[
https://issues.apache.org/jira/browse/FLINK-3774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15247621#comment-15247621
]
ASF GitHub Bot commented on FLINK-3774:
---------------------------------------
Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/1904#discussion_r60217702
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/RemoteEnvironment.java ---
@@ -133,26 +137,31 @@ public RemoteEnvironment(String host, int port,
Configuration clientConfig,
this.port = port;
this.clientConfiguration = clientConfig == null ? new
Configuration() : clientConfig;
if (jarFiles != null) {
- this.jarFiles = new URL[jarFiles.length];
+ this.jarFiles = new ArrayList<URL>(jarFiles.length);
for (int i = 0; i < jarFiles.length; i++) {
try {
- this.jarFiles[i] = new
File(jarFiles[i]).getAbsoluteFile().toURI().toURL();
+ this.jarFiles.add(new
File(jarFiles[i]).getAbsoluteFile().toURI().toURL());
} catch (MalformedURLException e) {
throw new IllegalArgumentException("JAR
file path invalid", e);
}
}
}
else {
- this.jarFiles = null;
+ this.jarFiles = Collections.emptyList();
+ }
+
+ if (globalClasspaths == null) {
+ this.globalClasspaths = Collections.emptyList();
+ } else {
+ this.globalClasspaths = Arrays.asList(globalClasspaths);
}
- this.globalClasspaths = globalClasspaths;
}
//
------------------------------------------------------------------------
@Override
public JobExecutionResult execute(String jobName) throws Exception {
- ensureExecutorCreated();
+ PlanExecutor executor = getExecutor();
--- End diff --
would it make sense to move the assignment to ```this.executor``` from
```getExecutor()``` to this line? as it stands the ScalaShellRemoteEnvironment
executor is never closed.
> Flink configuration is not correctly forwarded to PlanExecutor in
> ScalaShellRemoteEnvironment
> ---------------------------------------------------------------------------------------------
>
> Key: FLINK-3774
> URL: https://issues.apache.org/jira/browse/FLINK-3774
> Project: Flink
> Issue Type: Bug
> Components: Scala Shell
> Affects Versions: 1.1.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Priority: Minor
> Fix For: 1.1.0
>
>
> Currently, the {{ScalaShellRemoteEnvironment}} does not correctly forwards
> the Flink configuration to the {{PlanExecutor}}. Therefore, it is not
> possible to use the Scala shell in combination with an HA cluster which needs
> the configuration parameters set in the configuration.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)