mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
[ZEPPELIN-2403] generalized types, added new types
This commit is contained in:
parent
07160e00eb
commit
e92713c72f
41 changed files with 672 additions and 274 deletions
|
|
@ -9,14 +9,16 @@
|
|||
"propertyName": "alluxio.master.hostname",
|
||||
"defaultValue": "localhost",
|
||||
"description": "Alluxio master hostname",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"alluxio.master.port": {
|
||||
"envName": "ALLUXIO_MASTER_PORT",
|
||||
"propertyName": "alluxio.master.port",
|
||||
"defaultValue": "19998",
|
||||
"description": "Alluxio master port",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -20,14 +20,16 @@
|
|||
"propertyName": "zeppelin.scio.argz",
|
||||
"defaultValue": "--runner=InProcessPipelineRunner",
|
||||
"description": "Scio interpreter wide arguments",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.scio.maxResult": {
|
||||
"envName": "ZEPPELIN_SCIO_MAXRESULT",
|
||||
"propertyName": "zeppelin.scio.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of SCollection results to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,21 +9,24 @@
|
|||
"propertyName": "zeppelin.bigquery.project_id",
|
||||
"defaultValue": " ",
|
||||
"description": "Google Project ID",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.bigquery.wait_time": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.bigquery.wait_time",
|
||||
"defaultValue": "5000",
|
||||
"description": "Query timeout in Milliseconds",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,217 +9,248 @@
|
|||
"propertyName": "cassandra.hosts",
|
||||
"defaultValue": "localhost",
|
||||
"description": "Comma separated Cassandra hosts (DNS name or IP address). Default = localhost. Ex: '192.168.0.12,node2,node3'",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.native.port": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.native.port",
|
||||
"defaultValue": "9042",
|
||||
"description": "Cassandra native port. Default = 9042",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.protocol.version": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.protocol.version",
|
||||
"defaultValue": "4",
|
||||
"description": "Cassandra protocol version. Default = 4",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.cluster": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.cluster",
|
||||
"defaultValue": "Test Cluster",
|
||||
"description": "Cassandra cluster name. Default = 'Test Cluster'",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.keyspace": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.keyspace",
|
||||
"defaultValue": "system",
|
||||
"description": "Cassandra keyspace name. Default = 'system'",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.compression.protocol": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.compression.protocol",
|
||||
"defaultValue": "NONE",
|
||||
"description": "Cassandra compression protocol. Available values: NONE, SNAPPY, LZ4. Default = NONE",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.credentials.username": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.credentials.username",
|
||||
"defaultValue": "none",
|
||||
"description": "Cassandra credentials username. Default = 'none'",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.credentials.password": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.credentials.password",
|
||||
"defaultValue": "none",
|
||||
"description": "Cassandra credentials password. Default = 'none'",
|
||||
"widget": "password"
|
||||
"widget": "password",
|
||||
"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())",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.retry.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.retry.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Retry Policy. Default = DefaultRetryPolicy.INSTANCE",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.reconnection.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.reconnection.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Reconnection Policy. Default = new ExponentialReconnectionPolicy(1000, 10 * 60 * 1000)",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.speculative.execution.policy": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.speculative.execution.policy",
|
||||
"defaultValue": "DEFAULT",
|
||||
"description": "Cassandra Speculative Execution Policy. Default = NoSpeculativeExecutionPolicy.INSTANCE",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.interpreter.parallelism": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.interpreter.parallelism",
|
||||
"defaultValue": "10",
|
||||
"description": "Cassandra interpreter parallelism.Default = 10",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.pooling.idle.timeout.seconds": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.idle.timeout.seconds",
|
||||
"defaultValue": "120",
|
||||
"description": "Cassandra idle time out in seconds. Default = 120",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.pooling.pool.timeout.millisecs": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.pool.timeout.millisecs",
|
||||
"defaultValue": "5000",
|
||||
"description": "Cassandra pool time out in millisecs. Default = 5000",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.pooling.heartbeat.interval.seconds": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.pooling.heartbeat.interval.seconds",
|
||||
"defaultValue": "30",
|
||||
"description": "Cassandra pool heartbeat interval in secs. Default = 30",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.query.default.consistency": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.query.default.consistency",
|
||||
"defaultValue": "ONE",
|
||||
"description": "Cassandra query default consistency level. Default = ONE",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.query.default.serial.consistency": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.query.default.serial.consistency",
|
||||
"defaultValue": "SERIAL",
|
||||
"description": "Cassandra query default serial consistency level. Default = SERIAL",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"cassandra.query.default.fetchSize": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.query.default.fetchSize",
|
||||
"defaultValue": "5000",
|
||||
"description": "Cassandra query default fetch size. Default = 5000",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.socket.read.timeout.millisecs": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.socket.read.timeout.millisecs",
|
||||
"defaultValue": "12000",
|
||||
"description": "Cassandra socket read timeout in millisecs. Default = 12000",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"cassandra.socket.tcp.no_delay": {
|
||||
"envName": null,
|
||||
"propertyName": "cassandra.socket.tcp.no_delay",
|
||||
"defaultValue": true,
|
||||
"description": "Cassandra socket TCP no delay. Default = true",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -62,14 +62,16 @@ Here is an example of `interpreter-setting.json` on your own interpreter.
|
|||
"propertyName": "property.1.name",
|
||||
"defaultValue": "propertyDefaultValue",
|
||||
"description": "Property description",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"properties2": {
|
||||
"envName": PROPERTIES_2,
|
||||
"propertyName": null,
|
||||
"defaultValue": "property2DefaultValue",
|
||||
"description": "Property 2 description",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
}, ...
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -87,12 +87,14 @@ So, copying `notebook` and `conf` directory should be enough.
|
|||
"spark.executor.memory": {
|
||||
"name": "spark.executor.memory",
|
||||
"value": "",
|
||||
"widget": "text"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.concurrentSQL": {
|
||||
"name": "zeppelin.spark.concurrentSQL",
|
||||
"value": false,
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
...
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -77,12 +77,14 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"spark.executor.memory": {
|
||||
"defaultValue": "1g",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"widget": "text
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"spark.cores.max": {
|
||||
"defaultValue": "",
|
||||
"description": "Total number of cores to use. Empty value uses all available core.",
|
||||
"widget": "text"
|
||||
"widget": "inmput",
|
||||
"type": "number"
|
||||
},
|
||||
},
|
||||
"path": "/zeppelin/interpreter/spark"
|
||||
|
|
@ -95,7 +97,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"zeppelin.spark.maxResult": {
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"widget": "text"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"path": "/zeppelin/interpreter/spark"
|
||||
|
|
@ -159,12 +162,14 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"spark.cores.max": {
|
||||
"name": "",
|
||||
"value": "spark.cores.max",
|
||||
"widget": "text"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"spark.executor.memory": {
|
||||
"name": "",
|
||||
"value": "1g",
|
||||
"widget": "text"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"interpreterGroup": [
|
||||
|
|
@ -229,7 +234,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "propvalue",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"interpreterGroup": [
|
||||
|
|
@ -288,7 +294,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "propvalue",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -323,7 +330,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "propvalue",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -377,7 +385,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "Otherpropvalue",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -412,7 +421,8 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
"propname": {
|
||||
"name": "propname",
|
||||
"value": "Otherpropvalue",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"interpreterGroup": [
|
||||
{
|
||||
|
|
@ -594,7 +604,19 @@ The role of registered interpreters, settings and interpreters group are describ
|
|||
<pre>
|
||||
{
|
||||
"status": "OK",
|
||||
"body": ["text", "password"]
|
||||
"body": [
|
||||
{
|
||||
"id": "textarea",
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "string",
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -9,49 +9,56 @@
|
|||
"propertyName": "elasticsearch.host",
|
||||
"defaultValue": "localhost",
|
||||
"description": "The host for Elasticsearch",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"elasticsearch.port": {
|
||||
"envName": "ELASTICSEARCH_PORT",
|
||||
"propertyName": "elasticsearch.port",
|
||||
"defaultValue": "9300",
|
||||
"description": "The port for Elasticsearch",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"elasticsearch.client.type": {
|
||||
"envName": "ELASTICSEARCH_CLIENT_TYPE",
|
||||
"propertyName": "elasticsearch.client.type",
|
||||
"defaultValue": "transport",
|
||||
"description": "The type of client for Elasticsearch (transport or http)",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"elasticsearch.cluster.name": {
|
||||
"envName": "ELASTICSEARCH_CLUSTER_NAME",
|
||||
"propertyName": "elasticsearch.cluster.name",
|
||||
"defaultValue": "elasticsearch",
|
||||
"description": "The cluster name for Elasticsearch",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"elasticsearch.result.size": {
|
||||
"envName": "ELASTICSEARCH_RESULT_SIZE",
|
||||
"propertyName": "elasticsearch.result.size",
|
||||
"defaultValue": "10",
|
||||
"description": "The size of the result set of a search query",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"elasticsearch.basicauth.username": {
|
||||
"envName": "ELASTICSEARCH_BASIC_AUTH_USERNAME",
|
||||
"propertyName": "elasticsearch.basicauth.username",
|
||||
"defaultValue": "",
|
||||
"description": "Username for a basic authentication",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"elasticsearch.basicauth.password": {
|
||||
"envName": "ELASTICSEARCH_BASIC_AUTH_PASSWORD",
|
||||
"propertyName": "elasticsearch.basicauth.password",
|
||||
"defaultValue": "",
|
||||
"description": "Password for a basic authentication",
|
||||
"widget": "password"
|
||||
"widget": "password",
|
||||
"type": "password"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,21 +9,24 @@
|
|||
"propertyName": "hdfs.url",
|
||||
"defaultValue": "http://localhost:50070/webhdfs/v1/",
|
||||
"description": "The URL for WebHDFS",
|
||||
"widget": "url"
|
||||
"widget": "input",
|
||||
"type": "url"
|
||||
},
|
||||
"hdfs.user": {
|
||||
"envName": null,
|
||||
"propertyName": "hdfs.user",
|
||||
"defaultValue": "hdfs",
|
||||
"description": "The WebHDFS user",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"hdfs.maxlength": {
|
||||
"envName": null,
|
||||
"propertyName": "hdfs.maxlength",
|
||||
"defaultValue": "1000",
|
||||
"description": "Maximum number of lines of results fetched",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@
|
|||
"propertyName": null,
|
||||
"defaultValue": "local",
|
||||
"description": "host name of running JobManager. 'local' runs flink in local mode.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"envName": "port",
|
||||
"propertyName": null,
|
||||
"defaultValue": "6123",
|
||||
"description": "port of running JobManager.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,21 +9,24 @@
|
|||
"propertyName": "geode.locator.host",
|
||||
"defaultValue": "localhost",
|
||||
"description": "The Geode Locator Host.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"geode.locator.port": {
|
||||
"envName": null,
|
||||
"propertyName": "geode.locator.port",
|
||||
"defaultValue": "10334",
|
||||
"description": "The Geode Locator Port.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"geode.max.result": {
|
||||
"envName": null,
|
||||
"propertyName": "geode.max.result",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of OQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
"propertyName": "GROOVY_CLASSES",
|
||||
"defaultValue": "",
|
||||
"description": "The path for custom groovy classes location. If empty `./interpreter/groovy/classes`",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,19 +9,22 @@
|
|||
"propertyName": "hbase.home",
|
||||
"defaultValue": "/usr/lib/hbase/",
|
||||
"description": "Installation directory of HBase",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"hbase.ruby.sources": {
|
||||
"propertyName": "hbase.ruby.sources",
|
||||
"defaultValue": "lib/ruby",
|
||||
"description": "Path to Ruby scripts relative to 'hbase.home'",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.hbase.test.mode": {
|
||||
"propertyName": "zeppelin.hbase.test.mode",
|
||||
"defaultValue": false,
|
||||
"description": "Disable checks for unit and manual tests",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
"propertyName": "port",
|
||||
"defaultValue": "jdbc:postgresql://localhost:5432/",
|
||||
"description": "The URL for JDBC.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,28 +9,32 @@
|
|||
"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)",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"ignite.clientMode": {
|
||||
"envName": null,
|
||||
"propertyName": "ignite.clientMode",
|
||||
"defaultValue": true,
|
||||
"description": "Client mode. true or false",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"ignite.config.url": {
|
||||
"envName": null,
|
||||
"propertyName": "ignite.config.url",
|
||||
"defaultValue": "",
|
||||
"description": "Configuration URL. Overrides all other settings.",
|
||||
"widget": "url"
|
||||
"widget": "input",
|
||||
"type": "url"
|
||||
},
|
||||
"ignite.peerClassLoadingEnabled": {
|
||||
"envName": null,
|
||||
"propertyName": "ignite.peerClassLoadingEnabled",
|
||||
"defaultValue": true,
|
||||
"description": "Peer class loading enabled. True or false",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -44,7 +48,8 @@
|
|||
"propertyName": "ignite.jdbc.url",
|
||||
"defaultValue": "jdbc:ignite:cfg://default-ignite-jdbc.xml",
|
||||
"description": "Ignite JDBC connection URL.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,84 +9,96 @@
|
|||
"propertyName": "default.url",
|
||||
"defaultValue": "jdbc:postgresql://localhost:5432/",
|
||||
"description": "The URL for JDBC.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"default.user": {
|
||||
"envName": null,
|
||||
"propertyName": "default.user",
|
||||
"defaultValue": "gpadmin",
|
||||
"description": "The JDBC user name",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"default.password": {
|
||||
"envName": null,
|
||||
"propertyName": "default.password",
|
||||
"defaultValue": "",
|
||||
"description": "The JDBC user password",
|
||||
"widget": "password"
|
||||
"widget": "password",
|
||||
"type": "password"
|
||||
},
|
||||
"default.driver": {
|
||||
"envName": null,
|
||||
"propertyName": "default.driver",
|
||||
"defaultValue": "org.postgresql.Driver",
|
||||
"description": "JDBC Driver Name",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"default.completer.schemaFilters": {
|
||||
"envName": null,
|
||||
"propertyName": "default.completer.schemaFilters",
|
||||
"defaultValue": "",
|
||||
"description": "Сomma separated schema (schema = catalog = database) filters to get metadata for completions. Supports '%' symbol is equivalent to any set of characters. (ex. prod_v_%,public%,info)",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"default.precode": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.precode",
|
||||
"defaultValue": "",
|
||||
"description": "SQL which executes while opening connection",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"common.max_count": {
|
||||
"envName": null,
|
||||
"propertyName": "common.max_count",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of SQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.jdbc.auth.type": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.auth.type",
|
||||
"defaultValue": "",
|
||||
"description": "If auth type is needed, Example: KERBEROS",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.jdbc.concurrent.use": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.concurrent.use",
|
||||
"defaultValue": true,
|
||||
"description": "Use parallel scheduler",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"zeppelin.jdbc.concurrent.max_connection": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.concurrent.max_connection",
|
||||
"defaultValue": "10",
|
||||
"description": "Number of concurrent execution",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.jdbc.keytab.location": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.keytab.location",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos keytab location",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.jdbc.principal": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.jdbc.principal",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos principal",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,49 +9,56 @@
|
|||
"propertyName": "kylin.api.url",
|
||||
"defaultValue": "http://localhost:7070/kylin/api/query",
|
||||
"description": "Kylin API",
|
||||
"widget": "url"
|
||||
"widget": "input",
|
||||
"type": "url"
|
||||
},
|
||||
"kylin.api.user": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.api.user",
|
||||
"defaultValue": "ADMIN",
|
||||
"description": "Kylin username",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"kylin.api.password": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.api.password",
|
||||
"defaultValue": "KYLIN",
|
||||
"description": "Kylin password",
|
||||
"widget": "password"
|
||||
"widget": "password",
|
||||
"type": "password"
|
||||
},
|
||||
"kylin.query.project": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.project",
|
||||
"defaultValue": "learn_kylin",
|
||||
"description": "Default Kylin project name",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"kylin.query.offset": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.offset",
|
||||
"defaultValue": "0",
|
||||
"description": "Kylin query offset",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"kylin.query.limit": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.limit",
|
||||
"defaultValue": "5000",
|
||||
"description": "Kylin query limit",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"kylin.query.ispartial": {
|
||||
"envName": null,
|
||||
"propertyName": "kylin.query.ispartial",
|
||||
"defaultValue": true,
|
||||
"description": "Kylin query partial flag, deprecated",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,49 +9,56 @@
|
|||
"propertyName": "zeppelin.lens.run.concurrent",
|
||||
"defaultValue": true,
|
||||
"description": "Run concurrent Lens Sessions",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"zeppelin.lens.maxThreads": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.lens.maxThreads",
|
||||
"defaultValue": "10",
|
||||
"description": "If concurrency is true then how many threads?",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.lens.maxResults": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.lens.maxResults",
|
||||
"defaultValue": "1000",
|
||||
"description": "max number of rows to display",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"lens.server.base.url": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.server.base.url",
|
||||
"defaultValue": "http://<hostname>:<port>/lensapi",
|
||||
"description": "The URL for Lens Server",
|
||||
"widget": "url"
|
||||
"widget": "input",
|
||||
"type": "url"
|
||||
},
|
||||
"lens.client.dbname": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.client.dbname",
|
||||
"defaultValue": "default",
|
||||
"description": "The database schema name",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"lens.query.enable.persistent.resultset": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.query.enable.persistent.resultset",
|
||||
"defaultValue": false,
|
||||
"description": "Apache Lens to persist result in HDFS?",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"lens.session.cluster.user": {
|
||||
"envName": null,
|
||||
"propertyName": "lens.session.cluster.user",
|
||||
"defaultValue": "default",
|
||||
"description": "Hadoop cluster username",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,104 +10,121 @@
|
|||
"propertyName": "zeppelin.livy.url",
|
||||
"defaultValue": "http://localhost:8998",
|
||||
"description": "The URL for Livy Server.",
|
||||
"widget": "url"
|
||||
"widget": "input",
|
||||
"type": "url"
|
||||
},
|
||||
"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).",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.driver.cores": {
|
||||
"propertyName": "livy.spark.driver.cores",
|
||||
"defaultValue": "",
|
||||
"description": "Driver cores. ex) 1, 2",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.driver.memory": {
|
||||
"propertyName": "livy.spark.driver.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Driver memory. ex) 512m, 32g",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"livy.spark.executor.instances": {
|
||||
"propertyName": "livy.spark.executor.instances",
|
||||
"defaultValue": "",
|
||||
"description": "Executor instances. ex) 1, 4",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.executor.cores": {
|
||||
"propertyName": "livy.spark.executor.cores",
|
||||
"defaultValue": "",
|
||||
"description": "Num cores per executor. ex) 1, 4",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.executor.memory": {
|
||||
"propertyName": "livy.spark.executor.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.enabled": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.enabled",
|
||||
"defaultValue": false,
|
||||
"description": "Use dynamic resource allocation",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.cachedExecutorIdleTimeout": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.cachedExecutorIdleTimeout",
|
||||
"defaultValue": "",
|
||||
"description": "Remove an executor which has cached data blocks",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.minExecutors": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.minExecutors",
|
||||
"defaultValue": "",
|
||||
"description": "Lower bound for the number of executors if dynamic allocation is enabled.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.initialExecutors": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.initialExecutors",
|
||||
"defaultValue": "",
|
||||
"description": "Initial number of executors to run if dynamic allocation is enabled.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.dynamicAllocation.maxExecutors": {
|
||||
"propertyName": "livy.spark.dynamicAllocation.maxExecutors",
|
||||
"defaultValue": "",
|
||||
"description": "Upper bound for the number of executors if dynamic allocation is enabled.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.livy.principal": {
|
||||
"propertyName": "zeppelin.livy.principal",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos principal to authenticate livy",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.livy.keytab": {
|
||||
"propertyName": "zeppelin.livy.keytab",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos keytab to authenticate livy",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.livy.pull_status.interval.millis": {
|
||||
"propertyName": "zeppelin.livy.pull_status.interval.millis",
|
||||
"defaultValue": "1000",
|
||||
"description": "The interval for checking paragraph execution status",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"livy.spark.jars.packages": {
|
||||
"propertyName": "livy.spark.jars.packages",
|
||||
"defaultValue": "",
|
||||
"description": "Adding extra libraries to livy interpreter",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.livy.displayAppInfo": {
|
||||
"propertyName": "zeppelin.livy.displayAppInfo",
|
||||
"defaultValue": false,
|
||||
"description": "Whether display app info",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"option": {
|
||||
|
|
@ -134,19 +151,22 @@
|
|||
"propertyName": "zeppelin.livy.spark.sql.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"zeppelin.livy.concurrentSQL": {
|
||||
"propertyName": "zeppelin.livy.concurrentSQL",
|
||||
"defaultValue": false,
|
||||
"description": "Execute multiple SQL concurrently if set true.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"option": {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
"propertyName": "markdown.parser.type",
|
||||
"defaultValue": "pegdown",
|
||||
"description": "Markdown Parser Type. Available values: pegdown, markdown4j. Default = pegdown",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@
|
|||
"propertyName": "zeppelin.pig.execType",
|
||||
"defaultValue": "mapreduce",
|
||||
"description": "local | mapreduce | tez",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.pig.includeJobStats": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.pig.includeJobStats",
|
||||
"defaultValue": false,
|
||||
"description": "flag to include job stats in output",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -34,14 +36,16 @@
|
|||
"propertyName": "zeppelin.pig.execType",
|
||||
"defaultValue": "mapreduce",
|
||||
"description": "local | mapreduce | tez",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.pig.maxResult": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.pig.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "max row number for %pig.query",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@
|
|||
"propertyName": "zeppelin.python",
|
||||
"defaultValue": "python",
|
||||
"description": "Python directory. It is set to python by default.(assume python is in your $PATH)",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.python.maxResult": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.python.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of dataframe rows to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -7,22 +7,26 @@
|
|||
"rhadoop.cmd": {
|
||||
"envName": "HADOOP_CMD",
|
||||
"defaultValue": "",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"rhadooop.streamingjar": {
|
||||
"envName": "HADOOP_STREAMING",
|
||||
"defaultValue": "",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"rscala.debug": {
|
||||
"envName": "RSCALA_DEBUG",
|
||||
"defaultValue": false,
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"rscala.timeout": {
|
||||
"envName": "RSCALA_TIMEOUT",
|
||||
"defaultValue": "60",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -34,22 +38,26 @@
|
|||
"rhadoop.cmd": {
|
||||
"envName": "HADOOP_CMD",
|
||||
"defaultValue": "",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"rhadooop.streamingjar": {
|
||||
"envName": "HADOOP_STREAMING",
|
||||
"defaultValue": "",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"rscala.debug": {
|
||||
"envName": "RSCALA_DEBUG",
|
||||
"defaultValue": false,
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"rscala.timeout": {
|
||||
"envName": "RSCALA_TIMEOUT",
|
||||
"defaultValue": "60",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@
|
|||
"envName": null,
|
||||
"defaultValue": "--local --repl",
|
||||
"description": "Arguments for scalding REPL",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"max.open.instances": {
|
||||
"envName": null,
|
||||
"defaultValue": "50",
|
||||
"description": "Maximum number of open interpreter instances",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,28 +9,32 @@
|
|||
"propertyName": "shell.command.timeout.millisecs",
|
||||
"defaultValue": "60000",
|
||||
"description": "Shell command time out in millisecs. Default = 60000",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.shell.auth.type": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.shell.auth.type",
|
||||
"defaultValue": "",
|
||||
"description": "If auth type is needed, Example: KERBEROS",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.shell.keytab.location": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.shell.keytab.location",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos keytab location",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.shell.principal": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.shell.principal",
|
||||
"defaultValue": "",
|
||||
"description": "Kerberos principal",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ 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.InterpreterPropertyWidget;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
|
||||
import org.apache.zeppelin.interpreter.InterpreterUtils;
|
||||
|
|
@ -527,14 +526,12 @@ public class SparkInterpreter extends Interpreter {
|
|||
|
||||
private void setupConfForPySpark(SparkConf conf) {
|
||||
Object pysparkBaseProperty =
|
||||
new DefaultInterpreterProperty("SPARK_HOME", null, null, null,
|
||||
InterpreterPropertyWidget.text).getValue();
|
||||
new DefaultInterpreterProperty("SPARK_HOME", null, null).getValue();
|
||||
String pysparkBasePath = pysparkBaseProperty != null ? pysparkBaseProperty.toString() : null;
|
||||
File pysparkPath;
|
||||
if (null == pysparkBasePath) {
|
||||
pysparkBasePath =
|
||||
new DefaultInterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../", null,
|
||||
InterpreterPropertyWidget.text).getValue().toString();
|
||||
new DefaultInterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../").getValue().toString();
|
||||
pysparkPath = new File(pysparkBasePath,
|
||||
"interpreter" + File.separator + "spark" + File.separator + "pyspark");
|
||||
} else {
|
||||
|
|
@ -580,14 +577,12 @@ public class SparkInterpreter extends Interpreter {
|
|||
|
||||
private void setupConfForSparkR(SparkConf conf) {
|
||||
Object sparkRBaseProperty =
|
||||
new DefaultInterpreterProperty("SPARK_HOME", null, null, null,
|
||||
InterpreterPropertyWidget.text).getValue();
|
||||
new DefaultInterpreterProperty("SPARK_HOME", null, null).getValue();
|
||||
String sparkRBasePath = sparkRBaseProperty != null ? sparkRBaseProperty.toString() : null;
|
||||
File sparkRPath;
|
||||
if (null == sparkRBasePath) {
|
||||
sparkRBasePath =
|
||||
new DefaultInterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../", null,
|
||||
InterpreterPropertyWidget.text).getValue().toString();
|
||||
new DefaultInterpreterProperty("ZEPPELIN_HOME", "zeppelin.home", "../").getValue().toString();
|
||||
sparkRPath = new File(sparkRBasePath,
|
||||
"interpreter" + File.separator + "spark" + File.separator + "R");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -10,63 +10,72 @@
|
|||
"propertyName": "spark.executor.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "",
|
||||
"description": "spark commandline args",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.useHiveContext": {
|
||||
"envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
|
||||
"propertyName": "zeppelin.spark.useHiveContext",
|
||||
"defaultValue": true,
|
||||
"description": "Use HiveContext instead of SQLContext if it is true.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"spark.app.name": {
|
||||
"envName": "SPARK_APP_NAME",
|
||||
"propertyName": "spark.app.name",
|
||||
"defaultValue": "Zeppelin",
|
||||
"description": "The name of spark application.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.printREPLOutput": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.spark.printREPLOutput",
|
||||
"defaultValue": true,
|
||||
"description": "Print REPL output",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"spark.cores.max": {
|
||||
"envName": null,
|
||||
"propertyName": "spark.cores.max",
|
||||
"defaultValue": "",
|
||||
"description": "Total number of cores to use. Empty value uses all available core.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"master": {
|
||||
"envName": "MASTER",
|
||||
"propertyName": "spark.master",
|
||||
"defaultValue": "local[*]",
|
||||
"description": "Spark master uri. ex) spark://masterhost:7077",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.unSupportedVersionCheck": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.spark.enableSupportedVersionCheck",
|
||||
"defaultValue": true,
|
||||
"description": "Do not change - developer only setting, not for production use",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -84,28 +93,32 @@
|
|||
"propertyName": "zeppelin.spark.concurrentSQL",
|
||||
"defaultValue": false,
|
||||
"description": "Execute multiple SQL concurrently if set true.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"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.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -123,14 +136,16 @@
|
|||
"propertyName": null,
|
||||
"defaultValue": "local-repo",
|
||||
"description": "local repository for dependency loader",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"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.",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -148,7 +163,8 @@
|
|||
"propertyName": null,
|
||||
"defaultValue": "python",
|
||||
"description": "Python command to run pyspark with",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -10,63 +10,72 @@
|
|||
"propertyName": "spark.executor.memory",
|
||||
"defaultValue": "",
|
||||
"description": "Executor memory per worker instance. ex) 512m, 32g",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"envName": null,
|
||||
"propertyName": null,
|
||||
"defaultValue": "",
|
||||
"description": "spark commandline args",
|
||||
"widget": "text"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.useHiveContext": {
|
||||
"envName": "ZEPPELIN_SPARK_USEHIVECONTEXT",
|
||||
"propertyName": "zeppelin.spark.useHiveContext",
|
||||
"defaultValue": true,
|
||||
"description": "Use HiveContext instead of SQLContext if it is true.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"spark.app.name": {
|
||||
"envName": "SPARK_APP_NAME",
|
||||
"propertyName": "spark.app.name",
|
||||
"defaultValue": "Zeppelin",
|
||||
"description": "The name of spark application.",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.printREPLOutput": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.spark.printREPLOutput",
|
||||
"defaultValue": true,
|
||||
"description": "Print REPL output",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"spark.cores.max": {
|
||||
"envName": null,
|
||||
"propertyName": "spark.cores.max",
|
||||
"defaultValue": "",
|
||||
"description": "Total number of cores to use. Empty value uses all available core.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"master": {
|
||||
"envName": "MASTER",
|
||||
"propertyName": "spark.master",
|
||||
"defaultValue": "local[*]",
|
||||
"description": "Spark master uri. ex) spark://masterhost:7077",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.spark.unSupportedVersionCheck": {
|
||||
"envName": null,
|
||||
"propertyName": "zeppelin.spark.enableSupportedVersionCheck",
|
||||
"defaultValue": true,
|
||||
"description": "Do not change - developer only setting, not for production use",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -83,28 +92,32 @@
|
|||
"propertyName": "zeppelin.spark.concurrentSQL",
|
||||
"defaultValue": false,
|
||||
"description": "Execute multiple SQL concurrently if set true.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"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.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"zeppelin.spark.maxResult": {
|
||||
"envName": "ZEPPELIN_SPARK_MAXRESULT",
|
||||
"propertyName": "zeppelin.spark.maxResult",
|
||||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display.",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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.",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -121,14 +134,16 @@
|
|||
"propertyName": null,
|
||||
"defaultValue": "local-repo",
|
||||
"description": "local repository for dependency loader",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"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.",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -145,7 +160,8 @@
|
|||
"propertyName": null,
|
||||
"defaultValue": "python",
|
||||
"description": "Python command to run pyspark with",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
@ -162,28 +178,32 @@
|
|||
"propertyName": "zeppelin.R.knitr",
|
||||
"defaultValue": true,
|
||||
"description": "whether use knitr or not",
|
||||
"widget": "checkbox"
|
||||
"widget": "checkbox",
|
||||
"type": "boolean"
|
||||
},
|
||||
"zeppelin.R.cmd": {
|
||||
"envName": "ZEPPELIN_R_CMD",
|
||||
"propertyName": "zeppelin.R.cmd",
|
||||
"defaultValue": "R",
|
||||
"description": "R repl path",
|
||||
"widget": "string"
|
||||
"widget": "input",
|
||||
"type": "string"
|
||||
},
|
||||
"zeppelin.R.image.width": {
|
||||
"envName": "ZEPPELIN_R_IMAGE_WIDTH",
|
||||
"propertyName": "zeppelin.R.image.width",
|
||||
"defaultValue": "100%",
|
||||
"description": "",
|
||||
"widget": "number"
|
||||
"widget": "input",
|
||||
"type": "number"
|
||||
},
|
||||
"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": "",
|
||||
"widget": "text"
|
||||
"widget": "textarea",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
|
|
|
|||
|
|
@ -21,24 +21,37 @@ package org.apache.zeppelin.interpreter;
|
|||
* Property for registered interpreter
|
||||
*/
|
||||
public class DefaultInterpreterProperty {
|
||||
String envName;
|
||||
String propertyName;
|
||||
Object defaultValue;
|
||||
String description;
|
||||
InterpreterPropertyWidget widget;
|
||||
private String envName;
|
||||
private String propertyName;
|
||||
private Object defaultValue;
|
||||
private String description;
|
||||
private String widget;
|
||||
private String type;
|
||||
|
||||
public DefaultInterpreterProperty(String envName, String propertyName, Object defaultValue,
|
||||
String description, InterpreterPropertyWidget widget) {
|
||||
String description, String widget,
|
||||
String type) {
|
||||
this.envName = envName;
|
||||
this.propertyName = propertyName;
|
||||
this.defaultValue = defaultValue;
|
||||
this.description = description;
|
||||
this.widget = widget;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public DefaultInterpreterProperty(Object defaultValue, String description,
|
||||
InterpreterPropertyWidget widget) {
|
||||
this(null, null, defaultValue, description, widget);
|
||||
String widget, String type) {
|
||||
this(null, null, defaultValue, description, widget, type);
|
||||
}
|
||||
|
||||
public DefaultInterpreterProperty(Object defaultValue, String description) {
|
||||
this(null, null, defaultValue, description, InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue());
|
||||
}
|
||||
|
||||
public DefaultInterpreterProperty(String envName, String propertyName, String defaultValue) {
|
||||
this(envName, propertyName, defaultValue, null, InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue());
|
||||
}
|
||||
|
||||
public String getEnvName() {
|
||||
|
|
@ -73,14 +86,22 @@ public class DefaultInterpreterProperty {
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
public InterpreterPropertyWidget getWidget() {
|
||||
public String getWidget() {
|
||||
return widget;
|
||||
}
|
||||
|
||||
public void setWidget(InterpreterPropertyWidget widget) {
|
||||
public void setWidget(String widget) {
|
||||
this.widget = widget;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.toString().hashCode();
|
||||
}
|
||||
|
|
@ -110,6 +131,6 @@ public class DefaultInterpreterProperty {
|
|||
@Override
|
||||
public String toString() {
|
||||
return String.format("{envName=%s, propertyName=%s, defaultValue=%s, description=%20s, " +
|
||||
"type=%s}", envName, propertyName, defaultValue, description, widget);
|
||||
"widget=%s, type=%s}", envName, propertyName, defaultValue, description, widget, type);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,19 @@ package org.apache.zeppelin.interpreter;
|
|||
public class InterpreterProperty {
|
||||
private String name;
|
||||
private Object value;
|
||||
private InterpreterPropertyWidget widget;
|
||||
private String widget;
|
||||
private String type;
|
||||
|
||||
public InterpreterProperty(String name, Object value, InterpreterPropertyWidget widget) {
|
||||
public InterpreterProperty(String name, Object value, String widget, String type) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.widget = widget;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public InterpreterProperty(String name, Object value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
|
@ -47,11 +54,19 @@ public class InterpreterProperty {
|
|||
this.value = value;
|
||||
}
|
||||
|
||||
public InterpreterPropertyWidget getWidget() {
|
||||
public String getWidget() {
|
||||
return widget;
|
||||
}
|
||||
|
||||
public void setWidget(InterpreterPropertyWidget widget) {
|
||||
public void setWidget(String widget) {
|
||||
this.widget = widget;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,15 +28,14 @@ public class InterpreterPropertyBuilder {
|
|||
|
||||
public InterpreterPropertyBuilder add(String name, String defaultValue, String description){
|
||||
properties.put(name,
|
||||
new DefaultInterpreterProperty(defaultValue, description, InterpreterPropertyWidget.text));
|
||||
new DefaultInterpreterProperty(defaultValue, description));
|
||||
return this;
|
||||
}
|
||||
|
||||
public InterpreterPropertyBuilder add(String name, String envName, String propertyName,
|
||||
String defaultValue, String description){
|
||||
properties.put(name,
|
||||
new DefaultInterpreterProperty(envName, propertyName, defaultValue, description,
|
||||
InterpreterPropertyWidget.text));
|
||||
new DefaultInterpreterProperty(envName, propertyName, defaultValue, description));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* Widgets of interpreter properties
|
||||
*/
|
||||
public enum InterpreterPropertyType {
|
||||
|
||||
STRING("string"),
|
||||
NUMBER("number"),
|
||||
URL("url"),
|
||||
PASSWORD("password"),
|
||||
BOOLEAN("boolean");
|
||||
|
||||
private String value;
|
||||
|
||||
InterpreterPropertyType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static InterpreterPropertyType byValue(String value) {
|
||||
for (InterpreterPropertyType e : values()) {
|
||||
if (e.getValue().equals(value)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,10 +21,28 @@ package org.apache.zeppelin.interpreter;
|
|||
* Widgets of interpreter properties
|
||||
*/
|
||||
public enum InterpreterPropertyWidget {
|
||||
text,
|
||||
string,
|
||||
number,
|
||||
url,
|
||||
password,
|
||||
checkbox
|
||||
TEXTAREA("textarea"),
|
||||
INPUT("input"),
|
||||
PASSWORD("password"),
|
||||
CHECKBOX("checkbox");
|
||||
|
||||
private String value;
|
||||
|
||||
InterpreterPropertyWidget(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static InterpreterPropertyWidget byValue(String value) {
|
||||
for (InterpreterPropertyWidget e : values()) {
|
||||
if (e.getValue().equals(value)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,24 +34,24 @@ import javax.ws.rs.core.Context;
|
|||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.Status;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.apache.zeppelin.interpreter.InterpreterPropertyWidget;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSettingManager;
|
||||
import org.apache.zeppelin.rest.message.RestartInterpreterRequest;
|
||||
import org.apache.zeppelin.utils.SecurityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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.InterpreterSetting;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSettingManager;
|
||||
import org.apache.zeppelin.rest.message.NewInterpreterSettingRequest;
|
||||
import org.apache.zeppelin.rest.message.RestartInterpreterRequest;
|
||||
import org.apache.zeppelin.rest.message.UpdateInterpreterSettingRequest;
|
||||
import org.apache.zeppelin.server.JsonResponse;
|
||||
import org.apache.zeppelin.socket.NotebookServer;
|
||||
import org.apache.zeppelin.utils.SecurityUtils;
|
||||
import org.apache.zeppelin.utils.InterpreterPropertyWidgetUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.sonatype.aether.repository.RemoteRepository;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* Interpreter Rest API
|
||||
|
|
@ -255,7 +255,7 @@ public class InterpreterRestApi {
|
|||
@GET
|
||||
@Path("getmetainfos/{settingId}")
|
||||
public Response getMetaInfo(@Context HttpServletRequest req,
|
||||
@PathParam("settingId") String settingId) {
|
||||
@PathParam("settingId") String settingId) {
|
||||
String propName = req.getParameter("propName");
|
||||
if (propName == null) {
|
||||
return new JsonResponse<>(Status.BAD_REQUEST).build();
|
||||
|
|
@ -300,6 +300,8 @@ public class InterpreterRestApi {
|
|||
@GET
|
||||
@Path("property/widgets")
|
||||
public Response listInterpreterPropertyWidgets() {
|
||||
return new JsonResponse<>(Status.OK, InterpreterPropertyWidget.values()).build();
|
||||
return new JsonResponse<>(Status.OK, InterpreterPropertyWidgetUtils.getAvailableWidgets()).build();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.zeppelin.interpreter.InterpreterPropertyType;
|
||||
import org.apache.zeppelin.interpreter.InterpreterPropertyWidget;
|
||||
|
||||
/**
|
||||
* Utils for widget of interpreter property
|
||||
*/
|
||||
public class InterpreterPropertyWidgetUtils {
|
||||
|
||||
private static final List<Widget> availableWidgets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
availableWidgets.add(new Widget("textarea", InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
availableWidgets.add(new Widget("number", InterpreterPropertyWidget.INPUT.getValue(),
|
||||
InterpreterPropertyType.NUMBER.getValue()));
|
||||
availableWidgets.add(new Widget("string", InterpreterPropertyWidget.INPUT.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
availableWidgets.add(new Widget("url", InterpreterPropertyWidget.INPUT.getValue(),
|
||||
InterpreterPropertyType.URL.getValue()));
|
||||
availableWidgets.add(new Widget("password", InterpreterPropertyWidget.PASSWORD.getValue(),
|
||||
InterpreterPropertyType.PASSWORD.getValue()));
|
||||
availableWidgets.add(new Widget("checkbox", InterpreterPropertyWidget.CHECKBOX.getValue(),
|
||||
InterpreterPropertyType.BOOLEAN.getValue()));
|
||||
}
|
||||
|
||||
private static class Widget {
|
||||
private String id;
|
||||
private String widget;
|
||||
private String type;
|
||||
|
||||
public Widget(String id, String widget, String type) {
|
||||
this.id = id;
|
||||
this.widget = widget;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getWidget() {
|
||||
return widget;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Widget> getAvailableWidgets() {
|
||||
return availableWidgets;
|
||||
}
|
||||
}
|
||||
|
|
@ -45,6 +45,7 @@ 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.InterpreterPropertyWidget;
|
||||
import org.apache.zeppelin.interpreter.InterpreterSetting;
|
||||
import org.apache.zeppelin.server.ZeppelinServer;
|
||||
|
|
@ -205,14 +206,18 @@ public abstract class AbstractTestRestApi {
|
|||
if ("true".equals(System.getenv("CI"))) {
|
||||
// set spark master and other properties
|
||||
sparkProperties.put("master",
|
||||
new InterpreterProperty("master", "local[2]", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("master", "local[2]", InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
sparkProperties.put("spark.cores.max",
|
||||
new InterpreterProperty("spark.cores.max", "2", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("spark.cores.max", "2", InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
sparkProperties.put("zeppelin.spark.useHiveContext",
|
||||
new InterpreterProperty("zeppelin.spark.useHiveContext", false, InterpreterPropertyWidget.checkbox));
|
||||
new InterpreterProperty("zeppelin.spark.useHiveContext", false, InterpreterPropertyWidget.CHECKBOX.getValue(),
|
||||
InterpreterPropertyType.BOOLEAN.getValue()));
|
||||
// set spark home for pyspark
|
||||
sparkProperties.put("spark.home",
|
||||
new InterpreterProperty("spark.home", getSparkHome(), InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("spark.home", getSparkHome(), InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
|
||||
sparkIntpSetting.setProperties(sparkProperties);
|
||||
pySpark = true;
|
||||
|
|
@ -223,18 +228,23 @@ public abstract class AbstractTestRestApi {
|
|||
if (sparkHome != null) {
|
||||
if (System.getenv("SPARK_MASTER") != null) {
|
||||
sparkProperties.put("master",
|
||||
new InterpreterProperty("master", System.getenv("SPARK_MASTER"), InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("master", System.getenv("SPARK_MASTER"), InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
} else {
|
||||
sparkProperties.put("master",
|
||||
new InterpreterProperty("master", "local[2]", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("master", "local[2]", InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
}
|
||||
sparkProperties.put("spark.cores.max",
|
||||
new InterpreterProperty("spark.cores.max", "2", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("spark.cores.max", "2", InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
// set spark home for pyspark
|
||||
sparkProperties.put("spark.home",
|
||||
new InterpreterProperty("spark.home", sparkHome, InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("spark.home", sparkHome, InterpreterPropertyWidget.TEXTAREA.getValue(),
|
||||
InterpreterPropertyType.STRING.getValue()));
|
||||
sparkProperties.put("zeppelin.spark.useHiveContext",
|
||||
new InterpreterProperty("zeppelin.spark.useHiveContext", false, InterpreterPropertyWidget.checkbox));
|
||||
new InterpreterProperty("zeppelin.spark.useHiveContext", false, InterpreterPropertyWidget.CHECKBOX.getValue(),
|
||||
InterpreterPropertyType.BOOLEAN.getValue()));
|
||||
pySpark = true;
|
||||
sparkR = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,13 +277,19 @@ limitations under the License.
|
|||
</tr>
|
||||
<tr ng-repeat="key in newInterpreterSetting.properties | sortByKey">
|
||||
<td>{{key}}</td>
|
||||
<td style="vertical-align: middle;" ng-switch on="newInterpreterSetting.properties[key].widget">
|
||||
<textarea ng-switch-default msd-elastic ng-model="newInterpreterSetting.properties[key].value"></textarea>
|
||||
<input ng-switch-when="string" type="text" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-switch-when="number" type="text" widget-number msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-switch-when="url" type="text" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-switch-when="password" type="password" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-switch-when="checkbox" type="checkbox" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<td style="vertical-align: middle;">
|
||||
<textarea ng-if="newInterpreterSetting.properties[key].widget === 'textarea' && newInterpreterSetting.properties[key].type === 'string'"
|
||||
msd-elastic ng-model="newInterpreterSetting.properties[key].value"></textarea>
|
||||
<input ng-if="newInterpreterSetting.properties[key].widget === 'input' && newInterpreterSetting.properties[key].type === 'string'"
|
||||
type="text" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-if="newInterpreterSetting.properties[key].widget === 'input' && newInterpreterSetting.properties[key].type === 'number'"
|
||||
type="text" widget-number msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-if="newInterpreterSetting.properties[key].widget === 'input' && newInterpreterSetting.properties[key].type === 'url'"
|
||||
type="text" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-if="newInterpreterSetting.properties[key].widget === 'password' && newInterpreterSetting.properties[key].type === 'password'"
|
||||
type="password" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
<input ng-if="newInterpreterSetting.properties[key].widget === 'checkbox' && newInterpreterSetting.properties[key].type === 'boolean'"
|
||||
type="checkbox" msd-elastic ng-model="newInterpreterSetting.properties[key].value" />
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<button class="btn btn-default btn-sm fa fa-remove" ng-click="removeInterpreterProperty(key)">
|
||||
|
|
@ -299,7 +305,7 @@ limitations under the License.
|
|||
<input pu-elastic-input pu-elastic-input-minwidth="180px"
|
||||
ng-model="newInterpreterSetting.propertyKey" />
|
||||
</td>
|
||||
<td style="vertical-align: middle;" ng-switch on="newInterpreterSetting.propertyWidget">
|
||||
<td style="vertical-align: middle;" ng-switch on="newInterpreterSetting.propertyWidget.id">
|
||||
<textarea ng-switch-default msd-elastic ng-model="newInterpreterSetting.propertyValue"></textarea>
|
||||
<input ng-switch-when="string" type="text" msd-elastic ng-model="newInterpreterSetting.propertyValue" />
|
||||
<input ng-switch-when="number" type="text" widget-number msd-elastic ng-model="newInterpreterSetting.propertyValue" />
|
||||
|
|
@ -309,7 +315,7 @@ limitations under the License.
|
|||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<select msd-elastic ng-model="newInterpreterSetting.propertyWidget" ng-init="newInterpreterSetting.propertyWidget=interpreterPropertyWidgets[0]"
|
||||
ng-options="item for item in interpreterPropertyWidgets" ng-change="defaultValueByWidget(newInterpreterSetting)">
|
||||
ng-options="item.id for item in interpreterPropertyWidgets" ng-change="defaultValueByWidget(newInterpreterSetting)">
|
||||
</select>
|
||||
<button class="btn btn-default btn-sm fa fa-plus" ng-click="addNewInterpreterProperty()">
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
}
|
||||
|
||||
$scope.defaultValueByWidget = function (setting) {
|
||||
if (setting.propertyWidget === 'checkbox') {
|
||||
if (setting.propertyWidget.widget === 'checkbox' && setting.propertyWidget.type === 'boolean') {
|
||||
setting.propertyValue = false
|
||||
return
|
||||
}
|
||||
|
|
@ -429,7 +429,8 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
properties[key] = {
|
||||
value: intpInfo[key].defaultValue,
|
||||
description: intpInfo[key].description,
|
||||
widget: intpInfo[key].widget
|
||||
widget: intpInfo[key].widget,
|
||||
type: intpInfo[key].type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -506,7 +507,12 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
let newProperties = {}
|
||||
|
||||
for (let p in newSetting.properties) {
|
||||
newProperties[p] = {value: newSetting.properties[p].value, widget: newSetting.properties[p].widget, name: p}
|
||||
newProperties[p] = {
|
||||
value: newSetting.properties[p].value,
|
||||
widget: newSetting.properties[p].widget,
|
||||
type: newSetting.properties[p].type,
|
||||
name: p
|
||||
}
|
||||
}
|
||||
|
||||
request.properties = newProperties
|
||||
|
|
@ -576,10 +582,10 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
if (!$scope.newInterpreterSetting.propertyKey || $scope.newInterpreterSetting.propertyKey === '') {
|
||||
return
|
||||
}
|
||||
|
||||
$scope.newInterpreterSetting.properties[$scope.newInterpreterSetting.propertyKey] = {
|
||||
value: $scope.newInterpreterSetting.propertyValue,
|
||||
widget: $scope.newInterpreterSetting.propertyWidget
|
||||
widget: $scope.newInterpreterSetting.propertyWidget.widget,
|
||||
type: $scope.newInterpreterSetting.propertyWidget.type
|
||||
}
|
||||
emptyNewProperty($scope.newInterpreterSetting)
|
||||
} else {
|
||||
|
|
@ -591,7 +597,8 @@ function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeou
|
|||
return
|
||||
}
|
||||
|
||||
setting.properties[setting.propertyKey] = {value: setting.propertyValue, widget: setting.propertyWidget}
|
||||
setting.properties[setting.propertyKey] =
|
||||
{value: setting.propertyValue, widget: setting.propertyWidget.widget, type: setting.propertyWidget.type}
|
||||
|
||||
emptyNewProperty(setting)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -400,21 +400,29 @@ limitations under the License.
|
|||
</thead>
|
||||
<tr ng-repeat="key in setting.properties | sortByKey" >
|
||||
<td style="vertical-align: middle;">{{key}}</td>
|
||||
<td style="vertical-align: middle;" ng-switch on="setting.properties[key].widget">
|
||||
<span ng-switch-default editable-textarea="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
<td style="vertical-align: middle;">
|
||||
<span ng-if="setting.properties[key].widget === 'textarea' && setting.properties[key].type === 'string'"
|
||||
editable-textarea="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value | breakFilter}}
|
||||
</span>
|
||||
<span ng-switch-when="string" editable-text="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
<span ng-if="setting.properties[key].widget === 'input' && setting.properties[key].type === 'string'"
|
||||
editable-text="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value}}
|
||||
</span>
|
||||
<span ng-switch-when="number" editable-text="setting.properties[key].value" e-widget-number e-form="valueform" e-msd-elastic>
|
||||
<span ng-if="setting.properties[key].widget === 'input' && setting.properties[key].type === 'number'"
|
||||
editable-text="setting.properties[key].value" e-widget-number e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value}}
|
||||
</span>
|
||||
<a ng-switch-when="url" ng-href="{{setting.properties[key].value}}" editable-text="setting.properties[key].value" e-label="setting.properties[key].value" e-form="valueform" e-msd-elastic>{{setting.properties[key].value}}</a>
|
||||
<span ng-switch-when="password" editable-password="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
<span ng-if="setting.properties[key].widget === 'input' && setting.properties[key].type === 'url'"
|
||||
editable-text="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
<a ng-href="{{setting.properties[key].value}}">{{setting.properties[key].value}}</a>
|
||||
</span>
|
||||
<span ng-if="setting.properties[key].widget === 'password' && setting.properties[key].type === 'password'"
|
||||
editable-password="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value ? '***' : ''}}
|
||||
</span>
|
||||
<span ng-switch-when="checkbox" editable-checkbox="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
<span ng-if="setting.properties[key].widget === 'checkbox' && setting.properties[key].type === 'boolean'"
|
||||
editable-checkbox="setting.properties[key].value" e-form="valueform" e-msd-elastic>
|
||||
{{setting.properties[key].value}}
|
||||
</span>
|
||||
</td>
|
||||
|
|
@ -430,7 +438,7 @@ limitations under the License.
|
|||
pu-elastic-input pu-elastic-input-minwidth="180px" />
|
||||
</td>
|
||||
|
||||
<td style="vertical-align: middle;" ng-switch on="setting.propertyWidget">
|
||||
<td style="vertical-align: middle;" ng-switch on="setting.propertyWidget.id">
|
||||
<textarea ng-switch-default msd-elastic ng-model="setting.propertyValue"></textarea>
|
||||
<input ng-switch-when="string" type="text" msd-elastic ng-model="setting.propertyValue"/>
|
||||
<input ng-switch-when="number" type="text" msd-elastic ng-model="setting.propertyValue" widget-number />
|
||||
|
|
@ -440,8 +448,9 @@ limitations under the License.
|
|||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<select ng-model="setting.propertyWidget" ng-init="setting.propertyWidget=interpreterPropertyWidgets[0]"
|
||||
ng-options="item for item in interpreterPropertyWidgets" ng-change="defaultValueByWidget(setting)">
|
||||
ng-options="item.id for item in interpreterPropertyWidgets" ng-change="defaultValueByWidget(setting)">
|
||||
</select>
|
||||
|
||||
<button class="btn btn-default btn-sm fa fa-plus"
|
||||
ng-click="addNewInterpreterProperty(setting.id)">
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -173,13 +173,15 @@ public class InterpreterSettingManager {
|
|||
for (String key : p.keySet()) {
|
||||
StringMap<String> fields = (StringMap<String>) p.get(key);
|
||||
// default 'text'
|
||||
InterpreterPropertyWidget widget = InterpreterPropertyWidget.text;
|
||||
String widget = InterpreterPropertyWidget.TEXTAREA.getValue();
|
||||
String type = InterpreterPropertyType.STRING.getValue();
|
||||
try {
|
||||
widget = InterpreterPropertyWidget.valueOf(fields.get("widget"));
|
||||
widget = InterpreterPropertyWidget.byValue(fields.get("widget")).getValue();
|
||||
type = InterpreterPropertyType.byValue(fields.get("type")).getValue();
|
||||
} catch (Exception e) {
|
||||
logger.warn("Incorrect type of property {} in settings {}", key, setting.getId());
|
||||
logger.warn("Incorrect widget or type of property {} in settings {}", key, setting.getId());
|
||||
}
|
||||
properties.put(key, new InterpreterProperty(key, fields.get("value"), widget));
|
||||
properties.put(key, new InterpreterProperty(key, fields.get("value"), widget, type));
|
||||
}
|
||||
setting.setProperties(properties);
|
||||
|
||||
|
|
@ -500,7 +502,7 @@ public class InterpreterSettingManager {
|
|||
for (String key : defaultProperties.keySet()) {
|
||||
DefaultInterpreterProperty defaultInterpreterProperty = defaultProperties.get(key);
|
||||
properties.put(key, new InterpreterProperty(key, defaultInterpreterProperty.getValue(),
|
||||
defaultInterpreterProperty.getWidget()));
|
||||
defaultInterpreterProperty.getWidget(), defaultInterpreterProperty.getType()));
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ public class InterpreterFactoryTest {
|
|||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1"));
|
||||
intp1Properties.put("property_2",
|
||||
new InterpreterProperty("property_2", "value_2", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("property_2", "value_2"));
|
||||
interpreterSettingManager.createNewSetting("mock1", "mock1", new ArrayList<Dependency>(), new InterpreterOption(true), intp1Properties);
|
||||
|
||||
ArrayList<InterpreterInfo> interpreterInfos2 = new ArrayList<>();
|
||||
|
|
@ -162,9 +162,8 @@ public class InterpreterFactoryTest {
|
|||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyWidget.text));
|
||||
intp1Properties.put("property_2", new InterpreterProperty("property_2", "value_2",
|
||||
InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1"));
|
||||
intp1Properties.put("property_2", new InterpreterProperty("property_2", "value_2"));
|
||||
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();
|
||||
|
|
@ -201,9 +200,9 @@ public class InterpreterFactoryTest {
|
|||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1"));
|
||||
intp1Properties.put("property_2",
|
||||
new InterpreterProperty("property_2", "value_2", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("property_2", "value_2"));
|
||||
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();
|
||||
|
|
@ -248,9 +247,9 @@ public class InterpreterFactoryTest {
|
|||
Maps.<String, DefaultInterpreterProperty>newHashMap(), "mock1", null);
|
||||
Map<String, InterpreterProperty> intp1Properties = new HashMap<String, InterpreterProperty>();
|
||||
intp1Properties.put("PROPERTY_1",
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("PROPERTY_1", "VALUE_1"));
|
||||
intp1Properties.put("property_2",
|
||||
new InterpreterProperty("property_2", "value_2", InterpreterPropertyWidget.text));
|
||||
new InterpreterProperty("property_2", "value_2"));
|
||||
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();
|
||||
|
|
@ -339,8 +338,8 @@ public class InterpreterFactoryTest {
|
|||
|
||||
// check if interpreter instance is saved as Properties in conf/interpreter.json file
|
||||
Map<String, InterpreterProperty> properties = new HashMap<String, InterpreterProperty>();
|
||||
properties.put("key1", new InterpreterProperty("key1", "value1", InterpreterPropertyWidget.text));
|
||||
properties.put("key2", new InterpreterProperty("key2", "value2", InterpreterPropertyWidget.text));
|
||||
properties.put("key1", new InterpreterProperty("key1", "value1"));
|
||||
properties.put("key2", new InterpreterProperty("key2", "value2"));
|
||||
|
||||
interpreterSettingManager.createNewSetting("newMock", "mock1", new LinkedList<Dependency>(), new InterpreterOption(false), properties);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue