mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-748 make websocket maxTextMessageSize configurable
This commit is contained in:
parent
b45663d227
commit
07b38f1154
5 changed files with 21 additions and 2 deletions
|
|
@ -61,4 +61,5 @@
|
|||
# export ZEPPELIN_SPARK_USEHIVECONTEXT # Use HiveContext instead of SQLContext if set true. true by default.
|
||||
# export ZEPPELIN_SPARK_CONCURRENTSQL # Execute multiple SQL concurrently if set true. false by default.
|
||||
# export ZEPPELIN_SPARK_MAXRESULT # Max number of SparkSQL result to display. 1000 by default.
|
||||
# export ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE # Size in characters of the maximum text message to be received by websocket. Defaults to 1024000
|
||||
|
||||
|
|
|
|||
|
|
@ -219,5 +219,11 @@
|
|||
<description>Anonymous user allowed by default</description>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>zeppelin.websocket.maxTextMessageSize</name>
|
||||
<value>1024000</value>
|
||||
<description>Size in characters of the maximum text message to be received by websocket. Defaults to 1024000</description>
|
||||
</property>
|
||||
|
||||
</configuration>
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,12 @@ You can configure Zeppelin with both **environment variables** in `conf/zeppelin
|
|||
<td>interpreter</td>
|
||||
<td>Zeppelin interpreter directory</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE</td>
|
||||
<td>zeppelin.websocket.maxTextMessageSize</td>
|
||||
<td>1024000</td>
|
||||
<td>Size in characters of the maximum text message to be received by websocket.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Maybe you need to configure individual interpreter. If so, please check **Interpreter** section in Zeppelin documentation.
|
||||
|
|
|
|||
|
|
@ -173,8 +173,9 @@ public class ZeppelinServer extends Application {
|
|||
|
||||
private static ServletContextHandler setupNotebookServer(ZeppelinConfiguration conf) {
|
||||
notebookWsServer = new NotebookServer();
|
||||
String maxTextMessageSize = conf.getWebsocketMaxTextMessageSize();
|
||||
final ServletHolder servletHolder = new ServletHolder(notebookWsServer);
|
||||
servletHolder.setInitParameter("maxTextMessageSize", "1024000");
|
||||
servletHolder.setInitParameter("maxTextMessageSize", maxTextMessageSize);
|
||||
|
||||
final ServletContextHandler cxfContext = new ServletContextHandler(
|
||||
ServletContextHandler.SESSIONS);
|
||||
|
|
|
|||
|
|
@ -383,6 +383,10 @@ public class ZeppelinConfiguration extends XMLConfiguration {
|
|||
return Arrays.asList(getString(ConfVars.ZEPPELIN_ALLOWED_ORIGINS).toLowerCase().split(","));
|
||||
}
|
||||
|
||||
public String getWebsocketMaxTextMessageSize() {
|
||||
return getString(ConfVars.ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE);
|
||||
}
|
||||
|
||||
public Map<String, String> dumpConfigurations(ZeppelinConfiguration conf,
|
||||
ConfigurationKeyPredicate predicate) {
|
||||
Map<String, String> configurations = new HashMap<>();
|
||||
|
|
@ -489,7 +493,8 @@ public class ZeppelinConfiguration extends XMLConfiguration {
|
|||
// Allows a way to specify a ',' separated list of allowed origins for rest and websockets
|
||||
// i.e. http://localhost:8080
|
||||
ZEPPELIN_ALLOWED_ORIGINS("zeppelin.server.allowed.origins", "*"),
|
||||
ZEPPELIN_ANONYMOUS_ALLOWED("zeppelin.anonymous.allowed", true);
|
||||
ZEPPELIN_ANONYMOUS_ALLOWED("zeppelin.anonymous.allowed", true),
|
||||
ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE("zeppelin.websocket.maxTextMessageSize", "1024000");
|
||||
|
||||
private String varName;
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
|
|
|||
Loading…
Reference in a new issue