提交 8125974c 编写于 作者: Y Yelli 提交者: Tboy

ds.server regularize log print (#1751)

* ds.server regularize log print

* log print modify

* log print modify

* modify lang3 to lang
上级 8ae401e3
......@@ -16,7 +16,7 @@
*/
package org.apache.dolphinscheduler.api.security;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -141,7 +141,7 @@ public class MasterServer implements IStoppable {
} catch (SchedulerException e1) {
logger.error("QuartzExecutors shutdown failed : " + e1.getMessage(), e1);
}
logger.error("start Quartz failed : " + e.getMessage(), e);
logger.error("start Quartz failed", e);
}
......@@ -183,7 +183,7 @@ public class MasterServer 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 {
heartbeatMasterService.shutdownNow();
......@@ -228,7 +228,7 @@ public class MasterServer implements IStoppable {
} catch (Exception e) {
logger.error("master server stop exception : " + e.getMessage(), e);
logger.error("master server stop exception ", e);
System.exit(-1);
}
}
......
......@@ -140,7 +140,7 @@ public class MasterBaseTaskExecThread implements Callable<Boolean> {
}
Thread.sleep(commitRetryInterval);
} catch (Exception e) {
logger.error("task commit to mysql and queue failed : " + e.getMessage(),e);
logger.error("task commit to mysql and queue failed",e);
}
retryTimes += 1;
}
......
......@@ -170,7 +170,7 @@ public class MasterExecThread implements Runnable {
executeProcess();
}
}catch (Exception e){
logger.error("master exec thread exception: " + e.getMessage(), e);
logger.error("master exec thread exception", e);
logger.error("process execute failed, process id:{}", processInstance.getId());
processInstance.setState(ExecutionStatus.FAILURE);
processInstance.setEndTime(new Date());
......@@ -355,7 +355,7 @@ public class MasterExecThread implements Runnable {
try {
FileUtils.deleteDirectory(new File(execLocalPath));
} catch (IOException e) {
logger.error("delete exec dir failed : " + e.getMessage(), e);
logger.error("delete exec dir failed ", e);
}
}
}
......@@ -733,7 +733,7 @@ public class MasterExecThread implements Runnable {
Date endTime = DateUtils.getScheduleDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE));
return processInstance.getScheduleTime().equals(endTime);
} catch (Exception e) {
logger.error("complement end failed : " + e.getMessage(),e);
logger.error("complement end failed ",e);
return false;
}
}
......@@ -1005,7 +1005,7 @@ public class MasterExecThread implements Runnable {
return task;
}
}catch (Exception e){
logger.error("get recovery task instance failed : " + e.getMessage(),e);
logger.error("get recovery task instance failed ",e);
}
return null;
}
......
......@@ -134,7 +134,7 @@ public class MasterSchedulerThread implements Runnable {
}
}
}catch (Exception e){
logger.error("master scheduler thread exception : " + e.getMessage(),e);
logger.error("master scheduler thread exception",e);
}finally{
AbstractZKClient.releaseMutex(mutex);
}
......
......@@ -137,7 +137,7 @@ public class MasterTaskExecThread extends MasterBaseTaskExecThread {
processInstance = processDao.findProcessInstanceById(processInstance.getId());
Thread.sleep(Constants.SLEEP_TIME_MILLIS);
} catch (Exception e) {
logger.error("exception: "+ e.getMessage(),e);
logger.error("exception",e);
if (processInstance != null) {
logger.error("wait task quit failed, instance id:{}, task id:{}",
processInstance.getId(), taskInstance.getId());
......
......@@ -18,9 +18,9 @@ package org.apache.dolphinscheduler.server.quartz;
import com.alibaba.druid.pool.DruidDataSource;
import org.quartz.SchedulerException;
import org.quartz.utils.ConnectionProvider;
import java.sql.Connection;
import java.sql.SQLException;
import org.quartz.utils.ConnectionProvider;
/**
* druid connection provider
......@@ -137,7 +137,7 @@ public class DruidConnectionProvider implements ConnectionProvider {
datasource.setDriverClassName(this.driver);
} catch (Exception e) {
try {
throw new SchedulerException("Problem setting driver class name on datasource: " + e.getMessage(), e);
throw new SchedulerException("Problem setting driver class name on datasource", e);
} catch (SchedulerException e1) {
}
}
......
......@@ -27,7 +27,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
import java.util.Calendar;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
......@@ -198,7 +197,7 @@ public class QuartzExecutors {
} catch (Exception e) {
logger.error("add job failed", e);
throw new RuntimeException("add job failed:"+e.getMessage());
throw new RuntimeException("add job failed", e);
} finally {
lock.writeLock().unlock();
}
......
......@@ -102,7 +102,7 @@ public class LogClient {
retStrInfo = blockingStub.rollViewLog(pathParameter);
return retStrInfo.getMsg();
} catch (StatusRuntimeException e) {
logger.error("roll view log failed : " + e.getMessage(), e);
logger.error("roll view log failed", e);
return null;
}
}
......@@ -122,7 +122,7 @@ public class LogClient {
retStrInfo = blockingStub.viewLog(pathParameter);
return retStrInfo.getMsg();
} catch (StatusRuntimeException e) {
logger.error("view log failed : " + e.getMessage(), e);
logger.error("view log failed", e);
return null;
}
}
......@@ -142,7 +142,7 @@ public class LogClient {
retByteInfo = blockingStub.getLogBytes(pathParameter);
return retByteInfo.getData().toByteArray();
} catch (StatusRuntimeException e) {
logger.error("get log bytes failed : " + e.getMessage(), e);
logger.error("get log bytes failed ", e);
return null;
}
}
......
......@@ -308,7 +308,7 @@ public class ProcessUtils {
Runtime.getRuntime().exec(runCmd);
} catch (Exception e) {
logger.error("kill application failed : " + e.getMessage(), e);
logger.error("kill application failed", e);
}
}
}
......@@ -337,7 +337,7 @@ public class ProcessUtils {
killYarnJob(taskInstance);
} catch (Exception e) {
logger.error("kill failed : " + e.getMessage(), e);
logger.error("kill task failed", e);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册