TisonKun commented on a change in pull request #10104: [FLINK-14629][client]
Refactor ScalaShellRemote(Stream)Environment to simplify inheritance
URL: https://github.com/apache/flink/pull/10104#discussion_r346158809
##########
File path:
flink-scala-shell/src/main/java/org/apache/flink/api/java/ScalaShellRemoteEnvironment.java
##########
@@ -19,51 +19,101 @@
* limitations under the License.
*/
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.api.common.InvalidProgramException;
import org.apache.flink.api.common.JobExecutionResult;
import org.apache.flink.api.common.Plan;
import org.apache.flink.api.common.PlanExecutor;
import org.apache.flink.api.scala.FlinkILoop;
import org.apache.flink.configuration.Configuration;
+import org.apache.flink.util.JarUtils;
+import org.apache.flink.util.function.TriFunction;
+import java.io.File;
+import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import static org.apache.flink.util.Preconditions.checkArgument;
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
/**
- * Special version of {@link org.apache.flink.api.java.RemoteEnvironment} that
has a reference
- * to a {@link org.apache.flink.api.scala.FlinkILoop}. When execute is called
this will
- * use the reference of the ILoop to write the compiled classes of the current
session to
- * a Jar file and submit these with the program.
+ * A remote {@link ExecutionEnvironment} for the Scala shell.
Review comment:
Technically the configuration code path of `RemoteEnvironment` is different
from `ScalaShellRemoteEnvironment`. Duplicate codes are hidden back
PlanExecutor. But I think you're right that we can make this configuration flow
configuration(appendable). Hopefully I send a new pull request integrate this
thought.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services