You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "ChengJie1053 (via GitHub)" <gi...@apache.org> on 2023/04/28 09:44:12 UTC
[GitHub] [linkis] ChengJie1053 opened a new pull request, #4499: Engineplugin shell Code optimization
ChengJie1053 opened a new pull request, #4499:
URL: https://github.com/apache/linkis/pull/4499
Engineplugin shell Code optimization
Will ShellEngineConnExecutor and ShellEngineConnConcurrentExecutor common code extraction
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] peacewong commented on a diff in pull request #4499: Engineplugin shell Code optimization
Posted by "peacewong (via GitHub)" <gi...@apache.org>.
peacewong commented on code in PR #4499:
URL: https://github.com/apache/linkis/pull/4499#discussion_r1181088476
##########
linkis-engineconn-plugins/shell/src/main/java/org/apache/linkis/manager/engineplugin/shell/executor/ShellEngineConnConcurrentExecutor.java:
##########
@@ -17,294 +17,98 @@
package org.apache.linkis.manager.engineplugin.shell.executor;
-import org.apache.linkis.common.utils.Utils;
import org.apache.linkis.engineconn.computation.executor.execute.ConcurrentComputationExecutor;
import org.apache.linkis.engineconn.computation.executor.execute.EngineExecutionContext;
-import org.apache.linkis.engineconn.core.EngineConnObject;
import org.apache.linkis.governance.common.utils.GovernanceUtils;
-import org.apache.linkis.manager.common.entity.resource.CommonNodeResource;
import org.apache.linkis.manager.common.entity.resource.NodeResource;
-import org.apache.linkis.manager.engineplugin.common.util.NodeResourceUtils;
-import org.apache.linkis.manager.engineplugin.shell.common.ShellEngineConnPluginConst;
-import org.apache.linkis.manager.engineplugin.shell.conf.ShellEngineConnConf;
-import org.apache.linkis.manager.engineplugin.shell.exception.ShellCodeErrorException;
import org.apache.linkis.manager.label.entity.Label;
import org.apache.linkis.protocol.engine.JobProgressInfo;
-import org.apache.linkis.rpc.Sender;
-import org.apache.linkis.scheduler.executer.ErrorExecuteResponse;
import org.apache.linkis.scheduler.executer.ExecuteResponse;
-import org.apache.linkis.scheduler.executer.SuccessExecuteResponse;
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import scala.concurrent.ExecutionContextExecutorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ShellEngineConnConcurrentExecutor extends ConcurrentComputationExecutor {
+
private static final Logger logger =
LoggerFactory.getLogger(ShellEngineConnConcurrentExecutor.class);
- private EngineExecutionContext engineExecutionContext;
+ private ShellEngineConnExecutor shellEngineConnExecutor;
- private List<Label<?>> executorLabels = new ArrayList<>();
-
- private Map<String, ShellECTaskInfo> shellECTaskInfoCache = new ConcurrentHashMap<>();
-
- private int id;
private int maxRunningNumber;
public ShellEngineConnConcurrentExecutor(int id, int maxRunningNumber) {
- super(maxRunningNumber);
- this.id = id;
+ super(id);
Review Comment:
can delete,use dufault
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] ChengJie1053 commented on a diff in pull request #4499: Engineplugin shell Code optimization
Posted by "ChengJie1053 (via GitHub)" <gi...@apache.org>.
ChengJie1053 commented on code in PR #4499:
URL: https://github.com/apache/linkis/pull/4499#discussion_r1181149475
##########
linkis-engineconn-plugins/shell/src/main/java/org/apache/linkis/manager/engineplugin/shell/executor/ShellEngineConnConcurrentExecutor.java:
##########
@@ -17,294 +17,98 @@
package org.apache.linkis.manager.engineplugin.shell.executor;
-import org.apache.linkis.common.utils.Utils;
import org.apache.linkis.engineconn.computation.executor.execute.ConcurrentComputationExecutor;
import org.apache.linkis.engineconn.computation.executor.execute.EngineExecutionContext;
-import org.apache.linkis.engineconn.core.EngineConnObject;
import org.apache.linkis.governance.common.utils.GovernanceUtils;
-import org.apache.linkis.manager.common.entity.resource.CommonNodeResource;
import org.apache.linkis.manager.common.entity.resource.NodeResource;
-import org.apache.linkis.manager.engineplugin.common.util.NodeResourceUtils;
-import org.apache.linkis.manager.engineplugin.shell.common.ShellEngineConnPluginConst;
-import org.apache.linkis.manager.engineplugin.shell.conf.ShellEngineConnConf;
-import org.apache.linkis.manager.engineplugin.shell.exception.ShellCodeErrorException;
import org.apache.linkis.manager.label.entity.Label;
import org.apache.linkis.protocol.engine.JobProgressInfo;
-import org.apache.linkis.rpc.Sender;
-import org.apache.linkis.scheduler.executer.ErrorExecuteResponse;
import org.apache.linkis.scheduler.executer.ExecuteResponse;
-import org.apache.linkis.scheduler.executer.SuccessExecuteResponse;
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import scala.concurrent.ExecutionContextExecutorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ShellEngineConnConcurrentExecutor extends ConcurrentComputationExecutor {
+
private static final Logger logger =
LoggerFactory.getLogger(ShellEngineConnConcurrentExecutor.class);
- private EngineExecutionContext engineExecutionContext;
+ private ShellEngineConnExecutor shellEngineConnExecutor;
- private List<Label<?>> executorLabels = new ArrayList<>();
-
- private Map<String, ShellECTaskInfo> shellECTaskInfoCache = new ConcurrentHashMap<>();
-
- private int id;
private int maxRunningNumber;
public ShellEngineConnConcurrentExecutor(int id, int maxRunningNumber) {
- super(maxRunningNumber);
- this.id = id;
+ super(id);
Review Comment:
Ok, thank you for reviewing the code
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] peacewong merged pull request #4499: Engineplugin shell Code optimization
Posted by "peacewong (via GitHub)" <gi...@apache.org>.
peacewong merged PR #4499:
URL: https://github.com/apache/linkis/pull/4499
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org