You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/08/25 15:12:42 UTC
[GitHub] [zeppelin] Reamer commented on a change in pull request #4207: [ZEPPELIN-5494] Make shell interpreter concurrency configurable
Reamer commented on a change in pull request #4207:
URL: https://github.com/apache/zeppelin/pull/4207#discussion_r695852869
##########
File path: shell/src/main/java/org/apache/zeppelin/shell/ShellInterpreter.java
##########
@@ -213,7 +214,17 @@ public int getProgress(InterpreterContext context) {
@Override
public Scheduler getScheduler() {
return SchedulerFactory.singleton().createOrGetParallelScheduler(
- ShellInterpreter.class.getName() + this.hashCode(), 10);
+ ShellInterpreter.class.getName() + this.hashCode(), getMaxConcurrent());
+ }
+
+ private int getMaxConcurrent() {
+ try {
+ return Integer.valueOf(getProperty(MAX_CONCURRENCY));
+ } catch (Exception e) {
Review comment:
Please catch only the `NumberFormatException`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org