diff --git a/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java b/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
index 12297b684bb..c677e451270 100644
--- a/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
+++ b/geode/src/main/java/org/apache/zeppelin/geode/GeodeOqlInterpreter.java
@@ -21,7 +21,6 @@
import org.apache.commons.lang.StringUtils;
import org.apache.zeppelin.interpreter.Interpreter;
import org.apache.zeppelin.interpreter.InterpreterContext;
-import org.apache.zeppelin.interpreter.InterpreterPropertyBuilder;
import org.apache.zeppelin.interpreter.InterpreterResult;
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
@@ -38,7 +37,7 @@
import com.gemstone.gemfire.pdx.PdxInstance;
/**
- * Apache Geode OQL Interpreter (http://geode.incubator.apache.org)
+ * Apache Geode OQL Interpreter (http://geode.apache.org)
*
*
* - {@code geode.locator.host} - The Geode Locator {@code } to connect to.
@@ -87,30 +86,12 @@ public class GeodeOqlInterpreter extends Interpreter {
private Logger logger = LoggerFactory.getLogger(GeodeOqlInterpreter.class);
- public static final String DEFAULT_PORT = "10334";
- public static final String DEFAULT_HOST = "localhost";
- public static final String DEFAULT_MAX_RESULT = "1000";
-
private static final char NEWLINE = '\n';
private static final char TAB = '\t';
private static final char WHITESPACE = ' ';
private static final String TABLE_MAGIC_TAG = "%table ";
- public static final String LOCATOR_HOST = "geode.locator.host";
- public static final String LOCATOR_PORT = "geode.locator.port";
- public static final String MAX_RESULT = "geode.max.result";
-
- static {
- Interpreter.register(
- "oql",
- "geode",
- GeodeOqlInterpreter.class.getName(),
- new InterpreterPropertyBuilder().add(LOCATOR_HOST, DEFAULT_HOST, "The Geode Locator Host.")
- .add(LOCATOR_PORT, DEFAULT_PORT, "The Geode Locator Port")
- .add(MAX_RESULT, DEFAULT_MAX_RESULT, "Max number of OQL result to display.").build());
- }
-
private ClientCache clientCache = null;
private QueryService queryService = null;
private Exception exceptionOnConnect;
@@ -122,8 +103,8 @@ public GeodeOqlInterpreter(Properties property) {
protected ClientCache getClientCache() {
- String locatorHost = getProperty(LOCATOR_HOST);
- int locatorPort = Integer.valueOf(getProperty(LOCATOR_PORT));
+ String locatorHost = getProperty("geode.locator.host");
+ int locatorPort = Integer.valueOf(getProperty("geode.locator.port"));
ClientCache clientCache =
new ClientCacheFactory().addPoolLocator(locatorHost, locatorPort).create();
@@ -139,7 +120,7 @@ public void open() {
close();
try {
- maxResult = Integer.valueOf(getProperty(MAX_RESULT));
+ maxResult = Integer.valueOf(getProperty("geode.max.result"));
clientCache = getClientCache();
queryService = clientCache.getQueryService();
diff --git a/geode/src/main/resources/interpreter-setting.json b/geode/src/main/resources/interpreter-setting.json
new file mode 100644
index 00000000000..f67cfef86f5
--- /dev/null
+++ b/geode/src/main/resources/interpreter-setting.json
@@ -0,0 +1,30 @@
+[
+ {
+ "group": "geode",
+ "name": "oql",
+ "className": "org.apache.zeppelin.geode.GeodeOqlInterpreter",
+ "properties": {
+ "geode.locator.host": {
+ "envName": null,
+ "propertyName": "geode.locator.host",
+ "defaultValue": "localhost",
+ "description": "The Geode Locator Host."
+ },
+ "geode.locator.port": {
+ "envName": null,
+ "propertyName": "geode.locator.port",
+ "defaultValue": "10334",
+ "description": "The Geode Locator Port."
+ },
+ "geode.max.result": {
+ "envName": null,
+ "propertyName": "geode.max.result",
+ "defaultValue": "1000",
+ "description": "Max number of OQL result to display."
+ }
+ },
+ "editor": {
+ "language": "sql"
+ }
+ }
+]
diff --git a/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java b/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
index 78755eba5a4..0b23caa4533 100644
--- a/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
+++ b/geode/src/test/java/org/apache/zeppelin/geode/GeodeOqlInterpreterTest.java
@@ -58,9 +58,9 @@ private static Iterator