mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
changed field name and description
This commit is contained in:
parent
9eae68bbb8
commit
bb006c09ad
4 changed files with 16 additions and 10 deletions
|
|
@ -56,14 +56,14 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
|
|||
<td>URL where livy server is running</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.livy.spark.maxResult</td>
|
||||
<td>zeppelin.livy.spark.sql.maxResult</td>
|
||||
<td>1000</td>
|
||||
<td>Max number of Spark SQL result to display.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.livy.spark.sql.truncate</td>
|
||||
<td>zeppelin.livy.spark.sql.field.truncate</td>
|
||||
<td>true</td>
|
||||
<td>Whether to truncate strings or not</td>
|
||||
<td>Whether to truncate field values longer than 20 characters or not</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.livy.session.create_timeout</td>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ import java.util.Properties;
|
|||
*/
|
||||
public class LivySparkSQLInterpreter extends BaseLivyInterprereter {
|
||||
|
||||
public static final String ZEPPELIN_LIVY_SPARK_SQL_FIELD_TRUNCATE =
|
||||
"zeppelin.livy.spark.sql.field.truncate";
|
||||
|
||||
public static final String ZEPPELIN_LIVY_SPARK_SQL_MAX_RESULT =
|
||||
"zeppelin.livy.spark.sql.maxResult";
|
||||
|
||||
private LivySparkInterpreter sparkInterpreter;
|
||||
|
||||
private boolean isSpark2 = false;
|
||||
|
|
@ -40,10 +46,10 @@ public class LivySparkSQLInterpreter extends BaseLivyInterprereter {
|
|||
|
||||
public LivySparkSQLInterpreter(Properties property) {
|
||||
super(property);
|
||||
this.maxResult = Integer.parseInt(property.getProperty("zeppelin.livy.spark.sql.maxResult"));
|
||||
if (property.getProperty("zeppelin.livy.spark.sql.truncate") != null) {
|
||||
this.maxResult = Integer.parseInt(property.getProperty(ZEPPELIN_LIVY_SPARK_SQL_MAX_RESULT));
|
||||
if (property.getProperty(ZEPPELIN_LIVY_SPARK_SQL_FIELD_TRUNCATE) != null) {
|
||||
this.truncate =
|
||||
Boolean.parseBoolean(property.getProperty("zeppelin.livy.spark.sql.truncate"));
|
||||
Boolean.parseBoolean(property.getProperty(ZEPPELIN_LIVY_SPARK_SQL_FIELD_TRUNCATE));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@
|
|||
"defaultValue": "1000",
|
||||
"description": "Max number of Spark SQL result to display."
|
||||
},
|
||||
"zeppelin.livy.spark.sql.truncate": {
|
||||
"propertyName": "zeppelin.livy.spark.sql.truncate",
|
||||
"zeppelin.livy.spark.sql.field.truncate": {
|
||||
"propertyName": "zeppelin.livy.spark.sql.field.truncate",
|
||||
"defaultValue": "true",
|
||||
"description": "If true, truncate strings greater than 20 characters."
|
||||
"description": "If true, truncate field values longer than 20 characters."
|
||||
},
|
||||
"zeppelin.livy.concurrentSQL": {
|
||||
"propertyName": "zeppelin.livy.concurrentSQL",
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ public class LivyInterpreterIT {
|
|||
for (Object name: properties.keySet()) {
|
||||
newProps.put(name, properties.get(name));
|
||||
}
|
||||
newProps.put("zeppelin.livy.spark.sql.truncate", "false");
|
||||
newProps.put(LivySparkSQLInterpreter.ZEPPELIN_LIVY_SPARK_SQL_FIELD_TRUNCATE, "false");
|
||||
LivySparkInterpreter sparkInterpreter = new LivySparkInterpreter(newProps);
|
||||
sparkInterpreter.setInterpreterGroup(interpreterGroup);
|
||||
interpreterGroup.get("session_1").add(sparkInterpreter);
|
||||
|
|
|
|||
Loading…
Reference in a new issue