[ 
https://issues.apache.org/jira/browse/FLINK-10559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16651667#comment-16651667
 ] 

ASF GitHub Bot commented on FLINK-10559:
----------------------------------------

zentol closed pull request #6851: [FLINK-10559] Remove 
LegacyLocalStreamEnvironment
URL: https://github.com/apache/flink/pull/6851
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java
 
b/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java
index b9b9f8cfa30..e1b92931cec 100644
--- 
a/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java
+++ 
b/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonEnvironmentFactory.java
@@ -20,7 +20,6 @@
 
 import org.apache.flink.configuration.Configuration;
 import org.apache.flink.core.fs.Path;
-import org.apache.flink.streaming.api.environment.LegacyLocalStreamEnvironment;
 import org.apache.flink.streaming.api.environment.LocalStreamEnvironment;
 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
 
@@ -62,7 +61,7 @@ public PythonStreamExecutionEnvironment 
get_execution_environment() {
         * @return A local execution environment with the specified parallelism.
         */
        public PythonStreamExecutionEnvironment 
create_local_execution_environment(Configuration config) {
-               return new PythonStreamExecutionEnvironment(new 
LegacyLocalStreamEnvironment(config), new Path(localTmpPath), scriptName);
+               return new PythonStreamExecutionEnvironment(new 
LocalStreamEnvironment(config), new Path(localTmpPath), scriptName);
        }
 
        /**
diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LegacyLocalStreamEnvironment.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LegacyLocalStreamEnvironment.java
deleted file mode 100644
index ab276d9b511..00000000000
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LegacyLocalStreamEnvironment.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.streaming.api.environment;
-
-import org.apache.flink.annotation.Public;
-import org.apache.flink.api.common.JobExecutionResult;
-import org.apache.flink.configuration.ConfigConstants;
-import org.apache.flink.configuration.Configuration;
-import org.apache.flink.configuration.TaskManagerOptions;
-import org.apache.flink.runtime.jobgraph.JobGraph;
-import org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster;
-import org.apache.flink.streaming.api.graph.StreamGraph;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The LocalStreamEnvironment is a StreamExecutionEnvironment that runs the 
program locally,
- * multi-threaded, in the JVM where the environment is instantiated. It spawns 
an embedded
- * Flink cluster in the background and executes the program on that cluster.
- *
- * <p>When this environment is instantiated, it uses a default parallelism of 
{@code 1}. The default
- * parallelism can be set via {@link #setParallelism(int)}.
- *
- * <p>Local environments can also be instantiated through {@link 
StreamExecutionEnvironment#createLocalEnvironment()}
- * and {@link StreamExecutionEnvironment#createLocalEnvironment(int)}. The 
former version will pick a
- * default parallelism equal to the number of hardware contexts in the local 
machine.
- */
-@Public
-public class LegacyLocalStreamEnvironment extends LocalStreamEnvironment {
-
-       private static final Logger LOG = 
LoggerFactory.getLogger(LocalStreamEnvironment.class);
-
-       public LegacyLocalStreamEnvironment() {
-               this(new Configuration());
-       }
-
-       /**
-        * Creates a new local stream environment that configures its local 
executor with the given configuration.
-        *
-        * @param config The configuration used to configure the local executor.
-        */
-       public LegacyLocalStreamEnvironment(Configuration config) {
-               super(config);
-       }
-
-       /**
-        * Executes the JobGraph of the on a mini cluster of CLusterUtil with a 
user
-        * specified name.
-        *
-        * @param jobName
-        *            name of the job
-        * @return The result of the job execution, containing elapsed time and 
accumulators.
-        */
-       @Override
-       public JobExecutionResult execute(String jobName) throws Exception {
-               // transform the streaming program into a JobGraph
-               StreamGraph streamGraph = getStreamGraph();
-               streamGraph.setJobName(jobName);
-
-               JobGraph jobGraph = streamGraph.getJobGraph();
-
-               Configuration configuration = new Configuration();
-               configuration.addAll(jobGraph.getJobConfiguration());
-
-               configuration.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, 
"0");
-               
configuration.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, 
jobGraph.getMaximumParallelism());
-
-               // add (and override) the settings with what the user defined
-               configuration.addAll(getConfiguration());
-
-               if (LOG.isInfoEnabled()) {
-                       LOG.info("Running job on local embedded Flink mini 
cluster");
-               }
-
-               LocalFlinkMiniCluster exec = new 
LocalFlinkMiniCluster(configuration, true);
-               try {
-                       exec.start();
-                       return exec.submitJobAndWait(jobGraph, 
getConfig().isSysoutLoggingEnabled());
-               }
-               finally {
-                       transformations.clear();
-                       exec.stop();
-               }
-       }
-}
diff --git a/pom.xml b/pom.xml
index 77094932682..e6bfa2c1a0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1623,6 +1623,7 @@ under the License.
                                                        <excludes>
                                                                
<exclude>@org.apache.flink.annotation.PublicEvolving</exclude>
                                                                
<exclude>@org.apache.flink.annotation.Internal</exclude>
+                                                               
<exclude>org.apache.flink.streaming.api.environment.LegacyLocalStreamEnvironment</exclude>
                                                                
<exclude>org.apache.flink.streaming.api.functions.sink.RichSinkFunction#invoke(java.lang.Object)</exclude>
                                                                
<exclude>org.apache.flink.streaming.api.functions.sink.SinkFunction</exclude>
                                                                
<exclude>org.apache.flink.api.java.hadoop.mapred.HadoopInputFormat</exclude>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Remove LegacyLocalStreamEnvironment
> -----------------------------------
>
>                 Key: FLINK-10559
>                 URL: https://issues.apache.org/jira/browse/FLINK-10559
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Local Runtime
>    Affects Versions: 1.7.0
>            Reporter: TisonKun
>            Assignee: TisonKun
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> See the corresponding GitHub pull request for diagnostic, basically this 
> class is not in used any more.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to