mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-2403 added interpreter property types
This commit is contained in:
parent
2173b4013a
commit
45f5f6276d
49 changed files with 875 additions and 399 deletions
|
|
@ -8,13 +8,15 @@
|
|||
"envName": "ALLUXIO_MASTER_HOSTNAME",
|
||||
"propertyName": "alluxio.master.hostname",
|
||||
"defaultValue": "localhost",
|
||||
"description": "Alluxio master hostname"
|
||||
"description": "Alluxio master hostname",
|
||||
"type": "text"
|
||||
},
|
||||
"alluxio.master.port": {
|
||||
"envName": "ALLUXIO_MASTER_PORT",
|
||||
"propertyName": "alluxio.master.port",
|
||||
"defaultValue": "19998",
|
||||
"description": "Alluxio master port"
|
||||
"description": "Alluxio master port",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -19,13 +19,15 @@
|
|||
"envName": "ZEPPELIN_SCIO_ARGZ",
|
||||
"propertyName": "zeppelin.scio.argz",
|
||||
"defaultValue": "--runner=InProcessPipelineRunner",
|
||||
"description": "Scio interpreter wide arguments"
|
||||
"description": "Scio interpreter wide arguments",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.scio.maxResult": {
|
||||
"envName": "ZEPPELIN_SCIO_MAXRESULT",
|
||||
"propertyName": "zeppelin.scio.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of SCollection results to display."
|
||||
"description": "Max number of SCollection results to display.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,19 +8,22 @@
|
|||
"envName": null,
|
||||
"propertyName": "zeppelin.bigquery.project_id",
|
||||
"defaultValue": " ",
|
||||
"description": "Google Project ID"
|
||||
"description": "Google Project ID",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.bigquery.wait_time": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.bigquery.wait_time",
|
||||
"defaultValue": "5000",
|
||||
"description": "Query timeout in Milliseconds"
|
||||
"description": "Query timeout in Milliseconds",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.bigquery.max_no_of_rows": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.bigquery.max_no_of_rows",
|
||||
"defaultValue": "100000",
|
||||
"description": "Maximum number of rows to fetch from BigQuery"
|
||||
"description": "Maximum number of rows to fetch from BigQuery",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,187 +8,218 @@
|
|||
"envName": null,
|
||||
"propertyName": "cassandra.hosts",
|
||||
"defaultValue": "localhost",
|
||||
"description": "Comma separated Cassandra hosts (DNS name or IP address). Default = localhost. Ex: '192.168.0.12,node2,node3'"
|
||||
"description": "Comma separated Cassandra hosts (DNS name or IP address). Default = localhost. Ex: '192.168.0.12,node2,node3'",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.native.port": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.native.port",
|
||||
"defaultValue": "9042",
|
||||
"description": "Cassandra native port. Default = 9042"
|
||||
"description": "Cassandra native port. Default = 9042",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.protocol.version": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.protocol.version",
|
||||
"defaultValue": "4",
|
||||
"description": "Cassandra protocol version. Default = 4"
|
||||
"description": "Cassandra protocol version. Default = 4",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.cluster": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.cluster",
|
||||
"defaultValue": "Test Cluster",
|
||||
"description": "Cassandra cluster name. Default = 'Test Cluster'"
|
||||
"description": "Cassandra cluster name. Default = 'Test Cluster'",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.keyspace": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.keyspace",
|
||||
"defaultValue": "system",
|
||||
"description": "Cassandra keyspace name. Default = 'system'"
|
||||
"description": "Cassandra keyspace name. Default = 'system'",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.compression.protocol": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.compression.protocol",
|
||||
"defaultValue": "NONE",
|
||||
"description": "Cassandra compression protocol. Available values: NONE, SNAPPY, LZ4. Default = NONE"
|
||||
"description": "Cassandra compression protocol. Available values: NONE, SNAPPY, LZ4. Default = NONE",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.credentials.username": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.credentials.username",
|
||||
"defaultValue": "none",
|
||||
"description": "Cassandra credentials username. Default = 'none'"
|
||||
"description": "Cassandra credentials username. Default = 'none'",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.credentials.password": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.credentials.password",
|
||||
"defaultValue": "none",
|
||||
"description": "Cassandra credentials password. Default = 'none'"
|
||||
"description": "Cassandra credentials password. Default = 'none'",
|
||||
"type": "password"
|
||||
},
|
||||
"cassandra.load.balancing.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.load.balancing.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Load Balancing Policy. Default = new TokenAwarePolicy(new DCAwareRoundRobinPolicy())"
|
||||
"description": "Cassandra Load Balancing Policy. Default = new TokenAwarePolicy(new DCAwareRoundRobinPolicy())",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.retry.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.retry.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Retry Policy. Default = DefaultRetryPolicy.INSTANCE"
|
||||
"description": "Cassandra Retry Policy. Default = DefaultRetryPolicy.INSTANCE",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.reconnection.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.reconnection.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Reconnection Policy. Default = new ExponentialReconnectionPolicy(1000, 10 * 60 * 1000)"
|
||||
"description": "Cassandra Reconnection Policy. Default = new ExponentialReconnectionPolicy(1000, 10 * 60 * 1000)",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.speculative.execution.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.speculative.execution.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Speculative Execution Policy. Default = NoSpeculativeExecutionPolicy.INSTANCE"
|
||||
"description": "Cassandra Speculative Execution Policy. Default = NoSpeculativeExecutionPolicy.INSTANCE",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.interpreter.parallelism": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.interpreter.parallelism",
|
||||
"defaultValue": "10",
|
||||
"description": "Cassandra interpreter parallelism.Default = 10"
|
||||
"description": "Cassandra interpreter parallelism.Default = 10",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.max.schema.agreement.wait.second": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.max.schema.agreement.wait.second",
|
||||
"defaultValue": "10",
|
||||
"description": "Cassandra max schema agreement wait in second.Default = ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS"
|
||||
"description": "Cassandra max schema agreement wait in second.Default = ProtocolOptions.DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.new.connection.threshold.local": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.new.connection.threshold.local",
|
||||
"defaultValue": "100",
|
||||
"description": "Cassandra new connection threshold local. Protocol V2 and below default = 100 Protocol V3 and above default = 800"
|
||||
"description": "Cassandra new connection threshold local. Protocol V2 and below default = 100 Protocol V3 and above default = 800",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.new.connection.threshold.remote": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.new.connection.threshold.remote",
|
||||
"defaultValue": "100",
|
||||
"description": "Cassandra new connection threshold remove. Protocol V2 and below default = 100 Protocol V3 and above default = 200"
|
||||
"description": "Cassandra new connection threshold remove. Protocol V2 and below default = 100 Protocol V3 and above default = 200",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.core.connection.per.host.local": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.core.connection.per.host.local",
|
||||
"defaultValue": "2",
|
||||
"description": "Cassandra core connection per host local. Protocol V2 and below default = 2 Protocol V3 and above default = 1"
|
||||
"description": "Cassandra core connection per host local. Protocol V2 and below default = 2 Protocol V3 and above default = 1",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.core.connection.per.host.remote": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.core.connection.per.host.remote",
|
||||
"defaultValue": "1",
|
||||
"description": "Cassandra core connection per host remove. Protocol V2 and below default = 1 Protocol V3 and above default = 1"
|
||||
"description": "Cassandra core connection per host remove. Protocol V2 and below default = 1 Protocol V3 and above default = 1",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.max.connection.per.host.local": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.max.connection.per.host.local",
|
||||
"defaultValue": "8",
|
||||
"description": "Cassandra max connection per host local. Protocol V2 and below default = 8 Protocol V3 and above default = 1"
|
||||
"description": "Cassandra max connection per host local. Protocol V2 and below default = 8 Protocol V3 and above default = 1",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.max.connection.per.host.remote": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.max.connection.per.host.remote",
|
||||
"defaultValue": "2",
|
||||
"description": "Cassandra max connection per host remote. Protocol V2 and below default = 2 Protocol V3 and above default = 1"
|
||||
"description": "Cassandra max connection per host remote. Protocol V2 and below default = 2 Protocol V3 and above default = 1",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.max.request.per.connection.local": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.max.request.per.connection.local",
|
||||
"defaultValue": "1024",
|
||||
"description": "Cassandra max request per connection local. Protocol V2 and below default = 128 Protocol V3 and above default = 1024"
|
||||
"description": "Cassandra max request per connection local. Protocol V2 and below default = 128 Protocol V3 and above default = 1024",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.max.request.per.connection.remote": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.max.request.per.connection.remote",
|
||||
"defaultValue": "256",
|
||||
"description": "Cassandra max request per connection remote. Protocol V2 and below default = 128 Protocol V3 and above default = 256"
|
||||
"description": "Cassandra max request per connection remote. Protocol V2 and below default = 128 Protocol V3 and above default = 256",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.idle.timeout.seconds": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.idle.timeout.seconds",
|
||||
"defaultValue": "120",
|
||||
"description": "Cassandra idle time out in seconds. Default = 120"
|
||||
"description": "Cassandra idle time out in seconds. Default = 120",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.pool.timeout.millisecs": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.pool.timeout.millisecs",
|
||||
"defaultValue": "5000",
|
||||
"description": "Cassandra pool time out in millisecs. Default = 5000"
|
||||
"description": "Cassandra pool time out in millisecs. Default = 5000",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.pooling.heartbeat.interval.seconds": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.heartbeat.interval.seconds",
|
||||
"defaultValue": "30",
|
||||
"description": "Cassandra pool heartbeat interval in secs. Default = 30"
|
||||
"description": "Cassandra pool heartbeat interval in secs. Default = 30",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.query.default.consistency": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.query.default.consistency",
|
||||
"defaultValue": "ONE",
|
||||
"description": "Cassandra query default consistency level. Default = ONE"
|
||||
"description": "Cassandra query default consistency level. Default = ONE",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.query.default.serial.consistency": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.query.default.serial.consistency",
|
||||
"defaultValue": "SERIAL",
|
||||
"description": "Cassandra query default serial consistency level. Default = SERIAL"
|
||||
"description": "Cassandra query default serial consistency level. Default = SERIAL",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.query.default.fetchSize": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.query.default.fetchSize",
|
||||
"defaultValue": "5000",
|
||||
"description": "Cassandra query default fetch size. Default = 5000"
|
||||
"description": "Cassandra query default fetch size. Default = 5000",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.socket.connection.timeout.millisecs": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.socket.connection.timeout.millisecs",
|
||||
"defaultValue": "5000",
|
||||
"description": "Cassandra socket default connection timeout in millisecs. Default = 5000"
|
||||
"description": "Cassandra socket default connection timeout in millisecs. Default = 5000",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.socket.read.timeout.millisecs": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.socket.read.timeout.millisecs",
|
||||
"defaultValue": "12000",
|
||||
"description": "Cassandra socket read timeout in millisecs. Default = 12000"
|
||||
"description": "Cassandra socket read timeout in millisecs. Default = 12000",
|
||||
"type": "text"
|
||||
},
|
||||
"cassandra.socket.tcp.no_delay": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.socket.tcp.no_delay",
|
||||
"defaultValue": "true",
|
||||
"description": "Cassandra socket TCP no delay. Default = true"
|
||||
"description": "Cassandra socket TCP no delay. Default = true",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -61,13 +61,15 @@ Here is an example of `interpreter-setting.json` on your own interpreter.
|
|||
"envName": null,
|
||||
"propertyName": "property.1.name",
|
||||
"defaultValue": "propertyDefaultValue",
|
||||
"description": "Property description"
|
||||
"description": "Property description",
|
||||
"type": "text"
|
||||
},
|
||||
"properties2": {
|
||||
"envName": PROPERTIES_2,
|
||||
"propertyName": null,
|
||||
"defaultValue": "property2DefaultValue",
|
||||
"description": "Property 2 description"
|
||||
"description": "Property 2 description",
|
||||
"type": "text"
|
||||
}, ...
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -60,4 +60,39 @@ So, copying `notebook` and `conf` directory should be enough.
|
|||
### Upgrading from Zeppelin 0.7 to 0.8
|
||||
|
||||
- From 0.8, we recommend to use `PYSPARK_PYTHON` and `PYSPARK_DRIVER_PYTHON` instead of `zeppelin.pyspark.python` as `zeppelin.pyspark.python` only effects driver. You can use `PYSPARK_PYTHON` and `PYSPARK_DRIVER_PYTHON` as using them in spark.
|
||||
- From 0.8, changed the format settings for interpreters (`interpreter.json`)
|
||||
|
||||
old format:
|
||||
```
|
||||
"interpreterSettings": {
|
||||
"2CD8TH1XV": {
|
||||
"id": "2CD8TH1XV",
|
||||
"name": "spark",
|
||||
"group": "spark",
|
||||
"properties": {
|
||||
"spark.executor.memory": "",
|
||||
"zeppelin.spark.concurrentSQL": "false",
|
||||
...
|
||||
}
|
||||
```
|
||||
new format:
|
||||
```
|
||||
"interpreterSettings": {
|
||||
"2CD8TH1XV": {
|
||||
"id": "2CD8TH1XV",
|
||||
"name": "spark",
|
||||
"group": "spark",
|
||||
"properties": {
|
||||
"spark.executor.memory": {
|
||||
"name": "spark.executor.memory",
|
||||
"value": "",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.concurrentSQL": {
|
||||
"name": "zeppelin.spark.concurrentSQL",
|
||||
"value": "false",
|
||||
"type": "text"
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -76,11 +76,13 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"properties": {
|
||||
"spark.executor.memory": {
|
||||
"defaultValue": "1g",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g"
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"type": "text
|
||||
},
|
||||
"spark.cores.max": {
|
||||
"defaultValue": "",
|
||||
"description": "Total number of cores to use. Empty value uses all available core."
|
||||
"description": "Total number of cores to use. Empty value uses all available core.",
|
||||
"type": "text"
|
||||
},
|
||||
},
|
||||
"path": "/zeppelin/interpreter/spark"
|
||||
|
|
@ -92,7 +94,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"properties": {
|
||||
"zeppelin.spark.maxResult": {
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"path": "/zeppelin/interpreter/spark"
|
||||
|
|
@ -153,8 +156,16 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"name": "spark",
|
||||
"group": "spark",
|
||||
"properties": {
|
||||
"spark.cores.max": "",
|
||||
"spark.executor.memory": "1g",
|
||||
"spark.cores.max": {
|
||||
name: "",
|
||||
value: "spark.cores.max",
|
||||
type: "text"
|
||||
},
|
||||
"spark.executor.memory": {
|
||||
"name": "",
|
||||
"value": "1g",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -215,7 +226,11 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"name": "Markdown setting name",
|
||||
"group": "md",
|
||||
"properties": {
|
||||
"propname": "propvalue"
|
||||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "propvalue",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -270,7 +285,10 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"name": "Markdown setting name",
|
||||
"group": "md",
|
||||
"properties": {
|
||||
"propname": "propvalue"
|
||||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "propvalue",
|
||||
"type": "text"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -302,7 +320,10 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"name": "Markdown setting name",
|
||||
"group": "md",
|
||||
"properties": {
|
||||
"propname": "propvalue"
|
||||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "propvalue",
|
||||
"type": "text"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -353,7 +374,10 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"name": "Markdown setting name",
|
||||
"group": "md",
|
||||
"properties": {
|
||||
"propname": "Otherpropvalue"
|
||||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "Otherpropvalue",
|
||||
"type": "text"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -385,7 +409,10 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"name": "Markdown setting name",
|
||||
"group": "md",
|
||||
"properties": {
|
||||
"propname": "Otherpropvalue"
|
||||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "Otherpropvalue",
|
||||
"type": "text"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -541,3 +568,36 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
### Get available types for property
|
||||
<table class="table-configuration">
|
||||
<col width="200">
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>This ```GET``` method returns available types for interpreter property.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>URL</td>
|
||||
<td>```http://[zeppelin-server]:[zeppelin-port]/api/interpreter/property/types```</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Success code</td>
|
||||
<td>200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fail code</td>
|
||||
<td> 500 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sample JSON response</td>
|
||||
<td>
|
||||
<pre>
|
||||
{
|
||||
"status": "OK",
|
||||
"body": ["text", "password"]
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,31 +8,36 @@
|
|||
"envName": "ELASTICSEARCH_HOST",
|
||||
"propertyName": "elasticsearch.host",
|
||||
"defaultValue": "localhost",
|
||||
"description": "The host for Elasticsearch"
|
||||
"description": "The host for Elasticsearch",
|
||||
"type": "text"
|
||||
},
|
||||
"elasticsearch.port": {
|
||||
"envName": "ELASTICSEARCH_PORT",
|
||||
"propertyName": "elasticsearch.port",
|
||||
"defaultValue": "9300",
|
||||
"description": "The port for Elasticsearch"
|
||||
"description": "The port for Elasticsearch",
|
||||
"type": "text"
|
||||
},
|
||||
"elasticsearch.client.type": {
|
||||
"envName": "ELASTICSEARCH_CLIENT_TYPE",
|
||||
"propertyName": "elasticsearch.client.type",
|
||||
"defaultValue": "transport",
|
||||
"description": "The type of client for Elasticsearch (transport or http)"
|
||||
"description": "The type of client for Elasticsearch (transport or http)",
|
||||
"type": "text"
|
||||
},
|
||||
"elasticsearch.cluster.name": {
|
||||
"envName": "ELASTICSEARCH_CLUSTER_NAME",
|
||||
"propertyName": "elasticsearch.cluster.name",
|
||||
"defaultValue": "elasticsearch",
|
||||
"description": "The cluster name for Elasticsearch"
|
||||
"description": "The cluster name for Elasticsearch",
|
||||
"type": "text"
|
||||
},
|
||||
"elasticsearch.result.size": {
|
||||
"envName": "ELASTICSEARCH_RESULT_SIZE",
|
||||
"propertyName": "elasticsearch.result.size",
|
||||
"defaultValue": "10",
|
||||
"description": "The size of the result set of a search query"
|
||||
"description": "The size of the result set of a search query",
|
||||
"type": "text"
|
||||
},
|
||||
"elasticsearch.basicauth.username": {
|
||||
"envName": "ELASTICSEARCH_BASIC_AUTH_USERNAME",
|
||||
|
|
@ -44,7 +49,8 @@
|
|||
"envName": "ELASTICSEARCH_BASIC_AUTH_PASSWORD",
|
||||
"propertyName": "elasticsearch.basicauth.password",
|
||||
"defaultValue": "",
|
||||
"description": "Password for a basic authentication"
|
||||
"description": "Password for a basic authentication",
|
||||
"type": "password"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,19 +8,22 @@
|
|||
"envName": null,
|
||||
"propertyName": "hdfs.url",
|
||||
"defaultValue": "http://localhost:50070/webhdfs/v1/",
|
||||
"description": "The URL for WebHDFS"
|
||||
"description": "The URL for WebHDFS",
|
||||
"type": "text"
|
||||
},
|
||||
"hdfs.user": {
|
||||
"envName": null,
|
||||
"propertyName": "hdfs.user",
|
||||
"defaultValue": "hdfs",
|
||||
"description": "The WebHDFS user"
|
||||
"description": "The WebHDFS user",
|
||||
"type": "text"
|
||||
},
|
||||
"hdfs.maxlength": {
|
||||
"envName": null,
|
||||
"propertyName": "hdfs.maxlength",
|
||||
"defaultValue": "1000",
|
||||
"description": "Maximum number of lines of results fetched"
|
||||
"description": "Maximum number of lines of results fetched",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@
|
|||
"envName": "host",
|
||||
"propertyName": null,
|
||||
"defaultValue": "local",
|
||||
"description": "host name of running JobManager. 'local' runs flink in local mode."
|
||||
"description": "host name of running JobManager. 'local' runs flink in local mode.",
|
||||
"type": "text"
|
||||
},
|
||||
"port": {
|
||||
"envName": "port",
|
||||
"propertyName": null,
|
||||
"defaultValue": "6123",
|
||||
"description": "port of running JobManager."
|
||||
"description": "port of running JobManager.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,19 +8,22 @@
|
|||
"envName": null,
|
||||
"propertyName": "geode.locator.host",
|
||||
"defaultValue": "localhost",
|
||||
"description": "The Geode Locator Host."
|
||||
"description": "The Geode Locator Host.",
|
||||
"type": "text"
|
||||
},
|
||||
"geode.locator.port": {
|
||||
"envName": null,
|
||||
"propertyName": "geode.locator.port",
|
||||
"defaultValue": "10334",
|
||||
"description": "The Geode Locator Port."
|
||||
"description": "The Geode Locator Port.",
|
||||
"type": "text"
|
||||
},
|
||||
"geode.max.result": {
|
||||
"envName": null,
|
||||
"propertyName": "geode.max.result",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of OQL result to display."
|
||||
"description": "Max number of OQL result to display.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
"envName": null,
|
||||
"propertyName": "GROOVY_CLASSES",
|
||||
"defaultValue": "",
|
||||
"description": "The path for custom groovy classes location. If empty `./interpreter/groovy/classes`"
|
||||
"description": "The path for custom groovy classes location. If empty `./interpreter/groovy/classes`",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,17 +8,20 @@
|
|||
"envName": "HBASE_HOME",
|
||||
"propertyName": "hbase.home",
|
||||
"defaultValue": "/usr/lib/hbase/",
|
||||
"description": "Installation directory of HBase"
|
||||
"description": "Installation directory of HBase",
|
||||
"type": "text"
|
||||
},
|
||||
"hbase.ruby.sources": {
|
||||
"propertyName": "hbase.ruby.sources",
|
||||
"defaultValue": "lib/ruby",
|
||||
"description": "Path to Ruby scripts relative to 'hbase.home'"
|
||||
"description": "Path to Ruby scripts relative to 'hbase.home'",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.hbase.test.mode": {
|
||||
"propertyName": "zeppelin.hbase.test.mode",
|
||||
"defaultValue": "false",
|
||||
"description": "Disable checks for unit and manual tests"
|
||||
"description": "Disable checks for unit and manual tests",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
"envName": "PORT",
|
||||
"propertyName": "port",
|
||||
"defaultValue": "jdbc:postgresql://localhost:5432/",
|
||||
"description": "The URL for JDBC."
|
||||
"description": "The URL for JDBC.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,25 +8,29 @@
|
|||
"envName": null,
|
||||
"propertyName": "ignite.addresses",
|
||||
"defaultValue": "127.0.0.1:47500..47509",
|
||||
"description": "Comma separated list of addresses (e.g. 127.0.0.1:47500 or 127.0.0.1:47500..47509)"
|
||||
"description": "Comma separated list of addresses (e.g. 127.0.0.1:47500 or 127.0.0.1:47500..47509)",
|
||||
"type": "text"
|
||||
},
|
||||
"ignite.clientMode": {
|
||||
"envName": null,
|
||||
"propertyName": "ignite.clientMode",
|
||||
"defaultValue": "true",
|
||||
"description": "Client mode. true or false"
|
||||
"description": "Client mode. true or false",
|
||||
"type": "text"
|
||||
},
|
||||
"ignite.config.url": {
|
||||
"envName": null,
|
||||
"propertyName": "ignite.config.url",
|
||||
"defaultValue": "",
|
||||
"description": "Configuration URL. Overrides all other settings."
|
||||
"description": "Configuration URL. Overrides all other settings.",
|
||||
"type": "text"
|
||||
},
|
||||
"ignite.peerClassLoadingEnabled": {
|
||||
"envName": null,
|
||||
"propertyName": "ignite.peerClassLoadingEnabled",
|
||||
"defaultValue": "true",
|
||||
"description": "Peer class loading enabled. True or false"
|
||||
"description": "Peer class loading enabled. True or false",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -39,7 +43,8 @@
|
|||
"envName": null,
|
||||
"propertyName": "ignite.jdbc.url",
|
||||
"defaultValue": "jdbc:ignite:cfg://default-ignite-jdbc.xml",
|
||||
"description": "Ignite JDBC connection URL."
|
||||
"description": "Ignite JDBC connection URL.",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,67 +8,78 @@
|
|||
"envName": null,
|
||||
"propertyName": "default.url",
|
||||
"defaultValue": "jdbc:postgresql://localhost:5432/",
|
||||
"description": "The URL for JDBC."
|
||||
"description": "The URL for JDBC.",
|
||||
"type": "text"
|
||||
},
|
||||
"default.user": {
|
||||
"envName": null,
|
||||
"propertyName": "default.user",
|
||||
"defaultValue": "gpadmin",
|
||||
"description": "The JDBC user name"
|
||||
"description": "The JDBC user name",
|
||||
"type": "text"
|
||||
},
|
||||
"default.password": {
|
||||
"envName": null,
|
||||
"propertyName": "default.password",
|
||||
"defaultValue": "",
|
||||
"description": "The JDBC user password"
|
||||
"description": "The JDBC user password",
|
||||
"type": "password"
|
||||
},
|
||||
"default.driver": {
|
||||
"envName": null,
|
||||
"propertyName": "default.driver",
|
||||
"defaultValue": "org.postgresql.Driver",
|
||||
"description": "JDBC Driver Name"
|
||||
"description": "JDBC Driver Name",
|
||||
"type": "text"
|
||||
},
|
||||
"default.precode": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.precode",
|
||||
"defaultValue": "",
|
||||
"description": "SQL which executes while opening connection"
|
||||
"description": "SQL which executes while opening connection",
|
||||
"type": "text"
|
||||
},
|
||||
"common.max_count": {
|
||||
"envName": null,
|
||||
"propertyName": "common.max_count",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of SQL result to display."
|
||||
"description": "Max number of SQL result to display.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.jdbc.auth.type": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.auth.type",
|
||||
"defaultValue": "",
|
||||
"description": "If auth type is needed, Example: KERBEROS"
|
||||
"description": "If auth type is needed, Example: KERBEROS",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.jdbc.concurrent.use": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.concurrent.use",
|
||||
"defaultValue": "true",
|
||||
"description": "Use parallel scheduler"
|
||||
"description": "Use parallel scheduler",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.jdbc.concurrent.max_connection": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.concurrent.max_connection",
|
||||
"defaultValue": "10",
|
||||
"description": "Number of concurrent execution"
|
||||
"description": "Number of concurrent execution",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.jdbc.keytab.location": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.keytab.location",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos keytab location"
|
||||
"description": "Kerberos keytab location",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.jdbc.principal": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.principal",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos principal"
|
||||
"description": "Kerberos principal",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,43 +8,50 @@
|
|||
"envName": null,
|
||||
"propertyName": "kylin.api.url",
|
||||
"defaultValue": "http://localhost:7070/kylin/api/query",
|
||||
"description": "Kylin API"
|
||||
"description": "Kylin API",
|
||||
"type": "text"
|
||||
},
|
||||
"kylin.api.user": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.api.user",
|
||||
"defaultValue": "ADMIN",
|
||||
"description": "Kylin username"
|
||||
"description": "Kylin username",
|
||||
"type": "text"
|
||||
},
|
||||
"kylin.api.password": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.api.password",
|
||||
"defaultValue": "KYLIN",
|
||||
"description": "Kylin password"
|
||||
"description": "Kylin password",
|
||||
"type": "password"
|
||||
},
|
||||
"kylin.query.project": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.project",
|
||||
"defaultValue": "learn_kylin",
|
||||
"description": "Default Kylin project name"
|
||||
"description": "Default Kylin project name",
|
||||
"type": "text"
|
||||
},
|
||||
"kylin.query.offset": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.offset",
|
||||
"defaultValue": "0",
|
||||
"description": "Kylin query offset"
|
||||
"description": "Kylin query offset",
|
||||
"type": "text"
|
||||
},
|
||||
"kylin.query.limit": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.limit",
|
||||
"defaultValue": "5000",
|
||||
"description": "Kylin query limit"
|
||||
"description": "Kylin query limit",
|
||||
"type": "text"
|
||||
},
|
||||
"kylin.query.ispartial": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.ispartial",
|
||||
"defaultValue": "true",
|
||||
"description": "Kylin query partial flag, deprecated"
|
||||
"description": "Kylin query partial flag, deprecated",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,43 +8,50 @@
|
|||
"envName": null,
|
||||
"propertyName": "zeppelin.lens.run.concurrent",
|
||||
"defaultValue": "true",
|
||||
"description": "Run concurrent Lens Sessions"
|
||||
"description": "Run concurrent Lens Sessions",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.lens.maxThreads": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.lens.maxThreads",
|
||||
"defaultValue": "10",
|
||||
"description": "If concurrency is true then how many threads?"
|
||||
"description": "If concurrency is true then how many threads?",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.lens.maxResults": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.lens.maxResults",
|
||||
"defaultValue": "1000",
|
||||
"description": "max number of rows to display"
|
||||
"description": "max number of rows to display",
|
||||
"type": "text"
|
||||
},
|
||||
"lens.server.base.url": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.server.base.url",
|
||||
"defaultValue": "http://<hostname>:<port>/lensapi",
|
||||
"description": "The URL for Lens Server"
|
||||
"description": "The URL for Lens Server",
|
||||
"type": "text"
|
||||
},
|
||||
"lens.client.dbname": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.client.dbname",
|
||||
"defaultValue": "default",
|
||||
"description": "The database schema name"
|
||||
"description": "The database schema name",
|
||||
"type": "text"
|
||||
},
|
||||
"lens.query.enable.persistent.resultset": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.query.enable.persistent.resultset",
|
||||
"defaultValue": "false",
|
||||
"description": "Apache Lens to persist result in HDFS?"
|
||||
"description": "Apache Lens to persist result in HDFS?",
|
||||
"type": "text"
|
||||
},
|
||||
"lens.session.cluster.user": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.session.cluster.user",
|
||||
"defaultValue": "default",
|
||||
"description": "Hadoop cluster username"
|
||||
"description": "Hadoop cluster username",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,88 +9,105 @@
|
|||
"envName": "ZEPPELIN_LIVY_HOST_URL",
|
||||
"propertyName": "zeppelin.livy.url",
|
||||
"defaultValue": "http://localhost:8998",
|
||||
"description": "The URL for Livy Server."
|
||||
"description": "The URL for Livy Server.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.session.create_timeout": {
|
||||
"envName": "ZEPPELIN_LIVY_SESSION_CREATE_TIMEOUT",
|
||||
"propertyName": "zeppelin.livy.session.create_timeout",
|
||||
"defaultValue": "120",
|
||||
"description": "Livy Server create session timeout (seconds)."
|
||||
"description": "Livy Server create session timeout (seconds).",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.driver.cores": {
|
||||
"propertyName": "livy.spark.driver.cores",
|
||||
"defaultValue": "",
|
||||
"description": "Driver cores. ex) 1, 2"
|
||||
"description": "Driver cores. ex) 1, 2",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.driver.memory": {
|
||||
"propertyName": "livy.spark.driver.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Driver memory. ex) 512m, 32g"
|
||||
"description": "Driver memory. ex) 512m, 32g",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.executor.instances": {
|
||||
"propertyName": "livy.spark.executor.instances",
|
||||
"defaultValue": "",
|
||||
"description": "Executor instances. ex) 1, 4"
|
||||
"description": "Executor instances. ex) 1, 4",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.executor.cores": {
|
||||
"propertyName": "livy.spark.executor.cores",
|
||||
"defaultValue": "",
|
||||
"description": "Num cores per executor. ex) 1, 4"
|
||||
"description": "Num cores per executor. ex) 1, 4",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.executor.memory": {
|
||||
"propertyName": "livy.spark.executor.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g"
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.enabled": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.enabled",
|
||||
"defaultValue": "",
|
||||
"description": "Use dynamic resource allocation"
|
||||
"description": "Use dynamic resource allocation",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.cachedExecutorIdleTimeout": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.cachedExecutorIdleTimeout",
|
||||
"defaultValue": "",
|
||||
"description": "Remove an executor which has cached data blocks"
|
||||
"description": "Remove an executor which has cached data blocks",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.minExecutors": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.minExecutors",
|
||||
"defaultValue": "",
|
||||
"description": "Lower bound for the number of executors if dynamic allocation is enabled."
|
||||
"description": "Lower bound for the number of executors if dynamic allocation is enabled.",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.initialExecutors": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.initialExecutors",
|
||||
"defaultValue": "",
|
||||
"description": "Initial number of executors to run if dynamic allocation is enabled."
|
||||
"description": "Initial number of executors to run if dynamic allocation is enabled.",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.maxExecutors": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.maxExecutors",
|
||||
"defaultValue": "",
|
||||
"description": "Upper bound for the number of executors if dynamic allocation is enabled."
|
||||
"description": "Upper bound for the number of executors if dynamic allocation is enabled.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.principal": {
|
||||
"propertyName": "zeppelin.livy.principal",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos principal to authenticate livy"
|
||||
"description": "Kerberos principal to authenticate livy",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.keytab": {
|
||||
"propertyName": "zeppelin.livy.keytab",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos keytab to authenticate livy"
|
||||
"description": "Kerberos keytab to authenticate livy",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.pull_status.interval.millis": {
|
||||
"propertyName": "zeppelin.livy.pull_status.interval.millis",
|
||||
"defaultValue": "1000",
|
||||
"description": "The interval for checking paragraph execution status"
|
||||
"description": "The interval for checking paragraph execution status",
|
||||
"type": "text"
|
||||
},
|
||||
"livy.spark.jars.packages": {
|
||||
"propertyName": "livy.spark.jars.packages",
|
||||
"defaultValue": "",
|
||||
"description": "Adding extra libraries to livy interpreter"
|
||||
"description": "Adding extra libraries to livy interpreter",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.displayAppInfo": {
|
||||
"propertyName": "zeppelin.livy.displayAppInfo",
|
||||
"defaultValue": "false",
|
||||
"description": "Whether display app info"
|
||||
"description": "Whether display app info",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"option": {
|
||||
|
|
@ -116,17 +133,20 @@
|
|||
"envName": "ZEPPELIN_LIVY_MAXRESULT",
|
||||
"propertyName": "zeppelin.livy.spark.sql.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.spark.sql.field.truncate": {
|
||||
"propertyName": "zeppelin.livy.spark.sql.field.truncate",
|
||||
"defaultValue": "true",
|
||||
"description": "If true, truncate field values longer than 20 characters."
|
||||
"description": "If true, truncate field values longer than 20 characters.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.livy.concurrentSQL": {
|
||||
"propertyName": "zeppelin.livy.concurrentSQL",
|
||||
"defaultValue": "false",
|
||||
"description": "Execute multiple SQL concurrently if set true."
|
||||
"description": "Execute multiple SQL concurrently if set true.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"option": {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
"envName": "MARKDOWN_PARSER_TYPE",
|
||||
"propertyName": "markdown.parser.type",
|
||||
"defaultValue": "pegdown",
|
||||
"description": "Markdown Parser Type. Available values: pegdown, markdown4j. Default = pegdown"
|
||||
"description": "Markdown Parser Type. Available values: pegdown, markdown4j. Default = pegdown",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@
|
|||
"envName": null,
|
||||
"propertyName": "zeppelin.pig.execType",
|
||||
"defaultValue": "mapreduce",
|
||||
"description": "local | mapreduce | tez"
|
||||
"description": "local | mapreduce | tez",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.pig.includeJobStats": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.pig.includeJobStats",
|
||||
"defaultValue": "false",
|
||||
"description": "flag to include job stats in output"
|
||||
"description": "flag to include job stats in output",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -31,13 +33,15 @@
|
|||
"envName": null,
|
||||
"propertyName": "zeppelin.pig.execType",
|
||||
"defaultValue": "mapreduce",
|
||||
"description": "local | mapreduce | tez"
|
||||
"description": "local | mapreduce | tez",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.pig.maxResult": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.pig.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "max row number for %pig.query"
|
||||
"description": "max row number for %pig.query",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@
|
|||
"envName": null,
|
||||
"propertyName": "zeppelin.python",
|
||||
"defaultValue": "python",
|
||||
"description": "Python directory. It is set to python by default.(assume python is in your $PATH)"
|
||||
"description": "Python directory. It is set to python by default.(assume python is in your $PATH)",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.python.maxResult": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.python.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of dataframe rows to display."
|
||||
"description": "Max number of dataframe rows to display.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -6,19 +6,23 @@
|
|||
"properties": {
|
||||
"rhadoop.cmd": {
|
||||
"envName": "HADOOP_CMD",
|
||||
"defaultValue": ""
|
||||
"defaultValue": "",
|
||||
"type": "text"
|
||||
},
|
||||
"rhadooop.streamingjar": {
|
||||
"envName": "HADOOP_STREAMING",
|
||||
"defaultValue": ""
|
||||
"defaultValue": "",
|
||||
"type": "text"
|
||||
},
|
||||
"rscala.debug": {
|
||||
"envName": "RSCALA_DEBUG",
|
||||
"defaultValue": "false"
|
||||
"defaultValue": "false",
|
||||
"type": "text"
|
||||
},
|
||||
"rscala.timeout": {
|
||||
"envName": "RSCALA_TIMEOUT",
|
||||
"defaultValue": "60"
|
||||
"defaultValue": "60",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -29,19 +33,23 @@
|
|||
"properties": {
|
||||
"rhadoop.cmd": {
|
||||
"envName": "HADOOP_CMD",
|
||||
"defaultValue": ""
|
||||
"defaultValue": "",
|
||||
"type": "text"
|
||||
},
|
||||
"rhadooop.streamingjar": {
|
||||
"envName": "HADOOP_STREAMING",
|
||||
"defaultValue": ""
|
||||
"defaultValue": "",
|
||||
"type": "text"
|
||||
},
|
||||
"rscala.debug": {
|
||||
"envName": "RSCALA_DEBUG",
|
||||
"defaultValue": "false"
|
||||
"defaultValue": "false",
|
||||
"type": "text"
|
||||
},
|
||||
"rscala.timeout": {
|
||||
"envName": "RSCALA_TIMEOUT",
|
||||
"defaultValue": "60"
|
||||
"defaultValue": "60",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
"args.string": {
|
||||
"envName": null,
|
||||
"defaultValue": "--local --repl",
|
||||
"description": "Arguments for scalding REPL"
|
||||
"description": "Arguments for scalding REPL",
|
||||
"type": "text"
|
||||
},
|
||||
"max.open.instances": {
|
||||
"envName": null,
|
||||
"defaultValue": "50",
|
||||
"description": "Maximum number of open interpreter instances"
|
||||
"description": "Maximum number of open interpreter instances",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,25 +8,29 @@
|
|||
"envName": "SHELL_COMMAND_TIMEOUT",
|
||||
"propertyName": "shell.command.timeout.millisecs",
|
||||
"defaultValue": "60000",
|
||||
"description": "Shell command time out in millisecs. Default = 60000"
|
||||
"description": "Shell command time out in millisecs. Default = 60000",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.shell.auth.type": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.shell.auth.type",
|
||||
"defaultValue": "",
|
||||
"description": "If auth type is needed, Example: KERBEROS"
|
||||
"description": "If auth type is needed, Example: KERBEROS",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.shell.keytab.location": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.shell.keytab.location",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos keytab location"
|
||||
"description": "Kerberos keytab location",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.shell.principal": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.shell.principal",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos principal"
|
||||
"description": "Kerberos principal",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -26,18 +26,21 @@ import java.lang.reflect.InvocationTargetException;
|
|||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.hadoop.security.UserGroupInformation;
|
||||
import org.apache.spark.SecurityManager;
|
||||
import org.apache.spark.SparkConf;
|
||||
import org.apache.spark.SparkContext;
|
||||
import org.apache.spark.SparkEnv;
|
||||
|
||||
import org.apache.spark.SecurityManager;
|
||||
import org.apache.spark.api.java.JavaSparkContext;
|
||||
import org.apache.spark.repl.SparkILoop;
|
||||
import org.apache.spark.scheduler.ActiveJob;
|
||||
|
|
@ -47,20 +50,21 @@ import org.apache.spark.scheduler.SparkListenerJobStart;
|
|||
import org.apache.spark.sql.SQLContext;
|
||||
import org.apache.spark.ui.SparkUI;
|
||||
import org.apache.spark.ui.jobs.JobProgressListener;
|
||||
import org.apache.zeppelin.interpreter.DefaultInterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.Interpreter;
|
||||
import org.apache.zeppelin.interpreter.InterpreterContext;
|
||||
import org.apache.zeppelin.interpreter.InterpreterException;
|
||||
import org.apache.zeppelin.interpreter.InterpreterHookRegistry;
|
||||
import org.apache.zeppelin.interpreter.InterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.InterpreterPropertyType;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
|
||||
import org.apache.zeppelin.interpreter.InterpreterUtils;
|
||||
import org.apache.zeppelin.interpreter.WrappedInterpreter;
|
||||
import org.apache.zeppelin.interpreter.remote.RemoteEventClientWrapper;
|
||||
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
|
||||
import org.apache.zeppelin.interpreter.util.InterpreterOutputStream;
|
||||
import org.apache.zeppelin.resource.ResourcePool;
|
||||
import org.apache.zeppelin.resource.WellKnownResourceName;
|
||||
import org.apache.zeppelin.interpreter.remote.RemoteEventClientWrapper;
|
||||
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
|
||||
import org.apache.zeppelin.scheduler.Scheduler;
|
||||
import org.apache.zeppelin.scheduler.SchedulerFactory;
|
||||
import org.apache.zeppelin.spark.dep.SparkDependencyContext;
|
||||
|
|
@ -68,8 +72,13 @@ import org.apache.zeppelin.spark.dep.SparkDependencyResolver;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import scala.*;
|
||||
import com.google.common.base.Joiner;
|
||||
import scala.Console;
|
||||
import scala.Enumeration.Value;
|
||||
import scala.None;
|
||||
import scala.Option;
|
||||
import scala.Some;
|
||||
import scala.Tuple2;
|
||||
import scala.collection.Iterator;
|
||||
import scala.collection.JavaConversions;
|
||||
import scala.collection.JavaConverters;
|
||||
|
|
@ -517,11 +526,14 @@ public class SparkInterpreter extends Interpreter {
|
|||
}
|
||||
|
||||
private void setupConfForPySpark(SparkConf conf) {
|
||||
String pysparkBasePath = new InterpreterProperty("SPARK_HOME", null, null, null).getValue();
|
||||
String pysparkBasePath =
|
||||
new DefaultInterpreterProperty("SPARK_HOME", null, null, null, InterpreterPropertyType.text)
|
||||
.getValue();
|
||||
File pysparkPath;
|
||||
if (null == pysparkBasePath) {
|
||||
pysparkBasePath =
|
||||
new InterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../", null).getValue();
|
||||
new DefaultInterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../", null,
|
||||
InterpreterPropertyType.text).getValue();
|
||||
pysparkPath = new File(pysparkBasePath,
|
||||
"interpreter" + File.separator + "spark" + File.separator + "pyspark");
|
||||
} else {
|
||||
|
|
@ -566,11 +578,14 @@ public class SparkInterpreter extends Interpreter {
|
|||
}
|
||||
|
||||
private void setupConfForSparkR(SparkConf conf) {
|
||||
String sparkRBasePath = new InterpreterProperty("SPARK_HOME", null, null, null).getValue();
|
||||
String sparkRBasePath =
|
||||
new DefaultInterpreterProperty("SPARK_HOME", null, null, null,
|
||||
InterpreterPropertyType.text).getValue();
|
||||
File sparkRPath;
|
||||
if (null == sparkRBasePath) {
|
||||
sparkRBasePath =
|
||||
new InterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../", null).getValue();
|
||||
new DefaultInterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../", null,
|
||||
InterpreterPropertyType.text).getValue();
|
||||
sparkRPath = new File(sparkRBasePath,
|
||||
"interpreter" + File.separator + "spark" + File.separator + "R");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -9,56 +9,64 @@
|
|||
"envName": null,
|
||||
"propertyName": "spark.executor.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g"
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"type": "text"
|
||||
},
|
||||
"args": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "",
|
||||
"description": "spark commandline args"
|
||||
"description": "spark commandline args",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.useHiveContext": {
|
||||
"envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
|
||||
"propertyName": "zeppelin.spark.useHiveContext",
|
||||
"defaultValue": "true",
|
||||
"description": "Use HiveContext instead of SQLContext if it is true."
|
||||
"description": "Use HiveContext instead of SQLContext if it is true.",
|
||||
"type": "text"
|
||||
},
|
||||
"spark.app.name": {
|
||||
"envName": "SPARK_APP_NAME",
|
||||
|
||||
"propertyName": "spark.app.name",
|
||||
"defaultValue": "Zeppelin",
|
||||
"description": "The name of spark application."
|
||||
"description": "The name of spark application.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.printREPLOutput": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "true",
|
||||
"description": "Print REPL output"
|
||||
"description": "Print REPL output",
|
||||
"type": "text"
|
||||
},
|
||||
"spark.cores.max": {
|
||||
"envName": null,
|
||||
"propertyName": "spark.cores.max",
|
||||
"defaultValue": "",
|
||||
"description": "Total number of cores to use. Empty value uses all available core."
|
||||
"description": "Total number of cores to use. Empty value uses all available core.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"type": "text"
|
||||
},
|
||||
"master": {
|
||||
"envName": "MASTER",
|
||||
"propertyName": "spark.master",
|
||||
"defaultValue": "local[*]",
|
||||
"description": "Spark master uri. ex) spark://masterhost:7077"
|
||||
"description": "Spark master uri. ex) spark://masterhost:7077",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.unSupportedVersionCheck": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.spark.enableSupportedVersionCheck",
|
||||
"defaultValue": "true",
|
||||
"description": "Do not change - developer only setting, not for production use"
|
||||
"description": "Do not change - developer only setting, not for production use",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -75,25 +83,29 @@
|
|||
"envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
|
||||
"propertyName": "zeppelin.spark.concurrentSQL",
|
||||
"defaultValue": "false",
|
||||
"description": "Execute multiple SQL concurrently if set true."
|
||||
"description": "Execute multiple SQL concurrently if set true.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.sql.stacktrace": {
|
||||
"envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
|
||||
"propertyName": "zeppelin.spark.sql.stacktrace",
|
||||
"defaultValue": "false",
|
||||
"description": "Show full exception stacktrace for SQL queries if set to true."
|
||||
"description": "Show full exception stacktrace for SQL queries if set to true.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.importImplicit": {
|
||||
"envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
|
||||
"propertyName": "zeppelin.spark.importImplicit",
|
||||
"defaultValue": "true",
|
||||
"description": "Import implicits, UDF collection, and sql if set true. true by default."
|
||||
"description": "Import implicits, UDF collection, and sql if set true. true by default.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -110,13 +122,15 @@
|
|||
"envName": "ZEPPELIN_DEP_LOCALREPO",
|
||||
"propertyName": null,
|
||||
"defaultValue": "local-repo",
|
||||
"description": "local repository for dependency loader"
|
||||
"description": "local repository for dependency loader",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.dep.additionalRemoteRepository": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
|
||||
"description": "A list of 'id,remote-repository-URL,is-snapshot;' for each remote repository."
|
||||
"description": "A list of 'id,remote-repository-URL,is-snapshot;' for each remote repository.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -133,7 +147,8 @@
|
|||
"envName": "PYSPARK_PYTHON",
|
||||
"propertyName": null,
|
||||
"defaultValue": "python",
|
||||
"description": "Python command to run pyspark with"
|
||||
"description": "Python command to run pyspark with",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,56 +9,64 @@
|
|||
"envName": null,
|
||||
"propertyName": "spark.executor.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g"
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"type": "text"
|
||||
},
|
||||
"args": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "",
|
||||
"description": "spark commandline args"
|
||||
"description": "spark commandline args",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.useHiveContext": {
|
||||
"envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
|
||||
"propertyName": "zeppelin.spark.useHiveContext",
|
||||
"defaultValue": "true",
|
||||
"description": "Use HiveContext instead of SQLContext if it is true."
|
||||
"description": "Use HiveContext instead of SQLContext if it is true.",
|
||||
"type": "text"
|
||||
},
|
||||
"spark.app.name": {
|
||||
"envName": "SPARK_APP_NAME",
|
||||
|
||||
"propertyName": "spark.app.name",
|
||||
"defaultValue": "Zeppelin",
|
||||
"description": "The name of spark application."
|
||||
"description": "The name of spark application.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.printREPLOutput": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "true",
|
||||
"description": "Print REPL output"
|
||||
"description": "Print REPL output",
|
||||
"type": "text"
|
||||
},
|
||||
"spark.cores.max": {
|
||||
"envName": null,
|
||||
"propertyName": "spark.cores.max",
|
||||
"defaultValue": "",
|
||||
"description": "Total number of cores to use. Empty value uses all available core."
|
||||
"description": "Total number of cores to use. Empty value uses all available core.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"type": "text"
|
||||
},
|
||||
"master": {
|
||||
"envName": "MASTER",
|
||||
"propertyName": "spark.master",
|
||||
"defaultValue": "local[*]",
|
||||
"description": "Spark master uri. ex) spark://masterhost:7077"
|
||||
"description": "Spark master uri. ex) spark://masterhost:7077",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.unSupportedVersionCheck": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.spark.enableSupportedVersionCheck",
|
||||
"defaultValue": "true",
|
||||
"description": "Do not change - developer only setting, not for production use"
|
||||
"description": "Do not change - developer only setting, not for production use",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -74,25 +82,29 @@
|
|||
"envName": "ZEPPELIN_SPARK_CONCURRENTSQL",
|
||||
"propertyName": "zeppelin.spark.concurrentSQL",
|
||||
"defaultValue": "false",
|
||||
"description": "Execute multiple SQL concurrently if set true."
|
||||
"description": "Execute multiple SQL concurrently if set true.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.sql.stacktrace": {
|
||||
"envName": "ZEPPELIN_SPARK_SQL_STACKTRACE",
|
||||
"propertyName": "zeppelin.spark.sql.stacktrace",
|
||||
"defaultValue": "false",
|
||||
"description": "Show full exception stacktrace for SQL queries if set to true."
|
||||
"description": "Show full exception stacktrace for SQL queries if set to true.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.spark.importImplicit": {
|
||||
"envName": "ZEPPELIN_SPARK_IMPORTIMPLICIT",
|
||||
"propertyName": "zeppelin.spark.importImplicit",
|
||||
"defaultValue": "true",
|
||||
"description": "Import implicits, UDF collection, and sql if set true. true by default."
|
||||
"description": "Import implicits, UDF collection, and sql if set true. true by default.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -108,13 +120,15 @@
|
|||
"envName": "ZEPPELIN_DEP_LOCALREPO",
|
||||
"propertyName": null,
|
||||
"defaultValue": "local-repo",
|
||||
"description": "local repository for dependency loader"
|
||||
"description": "local repository for dependency loader",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.dep.additionalRemoteRepository": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "spark-packages,http://dl.bintray.com/spark-packages/maven,false;",
|
||||
"description": "A list of 'id,remote-repository-URL,is-snapshot;' for each remote repository."
|
||||
"description": "A list of 'id,remote-repository-URL,is-snapshot;' for each remote repository.",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -130,7 +144,8 @@
|
|||
"envName": "PYSPARK_PYTHON",
|
||||
"propertyName": null,
|
||||
"defaultValue": "python",
|
||||
"description": "Python command to run pyspark with"
|
||||
"description": "Python command to run pyspark with",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -146,25 +161,29 @@
|
|||
"envName": "ZEPPELIN_R_KNITR",
|
||||
"propertyName": "zeppelin.R.knitr",
|
||||
"defaultValue": "true",
|
||||
"description": "whether use knitr or not"
|
||||
"description": "whether use knitr or not",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.R.cmd": {
|
||||
"envName": "ZEPPELIN_R_CMD",
|
||||
"propertyName": "zeppelin.R.cmd",
|
||||
"defaultValue": "R",
|
||||
"description": "R repl path"
|
||||
"description": "R repl path",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.R.image.width": {
|
||||
"envName": "ZEPPELIN_R_IMAGE_WIDTH",
|
||||
"propertyName": "zeppelin.R.image.width",
|
||||
"defaultValue": "100%",
|
||||
"description": ""
|
||||
"description": "",
|
||||
"type": "text"
|
||||
},
|
||||
"zeppelin.R.render.options": {
|
||||
"envName": "ZEPPELIN_R_RENDER_OPTIONS",
|
||||
"propertyName": "zeppelin.R.render.options",
|
||||
"defaultValue": "out.format = 'html', comment = NA, echo = FALSE, results = 'asis', message = F, warning = F",
|
||||
"description": ""
|
||||
"description": "",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.zeppelin.interpreter;
|
||||
|
||||
/**
|
||||
* Property for registered interpreter
|
||||
*/
|
||||
public class DefaultInterpreterProperty {
|
||||
String envName;
|
||||
String propertyName;
|
||||
String defaultValue;
|
||||
String description;
|
||||
InterpreterPropertyType type;
|
||||
|
||||
public DefaultInterpreterProperty(String envName, String propertyName, String defaultValue,
|
||||
String description, InterpreterPropertyType type) {
|
||||
this.envName = envName;
|
||||
this.propertyName = propertyName;
|
||||
this.defaultValue = defaultValue;
|
||||
this.description = description;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public DefaultInterpreterProperty(String defaultValue, String description,
|
||||
InterpreterPropertyType type) {
|
||||
this(null, null, defaultValue, description, type);
|
||||
}
|
||||
|
||||
public String getEnvName() {
|
||||
return envName;
|
||||
}
|
||||
|
||||
public void setEnvName(String envName) {
|
||||
this.envName = envName;
|
||||
}
|
||||
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
}
|
||||
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public void setDefaultValue(String defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public InterpreterPropertyType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(InterpreterPropertyType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.toString().hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == null) return false;
|
||||
return this.toString().equals(o.toString());
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
if (envName != null && !envName.isEmpty()) {
|
||||
String envValue = System.getenv().get(envName);
|
||||
if (envValue != null) {
|
||||
return envValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (propertyName != null && !propertyName.isEmpty()) {
|
||||
String propValue = System.getProperty(propertyName);
|
||||
if (propValue != null) {
|
||||
return propValue;
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("{envName=%s, propertyName=%s, defaultValue=%s, description=%20s, " +
|
||||
"type=%s}", envName, propertyName, defaultValue, description, type);
|
||||
}
|
||||
}
|
||||
|
|
@ -150,7 +150,8 @@ public abstract class Interpreter {
|
|||
RegisteredInterpreter registeredInterpreter = Interpreter.findRegisteredInterpreterByClassName(
|
||||
getClassName());
|
||||
if (null != registeredInterpreter) {
|
||||
Map<String, InterpreterProperty> defaultProperties = registeredInterpreter.getProperties();
|
||||
Map<String, DefaultInterpreterProperty> defaultProperties =
|
||||
registeredInterpreter.getProperties();
|
||||
for (String k : defaultProperties.keySet()) {
|
||||
if (!p.containsKey(k)) {
|
||||
String value = defaultProperties.get(k).getValue();
|
||||
|
|
@ -354,19 +355,19 @@ public abstract class Interpreter {
|
|||
private String name;
|
||||
private String className;
|
||||
private boolean defaultInterpreter;
|
||||
private Map<String, InterpreterProperty> properties;
|
||||
private Map<String, DefaultInterpreterProperty> properties;
|
||||
private Map<String, Object> editor;
|
||||
private String path;
|
||||
private InterpreterOption option;
|
||||
private InterpreterRunner runner;
|
||||
|
||||
public RegisteredInterpreter(String name, String group, String className,
|
||||
Map<String, InterpreterProperty> properties) {
|
||||
Map<String, DefaultInterpreterProperty> properties) {
|
||||
this(name, group, className, false, properties);
|
||||
}
|
||||
|
||||
public RegisteredInterpreter(String name, String group, String className,
|
||||
boolean defaultInterpreter, Map<String, InterpreterProperty> properties) {
|
||||
boolean defaultInterpreter, Map<String, DefaultInterpreterProperty> properties) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.group = group;
|
||||
|
|
@ -396,7 +397,7 @@ public abstract class Interpreter {
|
|||
this.defaultInterpreter = defaultInterpreter;
|
||||
}
|
||||
|
||||
public Map<String, InterpreterProperty> getProperties() {
|
||||
public Map<String, DefaultInterpreterProperty> getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
@ -437,13 +438,13 @@ public abstract class Interpreter {
|
|||
|
||||
@Deprecated
|
||||
public static void register(String name, String group, String className,
|
||||
Map<String, InterpreterProperty> properties) {
|
||||
Map<String, DefaultInterpreterProperty> properties) {
|
||||
register(name, group, className, false, properties);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void register(String name, String group, String className,
|
||||
boolean defaultInterpreter, Map<String, InterpreterProperty> properties) {
|
||||
boolean defaultInterpreter, Map<String, DefaultInterpreterProperty> properties) {
|
||||
logger.warn("Static initialization is deprecated for interpreter {}, You should change it " +
|
||||
"to use interpreter-setting.json in your jar or " +
|
||||
"interpreter/{interpreter}/interpreter-setting.json", name);
|
||||
|
|
|
|||
|
|
@ -18,87 +18,40 @@
|
|||
package org.apache.zeppelin.interpreter;
|
||||
|
||||
/**
|
||||
* Represent property of interpreter
|
||||
* Property for instance of interpreter
|
||||
*/
|
||||
public class InterpreterProperty {
|
||||
String envName;
|
||||
String propertyName;
|
||||
String defaultValue;
|
||||
String description;
|
||||
private String name;
|
||||
private String value;
|
||||
private InterpreterPropertyType type;
|
||||
|
||||
public InterpreterProperty(String envName, String propertyName, String defaultValue,
|
||||
String description) {
|
||||
this.envName = envName;
|
||||
this.propertyName = propertyName;
|
||||
this.defaultValue = defaultValue;
|
||||
this.description = description;
|
||||
public InterpreterProperty(String name, String value, InterpreterPropertyType type) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public InterpreterProperty(String defaultValue, String description) {
|
||||
this(null, null, defaultValue, description);
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getEnvName() {
|
||||
return envName;
|
||||
}
|
||||
|
||||
public void setEnvName(String envName) {
|
||||
this.envName = envName;
|
||||
}
|
||||
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
}
|
||||
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public void setDefaultValue(String defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.toString().hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == null) return false;
|
||||
return this.toString().equals(o.toString());
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
if (envName != null && !envName.isEmpty()) {
|
||||
String envValue = System.getenv().get(envName);
|
||||
if (envValue != null) {
|
||||
return envValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (propertyName != null && !propertyName.isEmpty()) {
|
||||
String propValue = System.getProperty(propertyName);
|
||||
if (propValue != null) {
|
||||
return propValue;
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("{envName=%s, propertyName=%s, defaultValue=%s, description=%20s}",
|
||||
envName, propertyName, defaultValue, description);
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public InterpreterPropertyType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(InterpreterPropertyType type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,21 +24,23 @@ import java.util.Map;
|
|||
* InterpreterPropertyBuilder
|
||||
*/
|
||||
public class InterpreterPropertyBuilder {
|
||||
Map<String, InterpreterProperty> properties = new HashMap<>();
|
||||
Map<String, DefaultInterpreterProperty> properties = new HashMap<>();
|
||||
|
||||
public InterpreterPropertyBuilder add(String name, String defaultValue, String description){
|
||||
properties.put(name, new InterpreterProperty(defaultValue, description));
|
||||
properties.put(name,
|
||||
new DefaultInterpreterProperty(defaultValue, description, InterpreterPropertyType.text));
|
||||
return this;
|
||||
}
|
||||
|
||||
public InterpreterPropertyBuilder add(String name, String envName, String propertyName,
|
||||
String defaultValue, String description){
|
||||
properties.put(name,
|
||||
new InterpreterProperty(envName, propertyName, defaultValue, description));
|
||||
new DefaultInterpreterProperty(envName, propertyName, defaultValue, description,
|
||||
InterpreterPropertyType.text));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, InterpreterProperty> build(){
|
||||
public Map<String, DefaultInterpreterProperty> build(){
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.zeppelin.interpreter;
|
||||
|
||||
/**
|
||||
* Types of interpreter properties
|
||||
*/
|
||||
public enum InterpreterPropertyType {
|
||||
text,
|
||||
password
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@ import javax.ws.rs.core.Response.Status;
|
|||
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.apache.zeppelin.interpreter.InterpreterPropertyType;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSettingManager;
|
||||
import org.apache.zeppelin.rest.message.RestartInterpreterRequest;
|
||||
import org.apache.zeppelin.utils.SecurityUtils;
|
||||
|
|
@ -47,7 +48,6 @@ import org.sonatype.aether.repository.RemoteRepository;
|
|||
import org.apache.zeppelin.annotation.ZeppelinApi;
|
||||
import org.apache.zeppelin.dep.Repository;
|
||||
import org.apache.zeppelin.interpreter.InterpreterException;
|
||||
import org.apache.zeppelin.interpreter.InterpreterFactory;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSetting;
|
||||
import org.apache.zeppelin.rest.message.NewInterpreterSettingRequest;
|
||||
import org.apache.zeppelin.rest.message.UpdateInterpreterSettingRequest;
|
||||
|
|
@ -122,11 +122,10 @@ public class InterpreterRestApi {
|
|||
if (request == null) {
|
||||
return new JsonResponse<>(Status.BAD_REQUEST).build();
|
||||
}
|
||||
Properties p = new Properties();
|
||||
p.putAll(request.getProperties());
|
||||
|
||||
InterpreterSetting interpreterSetting = interpreterSettingManager
|
||||
.createNewSetting(request.getName(), request.getGroup(), request.getDependencies(),
|
||||
request.getOption(), p);
|
||||
request.getOption(), request.getProperties());
|
||||
logger.info("new setting created with {}", interpreterSetting.getId());
|
||||
return new JsonResponse<>(Status.OK, "", interpreterSetting).build();
|
||||
} catch (InterpreterException | IOException e) {
|
||||
|
|
@ -295,4 +294,13 @@ public class InterpreterRestApi {
|
|||
}
|
||||
return new JsonResponse(Status.OK).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get available types for property
|
||||
*/
|
||||
@GET
|
||||
@Path("property/types")
|
||||
public Response listInterpreterPropertyTypes() {
|
||||
return new JsonResponse<>(Status.OK, InterpreterPropertyType.values()).build();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import java.util.Map;
|
|||
|
||||
import org.apache.zeppelin.dep.Dependency;
|
||||
import org.apache.zeppelin.interpreter.InterpreterOption;
|
||||
import org.apache.zeppelin.interpreter.InterpreterProperty;
|
||||
|
||||
/**
|
||||
* NewInterpreterSetting rest api request message
|
||||
|
|
@ -30,7 +31,7 @@ public class NewInterpreterSettingRequest {
|
|||
private String name;
|
||||
private String group;
|
||||
|
||||
private Map<String, String> properties;
|
||||
private Map<String, InterpreterProperty> properties;
|
||||
private List<Dependency> dependencies;
|
||||
private InterpreterOption option;
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ public class NewInterpreterSettingRequest {
|
|||
return group;
|
||||
}
|
||||
|
||||
public Map<String, String> getProperties() {
|
||||
public Map<String, InterpreterProperty> getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,27 +18,28 @@
|
|||
package org.apache.zeppelin.rest.message;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.zeppelin.dep.Dependency;
|
||||
import org.apache.zeppelin.interpreter.InterpreterOption;
|
||||
import org.apache.zeppelin.interpreter.InterpreterProperty;
|
||||
|
||||
/**
|
||||
* UpdateInterpreterSetting rest api request message
|
||||
*/
|
||||
public class UpdateInterpreterSettingRequest {
|
||||
Properties properties;
|
||||
Map<String, InterpreterProperty> properties;
|
||||
List<Dependency> dependencies;
|
||||
InterpreterOption option;
|
||||
|
||||
public UpdateInterpreterSettingRequest(Properties properties,
|
||||
public UpdateInterpreterSettingRequest(Map<String, InterpreterProperty> properties,
|
||||
List<Dependency> dependencies, InterpreterOption option) {
|
||||
this.properties = properties;
|
||||
this.dependencies = dependencies;
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
public Properties getProperties() {
|
||||
public Map<String, InterpreterProperty> getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class InterpreterIT extends AbstractZeppelinIT {
|
|||
select.selectByVisibleText("spark");
|
||||
|
||||
collector.checkThat("description of interpreter property is displayed",
|
||||
driver.findElement(By.xpath("//tr/td[contains(text(), 'spark.app.name')]/following-sibling::td[2]")).getText(),
|
||||
driver.findElement(By.xpath("//tr/td[contains(text(), 'spark.app.name')]/following-sibling::td[3]")).getText(),
|
||||
CoreMatchers.equalTo("The name of spark application."));
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.lang.ref.WeakReference;
|
|||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.regex.Pattern;
|
||||
|
|
@ -44,6 +44,8 @@ import org.apache.commons.httpclient.methods.RequestEntity;
|
|||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.zeppelin.conf.ZeppelinConfiguration;
|
||||
import org.apache.zeppelin.interpreter.InterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.InterpreterPropertyType;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSetting;
|
||||
import org.apache.zeppelin.server.ZeppelinServer;
|
||||
import org.hamcrest.Description;
|
||||
|
|
@ -196,16 +198,21 @@ public abstract class AbstractTestRestApi {
|
|||
}
|
||||
}
|
||||
|
||||
Properties sparkProperties = (Properties) sparkIntpSetting.getProperties();
|
||||
Map<String, InterpreterProperty> sparkProperties =
|
||||
(Map<String, InterpreterProperty>) sparkIntpSetting.getProperties();
|
||||
// ci environment runs spark cluster for testing
|
||||
// so configure zeppelin use spark cluster
|
||||
if ("true".equals(System.getenv("CI"))) {
|
||||
// set spark master and other properties
|
||||
sparkProperties.setProperty("master", "local[2]");
|
||||
sparkProperties.setProperty("spark.cores.max", "2");
|
||||
sparkProperties.setProperty("zeppelin.spark.useHiveContext", "false");
|
||||
sparkProperties.put("master",
|
||||
new InterpreterProperty("master", "local[2]", InterpreterPropertyType.text));
|
||||
sparkProperties.put("spark.cores.max",
|
||||
new InterpreterProperty("spark.cores.max", "2", InterpreterPropertyType.text));
|
||||
sparkProperties.put("zeppelin.spark.useHiveContext",
|
||||
new InterpreterProperty("zeppelin.spark.useHiveContext", "false", InterpreterPropertyType.text));
|
||||
// set spark home for pyspark
|
||||
sparkProperties.setProperty("spark.home", getSparkHome());
|
||||
sparkProperties.put("spark.home",
|
||||
new InterpreterProperty("spark.home", getSparkHome(), InterpreterPropertyType.text));
|
||||
|
||||
sparkIntpSetting.setProperties(sparkProperties);
|
||||
pySpark = true;
|
||||
|
|
@ -215,14 +222,19 @@ public abstract class AbstractTestRestApi {
|
|||
String sparkHome = getSparkHome();
|
||||
if (sparkHome != null) {
|
||||
if (System.getenv("SPARK_MASTER") != null) {
|
||||
sparkProperties.setProperty("master", System.getenv("SPARK_MASTER"));
|
||||
sparkProperties.put("master",
|
||||
new InterpreterProperty("master", System.getenv("SPARK_MASTER"), InterpreterPropertyType.text));
|
||||
} else {
|
||||
sparkProperties.setProperty("master", "local[2]");
|
||||
sparkProperties.put("master",
|
||||
new InterpreterProperty("master", "local[2]", InterpreterPropertyType.text));
|
||||
}
|
||||
sparkProperties.setProperty("spark.cores.max", "2");
|
||||
sparkProperties.put("spark.cores.max",
|
||||
new InterpreterProperty("spark.cores.max", "2", InterpreterPropertyType.text));
|
||||
// set spark home for pyspark
|
||||
sparkProperties.setProperty("spark.home", sparkHome);
|
||||
sparkProperties.setProperty("zeppelin.spark.useHiveContext", "false");
|
||||
sparkProperties.put("spark.home",
|
||||
new InterpreterProperty("spark.home", sparkHome, InterpreterPropertyType.text));
|
||||
sparkProperties.put("zeppelin.spark.useHiveContext",
|
||||
new InterpreterProperty("zeppelin.spark.useHiveContext", "false", InterpreterPropertyType.text));
|
||||
pySpark = true;
|
||||
sparkR = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,27 +272,45 @@ limitations under the License.
|
|||
<tr>
|
||||
<th>name</th>
|
||||
<th>value</th>
|
||||
<th style="width: 10%;">type</th>
|
||||
<th>description</th>
|
||||
<th>action</th>
|
||||
</tr>
|
||||
<tr ng-repeat="key in newInterpreterSetting.properties | sortByKey">
|
||||
<td>{{key}}</td>
|
||||
<td><textarea msd-elastic ng-model="newInterpreterSetting.properties[key].value"></textarea></td>
|
||||
<td>{{newInterpreterSetting.properties[key].description}}</td>
|
||||
<td>
|
||||
<td style="vertical-align: middle;" ng-switch on="newInterpreterSetting.properties[key].type">
|
||||
<textarea ng-switch-default msd-elastic ng-model="newInterpreterSetting.properties[key].value"></textarea>
|
||||
<input ng-switch-when="password" type="password" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<select ng-model="newInterpreterSetting.properties[key].type" ng-options="item for item in interpreterPropertyTypes">
|
||||
</select>
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
{{newInterpreterSetting.properties[key].description}}
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<button class="btn btn-default btn-sm fa fa-remove" ng-click="removeInterpreterProperty(key)">
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<td style="vertical-align: middle;">
|
||||
<input pu-elastic-input pu-elastic-input-minwidth="180px"
|
||||
ng-model="newInterpreterSetting.propertyKey" />
|
||||
</td>
|
||||
<td><textarea msd-elastic ng-model="newInterpreterSetting.propertyValue"></textarea></td>
|
||||
<td style="vertical-align: middle;" ng-switch on="newInterpreterSetting.propertyType">
|
||||
<textarea ng-switch-default msd-elastic ng-model="newInterpreterSetting.propertyValue"></textarea>
|
||||
<input ng-switch-when="password" type="password" msd-elastic ng-model="newInterpreterSetting.propertyValue" />
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<select ng-model="newInterpreterSetting.propertyType" ng-init="newInterpreterSetting.propertyType=interpreterPropertyTypes[0]"
|
||||
ng-options="item for item in interpreterPropertyTypes">
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<td style="vertical-align: middle;">
|
||||
<button class="btn btn-default btn-sm fa fa-plus" ng-click="addNewInterpreterProperty()">
|
||||
</button>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
$scope.showRepositoryInfo = false;
|
||||
$scope.searchInterpreter = '';
|
||||
$scope._ = _;
|
||||
$scope.interpreterPropertyTypes = [];
|
||||
ngToast.dismiss();
|
||||
|
||||
$scope.openPermissions = function() {
|
||||
|
|
@ -140,8 +141,17 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
});
|
||||
};
|
||||
|
||||
var getAvailableInterpreterPropertyTypes = function () {
|
||||
$http.get(baseUrlSrv.getRestApiBase() + '/interpreter/property/types')
|
||||
.success(function (data, status, headers, config) {
|
||||
$scope.interpreterPropertyTypes = data.body;
|
||||
}).error(function (data, status, headers, config) {
|
||||
console.log('Error %o %o', status, data.message);
|
||||
});
|
||||
};
|
||||
|
||||
var emptyNewProperty = function(object) {
|
||||
angular.extend(object, {propertyValue: '', propertyKey: ''});
|
||||
angular.extend(object, {propertyValue: '', propertyKey: '', propertyType: $scope.interpreterPropertyTypes[0]});
|
||||
};
|
||||
|
||||
var emptyNewDependency = function(object) {
|
||||
|
|
@ -408,7 +418,8 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
for (var key in intpInfo) {
|
||||
properties[key] = {
|
||||
value: intpInfo[key].defaultValue,
|
||||
description: intpInfo[key].description
|
||||
description: intpInfo[key].description,
|
||||
type: intpInfo[key].type
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -483,9 +494,11 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
|
||||
// Change properties to proper request format
|
||||
var newProperties = {};
|
||||
|
||||
for (var p in newSetting.properties) {
|
||||
newProperties[p] = newSetting.properties[p].value;
|
||||
newProperties[p] = {value: newSetting.properties[p].value, type: newSetting.properties[p].type, name: p};
|
||||
}
|
||||
|
||||
request.properties = newProperties;
|
||||
|
||||
$http.post(baseUrlSrv.getRestApiBase() + '/interpreter/setting', request)
|
||||
|
|
@ -555,7 +568,8 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
}
|
||||
|
||||
$scope.newInterpreterSetting.properties[$scope.newInterpreterSetting.propertyKey] = {
|
||||
value: $scope.newInterpreterSetting.propertyValue
|
||||
value: $scope.newInterpreterSetting.propertyValue,
|
||||
type: $scope.newInterpreterSetting.propertyType
|
||||
};
|
||||
emptyNewProperty($scope.newInterpreterSetting);
|
||||
} else {
|
||||
|
|
@ -566,7 +580,9 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
if (!setting.propertyKey || setting.propertyKey === '') {
|
||||
return;
|
||||
}
|
||||
setting.properties[setting.propertyKey] = setting.propertyValue;
|
||||
|
||||
setting.properties[setting.propertyKey] = {value: setting.propertyValue, type: setting.propertyType};
|
||||
|
||||
emptyNewProperty(setting);
|
||||
}
|
||||
};
|
||||
|
|
@ -694,6 +710,8 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
};
|
||||
|
||||
var init = function() {
|
||||
getAvailableInterpreterPropertyTypes();
|
||||
|
||||
$scope.resetNewInterpreterSetting();
|
||||
$scope.resetNewRepositorySetting();
|
||||
|
||||
|
|
|
|||
|
|
@ -395,15 +395,23 @@ limitations under the License.
|
|||
<tr>
|
||||
<th style="width:40%">name</th>
|
||||
<th style="width:40%">value</th>
|
||||
<th style="width:20%" ng-if="valueform.$visible">action</th>
|
||||
<th style="width:10%" ng-if="valueform.$visible">type</th>
|
||||
<th style="width:10%" ng-if="valueform.$visible">action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr ng-repeat="key in setting.properties | sortByKey" >
|
||||
<td style="vertical-align: middle;">{{key}}</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<span editable-textarea="setting.properties[key]" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key] | breakFilter}}
|
||||
<td style="vertical-align: middle;" ng-switch on="setting.properties[key].type">
|
||||
<span ng-switch-default editable-textarea="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value | breakFilter}}
|
||||
</span>
|
||||
<span ng-switch-when="password" editable-password="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value ? '***' : ''}}
|
||||
</span>
|
||||
</td>
|
||||
<td style="vertical-align: middle;" ng-if="valueform.$visible">
|
||||
<select ng-model="setting.properties[key].type" ng-options="item for item in interpreterPropertyTypes">
|
||||
</select>
|
||||
</td>
|
||||
<td style="vertical-align: middle;" ng-if="valueform.$visible">
|
||||
<button class="btn btn-default btn-sm fa fa-remove"
|
||||
|
|
@ -416,12 +424,19 @@ limitations under the License.
|
|||
<input ng-model="setting.propertyKey"
|
||||
pu-elastic-input pu-elastic-input-minwidth="180px" />
|
||||
</td>
|
||||
|
||||
<td style="vertical-align: middle;" ng-switch on="setting.propertyType">
|
||||
<textarea ng-switch-default msd-elastic ng-model="setting.propertyValue"></textarea>
|
||||
<input ng-switch-when="password" type="password" msd-elastic ng-model="setting.propertyValue" />
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<textarea msd-elastic ng-model="setting.propertyValue"></textarea>
|
||||
<select ng-model="setting.propertyType" ng-init="setting.propertyType=interpreterPropertyTypes[0]"
|
||||
ng-options="item for item in interpreterPropertyTypes">
|
||||
</select>
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<button class="btn btn-default btn-sm fa fa-plus"
|
||||
ng-click="addNewInterpreterProperty(setting.id)">
|
||||
ng-click="addNewInterpreterProperty(setting.id)">
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ public class InterpreterFactory implements InterpreterGroupFactory {
|
|||
String noteId, String interpreterSessionKey) {
|
||||
InterpreterGroup interpreterGroup = interpreterSetting.getInterpreterGroup(user, noteId);
|
||||
InterpreterOption option = interpreterSetting.getOption();
|
||||
Properties properties = (Properties) interpreterSetting.getProperties();
|
||||
Properties properties = interpreterSetting.getFlatProperties();
|
||||
// if interpreters are already there, wait until they're being removed
|
||||
synchronized (interpreterGroup) {
|
||||
long interpreterRemovalWaitStart = System.nanoTime();
|
||||
|
|
|
|||
|
|
@ -54,14 +54,14 @@ public class InterpreterSetting {
|
|||
private transient Map<String, Set<String>> runtimeInfosToBeCleared;
|
||||
|
||||
/**
|
||||
* properties can be either Properties or Map<String, InterpreterProperty>
|
||||
* properties can be either Map<String, DefaultInterpreterProperty> or
|
||||
* Map<String, InterpreterProperty>
|
||||
* properties should be:
|
||||
* - Properties when Interpreter instances are saved to `conf/interpreter.json` file
|
||||
* - Map<String, InterpreterProperty> when Interpreters are registered
|
||||
* - Map<String, InterpreterProperty> when Interpreter instances are saved to
|
||||
* `conf/interpreter.json` file
|
||||
* - Map<String, DefaultInterpreterProperty> when Interpreters are registered
|
||||
* : this is needed after https://github.com/apache/zeppelin/pull/1145
|
||||
* which changed the way of getting default interpreter setting AKA interpreterSettingsRef
|
||||
* Note(mina): In order to simplify the implementation, I chose to change properties
|
||||
* from Properties to Object instead of creating new classes.
|
||||
*/
|
||||
private Object properties;
|
||||
private Status status;
|
||||
|
|
@ -274,6 +274,18 @@ public class InterpreterSetting {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public Properties getFlatProperties() {
|
||||
Properties p = new Properties();
|
||||
if (properties != null) {
|
||||
Map<String, InterpreterProperty> propertyMap = (Map<String, InterpreterProperty>) properties;
|
||||
for (String key : propertyMap.keySet()) {
|
||||
InterpreterProperty tmp = propertyMap.get(key);
|
||||
p.put(tmp.getName() != null ? tmp.getName() : key, tmp.getValue());
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
public List<Dependency> getDependencies() {
|
||||
if (dependencies == null) {
|
||||
return new LinkedList<>();
|
||||
|
|
@ -325,7 +337,7 @@ public class InterpreterSetting {
|
|||
this.option = interpreterOption;
|
||||
}
|
||||
|
||||
public void setProperties(Properties p) {
|
||||
public void setProperties(Map<String, InterpreterProperty> p) {
|
||||
this.properties = p;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,16 +17,6 @@
|
|||
|
||||
package org.apache.zeppelin.interpreter;
|
||||
|
||||
import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
|
||||
import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.internal.StringMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
|
@ -45,7 +35,6 @@ import java.nio.file.DirectoryStream.Filter;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import java.nio.file.attribute.PosixFilePermission;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
@ -58,11 +47,12 @@ import java.util.Iterator;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.zeppelin.conf.ZeppelinConfiguration;
|
||||
import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
|
||||
import org.apache.zeppelin.dep.Dependency;
|
||||
import org.apache.zeppelin.dep.DependencyResolver;
|
||||
|
|
@ -71,13 +61,22 @@ import org.apache.zeppelin.scheduler.Job;
|
|||
import org.apache.zeppelin.scheduler.Job.Status;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.apache.zeppelin.conf.ZeppelinConfiguration;
|
||||
import org.sonatype.aether.RepositoryException;
|
||||
import org.sonatype.aether.repository.Authentication;
|
||||
import org.sonatype.aether.repository.Proxy;
|
||||
import org.sonatype.aether.repository.RemoteRepository;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.internal.StringMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
|
||||
import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
|
||||
|
||||
/**
|
||||
* TBD
|
||||
*/
|
||||
|
|
@ -169,13 +168,21 @@ public class InterpreterSettingManager {
|
|||
List<InterpreterInfo> infos = setting.getInterpreterInfos();
|
||||
|
||||
// Convert json StringMap to Properties
|
||||
StringMap<String> p = (StringMap<String>) setting.getProperties();
|
||||
Properties properties = new Properties();
|
||||
StringMap<StringMap> p = (StringMap<StringMap>) setting.getProperties();
|
||||
Map<String, InterpreterProperty> properties = new HashMap();
|
||||
for (String key : p.keySet()) {
|
||||
properties.put(key, p.get(key));
|
||||
StringMap<String> fields = (StringMap<String>) p.get(key);
|
||||
// default 'text'
|
||||
InterpreterPropertyType type = InterpreterPropertyType.text;
|
||||
try {
|
||||
type = InterpreterPropertyType.valueOf(fields.get("type"));
|
||||
} catch (Exception e) {
|
||||
logger.warn("Incorrect type of property {} in settings {}", key, setting.getId());
|
||||
}
|
||||
properties.put(key, new InterpreterProperty(key, fields.get("value"), type));
|
||||
}
|
||||
setting.setProperties(properties);
|
||||
|
||||
|
||||
// Always use separate interpreter process
|
||||
// While we decided to turn this feature on always (without providing
|
||||
// enable/disable option on GUI).
|
||||
|
|
@ -476,8 +483,8 @@ public class InterpreterSettingManager {
|
|||
new ArrayList<InterpreterInfo>() : new ArrayList<>(o.getInterpreterInfos());
|
||||
List<Dependency> deps = (null == o.getDependencies()) ?
|
||||
new ArrayList<Dependency>() : new ArrayList<>(o.getDependencies());
|
||||
Properties props =
|
||||
convertInterpreterProperties((Map<String, InterpreterProperty>) o.getProperties());
|
||||
Map<String, InterpreterProperty> props =
|
||||
convertInterpreterProperties((Map<String, DefaultInterpreterProperty>) o.getProperties());
|
||||
InterpreterOption option = InterpreterOption.fromInterpreterOption(o.getOption());
|
||||
|
||||
InterpreterSetting setting = new InterpreterSetting(o.getName(), o.getName(),
|
||||
|
|
@ -486,10 +493,14 @@ public class InterpreterSettingManager {
|
|||
return setting;
|
||||
}
|
||||
|
||||
private Properties convertInterpreterProperties(Map<String, InterpreterProperty> p) {
|
||||
Properties properties = new Properties();
|
||||
for (String key : p.keySet()) {
|
||||
properties.put(key, p.get(key).getValue());
|
||||
private Map<String, InterpreterProperty> convertInterpreterProperties(
|
||||
Map<String, DefaultInterpreterProperty> defaultProperties) {
|
||||
Map<String, InterpreterProperty> properties = new HashMap<>();
|
||||
|
||||
for (String key : defaultProperties.keySet()) {
|
||||
DefaultInterpreterProperty defaultInterpreterProperty = defaultProperties.get(key);
|
||||
properties.put(key, new InterpreterProperty(key, defaultInterpreterProperty.getValue(),
|
||||
defaultInterpreterProperty.getType()));
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
|
@ -675,7 +686,8 @@ public class InterpreterSettingManager {
|
|||
}
|
||||
|
||||
public InterpreterSetting createNewSetting(String name, String group,
|
||||
List<Dependency> dependencies, InterpreterOption option, Properties p) throws IOException {
|
||||
List<Dependency> dependencies, InterpreterOption option, Map<String, InterpreterProperty> p)
|
||||
throws IOException {
|
||||
if (name.indexOf(".") >= 0) {
|
||||
throw new IOException("'.' is invalid for InterpreterSetting name.");
|
||||
}
|
||||
|
|
@ -693,8 +705,8 @@ public class InterpreterSettingManager {
|
|||
}
|
||||
|
||||
private InterpreterSetting add(String group, InterpreterInfo interpreterInfo,
|
||||
Map<String, InterpreterProperty> interpreterProperties, InterpreterOption option, String path,
|
||||
InterpreterRunner runner)
|
||||
Map<String, DefaultInterpreterProperty> interpreterProperties, InterpreterOption option,
|
||||
String path, InterpreterRunner runner)
|
||||
throws InterpreterException, IOException, RepositoryException {
|
||||
ArrayList<InterpreterInfo> infos = new ArrayList<>();
|
||||
infos.add(interpreterInfo);
|
||||
|
|
@ -707,7 +719,7 @@ public class InterpreterSettingManager {
|
|||
*/
|
||||
public InterpreterSetting add(String group, ArrayList<InterpreterInfo> interpreterInfos,
|
||||
List<Dependency> dependencies, InterpreterOption option,
|
||||
Map<String, InterpreterProperty> interpreterProperties, String path,
|
||||
Map<String, DefaultInterpreterProperty> interpreterProperties, String path,
|
||||
InterpreterRunner runner) {
|
||||
Preconditions.checkNotNull(group, "name should not be null");
|
||||
Preconditions.checkNotNull(interpreterInfos, "interpreterInfos should not be null");
|
||||
|
|
@ -744,8 +756,8 @@ public class InterpreterSettingManager {
|
|||
}
|
||||
|
||||
// Append properties
|
||||
Map<String, InterpreterProperty> properties =
|
||||
(Map<String, InterpreterProperty>) interpreterSetting.getProperties();
|
||||
Map<String, DefaultInterpreterProperty> properties =
|
||||
(Map<String, DefaultInterpreterProperty>) interpreterSetting.getProperties();
|
||||
for (String key : interpreterProperties.keySet()) {
|
||||
if (!properties.containsKey(key)) {
|
||||
properties.put(key, interpreterProperties.get(key));
|
||||
|
|
@ -901,7 +913,8 @@ public class InterpreterSettingManager {
|
|||
/**
|
||||
* Change interpreter property and restart
|
||||
*/
|
||||
public void setPropertyAndRestart(String id, InterpreterOption option, Properties properties,
|
||||
public void setPropertyAndRestart(String id, InterpreterOption option,
|
||||
Map<String, InterpreterProperty> properties,
|
||||
List<Dependency> dependencies) throws IOException {
|
||||
synchronized (interpreterSettings) {
|
||||
InterpreterSetting intpSetting = interpreterSettings.get(id);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
|
@ -93,14 +92,14 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), new Properties());
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
ArrayList<InterpreterInfo> interpreterInfos2 = new ArrayList<>();
|
||||
interpreterInfos2.add(new InterpreterInfo(MockInterpreter2.class.getName(), "mock2", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock2", interpreterInfos2, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock2", null);
|
||||
interpreterSettingManager.createNewSetting("mock2", "mock2", new ArrayList<Dependency>(), new InterpreterOption(), new Properties());
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock2", null);
|
||||
interpreterSettingManager.createNewSetting("mock2", "mock2", new ArrayList<Dependency>(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
SearchService search = mock(SearchService.class);
|
||||
notebookRepo = new VFSNotebookRepo(conf);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.NullArgumentException;
|
||||
|
|
@ -101,17 +100,19 @@ public class InterpreterFactoryTest {
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
Properties intp1Properties = new Properties();
|
||||
intp1Properties.put("PROPERTY_1", "VALUE_1");
|
||||
intp1Properties.put("property_2", "value_2");
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyType.text));
|
||||
intp1Properties.put("property_2",
|
||||
new InterpreterProperty("property_2", "value_2", InterpreterPropertyType.text));
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), intp1Properties);
|
||||
|
||||
ArrayList<InterpreterInfo> interpreterInfos2 = new ArrayList<>();
|
||||
interpreterInfos2.add(new InterpreterInfo(MockInterpreter2.class.getName(), "mock2", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock2", interpreterInfos2, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock2", null);
|
||||
interpreterSettingManager.createNewSetting("mock2", "mock2", new ArrayList<Dependency>(), new InterpreterOption(), new Properties());
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock2", null);
|
||||
interpreterSettingManager.createNewSetting("mock2", "mock2", new ArrayList<Dependency>(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
SearchService search = mock(SearchService.class);
|
||||
notebookRepo = new VFSNotebookRepo(conf);
|
||||
|
|
@ -158,10 +159,12 @@ public class InterpreterFactoryTest {
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
Properties intp1Properties = new Properties();
|
||||
intp1Properties.put("PROPERTY_1", "VALUE_1");
|
||||
intp1Properties.put("property_2", "value_2");
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyType.text));
|
||||
intp1Properties.put("property_2", new InterpreterProperty("property_2", "value_2",
|
||||
InterpreterPropertyType.text));
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), intp1Properties);
|
||||
factory = new InterpreterFactory(conf, null, null, null, depResolver, false, interpreterSettingManager);
|
||||
List<InterpreterSetting> all = interpreterSettingManager.get();
|
||||
|
|
@ -195,10 +198,12 @@ public class InterpreterFactoryTest {
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
Properties intp1Properties = new Properties();
|
||||
intp1Properties.put("PROPERTY_1", "VALUE_1");
|
||||
intp1Properties.put("property_2", "value_2");
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyType.text));
|
||||
intp1Properties.put("property_2",
|
||||
new InterpreterProperty("property_2", "value_2", InterpreterPropertyType.text));
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), intp1Properties);
|
||||
factory = new InterpreterFactory(conf, null, null, null, depResolver, false, interpreterSettingManager);
|
||||
List<InterpreterSetting> all = interpreterSettingManager.get();
|
||||
|
|
@ -240,10 +245,12 @@ public class InterpreterFactoryTest {
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
Properties intp1Properties = new Properties();
|
||||
intp1Properties.put("PROPERTY_1", "VALUE_1");
|
||||
intp1Properties.put("property_2", "value_2");
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyType.text));
|
||||
intp1Properties.put("property_2",
|
||||
new InterpreterProperty("property_2", "value_2", InterpreterPropertyType.text));
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), intp1Properties);
|
||||
factory = new InterpreterFactory(conf, null, null, null, depResolver, false, interpreterSettingManager);
|
||||
List<InterpreterSetting> all = interpreterSettingManager.get();
|
||||
|
|
@ -307,7 +314,7 @@ public class InterpreterFactoryTest {
|
|||
// check if file saved
|
||||
assertTrue(new File(conf.getInterpreterSettingPath()).exists());
|
||||
|
||||
interpreterSettingManager.createNewSetting("new-mock1", "mock1", new LinkedList<Dependency>(), new InterpreterOption(false), new Properties());
|
||||
interpreterSettingManager.createNewSetting("new-mock1", "mock1", new LinkedList<Dependency>(), new InterpreterOption(false), new HashMap<String, InterpreterProperty>());
|
||||
assertEquals(numInterpreters + 1, interpreterSettingManager.get().size());
|
||||
|
||||
interpreterSettingManager = new InterpreterSettingManager(conf, depResolver, new InterpreterOption(true));
|
||||
|
|
@ -326,14 +333,14 @@ public class InterpreterFactoryTest {
|
|||
// check if default interpreter reference's property type is map
|
||||
Map<String, InterpreterSetting> interpreterSettingRefs = interpreterSettingManager.getAvailableInterpreterSettings();
|
||||
InterpreterSetting intpSetting = interpreterSettingRefs.get("mock1");
|
||||
Map<String, InterpreterProperty> intpProperties =
|
||||
(Map<String, InterpreterProperty>) intpSetting.getProperties();
|
||||
Map<String, DefaultInterpreterProperty> intpProperties =
|
||||
(Map<String, DefaultInterpreterProperty>) intpSetting.getProperties();
|
||||
assertTrue(intpProperties instanceof Map);
|
||||
|
||||
// check if interpreter instance is saved as Properties in conf/interpreter.json file
|
||||
Properties properties = new Properties();
|
||||
properties.put("key1", "value1");
|
||||
properties.put("key2", "value2");
|
||||
Map<String, InterpreterProperty> properties = new HashMap<String, InterpreterProperty>();
|
||||
properties.put("key1", new InterpreterProperty("key1", "value1", InterpreterPropertyType.text));
|
||||
properties.put("key2", new InterpreterProperty("key2", "value2", InterpreterPropertyType.text));
|
||||
|
||||
interpreterSettingManager.createNewSetting("newMock", "mock1", new LinkedList<Dependency>(), new InterpreterOption(false), properties);
|
||||
|
||||
|
|
@ -365,8 +372,8 @@ public class InterpreterFactoryTest {
|
|||
add(info2);
|
||||
}}, new ArrayList<Dependency>(), new InterpreterOption(true), Collections.EMPTY_MAP, "/path2", null);
|
||||
|
||||
final InterpreterSetting setting1 = interpreterSettingManager.createNewSetting("test-group1", "group1", new ArrayList<Dependency>(), new InterpreterOption(true), new Properties());
|
||||
final InterpreterSetting setting2 = interpreterSettingManager.createNewSetting("test-group2", "group1", new ArrayList<Dependency>(), new InterpreterOption(true), new Properties());
|
||||
final InterpreterSetting setting1 = interpreterSettingManager.createNewSetting("test-group1", "group1", new ArrayList<Dependency>(), new InterpreterOption(true), new HashMap<String, InterpreterProperty>());
|
||||
final InterpreterSetting setting2 = interpreterSettingManager.createNewSetting("test-group2", "group1", new ArrayList<Dependency>(), new InterpreterOption(true), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
interpreterSettingManager.setInterpreters("user", "note", new ArrayList<String>() {{
|
||||
add(setting1.getId());
|
||||
|
|
@ -387,7 +394,7 @@ public class InterpreterFactoryTest {
|
|||
}}, new ArrayList<Dependency>(), new InterpreterOption(true), Collections.EMPTY_MAP, "/path1", null);
|
||||
|
||||
InterpreterOption perUserInterpreterOption = new InterpreterOption(true, InterpreterOption.ISOLATED, InterpreterOption.SHARED);
|
||||
final InterpreterSetting setting1 = interpreterSettingManager.createNewSetting("test-group1", "group1", new ArrayList<Dependency>(), perUserInterpreterOption, new Properties());
|
||||
final InterpreterSetting setting1 = interpreterSettingManager.createNewSetting("test-group1", "group1", new ArrayList<Dependency>(), perUserInterpreterOption, new HashMap<String, InterpreterProperty>());
|
||||
|
||||
interpreterSettingManager.setInterpreters("user1", "note", new ArrayList<String>() {{
|
||||
add(setting1.getId());
|
||||
|
|
@ -404,7 +411,7 @@ public class InterpreterFactoryTest {
|
|||
@Test
|
||||
public void testInvalidInterpreterSettingName() {
|
||||
try {
|
||||
interpreterSettingManager.createNewSetting("new.mock1", "mock1", new LinkedList<Dependency>(), new InterpreterOption(false), new Properties());
|
||||
interpreterSettingManager.createNewSetting("new.mock1", "mock1", new LinkedList<Dependency>(), new InterpreterOption(false), new HashMap<String, InterpreterProperty>());
|
||||
fail("expect fail because of invalid InterpreterSetting Name");
|
||||
} catch (IOException e) {
|
||||
assertEquals("'.' is invalid for InterpreterSetting name.", e.getMessage());
|
||||
|
|
@ -446,9 +453,9 @@ public class InterpreterFactoryTest {
|
|||
ArrayList<InterpreterInfo> interpreterInfos1 = new ArrayList<>();
|
||||
interpreterInfos1.add(new InterpreterInfo("name1.class", "name1", true, Maps.<String, Object>newHashMap()));
|
||||
|
||||
spyInterpreterSettingManager.add("normalGroup1", interpreterInfos1, Lists.<Dependency>newArrayList(), new InterpreterOption(true), Maps.<String, InterpreterProperty>newHashMap(), "/normalGroup1", null);
|
||||
spyInterpreterSettingManager.add("normalGroup1", interpreterInfos1, Lists.<Dependency>newArrayList(), new InterpreterOption(true), Maps.<String, DefaultInterpreterProperty>newHashMap(), "/normalGroup1", null);
|
||||
|
||||
spyInterpreterSettingManager.createNewSetting("normalGroup1", "normalGroup1", Lists.<Dependency>newArrayList(), new InterpreterOption(true), new Properties());
|
||||
spyInterpreterSettingManager.createNewSetting("normalGroup1", "normalGroup1", Lists.<Dependency>newArrayList(), new InterpreterOption(true), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
ArrayList<InterpreterInfo> interpreterInfos2 = new ArrayList<>();
|
||||
interpreterInfos2.add(new InterpreterInfo("name1.class", "name1", true, Maps.<String, Object>newHashMap()));
|
||||
|
|
@ -457,9 +464,9 @@ public class InterpreterFactoryTest {
|
|||
|
||||
when(mockInterpreterRunner.getPath()).thenReturn("custom-linux-path.sh");
|
||||
|
||||
spyInterpreterSettingManager.add("customGroup1", interpreterInfos2, Lists.<Dependency>newArrayList(), new InterpreterOption(true), Maps.<String, InterpreterProperty>newHashMap(), "/customGroup1", mockInterpreterRunner);
|
||||
spyInterpreterSettingManager.add("customGroup1", interpreterInfos2, Lists.<Dependency>newArrayList(), new InterpreterOption(true), Maps.<String, DefaultInterpreterProperty>newHashMap(), "/customGroup1", mockInterpreterRunner);
|
||||
|
||||
spyInterpreterSettingManager.createNewSetting("customGroup1", "customGroup1", Lists.<Dependency>newArrayList(), new InterpreterOption(true), new Properties());
|
||||
spyInterpreterSettingManager.createNewSetting("customGroup1", "customGroup1", Lists.<Dependency>newArrayList(), new InterpreterOption(true), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
spyInterpreterSettingManager.setInterpreters("anonymous", "noteCustome", spyInterpreterSettingManager.getDefaultInterpreterSettingList());
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package org.apache.zeppelin.notebook;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Properties;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
|
@ -31,8 +31,8 @@ import org.apache.zeppelin.interpreter.Interpreter;
|
|||
import org.apache.zeppelin.interpreter.InterpreterFactory;
|
||||
import org.apache.zeppelin.interpreter.InterpreterInfo;
|
||||
import org.apache.zeppelin.interpreter.InterpreterOption;
|
||||
import org.apache.zeppelin.interpreter.DefaultInterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.InterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSetting;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSettingManager;
|
||||
import org.apache.zeppelin.interpreter.LazyOpenInterpreter;
|
||||
import org.apache.zeppelin.interpreter.mock.MockInterpreter1;
|
||||
|
|
@ -72,11 +72,11 @@ public class NoteInterpreterLoaderTest {
|
|||
ArrayList<InterpreterInfo> interpreterInfos2 = new ArrayList<>();
|
||||
interpreterInfos2.add(new InterpreterInfo(MockInterpreter2.class.getName(), "mock2", true, Maps.<String, Object>newHashMap()));
|
||||
|
||||
interpreterSettingManager.add("group1", interpreterInfos, Lists.<Dependency>newArrayList(), new InterpreterOption(), Maps.<String, InterpreterProperty>newHashMap(), "mock", null);
|
||||
interpreterSettingManager.add("group2", interpreterInfos2, Lists.<Dependency>newArrayList(), new InterpreterOption(), Maps.<String, InterpreterProperty>newHashMap(), "mock", null);
|
||||
interpreterSettingManager.add("group1", interpreterInfos, Lists.<Dependency>newArrayList(), new InterpreterOption(), Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock", null);
|
||||
interpreterSettingManager.add("group2", interpreterInfos2, Lists.<Dependency>newArrayList(), new InterpreterOption(), Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock", null);
|
||||
|
||||
interpreterSettingManager.createNewSetting("group1", "group1", Lists.<Dependency>newArrayList(), new InterpreterOption(), new Properties());
|
||||
interpreterSettingManager.createNewSetting("group2", "group2", Lists.<Dependency>newArrayList(), new InterpreterOption(), new Properties());
|
||||
interpreterSettingManager.createNewSetting("group1", "group1", Lists.<Dependency>newArrayList(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
interpreterSettingManager.createNewSetting("group2", "group2", Lists.<Dependency>newArrayList(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,14 +97,14 @@ public class NotebookTest implements JobListenerFactory{
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(), new Properties());
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
ArrayList<InterpreterInfo> interpreterInfos2 = new ArrayList<>();
|
||||
interpreterInfos2.add(new InterpreterInfo(MockInterpreter2.class.getName(), "mock2", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock2", interpreterInfos2, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock2", null);
|
||||
interpreterSettingManager.createNewSetting("mock2", "mock2", new ArrayList<Dependency>(), new InterpreterOption(), new Properties());
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock2", null);
|
||||
interpreterSettingManager.createNewSetting("mock2", "mock2", new ArrayList<Dependency>(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
|
||||
SearchService search = mock(SearchService.class);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import org.apache.zeppelin.dep.DependencyResolver;
|
|||
import org.apache.zeppelin.interpreter.InterpreterFactory;
|
||||
import org.apache.zeppelin.interpreter.InterpreterInfo;
|
||||
import org.apache.zeppelin.interpreter.InterpreterOption;
|
||||
import org.apache.zeppelin.interpreter.DefaultInterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.InterpreterProperty;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSettingManager;
|
||||
import org.apache.zeppelin.interpreter.mock.MockInterpreter1;
|
||||
|
|
@ -96,8 +97,8 @@ public class VFSNotebookRepoTest implements JobListenerFactory {
|
|||
ArrayList<InterpreterInfo> interpreterInfos = new ArrayList<>();
|
||||
interpreterInfos.add(new InterpreterInfo(MockInterpreter1.class.getName(), "mock1", true, new HashMap<String, Object>()));
|
||||
interpreterSettingManager.add("mock1", interpreterInfos, new ArrayList<Dependency>(), new InterpreterOption(),
|
||||
Maps.<String, InterpreterProperty>newHashMap(), "mock1", null);
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(), new Properties());
|
||||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(), new HashMap<String, InterpreterProperty>());
|
||||
|
||||
SearchService search = mock(SearchService.class);
|
||||
notebookRepo = new VFSNotebookRepo(conf);
|
||||
|
|
|
|||
Loading…
Reference in a new issue