Loading dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/zk/AbstractZKClient.java +6 −16 Original line number Diff line number Diff line Loading @@ -16,18 +16,6 @@ */ package org.apache.dolphinscheduler.common.zk; import static org.apache.dolphinscheduler.common.Constants.ADD_ZK_OP; import static org.apache.dolphinscheduler.common.Constants.DELETE_ZK_OP; import static org.apache.dolphinscheduler.common.Constants.MASTER_PREFIX; import static org.apache.dolphinscheduler.common.Constants.SINGLE_SLASH; import static org.apache.dolphinscheduler.common.Constants.UNDERLINE; import static org.apache.dolphinscheduler.common.Constants.WORKER_PREFIX; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.imps.CuratorFrameworkState; import org.apache.curator.framework.recipes.locks.InterProcessMutex; Loading @@ -42,6 +30,8 @@ import org.apache.dolphinscheduler.common.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.*; import static org.apache.dolphinscheduler.common.Constants.*; /** * abstract zookeeper client Loading Loading @@ -84,7 +74,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ zkClient.setData().forPath(znode,str.getBytes()); } catch (Exception e) { logger.error("heartbeat for zk failed : " + e.getMessage(), e); logger.error("heartbeat for zk failed", e); stoppable.stop("heartbeat for zk exception, release resources and stop myself"); } } Loading Loading @@ -274,7 +264,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ masterMap.putIfAbsent(server, super.get(path + "/" + server)); } } catch (Exception e) { logger.error("get server list failed : " + e.getMessage(), e); logger.error("get server list failed", e); } return masterMap; Loading Loading @@ -406,7 +396,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ if(e.getMessage().equals("instance must be started before calling this method")){ logger.warn("lock release"); }else{ logger.error("lock release failed : " + e.getMessage(),e); logger.error("lock release failed",e); } } Loading @@ -423,7 +413,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ persist(getDeadZNodeParentPath(), ""); } catch (Exception e) { logger.error("init system znode failed : " + e.getMessage(),e); logger.error("init system znode failed",e); } } Loading dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class WorkerServer implements IStoppable { //thread sleep 3 seconds for thread quitely stop Thread.sleep(3000L); }catch (Exception e){ logger.warn("thread sleep exception:" + e.getMessage(), e); logger.warn("thread sleep exception", e); } try { Loading Loading @@ -252,7 +252,7 @@ public class WorkerServer implements IStoppable { logger.info("zookeeper service stopped"); } catch (Exception e) { logger.error("worker server stop exception : " + e.getMessage(), e); logger.error("worker server stop exception ", e); System.exit(-1); } } Loading dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java +3 −3 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ public abstract class AbstractCommandExecutor { Runtime.getRuntime().exec(cmd); } catch (IOException e) { logger.info("kill attempt failed." + e.getMessage(), e); logger.info("kill attempt failed", e); } } Loading @@ -312,7 +312,7 @@ public abstract class AbstractCommandExecutor { Runtime.getRuntime().exec(cmd); } catch (IOException e) { logger.error("kill attempt failed." + e.getMessage(), e); logger.error("kill attempt failed ", e); } } } Loading Loading @@ -407,7 +407,7 @@ public abstract class AbstractCommandExecutor { } } } catch (Exception e) { logger.error(String.format("yarn applications: %s status failed : " + e.getMessage(), appIds.toString()),e); logger.error(String.format("yarn applications: %s status failed ", appIds.toString()),e); result = false; } return result; Loading dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java +3 −3 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class ZKMasterClient extends AbstractZKClient { } }catch (Exception e){ logger.error("master start up exception : " + e.getMessage(),e); logger.error("master start up exception",e); }finally { releaseMutex(mutex); } Loading Loading @@ -143,7 +143,7 @@ public class ZKMasterClient extends AbstractZKClient { } masterZNode = serverPath; } catch (Exception e) { logger.error("register master failure : " + e.getMessage(),e); logger.error("register master failure ",e); System.exit(-1); } } Loading Loading @@ -192,7 +192,7 @@ public class ZKMasterClient extends AbstractZKClient { } }catch (Exception e){ logger.error("{} server failover failed.", zkNodeType.toString()); logger.error("failover exception : " + e.getMessage(),e); logger.error("failover exception ",e); } finally { releaseMutex(mutex); Loading dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKWorkerClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ public class ZKWorkerClient extends AbstractZKClient { } workerZNode = serverPath; } catch (Exception e) { logger.error("register worker failure : " + e.getMessage(),e); logger.error("register worker failure",e); System.exit(-1); } } Loading Loading
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/zk/AbstractZKClient.java +6 −16 Original line number Diff line number Diff line Loading @@ -16,18 +16,6 @@ */ package org.apache.dolphinscheduler.common.zk; import static org.apache.dolphinscheduler.common.Constants.ADD_ZK_OP; import static org.apache.dolphinscheduler.common.Constants.DELETE_ZK_OP; import static org.apache.dolphinscheduler.common.Constants.MASTER_PREFIX; import static org.apache.dolphinscheduler.common.Constants.SINGLE_SLASH; import static org.apache.dolphinscheduler.common.Constants.UNDERLINE; import static org.apache.dolphinscheduler.common.Constants.WORKER_PREFIX; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.imps.CuratorFrameworkState; import org.apache.curator.framework.recipes.locks.InterProcessMutex; Loading @@ -42,6 +30,8 @@ import org.apache.dolphinscheduler.common.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.*; import static org.apache.dolphinscheduler.common.Constants.*; /** * abstract zookeeper client Loading Loading @@ -84,7 +74,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ zkClient.setData().forPath(znode,str.getBytes()); } catch (Exception e) { logger.error("heartbeat for zk failed : " + e.getMessage(), e); logger.error("heartbeat for zk failed", e); stoppable.stop("heartbeat for zk exception, release resources and stop myself"); } } Loading Loading @@ -274,7 +264,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ masterMap.putIfAbsent(server, super.get(path + "/" + server)); } } catch (Exception e) { logger.error("get server list failed : " + e.getMessage(), e); logger.error("get server list failed", e); } return masterMap; Loading Loading @@ -406,7 +396,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ if(e.getMessage().equals("instance must be started before calling this method")){ logger.warn("lock release"); }else{ logger.error("lock release failed : " + e.getMessage(),e); logger.error("lock release failed",e); } } Loading @@ -423,7 +413,7 @@ public abstract class AbstractZKClient extends ZookeeperCachedOperator{ persist(getDeadZNodeParentPath(), ""); } catch (Exception e) { logger.error("init system znode failed : " + e.getMessage(),e); logger.error("init system znode failed",e); } } Loading
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class WorkerServer implements IStoppable { //thread sleep 3 seconds for thread quitely stop Thread.sleep(3000L); }catch (Exception e){ logger.warn("thread sleep exception:" + e.getMessage(), e); logger.warn("thread sleep exception", e); } try { Loading Loading @@ -252,7 +252,7 @@ public class WorkerServer implements IStoppable { logger.info("zookeeper service stopped"); } catch (Exception e) { logger.error("worker server stop exception : " + e.getMessage(), e); logger.error("worker server stop exception ", e); System.exit(-1); } } Loading
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java +3 −3 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ public abstract class AbstractCommandExecutor { Runtime.getRuntime().exec(cmd); } catch (IOException e) { logger.info("kill attempt failed." + e.getMessage(), e); logger.info("kill attempt failed", e); } } Loading @@ -312,7 +312,7 @@ public abstract class AbstractCommandExecutor { Runtime.getRuntime().exec(cmd); } catch (IOException e) { logger.error("kill attempt failed." + e.getMessage(), e); logger.error("kill attempt failed ", e); } } } Loading Loading @@ -407,7 +407,7 @@ public abstract class AbstractCommandExecutor { } } } catch (Exception e) { logger.error(String.format("yarn applications: %s status failed : " + e.getMessage(), appIds.toString()),e); logger.error(String.format("yarn applications: %s status failed ", appIds.toString()),e); result = false; } return result; Loading
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java +3 −3 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class ZKMasterClient extends AbstractZKClient { } }catch (Exception e){ logger.error("master start up exception : " + e.getMessage(),e); logger.error("master start up exception",e); }finally { releaseMutex(mutex); } Loading Loading @@ -143,7 +143,7 @@ public class ZKMasterClient extends AbstractZKClient { } masterZNode = serverPath; } catch (Exception e) { logger.error("register master failure : " + e.getMessage(),e); logger.error("register master failure ",e); System.exit(-1); } } Loading Loading @@ -192,7 +192,7 @@ public class ZKMasterClient extends AbstractZKClient { } }catch (Exception e){ logger.error("{} server failover failed.", zkNodeType.toString()); logger.error("failover exception : " + e.getMessage(),e); logger.error("failover exception ",e); } finally { releaseMutex(mutex); Loading
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKWorkerClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ public class ZKWorkerClient extends AbstractZKClient { } workerZNode = serverPath; } catch (Exception e) { logger.error("register worker failure : " + e.getMessage(),e); logger.error("register worker failure",e); System.exit(-1); } } Loading