From d899a299f2d59ce6cd5dd43cc7e6431e5257cbf3 Mon Sep 17 00:00:00 2001 From: Jeff Zhang Date: Sat, 24 Feb 2018 14:25:38 +0800 Subject: [PATCH] [HOTFIX] rename zeppelin.ipython.grpc.framesize to zeppelin.ipython.grpc.message_size --- .../java/org/apache/zeppelin/python/IPythonInterpreter.java | 4 ++-- python/src/main/resources/interpreter-setting.json | 6 +++--- .../org/apache/zeppelin/python/IPythonInterpreterTest.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java index 10bf530b4ae..5c5bfe39500 100644 --- a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java +++ b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java @@ -143,10 +143,10 @@ public void open() throws InterpreterException { int jvmGatewayPort = RemoteInterpreterUtils.findRandomAvailablePortOnAllLocalInterfaces(); LOGGER.info("Launching IPython Kernel at port: " + ipythonPort); LOGGER.info("Launching JVM Gateway at port: " + jvmGatewayPort); - int framesize = Integer.parseInt(getProperty("zeppelin.ipython.grpc.framesize", + int message_size = Integer.parseInt(getProperty("zeppelin.ipython.grpc.message_size", 32 * 1024 * 1024 + "")); ipythonClient = new IPythonClient(ManagedChannelBuilder.forAddress("127.0.0.1", ipythonPort) - .usePlaintext(true).maxInboundMessageSize(framesize)); + .usePlaintext(true).maxInboundMessageSize(message_size)); launchIPythonKernel(ipythonPort); setupJVMGateway(jvmGatewayPort); } catch (Exception e) { diff --git a/python/src/main/resources/interpreter-setting.json b/python/src/main/resources/interpreter-setting.json index 3257e58abfb..f36add32aa3 100644 --- a/python/src/main/resources/interpreter-setting.json +++ b/python/src/main/resources/interpreter-setting.json @@ -41,10 +41,10 @@ "description": "time out for ipython launch", "type": "number" }, - "zeppelin.ipython.grpc.framesize": { - "propertyName": "zeppelin.ipython.grpc.framesize", + "zeppelin.ipython.grpc.message_size": { + "propertyName": "zeppelin.ipython.grpc.message_size", "defaultValue": "33554432", - "description": "grpc framesize, default is 32M", + "description": "grpc message size, default is 32M", "type": "number" } }, diff --git a/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java index dfc8c36b74a..480cae311cd 100644 --- a/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java +++ b/python/src/test/java/org/apache/zeppelin/python/IPythonInterpreterTest.java @@ -78,7 +78,7 @@ public void testIPython() throws IOException, InterruptedException, InterpreterE @Test public void testGrpcFrameSize() throws InterpreterException, IOException { Properties properties = new Properties(); - properties.setProperty("zeppelin.ipython.grpc.framesize", "4"); + properties.setProperty("zeppelin.ipython.grpc.message_size", "4"); startInterpreter(properties); // to make this test can run under both python2 and python3 @@ -99,7 +99,7 @@ public void testGrpcFrameSize() throws InterpreterException, IOException { close(); // increase framesize to make it work - properties.setProperty("zeppelin.ipython.grpc.framesize", "40"); + properties.setProperty("zeppelin.ipython.grpc.message_size", "40"); startInterpreter(properties); // to make this test can run under both python2 and python3 result = interpreter.interpret("from __future__ import print_function", getInterpreterContext());