diff --git a/az-core/src/main/java/azkaban/AzkabanCoreModule.java b/az-core/src/main/java/azkaban/AzkabanCoreModule.java index 5ce276b..79c640c 100644 --- a/az-core/src/main/java/azkaban/AzkabanCoreModule.java +++ b/az-core/src/main/java/azkaban/AzkabanCoreModule.java @@ -20,8 +20,8 @@ import com.codahale.metrics.MetricRegistry; import com.google.inject.AbstractModule; import com.google.inject.Scopes; -import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.Logger; /** diff --git a/az-core/src/main/java/azkaban/Constants.java b/az-core/src/main/java/azkaban/Constants.java index 188692b..ab43ea0 100644 --- a/az-core/src/main/java/azkaban/Constants.java +++ b/az-core/src/main/java/azkaban/Constants.java @@ -17,8 +17,6 @@ package azkaban; import java.time.Duration; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; /** * Constants used in configuration files or shared among classes. @@ -38,7 +36,6 @@ */ public class Constants { - public static final String FLOW_PAUSED_MAX_TIME_MS = "flow.paused.max.time.ms"; public static final long DEFAULT_FLOW_PAUSED_MAX_TIME = 1 * 60 * 60 * 1000; @@ -163,6 +160,9 @@ public static class ConfigurationKeys { public static final String IS_METRICS_ENABLED = "azkaban.is.metrics.enabled"; + public static final String IP_WHITELIST_ENABLED = "azkaban.ip.whiteList.enabled"; + public static final String IP_WHITELIST = "azkaban.ip.whiteList"; + // User facing web server configurations used to construct the user facing server URLs. They are useful when there is a reverse proxy between Azkaban web servers and users. // enduser -> myazkabanhost:443 -> proxy -> localhost:8081 // when this parameters set then these parameters are used to generate email links. diff --git a/az-core/src/main/java/azkaban/metrics/MetricsManager.java b/az-core/src/main/java/azkaban/metrics/MetricsManager.java index f935eec..cbfa022 100644 --- a/az-core/src/main/java/azkaban/metrics/MetricsManager.java +++ b/az-core/src/main/java/azkaban/metrics/MetricsManager.java @@ -28,12 +28,13 @@ import com.codahale.metrics.jvm.GarbageCollectorMetricSet; import com.codahale.metrics.jvm.MemoryUsageGaugeSet; import com.codahale.metrics.jvm.ThreadStatesGaugeSet; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.lang.reflect.Constructor; import java.util.function.Supplier; import javax.inject.Inject; import javax.inject.Singleton; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * The singleton class, MetricsManager, is the place to have MetricRegistry and ConsoleReporter in diff --git a/az-core/src/main/java/azkaban/utils/ExecutorServiceUtils.java b/az-core/src/main/java/azkaban/utils/ExecutorServiceUtils.java index 2cf46d4..89288f8 100644 --- a/az-core/src/main/java/azkaban/utils/ExecutorServiceUtils.java +++ b/az-core/src/main/java/azkaban/utils/ExecutorServiceUtils.java @@ -16,11 +16,12 @@ package azkaban.utils; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.time.Duration; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Executor service related utilities. @@ -28,6 +29,7 @@ public class ExecutorServiceUtils { private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceUtils.class); + private static final TimeUnit MILLI_SECONDS_TIME_UNIT = TimeUnit.MILLISECONDS; /** diff --git a/az-core/src/main/java/azkaban/utils/JSONUtils.java b/az-core/src/main/java/azkaban/utils/JSONUtils.java index a96dae9..b7ee585 100644 --- a/az-core/src/main/java/azkaban/utils/JSONUtils.java +++ b/az-core/src/main/java/azkaban/utils/JSONUtils.java @@ -28,7 +28,8 @@ import java.util.Iterator; import java.util.Map; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.JsonParser; @@ -37,7 +38,7 @@ public class JSONUtils { - private static final Logger logger = Logger.getLogger(JSONUtils.class); + private static final Logger logger = LoggerFactory.getLogger(JSONUtils.class); /** * The constructor. Cannot construct this class. @@ -101,7 +102,7 @@ public static Object parseJSONFromStringQuiet(final String json) { try { return parseJSONFromString(json); } catch (final IOException e) { - logger.error("parse error, caused by: " +e); + logger.error("parse error, caused by: ", e); return null; } } diff --git a/az-core/src/main/java/azkaban/utils/Props.java b/az-core/src/main/java/azkaban/utils/Props.java index d342c26..e80fbf7 100644 --- a/az-core/src/main/java/azkaban/utils/Props.java +++ b/az-core/src/main/java/azkaban/utils/Props.java @@ -16,6 +16,9 @@ package azkaban.utils; + +import org.slf4j.Logger; + import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; @@ -38,7 +41,6 @@ import java.util.Properties; import java.util.Set; import java.util.TreeMap; -import org.apache.log4j.Logger; /** * Hashmap implementation of a hierarchical properties with helpful converter functions and diff --git a/az-core/src/main/java/azkaban/utils/PropsUtils.java b/az-core/src/main/java/azkaban/utils/PropsUtils.java index 1bb1dcd..2f13328 100644 --- a/az-core/src/main/java/azkaban/utils/PropsUtils.java +++ b/az-core/src/main/java/azkaban/utils/PropsUtils.java @@ -28,11 +28,12 @@ import org.apache.commons.jexl2.JexlException; import org.apache.commons.jexl2.MapContext; import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; public class PropsUtils { - private static final Logger logger = Logger.getLogger(PropsUtils.class); + private static final Logger logger = LoggerFactory.getLogger(PropsUtils.class); private static final Pattern VARIABLE_REPLACEMENT_PATTERN = Pattern .compile("\\$\\{([a-zA-Z_.0-9]+)\\}"); diff --git a/az-core/src/main/java/azkaban/utils/Utils.java b/az-core/src/main/java/azkaban/utils/Utils.java index a91e968..0d86550 100644 --- a/az-core/src/main/java/azkaban/utils/Utils.java +++ b/az-core/src/main/java/azkaban/utils/Utils.java @@ -16,23 +16,6 @@ package azkaban.utils; -import org.apache.commons.io.IOUtils; -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.Days; -import org.joda.time.DurationFieldType; -import org.joda.time.Hours; -import org.joda.time.Minutes; -import org.joda.time.Months; -import org.joda.time.ReadablePeriod; -import org.joda.time.Seconds; -import org.joda.time.Weeks; -import org.joda.time.Years; -import org.quartz.CronExpression; -import org.quartz.TriggerUtils; -import org.quartz.impl.triggers.CronTriggerImpl; - import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; @@ -46,17 +29,27 @@ import java.lang.reflect.Method; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collection; -import java.util.Date; -import java.util.Enumeration; -import java.util.List; -import java.util.Random; -import java.util.TimeZone; +import java.util.*; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipOutputStream; +import org.apache.commons.io.IOUtils; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; +import org.joda.time.DateTime; +import org.joda.time.DateTimeZone; +import org.joda.time.Days; +import org.joda.time.DurationFieldType; +import org.joda.time.Hours; +import org.joda.time.Minutes; +import org.joda.time.Months; +import org.joda.time.ReadablePeriod; +import org.joda.time.Seconds; +import org.joda.time.Weeks; +import org.joda.time.Years; +import org.quartz.CronExpression; +import org.quartz.TriggerUtils; +import org.quartz.impl.triggers.CronTriggerImpl; /** * A util helper class full of static methods that are commonly used. @@ -64,7 +57,7 @@ public class Utils { public static final Random RANDOM = new Random(); - private static final Logger logger = Logger.getLogger(Utils.class); + private static final Logger logger = LoggerFactory.getLogger(Utils.class); private static final String TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; private static final String DATE_PATTERN = "yyyy-MM-dd"; @@ -286,6 +279,21 @@ public static Object callConstructor(final Class c, final Object... args) { return callConstructor(c, getTypes(args), args); } + public static Object newConstructor(final Class c, final Class[] classes, final Object... args) { + try { + final Constructor cons = c.getConstructor(classes); + return cons.newInstance(args); + } catch (final InvocationTargetException e) { + throw getCause(e); + } catch (final IllegalAccessException e) { + throw new IllegalStateException(e); + } catch (final NoSuchMethodException e) { + throw new IllegalStateException(e); + } catch (final InstantiationException e) { + throw new IllegalStateException(e); + } + } + /** * Call the class constructor with the given arguments * @@ -525,7 +533,7 @@ public static List getScheduleTime(Date startDate, Date endDate, String try { cronTriggerImpl.setCronExpression(cron); } catch (ParseException pe){ - logger.error("parsing cron expression falied, " + pe); + logger.error("parsing cron expression falied: {}", pe); return timeList; } List dates = TriggerUtils.computeFireTimesBetween(cronTriggerImpl, null, startDate, endDate); diff --git a/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/WeBankAlerter.java b/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/WeBankAlerter.java index cc4f341..af9f1b8 100644 --- a/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/WeBankAlerter.java +++ b/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/WeBankAlerter.java @@ -43,14 +43,15 @@ import java.util.Map; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; public class WeBankAlerter implements Alerter { - private static Logger logger = Logger.getLogger(WeBankAlerter.class); + private static Logger logger = LoggerFactory.getLogger(WeBankAlerter.class); private Props props; private String alarmServer; private String alarmPort; diff --git a/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/ims/IMSAlert.java b/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/ims/IMSAlert.java index 976d44f..6664e87 100644 --- a/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/ims/IMSAlert.java +++ b/az-webank-alerter/src/main/java/com/webank/wedatasphere/schedulis/ims/IMSAlert.java @@ -32,7 +32,8 @@ import java.util.List; import java.util.Set; import org.apache.commons.codec.binary.Hex; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class IMSAlert { public static class Result { diff --git a/az-webank-homepage/src/web/js/home-page.js b/az-webank-homepage/src/web/js/home-page.js index cbeb70a..6f1e47b 100755 --- a/az-webank-homepage/src/web/js/home-page.js +++ b/az-webank-homepage/src/web/js/home-page.js @@ -112,6 +112,13 @@ $(function () { }); +var todayFormat = function () { + var date = new Date(); + var year = date.getFullYear(); + var month = getTwoDigitStr(date.getMonth() + 1); + var day = getTwoDigitStr(date.getDate()); + return month + "/" + day + "/" + year; +} function getTodayExecFlowData (myChart) { var requestURL = contextURL + "/homepage"; @@ -146,12 +153,14 @@ function getTodayExecFlowData (myChart) { averageTime = "Average Time"; totalTasks = "Total Jobs"; } + var begin = todayFormat() + " 12:00 AM"; + var end = todayFormat() + " 11:59 PM"; $("#success-td").html( "
  " + workflowCompleted + ": " + data.todayFlowExecuteData[0].value + "
" + "
  " + runningWorkflow2 + ": " + data.todayFlowExecuteData[1].value + "
" + - "
  " + errorWorkflow + ": " + data.todayFlowExecuteData[2].value + "
" + "
  " + errorWorkflow + ": " + data.todayFlowExecuteData[2].value + "
" + "
  " + killWorkflow + ": " + data.todayFlowExecuteData[3].value + "
" + diff --git a/az-webank-system-manager/conf/plugin.properties b/az-webank-system-manager/conf/plugin.properties index 21b89c6..7045331 100755 --- a/az-webank-system-manager/conf/plugin.properties +++ b/az-webank-system-manager/conf/plugin.properties @@ -7,5 +7,8 @@ viewer.servlet.class=com.webank.wedatasphere.schedulis.system.servlet.SystemServ wtss.db.jdbc.url=[#SYSTEM_DB_URL] wtss.db.username=[#SYSTEM_DB_USERNAME] wtss.db.password=[#SYSTEM_DB_PASSWORD] +esb.app.domain=[#ESB_APP_URL] +esb.app.id=[#ESB_APP_ID] +esb.app.token=[#ESB_APP_TOKEN] diff --git a/az-webank-system-manager/pom.xml b/az-webank-system-manager/pom.xml index 8f9b7be..0c88976 100755 --- a/az-webank-system-manager/pom.xml +++ b/az-webank-system-manager/pom.xml @@ -83,7 +83,7 @@ com.alibaba easyexcel - 1.1.1 + 2.2.3 com.google.guava @@ -91,12 +91,6 @@ ${guava.version} - - - com.alibaba - fastjson - 1.2.61 - org.apache.commons commons-lang3 diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/dao/impl/JdbcSystemUserImpl.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/dao/impl/JdbcSystemUserImpl.java index 93c2b26..bec76a6 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/dao/impl/JdbcSystemUserImpl.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/dao/impl/JdbcSystemUserImpl.java @@ -37,12 +37,13 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.dbutils.ResultSetHandler; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @Singleton public class JdbcSystemUserImpl implements SystemUserLoader { - private static final Logger logger = Logger.getLogger(JdbcSystemUserImpl.class); + private static final Logger logger = LoggerFactory.getLogger(JdbcSystemUserImpl.class); private final DatabaseOperator dbOperator; diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemManager.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemManager.java index 041eda2..45d36ca 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemManager.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemManager.java @@ -42,13 +42,14 @@ import java.util.stream.Collectors; import javax.inject.Inject; import javax.inject.Singleton; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @Singleton public class SystemManager { - private static final Logger logger = Logger.getLogger(SystemManager.class); + private static final Logger logger = LoggerFactory.getLogger(SystemManager.class); private final ProjectLoader projectLoader; private final SystemUserLoader systemUserLoader; private final JdbcExecutorLoader jdbcExecutorLoader; diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemUserManager.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemUserManager.java index a471b2f..064f885 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemUserManager.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/SystemUserManager.java @@ -37,11 +37,12 @@ import java.util.Set; import javax.inject.Inject; import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SystemUserManager implements UserManager { - private static final Logger logger = Logger.getLogger(SystemUserManager.class.getName()); + private static final Logger logger = LoggerFactory.getLogger(SystemUserManager.class.getName()); private HashMap users; private HashMap userPassword; @@ -96,7 +97,7 @@ public User getUser(String username, String password) throws UserManagerExceptio initUserAuthority(wtssUser, user); } catch (Exception e) { - logger.error("登录失败!异常信息:" + e); + logger.error("登录失败!异常信息:", e); throw new UserManagerException("Error User Name Or Password."); } } diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/WebankXmlUserManager.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/WebankXmlUserManager.java index a23b35d..5835e5a 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/WebankXmlUserManager.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/WebankXmlUserManager.java @@ -33,7 +33,8 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; @@ -56,7 +57,7 @@ public class WebankXmlUserManager implements UserManager { public static final String PROXY_ATTR = "proxy"; public static final String GROUPS_ATTR = "groups"; public static final String GROUPNAME_ATTR = "name"; - private static final Logger logger = Logger.getLogger(WebankXmlUserManager.class + private static final Logger logger = LoggerFactory.getLogger(WebankXmlUserManager.class .getName()); private final String xmlPath; diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUserManager.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUserManager.java index 128c238..b5128e3 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUserManager.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUserManager.java @@ -32,7 +32,8 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; @@ -62,7 +63,7 @@ public class XmlUserManager implements UserManager { public static final String PROXY_ATTR = "proxy"; public static final String GROUPS_ATTR = "groups"; public static final String GROUPNAME_ATTR = "name"; - private static final Logger logger = Logger.getLogger(XmlUserManager.class + private static final Logger logger = LoggerFactory.getLogger(XmlUserManager.class .getName()); private final String xmlPath; diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUsersSync.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUsersSync.java index bbcdbbd..1d23ad7 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUsersSync.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/service/impl/XmlUsersSync.java @@ -28,7 +28,8 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; @@ -37,7 +38,7 @@ public class XmlUsersSync { - private static final Logger logger = Logger.getLogger(XmlUsersSync.class.getName()); + private static final Logger logger = LoggerFactory.getLogger(XmlUsersSync.class.getName()); public static final String XML_FILE_PARAM = "user.manager.xml.file"; diff --git a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/servlet/SystemServlet.java b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/servlet/SystemServlet.java index 3814c01..bd3a0e5 100755 --- a/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/servlet/SystemServlet.java +++ b/az-webank-system-manager/src/main/java/com/webank/wedatasphere/schedulis/system/servlet/SystemServlet.java @@ -26,11 +26,13 @@ import azkaban.webapp.servlet.LoginAbstractAzkabanServlet; import azkaban.webapp.servlet.Page; import azkaban.webapp.servlet.ProjectManagerServlet; -import com.alibaba.fastjson.JSON; + import com.google.common.base.Joiner; +import com.google.gson.JsonObject; import com.google.inject.Injector; import com.webank.wedatasphere.schedulis.common.executor.DepartmentGroup; import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; +import com.webank.wedatasphere.schedulis.common.utils.GsonUtils; import com.webank.wedatasphere.schedulis.system.entity.WebankDepartment; import com.webank.wedatasphere.schedulis.system.entity.WebankUser; import com.webank.wedatasphere.schedulis.system.entity.WtssUser; @@ -271,7 +273,7 @@ private void ajaxAddSystemUserViaFastTrack(final HttpServletRequest req, final H boolean containResult = arrayList.contains(proxyUser); if (containResult || proxyUser.equalsIgnoreCase(wtssUser.getUsername())) { - logger.error("wtssUser=" + JSON.toJSONString(wtssUser)); + logger.error("wtssUser=" + wtssUser.toString()); addResult = 2; } else { @@ -288,7 +290,7 @@ private void ajaxAddSystemUserViaFastTrack(final HttpServletRequest req, final H proxyUser = wtssUser.getProxyUsers() + "," + proxyUser; addResult = this.systemManager.updateSystemUser(userId, password, roleId, proxyUser, departmentId); } else { - logger.error("wtssUser=" + JSON.toJSONString(wtssUser)); + logger.error("wtssUser=" + wtssUser.toString()); addResult = 3; } } @@ -296,7 +298,7 @@ private void ajaxAddSystemUserViaFastTrack(final HttpServletRequest req, final H throw new SystemUserManagerException("代理用户不存在, 请检查数据是否完整."); } } else { - logger.error("wtssUser=" + JSON.toJSONString(wtssUser)); + logger.error("wtssUser=" + wtssUser.toString()); addResult = 4; } @@ -1004,8 +1006,8 @@ private void ajaxFetchAllDepartmentGroup(final HttpServletRequest req, final Htt private void ajaxAddDepartmentGroup(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - DepartmentGroup departmentGroup = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, DepartmentGroup.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + DepartmentGroup departmentGroup = GsonUtils.jsonToJavaObject(jsonObject, DepartmentGroup.class); Map dataMap = loadSystemServletI18nData(); //校验名字是否已存在 if (this.systemManager.checkGroupNameIsExist(departmentGroup)) { @@ -1029,8 +1031,8 @@ private void ajaxAddDepartmentGroup(final HttpServletRequest req, final HttpServ private void ajaxDeleteDepartmentGroup(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - DepartmentGroup departmentGroup = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, DepartmentGroup.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + DepartmentGroup departmentGroup = GsonUtils.jsonToJavaObject(jsonObject, DepartmentGroup.class); Map dataMap = loadSystemServletI18nData(); if (this.systemManager.groupIdIsExist(departmentGroup)) { ret.put("error", dataMap.get("checkGroup_2")); @@ -1045,8 +1047,8 @@ private void ajaxDeleteDepartmentGroup(final HttpServletRequest req, final HttpS private void ajaxUpdateDepartmentGroup(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - DepartmentGroup departmentGroup = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, DepartmentGroup.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + DepartmentGroup departmentGroup = GsonUtils.jsonToJavaObject(jsonObject, DepartmentGroup.class); Map dataMap = loadSystemServletI18nData(); if (this.systemManager.updateDepartmentGroup(departmentGroup)) { ret.put("success", dataMap.get("requestSuccess")); @@ -1057,8 +1059,8 @@ private void ajaxUpdateDepartmentGroup(final HttpServletRequest req, final HttpS private void ajaxFetchDepartmentGroupById(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - DepartmentGroup departmentGroup = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, DepartmentGroup.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + DepartmentGroup departmentGroup = GsonUtils.jsonToJavaObject(jsonObject, DepartmentGroup.class); DepartmentGroup dg = this.systemManager.getDepartmentGroupById(departmentGroup.getId()); Map dataMap = loadSystemServletI18nData(); if (dg != null) { diff --git a/az-webank-user-params/pom.xml b/az-webank-user-params/pom.xml index e428cf0..3185f97 100644 --- a/az-webank-user-params/pom.xml +++ b/az-webank-user-params/pom.xml @@ -55,12 +55,6 @@ 3.4 - - com.alibaba - fastjson - 1.2.61 - - diff --git a/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/service/UserParamsService.java b/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/service/UserParamsService.java index b0593cb..0c6ce23 100644 --- a/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/service/UserParamsService.java +++ b/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/service/UserParamsService.java @@ -31,12 +31,13 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.apache.commons.collections4.CollectionUtils; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @Singleton public class UserParamsService { - private static final Logger logger = Logger.getLogger(UserParamsService.class); + private static final Logger logger = LoggerFactory.getLogger(UserParamsService.class); private final ProjectLoader projectLoader; private final JdbcExecutorLoader jdbcExecutorLoader; private final SystemUserLoader systemUserLoader; @@ -121,7 +122,7 @@ public boolean checkWtssUserIsExist(String name){ try { cout = jdbcExecutorLoader.findWtssUserByName(name); }catch (ExecutorManagerException e){ - logger.error("can not found wtssuser by" + name + ", " + e); + logger.error("can not found wtssuser by" + name + ", ", e); } if(cout == 0){ return false; diff --git a/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/servlet/UserParamsServlet.java b/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/servlet/UserParamsServlet.java index 263e099..703df11 100644 --- a/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/servlet/UserParamsServlet.java +++ b/az-webank-user-params/src/main/java/com/webank/wedatasphere/schedulis/userparams/servlet/UserParamsServlet.java @@ -22,7 +22,10 @@ import azkaban.utils.Props; import azkaban.webapp.servlet.LoginAbstractAzkabanServlet; import azkaban.webapp.servlet.Page; +import com.google.gson.JsonObject; import com.google.inject.Injector; +import com.webank.wedatasphere.schedulis.common.utils.GsonUtils; +import org.json.JSONObject; import com.webank.wedatasphere.schedulis.common.executor.UserVariable; import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; import com.webank.wedatasphere.schedulis.common.system.entity.WtssUser; @@ -38,7 +41,7 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.json.JSONObject; + public class UserParamsServlet extends LoginAbstractAzkabanServlet { @@ -180,8 +183,8 @@ protected void handlePost(final HttpServletRequest req, final HttpServletRespons private void ajaxFetchAllUserVariable(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - UserVariable userVariable = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, UserVariable.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + UserVariable userVariable = GsonUtils.jsonToJavaObject(jsonObject, UserVariable.class); if(!userVariable.getOwner().equals(session.getUser().getUserId())){ ret.put("error", "No Access Permission"); } @@ -193,8 +196,8 @@ private void ajaxFetchAllUserVariable(final HttpServletRequest req, final HttpSe } private void ajaxAddUserVariable(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - UserVariable userVariable = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, UserVariable.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + UserVariable userVariable = GsonUtils.jsonToJavaObject(jsonObject, UserVariable.class); for(WtssUser user: userVariable.getUsers()){ if(!this.userParamsService.checkWtssUserIsExist(user.getUserId())){ @@ -213,8 +216,8 @@ private void ajaxAddUserVariable(final HttpServletRequest req, final HttpServlet private void ajaxDeleteUserVariable(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - UserVariable userVariable = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, UserVariable.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + UserVariable userVariable = GsonUtils.jsonToJavaObject(jsonObject, UserVariable.class); userVariable.setOwner(session.getUser().getUserId()); if(this.userParamsService.deleteUserVariable(userVariable)){ ret.put("success", "Request Success"); @@ -224,8 +227,8 @@ private void ajaxDeleteUserVariable(final HttpServletRequest req, final HttpServ } private void ajaxUpdateUpdateUserVariable(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - UserVariable userVariable = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, UserVariable.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + UserVariable userVariable = GsonUtils.jsonToJavaObject(jsonObject, UserVariable.class); userVariable.setOwner(session.getUser().getUserId()); for(WtssUser user: userVariable.getUsers()){ if(!this.userParamsService.checkWtssUserIsExist(user.getUserId())){ @@ -241,8 +244,8 @@ private void ajaxUpdateUpdateUserVariable(final HttpServletRequest req, final Ht } private void ajaxFetchUserVariableById(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final HashMap ret) throws ServletException { - com.alibaba.fastjson.JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); - UserVariable userVariable = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, UserVariable.class); + JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req); + UserVariable userVariable = GsonUtils.jsonToJavaObject(jsonObject, UserVariable.class); userVariable = this.userParamsService.getUserVariableById(userVariable.getId()); if(userVariable != null) { ret.put("userparam", userVariable); diff --git a/az-webank-user-params/src/web/js/userparams-manager.js b/az-webank-user-params/src/web/js/userparams-manager.js index 4b21e24..3f54ee9 100644 --- a/az-webank-user-params/src/web/js/userparams-manager.js +++ b/az-webank-user-params/src/web/js/userparams-manager.js @@ -657,6 +657,9 @@ azkaban.UpdateDepartmentGroupView = Backbone.View.extend({ }; var model = this.model; var successHandler = function (data) { + if (data.status && data.status == 'error') { + return false + } if (data.error) { $("#update-department-group-modal-error-msg").show(); $("#update-department-group-modal-error-msg").text(data.error); diff --git a/azkaban-common/pom.xml b/azkaban-common/pom.xml index 9960a38..a70f15e 100755 --- a/azkaban-common/pom.xml +++ b/azkaban-common/pom.xml @@ -20,8 +20,24 @@ ${hadoop.version} - netty - io.netty + jackson-databind + com.fasterxml.jackson.core + + + jackson-annotations + com.fasterxml.jackson.core + + + jackson-core + com.fasterxml.jackson.core + + + slf4j-log4j12 + org.slf4j + + + log4j + log4j @@ -97,6 +113,28 @@ org.apache.hadoop hadoop-common ${hadoop.version} + + + jackson-databind + com.fasterxml.jackson.core + + + jackson-annotations + com.fasterxml.jackson.core + + + log4j + log4j + + + slf4j-log4j12 + org.slf4j + + + commons-beanutils + commons-beanutils + + org.apache.hadoop @@ -104,8 +142,12 @@ ${hadoop.version} - netty - io.netty + jackson-databind + com.fasterxml.jackson.core + + + log4j + log4j @@ -151,6 +193,12 @@ org.quartz-scheduler quartz ${quartz.version} + + + c3p0 + c3p0 + + @@ -186,20 +234,6 @@ org.apache.velocity velocity ${velocity.version} - - - org.apache.struts - struts-core - - - org.apache.struts - struts-taglib - - - org.apache.struts - struts-tiles - - org.apache.velocity @@ -234,15 +268,20 @@ test - - com.alibaba - fastjson - 1.2.61 - com.alibaba easyexcel - 1.1.1 + 2.2.3 + + + poi + org.apache.poi + + + poi-ooxml-schemas + org.apache.poi + + diff --git a/azkaban-common/src/main/java/azkaban/AzkabanCommonModule.java b/azkaban-common/src/main/java/azkaban/AzkabanCommonModule.java index aae5ccc..782557d 100755 --- a/azkaban-common/src/main/java/azkaban/AzkabanCommonModule.java +++ b/azkaban-common/src/main/java/azkaban/AzkabanCommonModule.java @@ -39,8 +39,8 @@ import com.webank.wedatasphere.schedulis.common.executor.ExecutorQueueLoader; import com.webank.wedatasphere.schedulis.common.executor.JdbcExecutorQueueLoader; import org.apache.commons.dbutils.QueryRunner; -import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.Logger; /** diff --git a/azkaban-common/src/main/java/azkaban/AzkabanCommonModuleConfig.java b/azkaban-common/src/main/java/azkaban/AzkabanCommonModuleConfig.java index d20ed95..026416a 100755 --- a/azkaban-common/src/main/java/azkaban/AzkabanCommonModuleConfig.java +++ b/azkaban-common/src/main/java/azkaban/AzkabanCommonModuleConfig.java @@ -24,14 +24,16 @@ import azkaban.storage.StorageImplementationType; import azkaban.utils.Props; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import javax.inject.Inject; import java.net.URI; -import org.apache.log4j.Logger; public class AzkabanCommonModuleConfig { - private static final Logger log = Logger.getLogger(AzkabanCommonModuleConfig.class); + private static final Logger logger = LoggerFactory.getLogger(AzkabanCommonModuleConfig.class); private final Props props; private final URI hdfsRootUri; diff --git a/azkaban-common/src/main/java/azkaban/HadoopModule.java b/azkaban-common/src/main/java/azkaban/HadoopModule.java index 6884ac8..57a37ff 100755 --- a/azkaban-common/src/main/java/azkaban/HadoopModule.java +++ b/azkaban-common/src/main/java/azkaban/HadoopModule.java @@ -32,8 +32,8 @@ import javax.inject.Singleton; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; -import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.Logger; /** * Place Hadoop dependencies in this module. Since Hadoop is not included in the Azkaban Runtime diff --git a/azkaban-common/src/main/java/azkaban/alert/Alerter.java b/azkaban-common/src/main/java/azkaban/alert/Alerter.java index 008e2f2..1c8aec3 100755 --- a/azkaban-common/src/main/java/azkaban/alert/Alerter.java +++ b/azkaban-common/src/main/java/azkaban/alert/Alerter.java @@ -17,7 +17,7 @@ package azkaban.alert; import com.webank.wedatasphere.schedulis.common.executor.ExecutionCycle; -import org.apache.log4j.Logger; +import org.slf4j.Logger; import java.util.List; import java.util.Map; diff --git a/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseSetup.java b/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseSetup.java index 595f52c..feb45a2 100755 --- a/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseSetup.java +++ b/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseSetup.java @@ -37,7 +37,8 @@ import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.ResultSetHandler; import org.apache.commons.io.IOUtils; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; /** * @deprecated in favor of {@link azkaban.db.DatabaseSetup}. @@ -50,8 +51,7 @@ public class AzkabanDatabaseSetup { "database.auto.update.tables"; public static final String DATABASE_SQL_SCRIPT_DIR = "database.sql.scripts.dir"; - private static final Logger logger = Logger - .getLogger(AzkabanDatabaseSetup.class); + private static final Logger logger = LoggerFactory.getLogger(AzkabanDatabaseSetup.class); private static final String DEFAULT_SCRIPT_PATH = "sql"; private static final String CREATE_SCRIPT_PREFIX = "create."; private static final String UPDATE_SCRIPT_PREFIX = "update."; diff --git a/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseUpdater.java b/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseUpdater.java index f492283..9d2895c 100755 --- a/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseUpdater.java +++ b/azkaban-common/src/main/java/azkaban/database/AzkabanDatabaseUpdater.java @@ -24,12 +24,12 @@ import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; public class AzkabanDatabaseUpdater { - private static final Logger logger = Logger - .getLogger(AzkabanDatabaseUpdater.class); + private static final Logger logger = LoggerFactory.getLogger(AzkabanDatabaseUpdater.class); public static void main(final String[] args) throws Exception { final OptionParser parser = new OptionParser(); diff --git a/azkaban-common/src/main/java/azkaban/database/DataSourceUtils.java b/azkaban-common/src/main/java/azkaban/database/DataSourceUtils.java index 60d5a27..317382d 100755 --- a/azkaban-common/src/main/java/azkaban/database/DataSourceUtils.java +++ b/azkaban-common/src/main/java/azkaban/database/DataSourceUtils.java @@ -17,15 +17,17 @@ package azkaban.database; import azkaban.utils.Props; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.nio.file.Path; import java.nio.file.Paths; import java.util.Base64; -import org.apache.log4j.Logger; public class DataSourceUtils { - private static final Logger logger = Logger.getLogger(DataSourceUtils.class); + private static final Logger logger = LoggerFactory.getLogger(DataSourceUtils.class); /** * Hidden datasource diff --git a/azkaban-common/src/main/java/azkaban/executor/ActiveExecutors.java b/azkaban-common/src/main/java/azkaban/executor/ActiveExecutors.java index c0aadce..dbd2b6c 100755 --- a/azkaban-common/src/main/java/azkaban/executor/ActiveExecutors.java +++ b/azkaban-common/src/main/java/azkaban/executor/ActiveExecutors.java @@ -17,10 +17,12 @@ package azkaban.executor; import com.google.common.collect.ImmutableSet; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.util.Collection; import javax.inject.Inject; import javax.inject.Singleton; -import org.apache.log4j.Logger; /** * Loads & provides executors. @@ -28,7 +30,7 @@ @Singleton public class ActiveExecutors { - private static final Logger logger = Logger.getLogger(ExecutorManager.class); + private static final Logger logger = LoggerFactory.getLogger(ExecutorManager.class); private volatile ImmutableSet activeExecutors; private final ExecutorLoader executorLoader; diff --git a/azkaban-common/src/main/java/azkaban/executor/AlerterHolder.java b/azkaban-common/src/main/java/azkaban/executor/AlerterHolder.java index 7e692bf..4131524 100755 --- a/azkaban-common/src/main/java/azkaban/executor/AlerterHolder.java +++ b/azkaban-common/src/main/java/azkaban/executor/AlerterHolder.java @@ -22,6 +22,9 @@ import azkaban.utils.FileIOUtils; import azkaban.utils.Props; import azkaban.utils.PropsUtils; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import javax.inject.Inject; import javax.inject.Singleton; import java.io.File; @@ -36,13 +39,12 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.log4j.Logger; @Singleton public class AlerterHolder { - private static final Logger logger = Logger.getLogger(AlerterHolder.class); + private static final Logger logger = LoggerFactory.getLogger(AlerterHolder.class); private Map alerters; private final ConcurrentHashMap flowAlerterFlag = new ConcurrentHashMap<>(); @@ -51,7 +53,7 @@ public AlerterHolder(final Props props, final Emailer mailAlerter) { try { this.alerters = loadAlerters(props, mailAlerter); } catch (final Exception ex) { - logger.error(ex); + logger.error("", ex); this.alerters = new HashMap<>(); } } @@ -129,7 +131,7 @@ private Map loadPluginAlerters(final String pluginPath) { final URL url = files[i].toURI().toURL(); urls.add(url); } catch (final MalformedURLException e) { - logger.error(e); + logger.error("", e); } } if (extLibClasspath != null) { @@ -139,7 +141,7 @@ private Map loadPluginAlerters(final String pluginPath) { final URL url = file.toURI().toURL(); urls.add(url); } catch (final MalformedURLException e) { - logger.error(e); + logger.error("", e); } } } @@ -175,7 +177,7 @@ private Map loadPluginAlerters(final String pluginPath) { try { obj = constructor.newInstance(pluginProps); } catch (final Exception e) { - logger.error(e); + logger.error("", e); } if (!(obj instanceof Alerter)) { diff --git a/azkaban-common/src/main/java/azkaban/executor/ConnectorParams.java b/azkaban-common/src/main/java/azkaban/executor/ConnectorParams.java index 5cc357c..e68834d 100755 --- a/azkaban-common/src/main/java/azkaban/executor/ConnectorParams.java +++ b/azkaban-common/src/main/java/azkaban/executor/ConnectorParams.java @@ -23,6 +23,7 @@ public interface ConnectorParams { public static final String EXECID_PARAM = "execid"; public static final String SHAREDTOKEN_PARAM = "token"; public static final String USER_PARAM = "user"; + public static final String TOKEN_PARAM = "token"; public static final String UPDATE_ACTION = "update"; public static final String STATUS_ACTION = "status"; diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowBase.java b/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowBase.java index db966e2..2e7de7e 100755 --- a/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowBase.java +++ b/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowBase.java @@ -22,22 +22,24 @@ import azkaban.flow.SpecialJobTypes; import azkaban.project.Project; import azkaban.utils.TypedMapWrapper; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class ExecutableFlowBase extends ExecutableNode { + private static final Logger logger = LoggerFactory.getLogger(ExecutableFlowBase.class); + public static final String FLOW_ID_PARAM = "flowId"; public static final String NODES_PARAM = "nodes"; public static final String PROPERTIES_PARAM = "properties"; public static final String SOURCE_PARAM = "source"; public static final String INHERITED_PARAM = "inherited"; - private static final Logger logger = LoggerFactory.getLogger(ExecutableFlowBase.class); private final HashMap executableNodes = new HashMap<>(); diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowPriorityComparator.java b/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowPriorityComparator.java index 1af4202..77995d2 100755 --- a/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowPriorityComparator.java +++ b/azkaban-common/src/main/java/azkaban/executor/ExecutableFlowPriorityComparator.java @@ -17,8 +17,10 @@ package azkaban.executor; import azkaban.utils.Pair; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.util.Comparator; -import org.apache.log4j.Logger; /** * Comparator implicitly used in priority queue for QueuedExecutions. @@ -26,8 +28,7 @@ public final class ExecutableFlowPriorityComparator implements Comparator> { - private static final Logger logger = Logger - .getLogger(ExecutableFlowPriorityComparator.class); + private static final Logger logger = LoggerFactory.getLogger(ExecutableFlowPriorityComparator.class); /** *
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java b/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
index 37fa038..9c22eb1 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutionController.java
@@ -43,10 +43,9 @@
 import java.util.Set;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Controls flow executions on web server. This module implements the polling model
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java b/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
index 11e5fc3..c682b2d 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutionControllerUtils.java
@@ -29,16 +29,15 @@
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Utils for controlling executions.
  */
 public class ExecutionControllerUtils {
 
-  private static final Logger logger = LoggerFactory.getLogger(
-      ExecutionControllerUtils.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutionControllerUtils.class);
   /**
    * If the current status of the execution is not one of the finished statuses, mark the execution
    * as failed in the DB.
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutionFinalizer.java b/azkaban-common/src/main/java/azkaban/executor/ExecutionFinalizer.java
index a3a0352..7a6fadb 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutionFinalizer.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutionFinalizer.java
@@ -20,7 +20,8 @@
 import javax.inject.Inject;
 
 import azkaban.alert.Alerter;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -32,7 +33,7 @@
  */
 public class ExecutionFinalizer {
 
-  private static final Logger logger = Logger.getLogger(ExecutionFinalizer.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutionFinalizer.class);
 
   private final ExecutorLoader executorLoader;
   private final ExecutorManagerUpdaterStage updaterStage;
@@ -98,7 +99,7 @@ public void finalizeFlow(final ExecutableFlow flow, final String reason,
       this.runningExecutions.get().remove(execId);
     } catch (final ExecutorManagerException e) {
       alertUser = false; // failed due to azkaban internal error, not to alert user
-      logger.error(e);
+      logger.error("", e);
     }
     if(dsFlow == null){
       logger.error("can not found ExecutableFlow by execId:" + execId);
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java b/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
index f042e4f..5699fb8 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutionFlowDao.java
@@ -32,8 +32,8 @@
 import javax.inject.Singleton;
 import org.apache.commons.dbutils.ResultSetHandler;
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import static java.util.stream.Collectors.joining;
 
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutionJobDao.java b/azkaban-common/src/main/java/azkaban/executor/ExecutionJobDao.java
index d17c196..26330b8 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutionJobDao.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutionJobDao.java
@@ -34,12 +34,13 @@
 import javax.inject.Singleton;
 import org.apache.commons.dbutils.ResultSetHandler;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 @Singleton
 public class ExecutionJobDao {
 
-  private static final Logger logger = Logger.getLogger(ExecutorDao.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutorDao.class);
   private final DatabaseOperator dbOperator;
 
   @Inject
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutionLogsDao.java b/azkaban-common/src/main/java/azkaban/executor/ExecutionLogsDao.java
index 0ca2f23..ffb681b 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutionLogsDao.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutionLogsDao.java
@@ -39,14 +39,15 @@
 
 import org.apache.commons.dbutils.ResultSetHandler;
 import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTime;
 
 
 @Singleton
 public class ExecutionLogsDao implements ExecutionLogsAdapter {
 
-  private static final Logger logger = Logger.getLogger(ExecutionLogsDao.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutionLogsDao.class);
   private final DatabaseOperator dbOperator;
   private final EncodingType defaultEncodingType = EncodingType.GZIP;
 
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java b/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
index fa0c091..b7fd8d4 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutorApiGateway.java
@@ -16,8 +16,10 @@
 
 package azkaban.executor;
 
+import azkaban.Constants;
 import azkaban.utils.JSONUtils;
 import azkaban.utils.Pair;
+import azkaban.utils.Props;
 import com.google.inject.Inject;
 import java.io.IOException;
 import java.net.URI;
@@ -28,6 +30,7 @@
 import java.util.concurrent.TimeUnit;
 import javax.inject.Singleton;
 
+import com.webank.wedatasphere.schedulis.common.utils.JwtTokenUtils;
 import okhttp3.*;
 import org.codehaus.jackson.map.ObjectMapper;
 
@@ -35,10 +38,12 @@
 public class ExecutorApiGateway {
 
   private final ExecutorApiClient apiClient;
+  private final Props azkProps;
 
   @Inject
-  public ExecutorApiGateway(final ExecutorApiClient apiClient) {
+  public ExecutorApiGateway(final ExecutorApiClient apiClient,final Props azkProps) {
     this.apiClient = apiClient;
+    this.azkProps = azkProps;
   }
 
   // FIXME change this method access as public type in order to outside package object can call this method.
@@ -82,6 +87,12 @@ public Map callWithExecutionId(final String host, final int port
           .valueOf(executionId)));
       paramList.add(new Pair<>(ConnectorParams.USER_PARAM, user));
 
+      if(this.azkProps.getBoolean(Constants.ConfigurationKeys.IP_WHITELIST_ENABLED,false)){
+        String dss_secret = azkProps.getString("dss.secret", "dws-wtss|WeBankBDPWTSS&DWS@2019");
+        String token = JwtTokenUtils.getToken(null,false,dss_secret,300);
+        paramList.add(new Pair<>(ConnectorParams.TOKEN_PARAM, token));
+      }
+
       return callForJsonObjectMap(host, port, "/executor", paramList);
     } catch (final IOException e) {
       throw new ExecutorManagerException(e);
@@ -131,6 +142,12 @@ private String callForJsonString(final String host, final int port, final String
     @SuppressWarnings("unchecked") final URI uri =
         ExecutorApiClient.buildUri(host, port, path, true);
 
+    if(this.azkProps.getBoolean(Constants.ConfigurationKeys.IP_WHITELIST_ENABLED,false)){
+      String dss_secret = azkProps.getString("dss.secret", "dws-wtss|WeBankBDPWTSS&DWS@2019");
+      String token = JwtTokenUtils.getToken(null,false,dss_secret,300);
+      paramList.add(new Pair<>(ConnectorParams.TOKEN_PARAM, token));
+    }
+
     return this.apiClient.httpPost(uri, paramList);
   }
 
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutorDao.java b/azkaban-common/src/main/java/azkaban/executor/ExecutorDao.java
index 699c8b3..f82f1cd 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutorDao.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutorDao.java
@@ -25,12 +25,13 @@
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 @Singleton
 public class ExecutorDao {
 
-  private static final Logger logger = Logger.getLogger(ExecutorDao.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutorDao.class);
   private final DatabaseOperator dbOperator;
 
   @Inject
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java b/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
index d3e7bf9..0f77011 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutorHealthChecker.java
@@ -18,6 +18,9 @@
 import azkaban.Constants.ConfigurationKeys;
 import azkaban.utils.Pair;
 import azkaban.utils.Props;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.time.Duration;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -30,8 +33,6 @@
 import java.util.concurrent.TimeUnit;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Periodically checks the health of executors. Finalizes flows or sends alert emails when needed.
@@ -41,6 +42,7 @@
 public class ExecutorHealthChecker {
 
   private static final Logger logger = LoggerFactory.getLogger(ExecutorHealthChecker.class);
+
   // Max number of executor failures before sending out alert emails.
   private static final int DEFAULT_EXECUTOR_MAX_FAILURE_COUNT = 6;
   // Web server checks executor health every 5 min by default.
diff --git a/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java b/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
index e4c13e0..a27bb3e 100755
--- a/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
+++ b/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
@@ -23,8 +23,10 @@
 import com.webank.wedatasphere.schedulis.common.jobExecutor.utils.SystemBuiltInParamJodeTimeUtils;
 import com.webank.wedatasphere.schedulis.common.log.LogFilterEntity;
 
+import com.webank.wedatasphere.schedulis.common.utils.JwtTokenUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTime;
 import org.joda.time.LocalDateTime;
 
@@ -114,7 +116,7 @@ public class ExecutorManager extends EventHandler implements
   // 12 weeks
   private static final long DEFAULT_EXECUTION_LOGS_RETENTION_MS = 3 * 4 * 7 * 24 * 60 * 60 * 1000L;
   private static final Duration RECENTLY_FINISHED_LIFETIME = Duration.ofMinutes(10);
-  private static final Logger logger = Logger.getLogger(ExecutorManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutorManager.class);
   private final RunningExecutions runningExecutions;
   private final Props azkProps;
   private final CommonMetrics commonMetrics;
@@ -1085,6 +1087,17 @@ public void setFlowFailed(ExecutableFlow exFlow, String userId, List
@@ -34,7 +36,7 @@
  */
 public abstract class CandidateComparator implements Comparator {
 
-  protected static Logger logger = Logger.getLogger(CandidateComparator.class);
+  protected static final Logger logger = LoggerFactory.getLogger(CandidateComparator.class);
 
   // internal repository of the registered comparators .
   private final Map> factorComparatorList =
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
index 0c7b70c..6a96ddf 100755
--- a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateFilter.java
@@ -16,10 +16,12 @@
 
 package azkaban.executor.selector;
 
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.Collection;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
-import org.apache.log4j.Logger;
 
 
 /**
@@ -29,7 +31,7 @@
  */
 public abstract class CandidateFilter {
 
-  protected static Logger logger = Logger.getLogger(CandidateFilter.class);
+  protected static final Logger logger = LoggerFactory.getLogger(CandidateFilter.class);
 
   // internal repository of the registered filters .
   private final Map> factorFilterList =
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java
index f8ad1d9..1572770 100755
--- a/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/CandidateSelector.java
@@ -16,10 +16,12 @@
 
 package azkaban.executor.selector;
 
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import org.apache.log4j.Logger;
 
 /**
  * Implementation of the CandidateSelector.
@@ -29,7 +31,7 @@
  */
 public class CandidateSelector, V> implements Selector {
 
-  private static final Logger logger = Logger.getLogger(CandidateComparator.class);
+  private static final Logger logger = LoggerFactory.getLogger(CandidateComparator.class);
 
   private final CandidateFilter filter;
   private final CandidateComparator comparator;
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/FactorComparator.java b/azkaban-common/src/main/java/azkaban/executor/selector/FactorComparator.java
index 64f6da4..d8639d7 100755
--- a/azkaban-common/src/main/java/azkaban/executor/selector/FactorComparator.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/FactorComparator.java
@@ -16,8 +16,10 @@
 
 package azkaban.executor.selector;
 
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.Comparator;
-import org.apache.log4j.Logger;
 
 /**
  * wrapper class for a factor comparator .
@@ -26,7 +28,7 @@
  */
 public final class FactorComparator {
 
-  private static final Logger logger = Logger.getLogger(CandidateComparator.class);
+  private static final Logger logger = LoggerFactory.getLogger(CandidateComparator.class);
 
   private final String factorName;
   private final Comparator comparator;
diff --git a/azkaban-common/src/main/java/azkaban/executor/selector/FactorFilter.java b/azkaban-common/src/main/java/azkaban/executor/selector/FactorFilter.java
index d5d5c81..f5d22f0 100755
--- a/azkaban-common/src/main/java/azkaban/executor/selector/FactorFilter.java
+++ b/azkaban-common/src/main/java/azkaban/executor/selector/FactorFilter.java
@@ -16,7 +16,8 @@
 
 package azkaban.executor.selector;
 
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * wrapper class for a factor Filter .
@@ -26,7 +27,7 @@
  */
 public final class FactorFilter {
 
-  private static final Logger logger = Logger.getLogger(FactorFilter.class);
+  private static final Logger logger = LoggerFactory.getLogger(FactorFilter.class);
 
   private final String factorName;
   private final Filter filter;
diff --git a/azkaban-common/src/main/java/azkaban/flow/FlowUtils.java b/azkaban-common/src/main/java/azkaban/flow/FlowUtils.java
index 863fcda..5d39b3d 100755
--- a/azkaban-common/src/main/java/azkaban/flow/FlowUtils.java
+++ b/azkaban-common/src/main/java/azkaban/flow/FlowUtils.java
@@ -33,9 +33,9 @@
 import java.util.UUID;
 import java.util.stream.Collectors;
 
-import org.joda.time.DateTime;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.joda.time.DateTime;
 
 public class FlowUtils {
 
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractJob.java b/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractJob.java
index 4092fe2..7ccc6b8 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractJob.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractJob.java
@@ -17,7 +17,7 @@
 package azkaban.jobExecutor;
 
 import azkaban.utils.Props;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 public abstract class AbstractJob implements Job {
 
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractProcessJob.java b/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractProcessJob.java
index 36252d9..aed6d88 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractProcessJob.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/AbstractProcessJob.java
@@ -28,7 +28,7 @@
 import java.util.Map;
 import org.apache.commons.fileupload.util.Streams;
 import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 /**
  * A revised process-based job
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/JavaProcessJob.java b/azkaban-common/src/main/java/azkaban/jobExecutor/JavaProcessJob.java
index e025918..2aad963 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/JavaProcessJob.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/JavaProcessJob.java
@@ -21,10 +21,11 @@
 import azkaban.utils.Pair;
 import azkaban.utils.Props;
 import azkaban.utils.Utils;
+import org.slf4j.Logger;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.log4j.Logger;
 
 public class JavaProcessJob extends ProcessJob {
 
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/NoopJob.java b/azkaban-common/src/main/java/azkaban/jobExecutor/NoopJob.java
index dd19c8b..ebafa80 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/NoopJob.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/NoopJob.java
@@ -17,7 +17,7 @@
 package azkaban.jobExecutor;
 
 import azkaban.utils.Props;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 /**
  * A no-op job.
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java b/azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java
index 0ed816d..134f672 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/ProcessJob.java
@@ -40,7 +40,7 @@
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 
 /**
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcess.java b/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcess.java
index 273b0d1..3e8da12 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcess.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcess.java
@@ -29,8 +29,7 @@
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 /**
  * An improved version of java.lang.Process.
@@ -103,11 +102,11 @@ public void run() throws IOException {
       final LogGobbler outputGobbler =
           new LogGobbler(
               new InputStreamReader(this.process.getInputStream(), StandardCharsets.UTF_8),
-              this.logger, Level.INFO, 30);
+              this.logger, "INFO", 30);
       final LogGobbler errorGobbler =
           new LogGobbler(
               new InputStreamReader(this.process.getErrorStream(), StandardCharsets.UTF_8),
-              this.logger, Level.ERROR, 30);
+              this.logger, "ERROR", 30);
 
       outputGobbler.start();
       errorGobbler.start();
diff --git a/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcessBuilder.java b/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcessBuilder.java
index be96dc6..c61d7ad 100755
--- a/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcessBuilder.java
+++ b/azkaban-common/src/main/java/azkaban/jobExecutor/utils/process/AzkabanProcessBuilder.java
@@ -17,22 +17,24 @@
 package azkaban.jobExecutor.utils.process;
 
 import com.google.common.base.Joiner;
+import org.slf4j.Logger;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.log4j.Logger;
 
 /**
  * Helper code for building a process
  */
 public class AzkabanProcessBuilder {
 
+  private Logger logger;
+
   private final List cmd = new ArrayList<>();
   private Map env = new HashMap<>();
   private String workingDir = System.getProperty("user.dir");
-  private Logger logger = Logger.getLogger(AzkabanProcess.class);
   private boolean isExecuteAsUser = false;
   private String executeAsUserBinaryPath = null;
   private String effectiveUser = null;
diff --git a/azkaban-common/src/main/java/azkaban/jobcallback/JobCallbackValidator.java b/azkaban-common/src/main/java/azkaban/jobcallback/JobCallbackValidator.java
index 93fc766..3722aa6 100755
--- a/azkaban-common/src/main/java/azkaban/jobcallback/JobCallbackValidator.java
+++ b/azkaban-common/src/main/java/azkaban/jobcallback/JobCallbackValidator.java
@@ -11,8 +11,10 @@
 import static azkaban.jobcallback.JobCallbackConstants.STATUS_TOKEN;
 
 import azkaban.utils.Props;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.Collection;
-import org.apache.log4j.Logger;
 
 /**
  * Responsible for validating the job callback related properties at project upload time
@@ -21,8 +23,7 @@
  */
 public class JobCallbackValidator {
 
-  private static final Logger logger = Logger
-      .getLogger(JobCallbackValidator.class);
+  private static final Logger logger = LoggerFactory.getLogger(JobCallbackValidator.class);
 
   /**
    * Make sure all the job callback related properties are valid
diff --git a/azkaban-common/src/main/java/azkaban/jobtype/JobTypeManager.java b/azkaban-common/src/main/java/azkaban/jobtype/JobTypeManager.java
index 766381e..94a7710 100755
--- a/azkaban-common/src/main/java/azkaban/jobtype/JobTypeManager.java
+++ b/azkaban-common/src/main/java/azkaban/jobtype/JobTypeManager.java
@@ -24,6 +24,9 @@
 import azkaban.utils.Props;
 import azkaban.utils.PropsUtils;
 import azkaban.utils.Utils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -31,7 +34,6 @@
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.log4j.Logger;
 
 public class JobTypeManager {
 
@@ -44,7 +46,7 @@ public class JobTypeManager {
   private static final String COMMONCONFFILE = "common.properties";
   // common private properties for multiple plugins
   private static final String COMMONSYSCONFFILE = "commonprivate.properties";
-  private static final Logger logger = Logger.getLogger(JobTypeManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(JobTypeManager.class);
   private final String jobTypePluginDir; // the dir for jobtype plugins
   private final ClassLoader parentLoader;
   private final Props globalProperties;
@@ -224,8 +226,9 @@ private void loadJobTypes(final File pluginDir, final JobTypePluginSet plugins)
       final Props fakeSysProps = new Props(pluginLoadProps);
       final Props fakeJobProps = new Props(pluginJobProps);
       final Job job =
-          (Job) Utils.callConstructor(clazz, "dummy", fakeSysProps,
-              fakeJobProps, logger);
+          (Job) Utils.newConstructor(clazz,
+              new Class[]{String.class, Props.class, Props.class, Logger.class},
+              "dummy", fakeSysProps, fakeJobProps, logger);;
     } catch (final Throwable t) {
       logger.info("Jobtype " + jobTypeName + " failed test!", t);
       throw new JobExecutionException(t);
@@ -362,8 +365,9 @@ public Job buildJobExecutor(final String jobId, Props jobProps, final Logger log
       }
 
       job =
-          (Job) Utils.callConstructor(executorClass, jobId, pluginLoadProps,
-              jobProps, logger);
+          (Job) Utils.newConstructor(executorClass,
+              new Class[]{String.class, Props.class, Props.class, Logger.class},
+              jobId, pluginLoadProps, jobProps, logger);
     } catch (final Exception e) {
       logger.error("Failed to build job executor for job " + jobId
           + e.getMessage());
diff --git a/azkaban-common/src/main/java/azkaban/metric/AbstractMetric.java b/azkaban-common/src/main/java/azkaban/metric/AbstractMetric.java
index 463ed34..3baa687 100755
--- a/azkaban-common/src/main/java/azkaban/metric/AbstractMetric.java
+++ b/azkaban-common/src/main/java/azkaban/metric/AbstractMetric.java
@@ -16,7 +16,9 @@
 
 package azkaban.metric;
 
-import org.apache.log4j.Logger;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Abstract class for Metric
@@ -25,7 +27,7 @@
  */
 public abstract class AbstractMetric implements IMetric, Cloneable {
 
-  protected static final Logger logger = Logger.getLogger(MetricReportManager.class);
+  protected static final Logger logger = LoggerFactory.getLogger(MetricReportManager.class);
   protected String name;
   protected T value;
   protected String type;
diff --git a/azkaban-common/src/main/java/azkaban/metric/MetricReportManager.java b/azkaban-common/src/main/java/azkaban/metric/MetricReportManager.java
index d29eba4..49b9b79 100755
--- a/azkaban-common/src/main/java/azkaban/metric/MetricReportManager.java
+++ b/azkaban-common/src/main/java/azkaban/metric/MetricReportManager.java
@@ -16,12 +16,14 @@
 
 package azkaban.metric;
 
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-import org.apache.log4j.Logger;
 
 
 /**
@@ -36,7 +38,7 @@ public class MetricReportManager {
    * Maximum number of metrics reporting threads
    */
   private static final int MAX_EMITTER_THREADS = 4;
-  private static final Logger logger = Logger.getLogger(MetricReportManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(MetricReportManager.class);
   // Singleton variable
   private static volatile MetricReportManager instance = null;
   private static volatile boolean isManagerEnabled;
diff --git a/azkaban-common/src/main/java/azkaban/metric/inmemoryemitter/InMemoryMetricEmitter.java b/azkaban-common/src/main/java/azkaban/metric/inmemoryemitter/InMemoryMetricEmitter.java
index 6161af1..8904651 100755
--- a/azkaban-common/src/main/java/azkaban/metric/inmemoryemitter/InMemoryMetricEmitter.java
+++ b/azkaban-common/src/main/java/azkaban/metric/inmemoryemitter/InMemoryMetricEmitter.java
@@ -29,7 +29,8 @@
 import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.TimeUnit;
 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
@@ -38,7 +39,7 @@
  */
 public class InMemoryMetricEmitter implements IMetricEmitter {
 
-  protected static final Logger logger = Logger.getLogger(InMemoryMetricEmitter.class);
+  private static final Logger logger = LoggerFactory.getLogger(InMemoryMetricEmitter.class);
   private static final String INMEMORY_METRIC_REPORTER_WINDOW = "azkaban.metric.inmemory.interval";
   private static final String INMEMORY_METRIC_NUM_INSTANCES = "azkaban.metric.inmemory.maxinstances";
   private static final String INMEMORY_METRIC_STANDARDDEVIATION_FACTOR =
diff --git a/azkaban-common/src/main/java/azkaban/project/AzkabanProjectLoader.java b/azkaban-common/src/main/java/azkaban/project/AzkabanProjectLoader.java
index eeaac71..cea39b3 100755
--- a/azkaban-common/src/main/java/azkaban/project/AzkabanProjectLoader.java
+++ b/azkaban-common/src/main/java/azkaban/project/AzkabanProjectLoader.java
@@ -48,8 +48,7 @@
 import java.util.zip.ZipFile;
 import javax.inject.Inject;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,6 +58,7 @@
 class AzkabanProjectLoader {
 
   private static final Logger log = LoggerFactory.getLogger(AzkabanProjectLoader.class);
+
   private static final String DIRECTORY_FLOW_REPORT_KEY = "Directory Flow";
 
   private final Props props;
@@ -202,19 +202,20 @@ public Map uploadProject(final Project project,
   private File unzipProject(final File archive, final String fileType)
       throws ProjectManagerException {
     final File file;
-    try {
+
       if (fileType == null) {
         throw new ProjectManagerException("Unknown file type for "
             + archive.getName());
       } else if ("zip".equals(fileType)) {
-        file = unzipFile(archive);
+        try {
+          file = unzipFile(archive);
+        } catch (final Exception e) {
+          throw new ProjectManagerException("Error unzipping file:" + archive.getName() + ", Please check if there are Chinese characters in the file name.", e);
+        }
       } else {
         throw new ProjectManagerException("Unsupported archive type for file "
             + archive.getName());
       }
-    } catch (final IOException e) {
-      throw new ProjectManagerException("Error unzipping file.", e);
-    }
     return file;
   }
 
diff --git a/azkaban-common/src/main/java/azkaban/project/DirectoryFlowLoader.java b/azkaban-common/src/main/java/azkaban/project/DirectoryFlowLoader.java
index 107f0f2..1abda53 100755
--- a/azkaban-common/src/main/java/azkaban/project/DirectoryFlowLoader.java
+++ b/azkaban-common/src/main/java/azkaban/project/DirectoryFlowLoader.java
@@ -26,6 +26,9 @@
 import azkaban.project.FlowLoaderUtils.SuffixFilter;
 import azkaban.project.validator.ValidationReport;
 import azkaban.utils.Props;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -35,8 +38,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Loads job and properties files to flows from project directory.
@@ -47,6 +48,7 @@ public class DirectoryFlowLoader implements FlowLoader {
   private static final String JOB_SUFFIX = ".job";
 
   private static final Logger logger = LoggerFactory.getLogger(DirectoryFlowLoader.class);
+
   private final Props props;
   private final Set errors = new HashSet<>();
   private final Map flowMap = new HashMap<>();
@@ -158,7 +160,8 @@ private void loadProjectFromDir(final String base, final File dir, Props parent)
         final FlowProps flowProps = new FlowProps(parent);
         this.flowPropsList.add(flowProps);
       } catch (final IOException e) {
-        this.errors.add("Error loading properties " + file.getName() + ":"
+        this.logger.error("Error loading properties {}, cause by :", file.getName(), e);
+        this.errors.add("Error loading properties " + file.getName() + ", cause by :"
             + e.getMessage());
       }
 
@@ -173,7 +176,7 @@ private void loadProjectFromDir(final String base, final File dir, Props parent)
       try {
         if (!this.duplicateJobs.contains(jobName)) {
           if (this.jobPropsMap.containsKey(jobName)) {
-            this.errors.add("Duplicate job names found '" + jobName + "'.");
+            this.errors.add("Duplicate job names found '" + file.getName() + "'.");
             this.duplicateJobs.add(jobName);
             this.jobPropsMap.remove(jobName);
             this.nodeMap.remove(jobName);
@@ -185,7 +188,7 @@ private void loadProjectFromDir(final String base, final File dir, Props parent)
             final Node node = new Node(jobName);
             final String type = prop.getString("type", null);
             if (type == null) {
-              this.errors.add("Job doesn't have type set '" + jobName + "', please check whether the file encoding is UNIX, UTF-8.");
+              this.errors.add("Job type property not found in file '" + file.getName() + "', please check whether the file encoding is UNIX, UTF-8.");
             }
 
             node.setType(type);
@@ -210,7 +213,8 @@ private void loadProjectFromDir(final String base, final File dir, Props parent)
           }
         }
       } catch (final IOException e) {
-        this.errors.add("Error loading job file " + file.getName() + ":"
+        this.logger.error("Error loading job file {}, cause by :", file.getName(), e);
+        this.errors.add("Error loading job file " + file.getName() + ", cause by : "
             + e.getMessage());
       }
     }
@@ -284,19 +288,22 @@ private void resolveDependencies() {
               if (this.duplicateJobs.contains(dependencyName)) {
                 edge.setError("Ambiguous Dependency. Duplicates found.");
                 dependencies.put(dependencyName, edge);
-                this.errors.add(node.getId() + " 依赖关系不清晰 "
+                // 依赖关系不清晰
+                this.errors.add(node.getId() + " has ambiguous dependency, please check the dependency information."
                     + dependencyName);
               } else {
                 edge.setError("Dependency not found.");
                 dependencies.put(dependencyName, edge);
-                this.errors.add(node.getId() + " 找不到依赖 "
+                // 找不到依赖
+                this.errors.add(node.getId() + " cannot find dependency, please check the dependency information. "
                     + dependencyName);
               }
             } else if (dependencyNode == node) {
               // We have a self cycle
               edge.setError("Self cycle found.");
               dependencies.put(dependencyName, edge);
-              this.errors.add(node.getId() + " 有一个死循环");
+              // 有一个死循环
+              this.errors.add(node.getId() + " has a self cycle, please check the dependency information.");
             } else {
               dependencies.put(dependencyName, edge);
             }
diff --git a/azkaban-common/src/main/java/azkaban/project/DirectoryYamlFlowLoader.java b/azkaban-common/src/main/java/azkaban/project/DirectoryYamlFlowLoader.java
index d9d4681..2ed44fe 100755
--- a/azkaban-common/src/main/java/azkaban/project/DirectoryYamlFlowLoader.java
+++ b/azkaban-common/src/main/java/azkaban/project/DirectoryYamlFlowLoader.java
@@ -37,8 +37,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Loads yaml files to flows from project directory.
diff --git a/azkaban-common/src/main/java/azkaban/project/FlowLoaderUtils.java b/azkaban-common/src/main/java/azkaban/project/FlowLoaderUtils.java
index 95606b5..6083963 100755
--- a/azkaban-common/src/main/java/azkaban/project/FlowLoaderUtils.java
+++ b/azkaban-common/src/main/java/azkaban/project/FlowLoaderUtils.java
@@ -37,8 +37,8 @@
 import java.util.Map;
 import java.util.Set;
 import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.yaml.snakeyaml.DumperOptions;
 import org.yaml.snakeyaml.DumperOptions.FlowStyle;
 import org.yaml.snakeyaml.Yaml;
diff --git a/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java b/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java
index 0d6c70d..2a0607e 100755
--- a/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java
+++ b/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java
@@ -62,7 +62,8 @@
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
@@ -73,7 +74,7 @@
 @Singleton
 public class JdbcProjectImpl implements ProjectLoader {
 
-  private static final Logger logger = Logger.getLogger(JdbcProjectImpl.class);
+  private static final Logger logger = LoggerFactory.getLogger(JdbcProjectImpl.class);
 
   private static final int CHUCK_SIZE = 1024 * 1024 * 10;
   // Flow yaml files are usually small, set size limitation to 10 MB should be sufficient for now.
@@ -229,7 +230,7 @@ public synchronized Project createNewProject(final String name, final String des
             "Active project with name " + name + " already exists in db.");
       }
     } catch (final SQLException ex) {
-      logger.error(ex);
+      logger.error("", ex);
       throw new ProjectManagerException("Checking for existing project failed. " + name, ex);
     }
 
@@ -527,7 +528,7 @@ public ProjectFileHandler getUploadedFile(final int projectId, final int version
             .createTempFile(projHandler.getFileName(), String.valueOf(version), this.tempDir);
         bStream = new BufferedOutputStream(new FileOutputStream(file));
       } catch (final IOException e) {
-        throw new ProjectManagerException("Error creating temp file for stream.", e);
+        throw new ProjectManagerException("Error creating temp file for stream.");
       }
 
       final int collect = 5;
@@ -542,7 +543,7 @@ public ProjectFileHandler getUploadedFile(final int projectId, final int version
                   projectId,
                   version, fromChunk, toChunk);
         } catch (final SQLException e) {
-          logger.error(e);
+          logger.error("", e);
           throw new ProjectManagerException("Query for uploaded file for " + projectId + " failed.",
               e);
         }
@@ -787,7 +788,7 @@ public void updateDescription(final Project project, final String description, f
       project.setLastModifiedTimestamp(updateTime);
       project.setLastModifiedUser(user);
     } catch (final SQLException e) {
-      logger.error(e);
+      logger.error("", e);
       throw new ProjectManagerException("Error update Description, project " + project.getName(),
           e);
     }
@@ -799,7 +800,7 @@ public int getLatestProjectVersion(final Project project) throws ProjectManagerE
     try {
       return this.dbOperator.query(IntHandler.SELECT_LATEST_VERSION, handler, project.getId());
     } catch (final SQLException e) {
-      logger.error(e);
+      logger.error("", e);
       throw new ProjectManagerException(
           "Error marking project " + project.getName() + " as inactive", e);
     }
@@ -1143,7 +1144,7 @@ public int getLatestFlowVersion(final int projectId, final int projectVersion,
       return this.dbOperator.query(IntHandler.SELECT_LATEST_FLOW_VERSION, handler, projectId,
           projectVersion, flowName);
     } catch (final SQLException e) {
-      logger.error(e);
+      logger.error("", e);
       throw new ProjectManagerException(
           "Error selecting latest flow version from project " + projectId + ", version " +
               projectVersion + ", flow " + flowName + ".", e);
@@ -1161,7 +1162,7 @@ public boolean isFlowFileUploaded(final int projectId, final int projectVersion)
           .query(FlowFileResultHandler.SELECT_ALL_FLOW_FILES, handler,
               projectId, projectVersion);
     } catch (final SQLException e) {
-      logger.error(e);
+      logger.error("", e);
       throw new ProjectManagerException("Failed to query uploaded flow files ", e);
     }
 
@@ -1297,7 +1298,7 @@ public List getTodayCreateProjects(final String username) throws Projec
         }
       });
     } catch (final SQLException ex) {
-      logger.error(ex);
+      logger.error("", ex);
       throw new ProjectManagerException("查找当日新建项目列表SQL执行异常!", ex);
     }
     return projects;
@@ -1336,7 +1337,7 @@ public int getTodayRunFlow(int projectId, String flowName) throws ProjectManager
     try {
       return this.dbOperator.query(serchSQL, handler, params.toArray());
     } catch (final SQLException e) {
-      logger.error(e);
+      logger.error("", e);
       throw new ProjectManagerException(
           "Statistics Program " + projectId + " Flow " + flowName + " Exception number of execute SQL in a day ", e);
     }
diff --git a/azkaban-common/src/main/java/azkaban/project/ProjectManager.java b/azkaban-common/src/main/java/azkaban/project/ProjectManager.java
index d7b1332..9ac1373 100755
--- a/azkaban-common/src/main/java/azkaban/project/ProjectManager.java
+++ b/azkaban-common/src/main/java/azkaban/project/ProjectManager.java
@@ -51,13 +51,14 @@
 import java.util.stream.Collectors;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 @Singleton
 public class ProjectManager {
 
-  private static final Logger logger = Logger.getLogger(ProjectManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(ProjectManager.class);
   private final AzkabanProjectLoader azkabanProjectLoader;
   private final ProjectLoader projectLoader;
   private final Props props;
diff --git a/azkaban-common/src/main/java/azkaban/project/validator/ValidatorManager.java b/azkaban-common/src/main/java/azkaban/project/validator/ValidatorManager.java
index 93c89fb..b3bd2c8 100755
--- a/azkaban-common/src/main/java/azkaban/project/validator/ValidatorManager.java
+++ b/azkaban-common/src/main/java/azkaban/project/validator/ValidatorManager.java
@@ -5,7 +5,8 @@
 import java.io.File;
 import java.util.List;
 import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * ValidatorManager is responsible for loading the list of validators specified in the Azkaban
diff --git a/azkaban-common/src/main/java/azkaban/project/validator/XmlValidatorManager.java b/azkaban-common/src/main/java/azkaban/project/validator/XmlValidatorManager.java
index 13e8135..9c1d938 100755
--- a/azkaban-common/src/main/java/azkaban/project/validator/XmlValidatorManager.java
+++ b/azkaban-common/src/main/java/azkaban/project/validator/XmlValidatorManager.java
@@ -17,7 +17,9 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
-import org.apache.log4j.Logger;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -45,7 +47,7 @@ public class XmlValidatorManager implements ValidatorManager {
   public static final String VALIDATOR_TAG = "validator";
   public static final String CLASSNAME_ATTR = "classname";
   public static final String ITEM_TAG = "property";
-  private static final Logger logger = Logger.getLogger(XmlValidatorManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(XmlValidatorManager.class);
   private static final Map resourceTimestamps = new HashMap<>();
   private static ValidatorClassLoader validatorLoader;
   private final String validatorDirPath;
@@ -124,7 +126,7 @@ private void checkResources() {
    * {@inheritDoc}
    *
    * @see azkaban.project.validator.ValidatorManager#loadValidators(azkaban.utils.Props,
-   * org.apache.log4j.Logger)
+   * Logger)
    */
   @Override
   public void loadValidators(final Props props, final Logger log) {
diff --git a/azkaban-common/src/main/java/azkaban/scheduler/ScheduleManager.java b/azkaban-common/src/main/java/azkaban/scheduler/ScheduleManager.java
index a2abd5d..f569f08 100755
--- a/azkaban-common/src/main/java/azkaban/scheduler/ScheduleManager.java
+++ b/azkaban-common/src/main/java/azkaban/scheduler/ScheduleManager.java
@@ -35,7 +35,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTimeZone;
 import org.joda.time.ReadablePeriod;
 import org.joda.time.format.DateTimeFormat;
@@ -53,7 +54,7 @@
 public class ScheduleManager implements TriggerAgent {
 
     public static final String SIMPLE_TIME_TRIGGER = "SimpleTimeTrigger";
-    private static final Logger logger = Logger.getLogger(ScheduleManager.class);
+    private static final Logger logger = LoggerFactory.getLogger(ScheduleManager.class);
     private final DateTimeFormatter _dateFormat = DateTimeFormat.forPattern("MM-dd-yyyy HH:mm:ss:SSS");
     private final ScheduleLoader loader;
 
@@ -187,7 +188,7 @@ public synchronized void removeSchedule(final Schedule sched) {
         try {
             this.loader.removeSchedule(sched);
         } catch (final ScheduleManagerException e) {
-            logger.error(e);
+            logger.error("", e);
         }
     }
 
@@ -291,7 +292,7 @@ public synchronized void insertSchedule(final Schedule s) {
                     internalSchedule(s);//更新缓存
                 }
             } catch (final ScheduleManagerException e) {
-                logger.error(e);
+                logger.error("", e);
             }
         } else {
             logger.error("The provided schedule is non-recurring and the scheduled time already passed. " + s.getScheduleName());
diff --git a/azkaban-common/src/main/java/azkaban/scheduler/TriggerBasedScheduleLoader.java b/azkaban-common/src/main/java/azkaban/scheduler/TriggerBasedScheduleLoader.java
index a5920c1..d06a126 100755
--- a/azkaban-common/src/main/java/azkaban/scheduler/TriggerBasedScheduleLoader.java
+++ b/azkaban-common/src/main/java/azkaban/scheduler/TriggerBasedScheduleLoader.java
@@ -32,12 +32,12 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 public class TriggerBasedScheduleLoader implements ScheduleLoader {
 
-  private static final Logger logger = Logger
-      .getLogger(TriggerBasedScheduleLoader.class);
+  private static final Logger logger = LoggerFactory.getLogger(TriggerBasedScheduleLoader.class);
 
   private final TriggerManagerAdapter triggerManager;
 
diff --git a/azkaban-common/src/main/java/azkaban/server/AzkabanServer.java b/azkaban-common/src/main/java/azkaban/server/AzkabanServer.java
index 810e9f7..11c0562 100755
--- a/azkaban-common/src/main/java/azkaban/server/AzkabanServer.java
+++ b/azkaban-common/src/main/java/azkaban/server/AzkabanServer.java
@@ -30,13 +30,14 @@
 import joptsimple.OptionParser;
 import joptsimple.OptionSet;
 import joptsimple.OptionSpec;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.apache.velocity.app.VelocityEngine;
 
 
 public abstract class AzkabanServer {
 
-  private static final Logger logger = Logger.getLogger(AzkabanServer.class);
+  private static final Logger logger = LoggerFactory.getLogger(AzkabanServer.class);
   private static Props azkabanProperties = null;
 
   public static Props loadProps(final String[] args) {
diff --git a/azkaban-common/src/main/java/azkaban/server/HttpRequestUtils.java b/azkaban-common/src/main/java/azkaban/server/HttpRequestUtils.java
index 8a184e1..33eba7a 100755
--- a/azkaban-common/src/main/java/azkaban/server/HttpRequestUtils.java
+++ b/azkaban-common/src/main/java/azkaban/server/HttpRequestUtils.java
@@ -25,7 +25,6 @@
 import azkaban.user.Role;
 import azkaban.user.User;
 import azkaban.utils.JSONUtils;
-import com.alibaba.fastjson.JSONObject;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -36,10 +35,15 @@
 import java.util.Map;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
+
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.reflect.TypeToken;
+import com.webank.wedatasphere.schedulis.common.utils.GsonUtils;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 public class HttpRequestUtils {
 
@@ -125,11 +129,11 @@ public static ExecutionOptions parseFlowOptions(final HttpServletRequest req)
     return execOptions;
   }
 
-  public static ExecutionOptions parseFlowOptions(final JSONObject jsonObject)
+  public static ExecutionOptions parseFlowOptions(final JsonObject jsonObject)
           throws ServletException {
     final ExecutionOptions execOptions = new ExecutionOptions();
-    if (jsonObject.containsKey("failureAction")) {
-      final String option = jsonObject.getString("failureAction");
+    if (jsonObject.has("failureAction")) {
+      final String option = jsonObject.get("failureAction").getAsString();
       if (option.equals("finishCurrent")) {
         execOptions.setFailureAction(FailureAction.FINISH_CURRENTLY_RUNNING);
       } else if (option.equals("cancelImmediately")) {
@@ -141,63 +145,72 @@ public static ExecutionOptions parseFlowOptions(final JSONObject jsonObject)
       }
     }
 
-    if (jsonObject.containsKey("failureEmailsOverride")) {
-      final boolean override = (Boolean) jsonObject.getOrDefault("failureEmailsOverride", false);
+    if (jsonObject.has("failureEmailsOverride")) {
+      final boolean override = jsonObject.get("failureEmailsOverride").getAsBoolean();
       execOptions.setFailureEmailsOverridden(override);
     }
-    if (jsonObject.containsKey("successEmailsOverride")) {
-      final boolean override = (Boolean) jsonObject.getOrDefault("successEmailsOverride", false);
+    if (jsonObject.has("successEmailsOverride")) {
+      final boolean override = jsonObject.get("successEmailsOverride").getAsBoolean();
       execOptions.setSuccessEmailsOverridden(override);
     }
 
-    if (jsonObject.containsKey("failureEmails")) {
-      final String emails = jsonObject.getString("failureEmails");
+    if (jsonObject.has("failureEmails")) {
+      final String emails = jsonObject.get("failureEmails").getAsString();
       if (!emails.isEmpty()) {
         final String[] emailSplit = emails.split("\\s*,\\s*|\\s*;\\s*|\\s+");
         execOptions.setFailureEmails(Arrays.asList(emailSplit));
       }
     }
-    if (jsonObject.containsKey("successEmails")) {
-      final String emails = jsonObject.getString("successEmails");
+    if (jsonObject.has("successEmails")) {
+      final String emails = jsonObject.get("successEmails").getAsString();
       if (!emails.isEmpty()) {
         final String[] emailSplit = emails.split("\\s*,\\s*|\\s*;\\s*|\\s+");
         execOptions.setSuccessEmails(Arrays.asList(emailSplit));
       }
     }
-    if (jsonObject.containsKey("notifyFailureFirst")) {
-      execOptions.setNotifyOnFirstFailure(Boolean.parseBoolean(jsonObject.getString(
-              "notifyFailureFirst")));
+    if (jsonObject.has("notifyFailureFirst")) {
+      execOptions.setNotifyOnFirstFailure(jsonObject.get(
+              "notifyFailureFirst").getAsBoolean());
     }
-    if (jsonObject.containsKey("notifyFailureLast")) {
-      execOptions.setNotifyOnLastFailure(Boolean.parseBoolean(jsonObject.getString(
-              "notifyFailureLast")));
+    if (jsonObject.has("notifyFailureLast")) {
+      execOptions.setNotifyOnLastFailure(jsonObject.get(
+              "notifyFailureLast").getAsBoolean());
+    }
+    String concurrentOption = "skip";
+    if (jsonObject.has("concurrentOption")) {
+      concurrentOption = jsonObject.get("concurrentOption").getAsString();
     }
-
-    String concurrentOption = (String) jsonObject.getOrDefault("concurrentOption", "skip");
     execOptions.setConcurrentOption(concurrentOption);
+
     if (concurrentOption.equals("pipeline")) {
-      final int pipelineLevel = jsonObject.getIntValue( "pipelineLevel");
+      final int pipelineLevel = jsonObject.get( "pipelineLevel").getAsInt();
       execOptions.setPipelineLevel(pipelineLevel);
     } else if (concurrentOption.equals("queue")) {
       // Not yet implemented
-      final int queueLevel = (Integer) jsonObject.getOrDefault( "queueLevel", 1);
+      int queueLevel = 1;
+      if (jsonObject.has("queueLevel")) {
+        queueLevel = jsonObject.get("queueLevel").getAsInt();
+      }
       execOptions.setPipelineLevel(queueLevel);
     }
 
     String mailCreator = DefaultMailCreator.DEFAULT_MAIL_CREATOR;
-    if (jsonObject.containsKey("mailCreator")) {
-      mailCreator = jsonObject.getString("mailCreator");
+    if (jsonObject.has("mailCreator")) {
+      mailCreator = jsonObject.get("mailCreator").getAsString();
       execOptions.setMailCreator(mailCreator);
     }
 
-    final Map flowParamGroup = (Map) jsonObject.get("flowOverride");
+    Map flowParamGroup = new HashMap<>();
+    if(jsonObject.has("flowOverride")) {
+      flowParamGroup = GsonUtils.jsonToJavaObject(jsonObject.get("flowOverride").getAsJsonObject(), new TypeToken>() {
+      }.getType());
+    }
     execOptions.addAllFlowParameters(flowParamGroup);
 
-    if (jsonObject.containsKey("disabled")) {
-      final String disabled = jsonObject.getString("disabled");
-      if (!disabled.isEmpty()) {
-        final List disabledList =
-                (List) JSONUtils.parseJSONFromStringQuiet(disabled);
+    if (jsonObject.has("disabled")) {
+      List disabledList = GsonUtils.jsonToJavaObject(jsonObject.get("disabled"), new TypeToken>() {
+      }.getType());
+      if (disabledList != null) {
         execOptions.setDisabledJobs(disabledList);
       }
     }
@@ -418,18 +431,13 @@ public static Map parseWebOptions(final ExecutionOptions flowOpt
 
     return responseMap;
   }
-  public static JSONObject parseRequestToJsonObject(final HttpServletRequest request) {
-    JSONObject json = null;
+  public static JsonObject parseRequestToJsonObject(final HttpServletRequest request) {
+    JsonObject json = null;
     BufferedReader br = null;
     try {
       br = new BufferedReader(new InputStreamReader(request.getInputStream(),"utf-8"));
-      String line = null;
-      StringBuilder sb = new StringBuilder();
-      while((line = br.readLine()) != null){
-        sb.append(line);
-      }
-      json = JSONObject.parseObject(sb.toString());
-    } catch (IOException io){
+      json = JsonParser.parseReader(br).getAsJsonObject();
+    } catch (Exception io){
       logger.error("IOException: {}" , io);
     }finally {
       try {
diff --git a/azkaban-common/src/main/java/azkaban/server/session/SessionCache.java b/azkaban-common/src/main/java/azkaban/server/session/SessionCache.java
index 63875c6..7becc57 100755
--- a/azkaban-common/src/main/java/azkaban/server/session/SessionCache.java
+++ b/azkaban-common/src/main/java/azkaban/server/session/SessionCache.java
@@ -20,9 +20,11 @@
 import azkaban.utils.Props;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import javax.inject.Inject;
 import java.util.concurrent.TimeUnit;
-import org.apache.log4j.Logger;
 /**
  * Cache for web session.
  *
@@ -35,7 +37,7 @@
  */
 public class SessionCache {
 
-  private static final Logger logger = Logger.getLogger(SessionCache.class);
+  private static final Logger logger = LoggerFactory.getLogger(SessionCache.class);
 
   private static final int MAX_NUM_SESSIONS = 10000;
   private static final long DEFAULT_SESSION_TIME_TO_LIVE = 1 * 60 * 60 * 1000L;
diff --git a/azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java b/azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
index 2b8035c..89e3334 100755
--- a/azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
+++ b/azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
@@ -28,7 +28,8 @@
 import java.io.IOException;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
@@ -38,7 +39,7 @@
 @Singleton
 public class HdfsAuth {
 
-  private static final Logger log = Logger.getLogger(HdfsAuth.class);
+  private static final Logger logger = LoggerFactory.getLogger(HdfsAuth.class);
 
   private final boolean isSecurityEnabled;
 
@@ -51,7 +52,7 @@ public HdfsAuth(final Props props, final Configuration conf) {
     UserGroupInformation.setConfiguration(conf);
     this.isSecurityEnabled = UserGroupInformation.isSecurityEnabled();
     if (this.isSecurityEnabled) {
-      log.info("The Hadoop cluster has enabled security");
+      logger.info("The Hadoop cluster has enabled security");
       this.keytabPath = requireNonNull(props.getString(AZKABAN_KEYTAB_PATH));
       this.keytabPrincipal = requireNonNull(props.getString(AZKABAN_KERBEROS_PRINCIPAL));
     }
@@ -66,7 +67,7 @@ public void authorize() {
       try {
         login(this.keytabPrincipal, this.keytabPath);
       } catch (final IOException e) {
-        log.error(e);
+        logger.error("", e);
         throw new AzkabanException(String.format(
             "Error: Unable to authorize to Hadoop. Principal: %s Keytab: %s", this.keytabPrincipal,
             this.keytabPath));
@@ -76,14 +77,14 @@ public void authorize() {
 
   private void login(final String keytabPrincipal, final String keytabPath) throws IOException {
     if (this.loggedInUser == null) {
-      log.info(
+      logger.info(
           String.format("Logging in using Principal: %s Keytab: %s", keytabPrincipal, keytabPath));
 
       UserGroupInformation.loginUserFromKeytab(keytabPrincipal, keytabPath);
       this.loggedInUser = UserGroupInformation.getLoginUser();
-      log.info(String.format("User %s logged in.", this.loggedInUser));
+      logger.info(String.format("User %s logged in.", this.loggedInUser));
     } else {
-      log.info(String.format("User %s already logged in. Refreshing TGT", this.loggedInUser));
+      logger.info(String.format("User %s already logged in. Refreshing TGT", this.loggedInUser));
       this.loggedInUser.checkTGTAndReloginFromKeytab();
     }
   }
diff --git a/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java b/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
index 25efcdb..924ddaf 100755
--- a/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
+++ b/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
@@ -33,13 +33,14 @@
 import org.apache.commons.codec.binary.Hex;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 @Singleton
 public class HdfsStorage implements Storage {
 
-  private static final Logger log = Logger.getLogger(HdfsStorage.class);
+  private static final Logger logger = LoggerFactory.getLogger(HdfsStorage.class);
   private static final String HDFS_SCHEME = "hdfs";
 
   private final HdfsAuth hdfsAuth;
@@ -70,21 +71,21 @@ public String put(final StorageMetadata metadata, final File localFile) {
         String.valueOf(metadata.getProjectId()));
     try {
       if (this.hdfs.mkdirs(projectsPath)) {
-        log.info("Created project dir: " + projectsPath);
+        logger.info("Created project dir: " + projectsPath);
       }
       final Path targetPath = createTargetPath(metadata, projectsPath);
       if (this.hdfs.exists(targetPath)) {
-        log.info(
+        logger.info(
             String.format("Duplicate Found: meta: %s path: %s", metadata, targetPath));
         return getRelativePath(targetPath);
       }
 
       // Copy file to HDFS
-      log.info(String.format("Creating project artifact: meta: %s path: %s", metadata, targetPath));
+      logger.info(String.format("Creating project artifact: meta: %s path: %s", metadata, targetPath));
       this.hdfs.copyFromLocalFile(new Path(localFile.getAbsolutePath()), targetPath);
       return getRelativePath(targetPath);
     } catch (final IOException e) {
-      log.error("error in put(): Metadata: " + metadata);
+      logger.error("error in put(): Metadata: " + metadata);
       throw new StorageException(e);
     }
   }
@@ -107,7 +108,7 @@ public boolean delete(final String key) {
     try {
       return this.hdfs.delete(path, false);
     } catch (final IOException e) {
-      log.error("HDFS delete failed on " + path, e);
+      logger.error("HDFS delete failed on " + path, e);
       return false;
     }
   }
diff --git a/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java b/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
index 286a784..d416c37 100755
--- a/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
+++ b/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
@@ -32,13 +32,14 @@
 import java.io.InputStream;
 import org.apache.commons.codec.binary.Hex;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 @Singleton
 public class LocalStorage implements Storage {
 
-  private static final Logger log = Logger.getLogger(LocalStorage.class);
+  private static final Logger logger = LoggerFactory.getLogger(LocalStorage.class);
 
   final File rootDirectory;
 
@@ -52,7 +53,7 @@ private static File createIfDoesNotExist(final String baseDirectoryPath) {
     final File baseDirectory = new File(baseDirectoryPath);
     if (!baseDirectory.exists()) {
       baseDirectory.mkdir();
-      log.info("Creating dir: " + baseDirectory.getAbsolutePath());
+      logger.info("Creating dir: " + baseDirectory.getAbsolutePath());
     }
     return baseDirectory;
   }
@@ -81,7 +82,7 @@ public InputStream get(final String key) throws IOException {
   public String put(final StorageMetadata metadata, final File localFile) {
     final File projectDir = new File(this.rootDirectory, String.valueOf(metadata.getProjectId()));
     if (projectDir.mkdir()) {
-      log.info("Created project dir: " + projectDir.getAbsolutePath());
+      logger.info("Created project dir: " + projectDir.getAbsolutePath());
     }
 
     final File targetFile = new File(projectDir, String.format("%s-%s.zip",
@@ -89,7 +90,7 @@ public String put(final StorageMetadata metadata, final File localFile) {
         new String(Hex.encodeHex(metadata.getHash()))));
 
     if (targetFile.exists()) {
-      log.info(String.format("Duplicate found: meta: %s, targetFile: %s, ", metadata,
+      logger.info(String.format("Duplicate found: meta: %s, targetFile: %s, ", metadata,
           targetFile.getAbsolutePath()));
       return getRelativePath(targetFile);
     }
@@ -98,7 +99,7 @@ public String put(final StorageMetadata metadata, final File localFile) {
     try {
       FileUtils.copyFile(localFile, targetFile);
     } catch (final IOException e) {
-      log.error("LocalStorage error in put(): meta: " + metadata);
+      logger.error("LocalStorage error in put(): meta: " + metadata);
       throw new StorageException(e);
     }
     return getRelativePath(targetFile);
@@ -113,9 +114,9 @@ public boolean delete(final String key) {
     final File file = getFile(key);
     final boolean result = file.exists() && file.delete();
     if (result) {
-      log.warn("Deleted file: " + file.getAbsolutePath());
+      logger.warn("Deleted file: " + file.getAbsolutePath());
     } else {
-      log.warn("Unable to delete file: " + file.getAbsolutePath());
+      logger.warn("Unable to delete file: " + file.getAbsolutePath());
     }
     return result;
   }
diff --git a/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java b/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
index 9cd518d..6092832 100755
--- a/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
+++ b/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
@@ -32,7 +32,8 @@
 import java.util.Set;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 @Singleton
 public class StorageCleaner {
@@ -49,7 +50,7 @@ public class StorageCleaner {
    */
   static final String SQL_FETCH_PVR = "SELECT resource_id FROM project_versions WHERE project_id=? AND resource_id IS NOT NULL ORDER BY version DESC";
 
-  private static final Logger log = Logger.getLogger(StorageCleaner.class);
+  private static final Logger log = LoggerFactory.getLogger(StorageCleaner.class);
   private final DatabaseOperator databaseOperator;
   private final int maxArtifactsPerProject;
   private final Storage storage;
diff --git a/azkaban-common/src/main/java/azkaban/storage/StorageManager.java b/azkaban-common/src/main/java/azkaban/storage/StorageManager.java
index 4c82d06..77f0de3 100755
--- a/azkaban-common/src/main/java/azkaban/storage/StorageManager.java
+++ b/azkaban-common/src/main/java/azkaban/storage/StorageManager.java
@@ -40,7 +40,8 @@
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
@@ -50,7 +51,7 @@
 @Singleton
 public class StorageManager {
 
-  private static final Logger log = Logger.getLogger(StorageManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(StorageManager.class);
 
   private final StorageCleaner storageCleaner;
   private final Storage storage;
@@ -100,7 +101,7 @@ public void uploadProject(
         version,
         uploader.getUserId(),
         md5);
-    log.info(String.format("Adding archive to storage. Meta:%s File: %s[%d bytes]",
+    logger.info(String.format("Adding archive to storage. Meta:%s File: %s[%d bytes]",
         metadata, localFile.getName(), localFile.length()));
 
     String resourceId = null;
@@ -118,7 +119,7 @@ public void uploadProject(
           requireNonNull(md5),
           requireNonNull(resourceId)
       );
-      log.info(String.format("Added project metadata to DB. Meta:%s File: %s[%d bytes] URI: %s",
+      logger.info(String.format("Added project metadata to DB. Meta:%s File: %s[%d bytes] URI: %s",
           metadata, localFile.getName(), localFile.length(), resourceId));
     }
   }
@@ -130,7 +131,7 @@ public void cleanupProjectArtifacts(final int projectId) {
     try {
       this.storageCleaner.cleanupProjectArtifacts(projectId);
     } catch (final Exception e) {
-      log.error("Error occured during cleanup. Ignoring and continuing...", e);
+      logger.error("Error occured during cleanup. Ignoring and continuing...", e);
     }
   }
 
@@ -152,7 +153,7 @@ private byte[] computeHash(final File localFile) {
    * @return Handler object containing hooks to fetched project file
    */
   public ProjectFileHandler getProjectFile(final int projectId, final int version) {
-    log.info(
+    logger.info(
         String.format("Fetching project file. project ID: %d version: %d", projectId, version));
     // TODO spyne: remove huge hack ! There should not be any special handling for Database Storage.
     if (this.storage instanceof DatabaseStorage) {
diff --git a/azkaban-common/src/main/java/azkaban/trigger/ActionTypeLoader.java b/azkaban-common/src/main/java/azkaban/trigger/ActionTypeLoader.java
index 245b53e..dffd88e 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/ActionTypeLoader.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/ActionTypeLoader.java
@@ -18,16 +18,18 @@
 
 import azkaban.utils.Props;
 import azkaban.utils.Utils;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
-import org.apache.log4j.Logger;
 
 public class ActionTypeLoader {
 
   public static final String DEFAULT_TRIGGER_ACTION_PLUGIN_DIR =
       "plugins/triggeractions";
-  private static final Logger logger = Logger.getLogger(ActionTypeLoader.class);
+  private static final Logger logger = LoggerFactory.getLogger(ActionTypeLoader.class);
   protected static Map> actionToClass =
       new HashMap<>();
 
diff --git a/azkaban-common/src/main/java/azkaban/trigger/CheckerTypeLoader.java b/azkaban-common/src/main/java/azkaban/trigger/CheckerTypeLoader.java
index 30fe9f8..db587b8 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/CheckerTypeLoader.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/CheckerTypeLoader.java
@@ -18,15 +18,17 @@
 
 import azkaban.utils.Props;
 import azkaban.utils.Utils;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.log4j.Logger;
 
 public class CheckerTypeLoader {
 
   public static final String DEFAULT_CONDITION_CHECKER_PLUGIN_DIR =
       "plugins/conditioncheckers";
-  private static final Logger logger = Logger.getLogger(CheckerTypeLoader.class);
+  private static final Logger logger = LoggerFactory.getLogger(CheckerTypeLoader.class);
   protected static Map> checkerToClass =
       new HashMap<>();
 
diff --git a/azkaban-common/src/main/java/azkaban/trigger/Condition.java b/azkaban-common/src/main/java/azkaban/trigger/Condition.java
index 92f72c1..d5902e3 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/Condition.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/Condition.java
@@ -23,12 +23,13 @@
 import org.apache.commons.jexl2.Expression;
 import org.apache.commons.jexl2.JexlEngine;
 import org.apache.commons.jexl2.MapContext;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTime;
 
 public class Condition {
 
-  private static final Logger logger = Logger.getLogger(Condition.class);
+  private static final Logger logger = LoggerFactory.getLogger(Condition.class);
 
   private static final JexlEngine jexl = new JexlEngine();
   private static CheckerTypeLoader checkerLoader = null;
diff --git a/azkaban-common/src/main/java/azkaban/trigger/JdbcTriggerImpl.java b/azkaban-common/src/main/java/azkaban/trigger/JdbcTriggerImpl.java
index e6e4186..20860a9 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/JdbcTriggerImpl.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/JdbcTriggerImpl.java
@@ -30,7 +30,8 @@
 import java.util.Collections;
 import java.util.List;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTime;
 
 
@@ -55,7 +56,7 @@ public class JdbcTriggerImpl implements TriggerLoader {
   private static final String UPDATE_TRIGGER =
       "UPDATE " + TRIGGER_TABLE_NAME
           + " SET trigger_source=?, modify_time=?, enc_type=?, data=? WHERE trigger_id=?";
-  private static final Logger logger = Logger.getLogger(JdbcTriggerImpl.class);
+  private static final Logger logger = LoggerFactory.getLogger(JdbcTriggerImpl.class);
   private final DatabaseOperator dbOperator;
   private final EncodingType defaultEncodingType = EncodingType.GZIP;
 
diff --git a/azkaban-common/src/main/java/azkaban/trigger/Trigger.java b/azkaban-common/src/main/java/azkaban/trigger/Trigger.java
index d191269..8203375 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/Trigger.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/Trigger.java
@@ -23,13 +23,15 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.log4j.Logger;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTime;
 
 
 public class Trigger {
 
-  private static final Logger logger = Logger.getLogger(Trigger.class);
+  private static final Logger logger = LoggerFactory.getLogger(Trigger.class);
   private static ActionTypeLoader actionTypeLoader;
   private final long submitTime;
   private final String submitUser;
diff --git a/azkaban-common/src/main/java/azkaban/trigger/TriggerManager.java b/azkaban-common/src/main/java/azkaban/trigger/TriggerManager.java
index 3d5481b..0a77d9c 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/TriggerManager.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/TriggerManager.java
@@ -18,7 +18,7 @@
 
 import com.webank.wedatasphere.schedulis.common.distributelock.DBTableDistributeLock;
 
-import org.apache.log4j.Logger;
+
 import org.joda.time.DateTimeUtils;
 
 import java.util.ArrayList;
@@ -44,7 +44,8 @@
 
 import static java.util.Objects.requireNonNull;
 
-
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 /**
  * @author georgeqiao
  * @Title: TriggerManager support HA
@@ -56,7 +57,7 @@ public class TriggerManager extends EventHandler implements TriggerManagerAdapte
 
   public static final long DEFAULT_SCANNER_INTERVAL_MS = 60000;
   public static final String TRIGGERS_LOCK_KEY= "triggers_lock_key";
-  private static final Logger logger = Logger.getLogger(TriggerManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(TriggerManager.class);
   private static final Map triggerIdMap = new ConcurrentHashMap<>();
 
   private final TriggerScannerThread runnerThread;
@@ -114,7 +115,7 @@ public void start() throws TriggerManagerException {
         triggerIdMap.put(t.getTriggerId(), t);
       }
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("", e);
       throw new TriggerManagerException(e);
     }
 
diff --git a/azkaban-common/src/main/java/azkaban/trigger/builtin/ExecuteFlowAction.java b/azkaban-common/src/main/java/azkaban/trigger/builtin/ExecuteFlowAction.java
index 03311e8..bd8f0a3 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/builtin/ExecuteFlowAction.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/builtin/ExecuteFlowAction.java
@@ -32,7 +32,8 @@
 
 import java.util.*;
 
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 public class ExecuteFlowAction implements TriggerAction {
 
@@ -44,7 +45,7 @@ public class ExecuteFlowAction implements TriggerAction {
   private static TriggerManager triggerManager;
   private static ProjectManager projectManager;
   private static SystemManager systemManager;
-  private static Logger logger = Logger.getLogger(ExecuteFlowAction.class);
+  private static Logger logger = LoggerFactory.getLogger(ExecuteFlowAction.class);
   private final String actionId;
   private final String projectName;
   private int projectId;
diff --git a/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java b/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
index 932d43f..dde091f 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
@@ -21,9 +21,11 @@
 import azkaban.executor.ExecutorManagerAdapter;
 import azkaban.executor.Status;
 import azkaban.trigger.TriggerAction;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.log4j.Logger;
 
 /**
  * @deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager
@@ -36,8 +38,7 @@ public class KillExecutionAction implements TriggerAction {
 
   public static final String type = "KillExecutionAction";
 
-  private static final Logger logger = Logger
-      .getLogger(KillExecutionAction.class);
+  private static final Logger logger = LoggerFactory.getLogger(KillExecutionAction.class);
   private static ExecutorManagerAdapter executorManagerAdapter;
   private final String actionId;
   private final int execId;
diff --git a/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaAlertAction.java b/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaAlertAction.java
index c766daf..45a0fd2 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaAlertAction.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaAlertAction.java
@@ -23,15 +23,17 @@
 import azkaban.executor.ExecutorLoader;
 import azkaban.sla.SlaOption;
 import azkaban.trigger.TriggerAction;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.log4j.Logger;
 
 public class SlaAlertAction implements TriggerAction {
 
   public static final String type = "AlertAction";
 
-  private static final Logger logger = Logger.getLogger(SlaAlertAction.class);
+  private static final Logger logger = LoggerFactory.getLogger(SlaAlertAction.class);
 
   private final String actionId;
   private final SlaOption slaOption;
diff --git a/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaChecker.java b/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaChecker.java
index 1c913d9..fe7ccc8 100755
--- a/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaChecker.java
+++ b/azkaban-common/src/main/java/azkaban/trigger/builtin/SlaChecker.java
@@ -27,14 +27,16 @@
 import azkaban.utils.Utils;
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.log4j.Logger;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.DateTime;
 import org.joda.time.ReadablePeriod;
 
 public class SlaChecker implements ConditionChecker {
 
   public static final String type = "SlaChecker";
-  private static final Logger logger = Logger.getLogger(SlaChecker.class);
+  private static final Logger logger = LoggerFactory.getLogger(SlaChecker.class);
   private final String id;
   private final SlaOption slaOption;
   private final int execId;
diff --git a/azkaban-common/src/main/java/azkaban/user/XmlUserManager.java b/azkaban-common/src/main/java/azkaban/user/XmlUserManager.java
index 9a629fe..cb0b0de 100755
--- a/azkaban-common/src/main/java/azkaban/user/XmlUserManager.java
+++ b/azkaban-common/src/main/java/azkaban/user/XmlUserManager.java
@@ -28,7 +28,8 @@
 import javax.xml.parsers.ParserConfigurationException;
 
 import com.webank.wedatasphere.schedulis.common.utils.XmlResolveUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -44,6 +45,8 @@
  */
 public class XmlUserManager implements UserManager {
 
+  private static final Logger logger = LoggerFactory.getLogger(XmlUserManager.class);
+
   public static final String XML_FILE_PARAM = "user.manager.xml.file";
   public static final String AZKABAN_USERS_TAG = "azkaban-users";
   public static final String USER_TAG = "user";
@@ -58,8 +61,7 @@ public class XmlUserManager implements UserManager {
   public static final String PROXY_ATTR = "proxy";
   public static final String GROUPS_ATTR = "groups";
   public static final String GROUPNAME_ATTR = "name";
-  private static final Logger logger = Logger.getLogger(XmlUserManager.class
-      .getName());
+
   private final String xmlPath;
 
   private HashMap users;
diff --git a/azkaban-common/src/main/java/azkaban/utils/AuthenticationUtils.java b/azkaban-common/src/main/java/azkaban/utils/AuthenticationUtils.java
index c643f4c..e19f42f 100755
--- a/azkaban-common/src/main/java/azkaban/utils/AuthenticationUtils.java
+++ b/azkaban-common/src/main/java/azkaban/utils/AuthenticationUtils.java
@@ -25,8 +25,8 @@
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.authentication.client.AuthenticatedURL;
 import org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * The util class for hadoop authentication.
diff --git a/azkaban-common/src/main/java/azkaban/utils/EmailMessage.java b/azkaban-common/src/main/java/azkaban/utils/EmailMessage.java
index e5f81cc..abc3f7e 100755
--- a/azkaban-common/src/main/java/azkaban/utils/EmailMessage.java
+++ b/azkaban-common/src/main/java/azkaban/utils/EmailMessage.java
@@ -16,6 +16,9 @@
 
 package azkaban.utils;
 
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.io.File;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -32,7 +35,6 @@
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMultipart;
-import org.apache.log4j.Logger;
 
 public class EmailMessage {
 
@@ -40,7 +42,7 @@ public class EmailMessage {
   private static int _mailTimeout = 10000;
   private static int _connectionTimeout = 10000;
   private static long _totalAttachmentMaxSizeInByte = 1024 * 1024 * 1024; // 1
-  private final Logger logger = Logger.getLogger(EmailMessage.class);
+  private static final Logger logger = LoggerFactory.getLogger(EmailMessage.class);
   private final List _toAddress = new ArrayList<>();
   private final int _mailPort;
   private final ArrayList _attachments = new ArrayList<>();
diff --git a/azkaban-common/src/main/java/azkaban/utils/Emailer.java b/azkaban-common/src/main/java/azkaban/utils/Emailer.java
index 47ba901..d5ad729 100755
--- a/azkaban-common/src/main/java/azkaban/utils/Emailer.java
+++ b/azkaban-common/src/main/java/azkaban/utils/Emailer.java
@@ -41,14 +41,16 @@
 import javax.mail.internet.AddressException;
 
 import org.apache.commons.collections.CollectionUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Singleton
 public class Emailer extends AbstractMailer implements Alerter {
 
+  private static final Logger logger = LoggerFactory.getLogger(Emailer.class);
+
   private static final String HTTPS = "https";
   private static final String HTTP = "http";
-  private static final Logger logger = Logger.getLogger(Emailer.class);
   private final CommonMetrics commonMetrics;
   private final String scheme;
   private final String clientHostname;
diff --git a/azkaban-common/src/main/java/azkaban/utils/ExecuteAsUser.java b/azkaban-common/src/main/java/azkaban/utils/ExecuteAsUser.java
index 19981a9..37db091 100755
--- a/azkaban-common/src/main/java/azkaban/utils/ExecuteAsUser.java
+++ b/azkaban-common/src/main/java/azkaban/utils/ExecuteAsUser.java
@@ -19,7 +19,8 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * This is a wrapper over the binary executable execute-as-user. It provides a simple API to run
@@ -27,7 +28,7 @@
  */
 public class ExecuteAsUser {
 
-  private final static Logger log = Logger.getLogger(ExecuteAsUser.class);
+  private final static Logger logger = LoggerFactory.getLogger(ExecuteAsUser.class);
   private final static String EXECUTE_AS_USER = "execute-as-user";
 
   private final File binaryExecutable;
@@ -57,7 +58,7 @@ private void validate() {
    * @return The return value of the shell command
    */
   public int execute(final String user, final List command) throws IOException {
-    log.info("Command: " + command);
+    logger.info("Command: " + command);
     final Process process = new ProcessBuilder()
         .command(constructExecuteAsCommand(user, command))
         .inheritIO()
@@ -67,7 +68,7 @@ public int execute(final String user, final List command) throws IOExcep
     try {
       exitCode = process.waitFor();
     } catch (final InterruptedException e) {
-      log.error(e.getMessage(), e);
+      logger.error(e.getMessage(), e);
       exitCode = 1;
     }
     return exitCode;
diff --git a/azkaban-common/src/main/java/azkaban/utils/ExternalLinkUtils.java b/azkaban-common/src/main/java/azkaban/utils/ExternalLinkUtils.java
index e6bd10a..5642cbc 100755
--- a/azkaban-common/src/main/java/azkaban/utils/ExternalLinkUtils.java
+++ b/azkaban-common/src/main/java/azkaban/utils/ExternalLinkUtils.java
@@ -17,14 +17,16 @@
 package azkaban.utils;
 
 import azkaban.Constants;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import javax.servlet.http.HttpServletRequest;
-import org.apache.log4j.Logger;
 
 public class ExternalLinkUtils {
 
-  private static final Logger logger = Logger.getLogger(ExternalLinkUtils.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExternalLinkUtils.class);
 
   public static String getExternalAnalyzerOnReq(final Props azkProps,
       final HttpServletRequest req) {
diff --git a/azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java b/azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java
index 9449d30..8e6eea7 100755
--- a/azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java
+++ b/azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java
@@ -26,8 +26,8 @@
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
diff --git a/azkaban-common/src/main/java/azkaban/utils/LogGobbler.java b/azkaban-common/src/main/java/azkaban/utils/LogGobbler.java
index 1a83b53..ef94ee9 100755
--- a/azkaban-common/src/main/java/azkaban/utils/LogGobbler.java
+++ b/azkaban-common/src/main/java/azkaban/utils/LogGobbler.java
@@ -20,18 +20,18 @@
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.Reader;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+
+import org.slf4j.Logger;
 
 public class LogGobbler extends Thread {
 
   private final BufferedReader inputReader;
   private final Logger logger;
-  private final Level loggingLevel;
+  private final String loggingLevel;
   private final CircularBuffer buffer;
 
   public LogGobbler(final Reader inputReader, final Logger logger,
-      final Level level, final int bufferLines) {
+      final String level, final int bufferLines) {
     this.inputReader = new BufferedReader(inputReader);
     this.logger = logger;
     this.loggingLevel = level;
@@ -57,7 +57,23 @@ public void run() {
 
   private void log(final String message) {
     if (this.logger != null) {
-      this.logger.log(this.loggingLevel, message);
+      switch (this.loggingLevel) {
+        case "INFO":
+          this.logger.info(message);
+          break;
+        case "DEBUG":
+          this.logger.debug(message);
+          break;
+        case "ERROR":
+          this.logger.error(message);
+          break;
+        case "WARN":
+          this.logger.warn(message);
+          break;
+        default:
+          this.logger.trace(message);
+          break;
+      }
     }
   }
 
diff --git a/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java b/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java
index 1091aeb..4040f94 100755
--- a/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java
+++ b/azkaban-common/src/main/java/azkaban/utils/OsMemoryUtil.java
@@ -6,8 +6,9 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.List;
-import org.slf4j.Logger;
+
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
diff --git a/azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java b/azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java
deleted file mode 100755
index 2afe703..0000000
--- a/azkaban-common/src/main/java/azkaban/utils/PatternLayoutEscaped.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package azkaban.utils;
-
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.spi.LoggingEvent;
-
-/**
- * When we use the log4j Kafka appender, it seems that the appender simply does not log the stack
- * trace anywhere Seeing as the stack trace is a very important piece of information, we create our
- * own PatternLayout class that appends the stack trace to the log message that reported it, so that
- * all the information regarding that error can be found one in place.
- */
-public class PatternLayoutEscaped extends PatternLayout {
-
-  public PatternLayoutEscaped(final String s) {
-    super(s);
-  }
-
-  public PatternLayoutEscaped() {
-    super();
-  }
-
-  @Override
-  public String format(final LoggingEvent event) {
-    if (event.getMessage() instanceof String) {
-      return super.format(appendStackTraceToEvent(event));
-    }
-    return super.format(event);
-  }
-
-  /**
-   * Create a copy of event, but append a stack trace to the message (if it exists). Then it escapes
-   * the backslashes, tabs, newlines and quotes in its message as we are sending it as JSON and we
-   * don't want any corruption of the JSON object.
-   */
-  private LoggingEvent appendStackTraceToEvent(final LoggingEvent event) {
-    String message = event.getMessage().toString();
-    // If there is a stack trace available, print it out
-    if (event.getThrowableInformation() != null) {
-      final String[] s = event.getThrowableStrRep();
-      for (final String line : s) {
-        message += "\n" + line;
-      }
-    }
-    message = message
-        .replace("\\", "\\\\")
-        .replace("\n", "\\n")
-        .replace("\"", "\\\"")
-        .replace("\t", "\\t");
-
-    final Throwable throwable = event.getThrowableInformation() == null ? null
-        : event.getThrowableInformation().getThrowable();
-    return new LoggingEvent(event.getFQNOfLoggerClass(),
-        event.getLogger(),
-        event.getTimeStamp(),
-        event.getLevel(),
-        message,
-        throwable);
-  }
-}
diff --git a/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java b/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java
index 4f139fa..d5a6d6a 100755
--- a/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java
+++ b/azkaban-common/src/main/java/azkaban/utils/RestfulApiClient.java
@@ -33,7 +33,8 @@
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.message.BasicNameValuePair;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * class handles the communication between the application and a Restful API based web server.
@@ -46,7 +47,7 @@
  */
 public abstract class RestfulApiClient {
 
-  protected static Logger logger = Logger.getLogger(RestfulApiClient.class);
+  protected static Logger logger = LoggerFactory.getLogger(RestfulApiClient.class);
 
   /**
    * helper function to build a valid URI.
diff --git a/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java b/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java
index e135383..b7e434b 100755
--- a/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java
+++ b/azkaban-common/src/main/java/azkaban/utils/StdOutErrRedirect.java
@@ -16,10 +16,12 @@
 
 package azkaban.utils;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.OutputStream;
 import java.io.PrintStream;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+
 
 /**
  * A class to encapsulate the redirection of stdout and stderr to log4j This allows us to catch
@@ -28,31 +30,47 @@
 
 public class StdOutErrRedirect {
 
-  private static final Logger logger = Logger.getLogger(StdOutErrRedirect.class);
-  private static final PrintStream infoStream = createStream(System.out, Level.INFO);
-  private static final PrintStream errorStream = createStream(System.out, Level.ERROR);
+  private static final Logger logger = LoggerFactory.getLogger(StdOutErrRedirect.class);
+  private static final PrintStream infoStream = createStream(System.out, "INFO");
+  private static final PrintStream errorStream = createStream(System.out, "ERROR");
 
   public static void redirectOutAndErrToLog() {
     System.setOut(infoStream);
     System.setErr(errorStream);
   }
 
-  private static PrintStream createStream(final PrintStream stream, final Level level) {
+  private static PrintStream createStream(final PrintStream stream, final String level) {
     return new LogStream(stream, level);
   }
 
   private static class LogStream extends PrintStream {
 
-    private final Level level;
+    private final String level;
 
-    public LogStream(final OutputStream out, final Level level) {
+    public LogStream(final OutputStream out, final String level) {
       super(out);
       this.level = level;
     }
 
     // Underlying mechanism to log to log4j - all print methods will use this
     private void write(final String string) {
-      logger.log(this.level, string);
+      switch (this.level) {
+        case "INFO":
+          logger.info(string);
+          break;
+        case "DEBUG":
+          logger.debug(string);
+          break;
+        case "ERROR":
+          logger.error(string);
+          break;
+        case "WARN":
+          logger.warn(string);
+          break;
+        default:
+          logger.trace(string);
+          break;
+      }
     }
 
     // String
diff --git a/azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java b/azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java
index 20a0fa6..333b0a6 100755
--- a/azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java
+++ b/azkaban-common/src/main/java/azkaban/utils/SystemMemoryInfo.java
@@ -1,7 +1,9 @@
 package azkaban.utils;
 
-import javax.inject.Inject;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
+import javax.inject.Inject;
 
 
 /**
@@ -16,7 +18,8 @@
  */
 public class SystemMemoryInfo {
 
-  private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SystemMemoryInfo.class);
+  private static final Logger logger = LoggerFactory.getLogger(SystemMemoryInfo.class);
+
   private static final long LOW_MEM_THRESHOLD = 3L * 1024L * 1024L; //3 GB
   private final OsMemoryUtil util;
 
diff --git a/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java b/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java
index 2b71961..a899466 100755
--- a/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java
+++ b/azkaban-common/src/main/java/azkaban/utils/TrackingThreadPool.java
@@ -22,7 +22,8 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * A simple subclass of {@link ThreadPoolExecutor} to keep track of in progress tasks as well as
@@ -35,7 +36,7 @@
  */
 public class TrackingThreadPool extends ThreadPoolExecutor {
 
-  private static final Logger logger = Logger.getLogger(TrackingThreadPool.class);
+  private static final Logger logger = LoggerFactory.getLogger(TrackingThreadPool.class);
 
   private final Map inProgress =
       new ConcurrentHashMap<>();
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/AbstractDistributeLock.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/AbstractDistributeLock.java
index c2823a5..951fe40 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/AbstractDistributeLock.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/AbstractDistributeLock.java
@@ -17,7 +17,8 @@
 package com.webank.wedatasphere.schedulis.common.distributelock;
 
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -35,7 +36,7 @@
  */
 public class AbstractDistributeLock implements DistributeLockAdapter {
 
-    private static final Logger log = Logger.getLogger(AbstractDistributeLock.class);
+    private static final Logger log = LoggerFactory.getLogger(AbstractDistributeLock.class);
     DatabaseOperator dbOperator;
 
     @Inject
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/DBTableDistributeLock.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/DBTableDistributeLock.java
index 8ccb7af..f914dfb 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/DBTableDistributeLock.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/distributelock/DBTableDistributeLock.java
@@ -17,7 +17,8 @@
 package com.webank.wedatasphere.schedulis.common.distributelock;
 
 import com.webank.wedatasphere.schedulis.common.utils.HttpUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.Objects;
 
@@ -35,7 +36,7 @@
 @Singleton
 public class DBTableDistributeLock extends AbstractDistributeLock{
 
-    private static final Logger log = Logger.getLogger(DBTableDistributeLock.class);
+    private static final Logger log = LoggerFactory.getLogger(DBTableDistributeLock.class);
 
     @Inject
     public DBTableDistributeLock(DatabaseOperator dbOperator) {
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/DepartmentGroupDao.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/DepartmentGroupDao.java
index 32496c5..de2802e 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/DepartmentGroupDao.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/DepartmentGroupDao.java
@@ -21,7 +21,8 @@
 import azkaban.executor.Executor;
 import azkaban.executor.ExecutorManagerException;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -36,7 +37,7 @@
 @Singleton
 public class DepartmentGroupDao {
 
-    private static final Logger logger = Logger.getLogger(DepartmentGroupDao.class);
+    private static final Logger logger = LoggerFactory.getLogger(DepartmentGroupDao.class);
     private final DatabaseOperator dbOperator;
     // todo:wtss_user还是cfg_webank_all_users
     private static final String FETCH_EXECUTORS_IDS_BY_SUBMIT_USER = "" +
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionCycleDao.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionCycleDao.java
index dbe458a..e119c33 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionCycleDao.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionCycleDao.java
@@ -24,7 +24,8 @@
 import azkaban.utils.GZIPUtils;
 import azkaban.utils.JSONUtils;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -42,7 +43,7 @@
 @Singleton
 public class ExecutionCycleDao {
 
-    private static final Logger logger = Logger.getLogger(ExecutionCycleDao.class);
+    private static final Logger logger = LoggerFactory.getLogger(ExecutionCycleDao.class);
 
     private final DatabaseOperator dbOperator;
 
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionQueueDao.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionQueueDao.java
index a023d08..d5bf4c7 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionQueueDao.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionQueueDao.java
@@ -21,7 +21,8 @@
 import azkaban.executor.ExecutorManagerException;
 import azkaban.executor.Status;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.sql.ResultSet;
@@ -44,7 +45,7 @@
  * @Description: TODO
  */
 public class ExecutionQueueDao {
-    private static final Logger logger = Logger.getLogger(ExecutionQueueDao.class);
+    private static final Logger logger = LoggerFactory.getLogger(ExecutionQueueDao.class);
     private final DatabaseOperator dbOperator;
 
     @Inject
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionRecoverDao.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionRecoverDao.java
index d5d107d..99306e1 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionRecoverDao.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutionRecoverDao.java
@@ -31,14 +31,15 @@
 import javax.inject.Singleton;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import static java.util.stream.Collectors.joining;
 
 @Singleton
 public class ExecutionRecoverDao {
 
-  private static final Logger logger = Logger.getLogger(ExecutionRecoverDao.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutionRecoverDao.class);
   private final DatabaseOperator dbOperator;
 
   @Inject
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutorManagerHA.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutorManagerHA.java
index 40252a3..f0a83a9 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutorManagerHA.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/ExecutorManagerHA.java
@@ -25,7 +25,8 @@
 import com.webank.wedatasphere.schedulis.common.log.LogFilterEntity;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.joda.time.DateTime;
 import org.joda.time.LocalDateTime;
 
@@ -136,7 +137,7 @@ public class ExecutorManagerHA extends EventHandler implements
   // 12 weeks
   private static final long DEFAULT_EXECUTION_LOGS_RETENTION_MS = 3 * 4 * 7 * 24 * 60 * 60 * 1000L;
   private static final Duration RECENTLY_FINISHED_LIFETIME = Duration.ofMinutes(10);
-  private static final Logger logger = Logger.getLogger(ExecutorManagerHA.class);
+  private static final Logger logger = LoggerFactory.getLogger(ExecutorManagerHA.class);
   private final RunningExecutions runningExecutions;
   private final Props azkProps;
   private final CommonMetrics commonMetrics;
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/UserVariableDao.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/UserVariableDao.java
index 12b9339..60733bb 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/UserVariableDao.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/executor/UserVariableDao.java
@@ -21,7 +21,8 @@
 import azkaban.executor.ExecutorManagerException;
 import com.webank.wedatasphere.schedulis.common.system.entity.WtssUser;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -36,7 +37,7 @@
 @Singleton
 public class UserVariableDao {
 
-    private static final Logger logger = Logger.getLogger(UserVariableDao.class);
+    private static final Logger logger = LoggerFactory.getLogger(UserVariableDao.class);
     private final DatabaseOperator dbOperator;
 
     private final static String INSERT_USER_VARIABLE = "INSERT INTO user_variable (`key`, `description`, `value`, `owner`, `create_time`, `update_time`) VALUES (?, ?, ?, ?, ?, ?);";
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/i18nutils/LoadJsonUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/i18nutils/LoadJsonUtils.java
index c72ab73..a917219 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/i18nutils/LoadJsonUtils.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/i18nutils/LoadJsonUtils.java
@@ -16,9 +16,10 @@
 
 package com.webank.wedatasphere.schedulis.common.i18nutils;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import org.apache.log4j.Logger;
+
+import com.webank.wedatasphere.schedulis.common.utils.GsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -29,7 +30,7 @@
 
 public class LoadJsonUtils {
 
-    private static final Logger logger = Logger.getLogger(LoadJsonUtils.class);
+    private static final Logger logger = LoggerFactory.getLogger(LoadJsonUtils.class);
     public static volatile String languageType = "zh_CN";
 
     public static String getLanguageType() {
@@ -50,11 +51,9 @@ public static Map transJson(String fileName, String dataNode) {
         Map resultMap = new HashMap<>();
         try {
             String jsonStr = readFromTextFile(fileName);
-            JSONObject json = JSON.parseObject(jsonStr, JSONObject.class);
-            String data = json.getString(dataNode);
-            resultMap =  JSON.parseObject(data, Map.class);
+            resultMap = (Map)GsonUtils.json2Map(jsonStr).get(dataNode);
         } catch (Exception e) {
-            logger.error("Json File trans Failed, caused by:" + e);
+            logger.error("Json File trans Failed, caused by:{}", e);
         }
         return resultMap;
     }
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamJodeTimeUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamJodeTimeUtils.java
index 46fc125..4d4d489 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamJodeTimeUtils.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamJodeTimeUtils.java
@@ -17,7 +17,8 @@
 package com.webank.wedatasphere.schedulis.common.jobExecutor.utils;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.joda.time.LocalDate;
 import org.joda.time.format.DateTimeFormat;
 
@@ -41,7 +42,7 @@
 
 public class SystemBuiltInParamJodeTimeUtils {
 
-  private static final Logger utilLogger = Logger.getLogger(SystemBuiltInParamJodeTimeUtils.class);
+  private static final Logger utilLogger = LoggerFactory.getLogger(SystemBuiltInParamJodeTimeUtils.class);
   public static final String RUN_TODAY = "run_today";
   public static final String RUN_TODAY_STD = "run_today_std";
   public static final String RUN_DATE = "run_date";
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamUtils.java
index ccccf8d..7dcc127 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamUtils.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/jobExecutor/utils/SystemBuiltInParamUtils.java
@@ -38,12 +38,13 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Deprecated
 public class SystemBuiltInParamUtils {
 
-  private static final Logger utilLogger = Logger.getLogger(SystemBuiltInParamUtils.class);
+  private static final Logger utilLogger = LoggerFactory.getLogger(SystemBuiltInParamUtils.class);
 
   public static final String RUN_DATE = "run_date";
   public static final String RUN_DATE_STD = "run_date_std";
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/log/LogFilterDao.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/log/LogFilterDao.java
index bd4d400..cbf823c 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/log/LogFilterDao.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/log/LogFilterDao.java
@@ -29,12 +29,13 @@
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Singleton
 public class LogFilterDao {
 
-  private static final Logger logger = Logger.getLogger(LogFilterDao.class);
+  private static final Logger logger = LoggerFactory.getLogger(LogFilterDao.class);
   private final DatabaseOperator dbOperator;
 
   @Inject
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/JdbcSystemUserImpl.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/JdbcSystemUserImpl.java
index 884f852..3392b0f 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/JdbcSystemUserImpl.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/JdbcSystemUserImpl.java
@@ -37,12 +37,13 @@
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.dbutils.ResultSetHandler;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Singleton
 public class JdbcSystemUserImpl implements SystemUserLoader {
 
-    private static final Logger logger = Logger.getLogger(JdbcSystemUserImpl.class);
+    private static final Logger logger = LoggerFactory.getLogger(JdbcSystemUserImpl.class);
 
     private final DatabaseOperator dbOperator;
 
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/SystemManager.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/SystemManager.java
index b5afb4b..9dbeaa2 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/SystemManager.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/SystemManager.java
@@ -44,13 +44,14 @@
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.commons.collections.CollectionUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 @Singleton
 public class SystemManager {
 
-  private static final Logger logger = Logger.getLogger(SystemManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(SystemManager.class);
   private final ProjectLoader projectLoader;
   private final SystemUserLoader systemUserLoader;
   private final JdbcExecutorLoader jdbcExecutorLoader;
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/XmlUsersSync.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/XmlUsersSync.java
index a69e6bc..af8739e 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/XmlUsersSync.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/system/XmlUsersSync.java
@@ -29,7 +29,8 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -38,7 +39,7 @@
 
 public class XmlUsersSync {
 
-  private static final Logger logger = Logger.getLogger(XmlUsersSync.class.getName());
+  private static final Logger logger = LoggerFactory.getLogger(XmlUsersSync.class.getName());
 
   public static final String XML_FILE_PARAM = "user.manager.xml.file";
 
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/SystemUserManager.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/SystemUserManager.java
index 902006c..0207885 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/SystemUserManager.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/SystemUserManager.java
@@ -37,11 +37,12 @@
 import java.util.Set;
 import javax.inject.Inject;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SystemUserManager implements UserManager {
 
-  private static final Logger logger = Logger.getLogger(SystemUserManager.class.getName());
+  private static final Logger logger = LoggerFactory.getLogger(SystemUserManager.class.getName());
 
   private HashMap users;
   private HashMap userPassword;
@@ -96,7 +97,7 @@ public User getUser(String username, String password) throws UserManagerExceptio
         initUserAuthority(wtssUser, user);
 
       } catch (Exception e) {
-        logger.error("登录失败!异常信息:" + e);
+        logger.error("Login error! caused by {}:" , e);
         throw new UserManagerException("Error User Name Or Password.");
       }
     }
@@ -114,7 +115,7 @@ public User getUser(String username, String password) throws UserManagerExceptio
    */
   public User getUser(String username, String password, String superUser) throws UserManagerException {
     if (StringUtils.isBlank(username)){
-      logger.error("超级用户登录, username 是空值");
+      logger.error("Login by  superuser, username is null");
       throw new UserManagerException("superUser proxy login, username is null");
     }
     User user = null;
@@ -127,13 +128,13 @@ public User getUser(String username, String password, String superUser) throws U
           user = new User(wtssUser.getUsername());
           wtssUser.setPassword(password);
         } else {
-          throw new UserManagerException("Unknown User.");
+          throw new UserManagerException("User does not exists");
         }
 
         initUserAuthority(wtssUser, user);
 
       } catch (Exception e) {
-        logger.error("登录失败!异常信息:", e);
+        logger.error("Login error!cased by {}:", e);
         throw new UserManagerException("Error User Name Or Password.");
       }
     }
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/WebankXmlUserManager.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/WebankXmlUserManager.java
index 22f0a88..acbfba7 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/WebankXmlUserManager.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/user/WebankXmlUserManager.java
@@ -35,7 +35,8 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
@@ -58,7 +59,7 @@ public class WebankXmlUserManager implements UserManager {
   public static final String PROXY_ATTR = "proxy";
   public static final String GROUPS_ATTR = "groups";
   public static final String GROUPNAME_ATTR = "name";
-  private static final Logger logger = Logger.getLogger(WebankXmlUserManager.class
+  private static final Logger logger = LoggerFactory.getLogger(WebankXmlUserManager.class
       .getName());
   private final String xmlPath;
 
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/GsonUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/GsonUtils.java
new file mode 100644
index 0000000..291d0c9
--- /dev/null
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/GsonUtils.java
@@ -0,0 +1,114 @@
+package com.webank.wedatasphere.schedulis.common.utils;
+
+import com.google.gson.*;
+import com.google.gson.reflect.TypeToken;
+
+import java.lang.reflect.Type;
+import java.util.List;
+import java.util.Map;
+
+public class GsonUtils {
+
+  private static Gson gson;
+
+  static{
+    GsonBuilder builder = new GsonBuilder();
+    gson = builder.enableComplexMapKeySerialization()
+        .setPrettyPrinting()
+        .create();
+  }
+
+  /**
+   * use gson.fromJson(json, type) simplify
+   * @param json json string
+   * @param clazz type
+   * @param  actual need type
+   * @return deserialized object
+   */
+  public static T fromJson(String json, Class clazz ){
+    if(json.startsWith("[") && json.endsWith("]")){
+      return gson.fromJson(json, TypeToken.getParameterized(List.class, clazz).getType());
+    }
+    return gson.fromJson(json, TypeToken.getParameterized(clazz).getType());
+  }
+
+  /**
+   * use gson.fromJson(json, type) simplify
+   * @param json json string
+   * @param rawClass raw class
+   * @param genericArguments generic arguments
+   * @param 
+   * @return
+   */
+  public static T fromJson(String json, Class rawClass, Class... genericArguments){
+    return gson.fromJson(json, TypeToken.getParameterized(rawClass, genericArguments).getType());
+  }
+
+  /**
+   * use gson.toJson(src) simplify
+   * @param src source obj
+   * @return json
+   */
+  public static String toJson(Object src){
+    return gson.toJson(src);
+  }
+
+
+  /**
+   *  Json2List
+   *
+   * @param jsonStr json 字符串
+   * @param type    转换成的对象类型
+   * @param      返回的类型
+   * @return List
+   */
+  public static  List json2List(String jsonStr, Type type) {
+    List list = gson.fromJson(jsonStr, type);
+    return list;
+  }
+
+  public static  List json2List(JsonElement jsonStr, Type type) {
+    List list = gson.fromJson(jsonStr, type);
+    return list;
+  }
+
+  /**
+   * Json2Map
+   *
+   * @param jsonStr json 字符串
+   * @param      转换成的 Map 类型
+   * @return Map
+   */
+  public static  Map json2Map(String jsonStr) {
+    Map map = gson.fromJson(jsonStr, new TypeToken>() {
+    }.getType());
+    return map;
+  }
+
+  /**
+   * Json2List(Map)
+   *
+   * @param jsonStr json 字符串
+   * @param      转换成的 List> 类型
+   * @return List
+   */
+  public static  List> json2ListMap(String jsonStr) {
+    List> list = gson.fromJson(jsonStr, new TypeToken>>() {
+    }.getType());
+    return list;
+  }
+
+  public static  T jsonToJavaObject(JsonElement json, Type type) {
+    return gson.fromJson(json, type);
+  }
+
+  public static JsonObject toJsonObject(String jsonStr) {
+    return JsonParser.parseString(jsonStr).getAsJsonObject();
+  }
+
+  public static JsonArray toJsonArray(String jsonStr) {
+    return JsonParser.parseString(jsonStr).getAsJsonArray();
+  }
+
+
+}
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HadoopJobUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HadoopJobUtils.java
index c2d0bf2..bc37179 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HadoopJobUtils.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HadoopJobUtils.java
@@ -26,7 +26,8 @@
 import org.apache.hadoop.yarn.client.api.YarnClient;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.*;
 import java.util.*;
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HttpUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HttpUtils.java
index c227a9e..ce2a346 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HttpUtils.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/HttpUtils.java
@@ -19,7 +19,7 @@
 import azkaban.executor.ExecutableFlow;
 import azkaban.executor.Status;
 import azkaban.utils.Props;
-import com.alibaba.fastjson.JSON;
+
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
@@ -33,7 +33,8 @@
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import okhttp3.Call;
 import okhttp3.FormBody;
 import okhttp3.MediaType;
@@ -48,7 +49,7 @@
  */
 public class HttpUtils {
 
-  private static final Logger logger = Logger.getLogger(HttpUtils.class);
+  private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class);
 
   public static Map getReturnMap(String dataStr){
     Map dataMap = new HashMap<>();
@@ -144,7 +145,7 @@ public static void registerToIMS(final ExecutableFlow executableFlow, final Prop
       dataMap.put("groupName", executableFlow.getProjectName());
       dataMap.put("number", getValue(flowPros, "dcnNumber"));
       dataList.add(dataMap);
-      request = JSON.toJSON(dataList).toString();
+      request = GsonUtils.toJson(dataList);
       actionUrl = azkabanProps.getString("ims.job.register.url", null);
       if(actionUrl == null){
         logger.error("获取注册接口失败");
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/JwtTokenUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/JwtTokenUtils.java
new file mode 100644
index 0000000..dff856d
--- /dev/null
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/JwtTokenUtils.java
@@ -0,0 +1,202 @@
+package com.webank.wedatasphere.schedulis.common.utils;
+
+import io.jsonwebtoken.*;
+import org.apache.commons.codec.Charsets;
+
+import java.security.Key;
+import java.util.Date;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author georgeqiao
+ * @Description:
+ */
+public class JwtTokenUtils {
+
+    private Key key;
+    private SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
+
+//    static {
+//        String secret = "bdp";
+//        //We will sign our JWT with our ApiKey secret
+//        byte[] apiKeySecretBytes = secret.getBytes(Charsets.UTF_8);
+//        key = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());
+//    }
+
+
+    /**
+     * 获取token - json化 map信息
+     *
+     * @param claimMaps
+     * @param encryKey
+     * @param secondTimeOut
+     * @return
+     */
+    public static String getTokenByJson(Map claimMaps, String encryKey, int secondTimeOut) {
+        return getToken(claimMaps, true, encryKey, secondTimeOut);
+    }
+
+    /**
+     * 获取token
+     *
+     * @param claimMaps
+     * @param isJsonMpas
+     * @param encryKey
+     * @param secondTimeOut
+     * @return
+     */
+    public static String getToken(Map claimMaps, boolean isJsonMpas, String encryKey, int secondTimeOut) {
+
+        if (isJsonMpas) {
+            claimMaps.forEach((key, val) -> {
+                claimMaps.put(key, GsonUtils.toJson(val));
+            });
+        }
+        long currentTime = System.currentTimeMillis();
+        byte[] apiKeySecretBytes = encryKey.getBytes(Charsets.UTF_8);
+        return Jwts.builder()
+                .setId(UUID.randomUUID().toString())
+                .setIssuedAt(new Date(currentTime))  //签发时间
+                .setExpiration(new Date(currentTime + secondTimeOut * 1000))  //过期时间戳
+                .setSubject("webserver_to_executorserver")  //说明
+                .setAudience("executorservercontainer")  //接收用户
+                .setIssuer("webservercontainer") //签发者信息
+                .compressWith(CompressionCodecs.GZIP)  //数据压缩方式
+                .signWith(SignatureAlgorithm.HS256, apiKeySecretBytes) //加密方式
+                .addClaims(claimMaps) //cla信息
+                .compact();
+    }
+
+    /**
+     * 获取token中的claims信息
+     *
+     * @param token
+     * @param encryKey
+     * @return
+     */
+    private static Jws getJws(String token, String encryKey) {
+        byte[] apiKeySecretBytes = encryKey.getBytes(Charsets.UTF_8);
+        return Jwts.parser()
+                .setSigningKey(apiKeySecretBytes)
+                .parseClaimsJws(token);
+    }
+
+    /**
+     * 获取token中签名信息
+     *
+     * @param token
+     * @param encryKey
+     * @return
+     */
+    public static String getSignature(String token, String encryKey) {
+        try {
+            return getJws(token, encryKey).getSignature();
+        } catch (Exception ex) {
+            return "";
+        }
+    }
+
+    /**
+     * 获取token中head信息
+     *
+     * @param token
+     * @param encryKey
+     * @return
+     */
+    public static JwsHeader getHeader(String token, String encryKey) {
+        try {
+            return getJws(token, encryKey).getHeader();
+        } catch (Exception ex) {
+            return null;
+        }
+    }
+
+    /**
+     * 获取payload body信息
+     *
+     * @param token
+     * @param encryKey
+     * @return
+     */
+    public static Claims getClaimsBody(String token, String encryKey) {
+        return getJws(token, encryKey).getBody();
+    }
+
+    /**
+     * 获取body某个值
+     *
+     * @param token
+     * @param encryKey
+     * @param key
+     * @return
+     */
+    public static Object getVal(String token, String encryKey, String key) {
+        return getJws(token, encryKey).getBody().get(key);
+    }
+
+    /**
+     * 获取body某个值,json字符转实体
+     *
+     * @param token
+     * @param encryKey
+     * @param key
+     * @param tClass
+     * @param 
+     * @return
+     */
+    public static  T getValByT(String token, String encryKey, String key, Class tClass) {
+        try {
+            String strJson = getVal(token, encryKey, key).toString();
+            return GsonUtils.fromJson(strJson, tClass);
+        } catch (Exception ex) {
+            return null;
+        }
+    }
+
+    /**
+     * 是否过期
+     *
+     * @param token
+     * @param encryKey
+     * @return
+     */
+    public static boolean isExpiration(String token, String encryKey) {
+        try {
+            return getClaimsBody(token, encryKey)
+                    .getExpiration()
+                    .before(new Date());
+        } catch (ExpiredJwtException ex) {
+            return true;
+        }
+    }
+
+    /**
+     * 获取说明信息
+     *
+     * @param token
+     * @param encryKey
+     * @param key
+     * @return
+     */
+    public static String getSubject(String token, String encryKey) {
+        try {
+            return getClaimsBody(token, encryKey).getSubject();
+        } catch (Exception ex) {
+            return "";
+        }
+    }
+
+    public static void main(String[] args) {
+        String token = getToken(null,false,"dws-wtss|WeBankBDPWTSS&DWS@2019",1 * 7 * 24 * 60 * 60 );
+        System.out.println("testEncode: " + token);
+
+        Claims claims = getJws(token,"dws-wtss|WeBankBDPWTSS&DWS@2019").getBody();
+        System.out.println("ID: " + claims.getId());
+        System.out.println("Subject: " + claims.getSubject());
+        System.out.println("Issuer: " + claims.getIssuer());
+        System.out.println("Audience: " + claims.getAudience());
+        System.out.println("Expiration: " + claims.getExpiration());
+
+    }
+}
\ No newline at end of file
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LdapCheckCenter.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LdapCheckCenter.java
index d3cd3f2..907bba3 100755
--- a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LdapCheckCenter.java
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LdapCheckCenter.java
@@ -18,7 +18,8 @@
 
 import azkaban.utils.Props;
 import java.nio.charset.Charset;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.forgerock.opendj.ldap.Connection;
 import org.forgerock.opendj.ldap.LDAPConnectionFactory;
 import org.forgerock.opendj.ldap.LdapException;
@@ -26,7 +27,7 @@
 import org.forgerock.opendj.ldap.requests.Requests;
 
 public class LdapCheckCenter {
-  private static final Logger logger = Logger.getLogger(LdapCheckCenter.class.getName());
+  private static final Logger logger = LoggerFactory.getLogger(LdapCheckCenter.class.getName());
   private volatile static LDAPConnectionFactory lcf;
 
   public static boolean checkLogin(Props props, String userName, String password) {
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LogUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LogUtils.java
new file mode 100644
index 0000000..689e3b0
--- /dev/null
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/LogUtils.java
@@ -0,0 +1,129 @@
+package com.webank.wedatasphere.schedulis.common.utils;
+
+import com.webank.wedatasphere.schedulis.common.log.LogFilterEntity;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Filter;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.FileAppender;
+import org.apache.logging.log4j.core.appender.RollingFileAppender;
+import org.apache.logging.log4j.core.appender.rolling.*;
+import org.apache.logging.log4j.core.config.AppenderRef;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.filter.CompositeFilter;
+import org.apache.logging.log4j.core.filter.RegexFilter;
+import org.apache.logging.log4j.core.layout.PatternLayout;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+
+public class LogUtils {
+
+  private static org.slf4j.Logger logger = LoggerFactory.getLogger(LogUtils.class);
+
+  private static final LoggerContext ctx = LoggerContext.getContext(false);
+  private static final Configuration config = ctx.getConfiguration();
+
+  public static void createFlowLog(String logDir, String logFileName, String logName){
+    if (config.getAppender(logName) != null) {
+      return;
+    }
+    final PatternLayout layout = PatternLayout.newBuilder()
+        .withCharset(Charset.forName("UTF-8"))
+        .withConfiguration(config)
+        .withPattern("%d{dd-MM-yyyy HH:mm:ss z} %c{1} %p - %m\n")
+        .build();
+
+    final Appender appender = FileAppender.newBuilder()
+        .withName(logName)
+        .withImmediateFlush(true)
+        .withFileName(String.format(logDir + File.separator + "%s", logFileName))
+        .withLayout(layout)
+        .build();
+
+    appender.start();
+    config.addAppender(appender);
+
+    AppenderRef[] refs = new AppenderRef[]{AppenderRef.createAppenderRef(logName, Level.ALL, null)};
+    LoggerConfig loggerConfig = LoggerConfig.createLogger(false, Level.ALL, logName, "true", refs, null, config, null);
+    loggerConfig.addAppender(appender, Level.ALL, null);
+    config.addLogger(logName, loggerConfig);
+    ctx.updateLoggers(config);
+  }
+
+  public static void createJobLog(String logDir, String logFileName, String logName, String logFileSize, int logFileNum, List logFilterEntityList){
+
+    if (config.getAppender(logName) != null) {
+      return;
+    }
+
+    final PatternLayout layout = PatternLayout.newBuilder()
+        .withCharset(Charset.forName("UTF-8"))
+        .withConfiguration(config)
+        .withPattern("%d{dd-MM-yyyy HH:mm:ss z} %c{1} %p - %m\n")
+        .build();
+
+    final TriggeringPolicy tp = SizeBasedTriggeringPolicy.createPolicy(logFileSize);
+
+    final CompositeTriggeringPolicy policyComposite = CompositeTriggeringPolicy.createPolicy(tp);
+
+    final DefaultRolloverStrategy defaultRolloverStrategy = DefaultRolloverStrategy.newBuilder()
+        .withMax(String.valueOf(logFileNum))
+        .build();
+
+    CompositeFilter compositeFilter = null;
+    if(CollectionUtils.isNotEmpty(logFilterEntityList)) {
+      List filterList = new ArrayList<>();
+      for (int i = 0; i < logFilterEntityList.size(); i++) {
+        try {
+          LogFilterEntity logFilterEntity = logFilterEntityList.get(i);
+          Filter filter;
+          if (i < logFilterEntityList.size() - 1) {
+            filter = RegexFilter.createFilter(logFilterEntity.getCompareText(), null, false, Filter.Result.DENY, Filter.Result.NEUTRAL);
+          } else {
+            filter = RegexFilter.createFilter(logFilterEntity.getCompareText(), null, false, Filter.Result.DENY, Filter.Result.ACCEPT);
+          }
+          filterList.add(filter);
+        } catch (Exception e) {
+          logger.warn("create log filter failed.", e);
+        }
+      }
+      compositeFilter = CompositeFilter.createFilters(filterList.toArray(new Filter[filterList.size()]));
+    }
+
+    final Appender appender = RollingFileAppender.newBuilder()
+        .withName(logName)
+        .withImmediateFlush(true)
+        .withFileName(String.format(logDir + File.separator + "%s", logFileName))
+        .withFilePattern(logDir + File.separator + logFileName + ".%i")
+        .withLayout(layout)
+        .withPolicy(policyComposite)
+        .withStrategy(defaultRolloverStrategy)
+        .build();
+
+    appender.start();
+    config.addAppender(appender);
+
+    AppenderRef[] refs = new AppenderRef[]{AppenderRef.createAppenderRef(logName, Level.ALL, null)};
+    LoggerConfig loggerConfig = LoggerConfig.createLogger(false, Level.ALL, logName, "true", refs, null, config, null);
+    loggerConfig.addAppender(appender, Level.ALL, compositeFilter);
+    config.addLogger(logName, loggerConfig);
+    ctx.updateLoggers(config);
+  }
+
+  public static void stopLog(String logName){
+    if (config.getAppender(logName) == null) {
+      return;
+    }
+    config.getAppender(logName).stop();
+    config.getLoggerConfig(logName).removeAppender(logName);
+    config.removeLogger(logName);
+    ctx.updateLoggers();
+  }
+
+}
diff --git a/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/RSAUtils.java b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/RSAUtils.java
new file mode 100644
index 0000000..8e7f7bf
--- /dev/null
+++ b/azkaban-common/src/main/java/com/webank/wedatasphere/schedulis/common/utils/RSAUtils.java
@@ -0,0 +1,70 @@
+package com.webank.wedatasphere.schedulis.common.utils;
+
+import javax.crypto.Cipher;
+import java.security.*;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Base64;
+
+
+/**
+ * @author georgeqiao
+ */
+public class RSAUtils {
+    /**
+     * 密钥长度 于原文长度对应 以及越长速度越慢
+     */
+    private final static int KEY_SIZE = 1024;
+    /**
+     * 公钥与私钥
+     */
+    private static String publicKeyString = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCo14viXWDm19hwsCpSGiaehrF+oBbGq7tIsgfepjkI0iC8HrZ/vo/YsHw+G3yGgEC2oBsHnqUDs/f2k+1FK6EIm5nBnosXpSTtCVDfP8wkwBuTWPdmnAxNQyv7aH2e7BLdfEctYLAdw8atahM2WV9rFZBQzCyheeJ3nI4LCBSzMwIDAQAB";
+    private static String privateKeyString = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAKjXi+JdYObX2HCwKlIaJp6GsX6gFsaru0iyB96mOQjSILwetn++j9iwfD4bfIaAQLagGweepQOz9/aT7UUroQibmcGeixelJO0JUN8/zCTAG5NY92acDE1DK/tofZ7sEt18Ry1gsB3Dxq1qEzZZX2sVkFDMLKF54necjgsIFLMzAgMBAAECgYEAiQG/ZQRY6XklDOwmq1DFHcY2qYXGdZhM9QRiFm3TwjCgl4ZkmOxNVYyAhPVQ6uOPn6HzzQ8S4BpdkB0hYAuzMzMHnyhvv/MsH8V3WbJx0kC4If3UsSa0eANizrZaM3CwJ8ehvN2T73Z0B2iTp8Ocl3Wr74ULKC1y5pJnLC6dIMECQQDbhMVqIwPU+VftMEwIik0BDXHSFL4Vjh2rD9AVkvyWKV0qehYHGsXdlG4XlNUc0zAw8oQVFk9t6XGbMEWnk8QJAkEAxObH8gTy7iGYEUprxbEAJq0SJtOk3qfIngICpqdY5qgWqpl8BS7rSZhKswGLsrdY5rfYr/Mngj5cpe72lcbkWwJBAM+RRt4qR8hNEV/9CBgXNeLl5JdB988H93O12wtbVi1i5W5xzHxhS3FOlZ8Eo1LDOtE9r7kExIxobXzRczuWlIkCQQCJIBO1N78bGig2OnbtuYPaa4ONqK1UJtMvP0UrXLYsBHmsm7FkRrWzjizPl077ynZOT1DH0HX+XYHWSaJO0rGrAkBxQjicw5YAxaz0+Vl/HIFSCT4R4BBKDgSmwHf1yOUOIhspA2AOFdCByrmNg2gQ+Pn0ADHN6N3ke42eAt7GiI4T";
+
+    public static void genKeyPair() throws NoSuchAlgorithmException {
+        KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA");
+        keyPairGen.initialize(KEY_SIZE, new SecureRandom());
+        KeyPair keyPair = keyPairGen.generateKeyPair();
+        RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
+        RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
+        publicKeyString = Base64.getEncoder().encodeToString(publicKey.getEncoded());
+        privateKeyString = Base64.getEncoder().encodeToString(privateKey.getEncoded());
+
+    }
+
+    public static String encrypt(String str, String publicKey) throws Exception {
+        byte[] decoded = Base64.getDecoder().decode(publicKey);
+        RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(decoded));
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.ENCRYPT_MODE, pubKey);
+        String outStr = Base64.getEncoder().encodeToString(cipher.doFinal(str.getBytes("UTF-8")));
+        return outStr;
+    }
+
+    public static String decrypt(String str, String privateKey) throws Exception {
+        byte[] inputByte = Base64.getDecoder().decode(str);
+        byte[] decoded = Base64.getDecoder().decode(privateKey);
+        RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded));
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.DECRYPT_MODE, priKey);
+        String outStr = new String(cipher.doFinal(inputByte));
+        return outStr;
+    }
+    public static void main(String[] args) throws Exception {
+//        genKeyPair();
+//        String message = "Bdp_wtss@We_bank@ABCD~!@#$";
+//        String message = args[0];
+//        System.out.println("原文:" + message)
+//        String messageEn = encrypt(message, publicKeyString);
+//        System.out.println("密文:" + messageEn);
+        String str = "DIjK7zXeIpNEDrt7f8eh9bnaP7KqcYgEEDGmxuXd9YnXPh7rkR9cTPfASyZg75tkvRS1YakFvWB5rC4qqHslUzYcQX/mORcB1UGbqPLcNC7uLCGD5zLOarcjO6 3e94Z/lIsipLRGwior1UiZdDIoFly3SXMINjbHwLWd0IMV64=";
+
+        str = str.replaceAll(" ","+");
+
+        System.out.println("str:" + str);
+        String messageDe = decrypt(str, privateKeyString);
+        System.out.println("解密:" + messageDe);
+    }
+}
\ No newline at end of file
diff --git a/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/az-webank-system-manager-zh_CN.json b/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/az-webank-system-manager-zh_CN.json
index 840650b..274b040 100755
--- a/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/az-webank-system-manager-zh_CN.json
+++ b/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/az-webank-system-manager-zh_CN.json
@@ -24,7 +24,7 @@
     "invalidAddRealNameUserProxy": "新增用户失败,实名用户仅可添加自己作为代理,请将代理用户选项置为空,或者将代理用户设置为:",
     "invalidUpdateRealNameUserProxy": "更新用户失败,实名用户仅可添加自己作为代理,请将代理用户选项置为空,或者将代理用户设置为:",
     "invalidUpdateSystemUserProxy": "更新用户失败,系统用户仅可添加自己作为代理,请将代理用户选项置为空,或者将代理用户设置为:",
-    "invalidName": "]输入不合法,合法用户名示例如下(大小写敏感):运维账号:WTSS_纯英文部门代码_编号(WTSS_DBDP_01); 普通系统账号:hduser编号(hduser01).",
+    "invalidName": "]输入不合法,合法用户名示例如下(大小写敏感):运维账号:WTSS_纯英文部门代码_编号(WTSS_DBDP_01); 普通系统账号:hduser编号(hduser01)",
     "existDep": "该部门已存在.",
     "noParentDep": "父部门不存在.",
     "plsInputDepId": "请输入部门ID.",
diff --git a/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-en_US.json b/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-en_US.json
index 400edde..f1a149f 100755
--- a/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-en_US.json
+++ b/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-en_US.json
@@ -734,7 +734,8 @@
     "haveHisReRun": "History Re-Run job have been existed.",
     "submitHisReRunSuccess": " submit history Re-Run job success.",
     "submitHisReRunFail": " submit history Re-Run job failed.",
-    "resolveSlaFailed": "Resolve Sla alert settings failed."
+    "resolveSlaFailed": "Resolve Sla alert settings failed.",
+    "permissionForAction": "You have no Execute or Schedule permission for project: "
   },
   "azkaban.webapp.servlet.ProjectManagerServlet": {
     "project": "Project[",
@@ -744,6 +745,7 @@
     "flow": "Flow[",
     "job": "Job[",
     "config": "Configuration[",
+    "permissionForAction": "You have no Execute or Schedule permission for project: ",
     "uploadJobCoverFieldError": "Upload job cover field error",
     "getLastRunFailed": "Get the last flow execution  Failed",
     "noPerAccessProject": "No permission access to this project: ",
diff --git a/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-zh_CN.json b/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-zh_CN.json
index 525a642..8b5d1c9 100755
--- a/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-zh_CN.json
+++ b/azkaban-common/src/main/resources/com.webank.wedatasphere.schedulis.i18n.conf/azkaban-web-server-zh_CN.json
@@ -734,7 +734,8 @@
     "haveHisReRun": "历史重跑任务已存在.",
     "submitHisReRunSuccess": " 提交历史重跑任务成功.",
     "submitHisReRunFail": " 提交历史重跑任务失败.",
-    "resolveSlaFailed": "解析sla告警设置失败."
+    "resolveSlaFailed": "解析sla告警设置失败.",
+    "permissionForAction": "你没有权限执行或者调度这个项目: "
   },
   "azkaban.webapp.servlet.ProjectManagerServlet": {
     "project": "项目  ",
@@ -744,6 +745,7 @@
     "flow": " 工作流 ",
     "job": "任务 ",
     "config": "配置 ",
+    "permissionForAction": "你没有权限执行或者调度这个项目: ",
     "uploadJobCoverFieldError": "上传任务覆盖属性错误.",
     "getLastRunFailed": "获取项目最后一次执行工作流失败.",
     "noPerAccessProject": "没有权限查看项目 ",
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java b/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java
index f26e0c1..f91991f 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java
@@ -24,7 +24,8 @@
 import org.apache.commons.dbutils.DbUtils;
 import org.apache.commons.dbutils.QueryRunner;
 import org.apache.commons.dbutils.ResultSetHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * This interface is to define Base Data Access Object contract for Azkaban. All azkaban DB related
@@ -35,7 +36,7 @@
  */
 public class DatabaseOperator {
 
-  private static final Logger logger = Logger.getLogger(DatabaseOperator.class);
+  private static final Logger logger = LoggerFactory.getLogger(DatabaseOperator.class);
 
   private final QueryRunner queryRunner;
 
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java b/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java
index 2bdc31c..63ac4d5 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java
@@ -27,7 +27,8 @@
 import java.util.Set;
 import org.apache.commons.dbutils.QueryRunner;
 import org.apache.commons.io.IOUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Creates DB tables. The input to this class is a folder path, which includes all create table
@@ -39,7 +40,8 @@
  */
 public class DatabaseSetup {
 
-  private static final Logger logger = Logger .getLogger(DatabaseSetup.class);
+  private static final Logger logger = LoggerFactory.getLogger(DatabaseSetup.class);
+
   private static final String CREATE_SCRIPT_PREFIX = "create.";
   private static final String SQL_SCRIPT_SUFFIX = ".sql";
 
@@ -88,7 +90,7 @@ private void createTables(final Set tables) throws SQLException, IOExcep
 
   private void runTableScripts(final Connection conn, final String table)
       throws IOException, SQLException {
-    logger.info("Creating new table " + table);
+    logger.info("Creating new table {}", table);
 
     final String dbSpecificScript = "create." + table + ".sql";
     final File script = new File(this.scriptPath, dbSpecificScript);
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java b/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java
index 3788c1b..c677809 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java
@@ -21,7 +21,8 @@
 import org.apache.commons.dbutils.QueryRunner;
 import org.apache.commons.dbutils.ResultSetHandler;
 import org.apache.commons.dbutils.handlers.ScalarHandler;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
@@ -38,7 +39,8 @@
  */
 public class DatabaseTransOperator {
 
-  private static final Logger logger = Logger.getLogger(DatabaseTransOperator.class);
+  private static final Logger logger = LoggerFactory.getLogger(DatabaseTransOperator.class);
+
   private final Connection conn;
   private final QueryRunner queryRunner;
 
diff --git a/azkaban-db/src/main/java/azkaban/db/MySQLDataSource.java b/azkaban-db/src/main/java/azkaban/db/MySQLDataSource.java
index 46c1a7f..5a9b0f1 100644
--- a/azkaban-db/src/main/java/azkaban/db/MySQLDataSource.java
+++ b/azkaban-db/src/main/java/azkaban/db/MySQLDataSource.java
@@ -22,12 +22,13 @@
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.apache.commons.dbcp2.BasicDataSource;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 @Singleton
 public class MySQLDataSource extends AzkabanDataSource {
 
-  private static final Logger logger = Logger.getLogger(MySQLDataSource.class);
+  private static final Logger logger = LoggerFactory.getLogger(MySQLDataSource.class);
   private final DBMetrics dbMetrics;
 
   @Inject
@@ -44,7 +45,7 @@ public MySQLDataSource(final Props props, final DBMetrics dbMetrics) {
     try {
       pwd = new String(Base64.getDecoder().decode(props.getString("mysql.password").getBytes()),"UTF-8");
     } catch (Exception e){
-      logger.error("password decore failed" + e);
+      logger.error("password decore failed", e);
     }
     final String password = pwd;
     final int numConnections = props.getInt("mysql.numconnections");
@@ -138,7 +139,7 @@ private boolean isReadOnly(final Connection conn) throws SQLException {
           rs.close();
         }
       } catch (SQLException e) {
-        logger.error("SQLException in execute query, caused by:"+e.getMessage());
+        logger.error("SQLException in execute query, caused by:", e);
       }
 
       try {
@@ -146,7 +147,7 @@ private boolean isReadOnly(final Connection conn) throws SQLException {
           ps.close();
         }
       } catch (SQLException e) {
-        logger.error("SQLException in execute query, caused by:"+e.getMessage());
+        logger.error("SQLException in execute query, caused by:", e);
       }
     }
     return false;
diff --git a/azkaban-exec-server/pom.xml b/azkaban-exec-server/pom.xml
index 444c450..d540d2e 100644
--- a/azkaban-exec-server/pom.xml
+++ b/azkaban-exec-server/pom.xml
@@ -19,6 +19,12 @@
     com.webank.wedatasphere.schedulis
     az-core
     ${schedulis.version}
+    
+      
+        *
+        *
+      
+    
   
   
     com.webank.wedatasphere.schedulis
@@ -26,8 +32,8 @@
     ${schedulis.version}
     
       
-        netty
-        io.netty
+        *
+        *
       
     
   
@@ -36,12 +42,24 @@
     com.webank.wedatasphere.schedulis
     azkaban-spi
     ${schedulis.version}
+    
+      
+        *
+        *
+      
+    
   
 
   
     com.webank.wedatasphere.schedulis
     azkaban-db
     ${schedulis.version}
+    
+      
+        *
+        *
+      
+    
   
   
     com.webank.wedatasphere.schedulis
@@ -49,36 +67,8 @@
     ${schedulis.version}
     
       
-        jetty-all
-        org.eclipse.jetty.aggregate
-      
-      
-        hive-common
-        org.apache.hive
-      
-      
-        log4j-api
-        org.apache.logging.log4j
-      
-      
-        log4j-1.2-api
-        org.apache.logging.log4j
-      
-      
-        log4j-core
-        org.apache.logging.log4j
-      
-      
-        log4j-slf4j-impl
-        org.apache.logging.log4j
-      
-      
-        log4j-web
-        org.apache.logging.log4j
-      
-      
-        netty
-        io.netty
+        *
+        *
       
     
   
@@ -114,21 +104,6 @@
     jetty-servlet
     ${jetty.version}
   
-  
-    org.eclipse.jetty
-    jetty-http
-    ${jetty.version}
-  
-  
-    org.eclipse.jetty
-    jetty-io
-    ${jetty.version}
-  
-  
-    org.eclipse.jetty
-    jetty-webapp
-    ${jetty.version}
-  
 
   
     joda-time
@@ -216,27 +191,32 @@
     jsr305
     ${jsr305.version}
   
-  
-    org.apache.kafka
-    kafka-log4j-appender
-    ${kafkaLog4jAppender.version}
-    
-      
-        
-        
-      
-    
-  
   
     org.quartz-scheduler
     quartz
     ${quartz.version}
+    
+      
+        c3p0
+        c3p0
+      
+      
+        slf4j-api
+        org.slf4j
+      
+    
   
 
   
     io.dropwizard.metrics
     metrics-core
     ${dropwizard.core.version}
+    
+      
+        slf4j-api
+        org.slf4j
+      
+    
     
       
         
@@ -248,6 +228,12 @@
     io.dropwizard.metrics
     metrics-jvm
     ${dropwizard.core.version}
+    
+      
+        slf4j-api
+        org.slf4j
+      
+    
     
       
         
@@ -269,30 +255,11 @@
     org.apache.velocity
     velocity
     ${velocity.version}
-    
-      
-        org.apache.struts
-        struts-core
-      
-      
-        org.apache.struts
-        struts-taglib
-      
-      
-        org.apache.struts
-        struts-tiles
-      
-    
   
   
     org.slf4j
     slf4j-api
-    1.7.21
-  
-  
-    org.slf4j
-    slf4j-log4j12
-    1.7.21
+    ${slf4j.version}
   
 
   
@@ -302,12 +269,6 @@
     test
   
 
-  
-    com.alibaba
-    fastjson
-    1.2.61
-  
-
   
     com.squareup.okhttp3
     okhttp
@@ -317,7 +278,53 @@
   
     com.webank.wedatasphere.dss
     dss-linkis-node-execution
-    0.7.0
+    ${dss.version}
+    
+      
+        jackson-annotations
+        com.fasterxml.jackson.core
+      
+      
+        jackson-core
+        com.fasterxml.jackson.core
+      
+      
+        jackson-databind
+        com.fasterxml.jackson.core
+      
+      
+        log4j
+        log4j
+      
+      
+        jetty-servlet
+        org.eclipse.jetty
+      
+      
+        ooxml-schemas
+        org.apache.poi
+      
+      
+        poi
+        org.apache.poi
+      
+      
+        poi-ooxml-schemas
+        org.apache.poi
+      
+      
+        poi-ooxml
+        org.apache.poi
+      
+      
+        gson
+        com.google.code.gson
+      
+      
+        slf4j-api
+        org.slf4j
+      
+    
   
 
 
diff --git a/azkaban-exec-server/src/bin/internal/internal-start-executor.sh b/azkaban-exec-server/src/bin/internal/internal-start-executor.sh
index 109e86a..fce781e 100644
--- a/azkaban-exec-server/src/bin/internal/internal-start-executor.sh
+++ b/azkaban-exec-server/src/bin/internal/internal-start-executor.sh
@@ -79,10 +79,10 @@ function javaOption(){
     AZKABAN_OPTS="-Xmx8G"
   fi
   # Set the log4j configuration file
-  if [ -f $conf/log4j.properties ]; then
-    AZKABAN_OPTS="$AZKABAN_OPTS -Dlog4j.configuration=file:$conf/log4j.properties -Dlog4j.log.dir=/appcom/logs/azkaban"
+  if [ -f $conf/log4j2.xml ]; then
+    AZKABAN_OPTS="$AZKABAN_OPTS -Dlog4j.configurationFile=$conf/log4j2.xml"
   else
-    LOG ERROR "$conf/log4j.properties file doesn't exist."
+    LOG ERROR "$conf/log4j2.xml file doesn't exist."
     return 1
   fi
   executorport=`cat $conf/azkaban.properties | grep executor.port | awk -F '=' '{print($NF)}'`
@@ -96,7 +96,15 @@ function start(){
   LOG INFO "Starting AzkabanExecutorServer on port $executorport ..."
   java $AZKABAN_OPTS $JAVA_LIB_PATH -cp $CLASSPATH azkaban.execapp.AzkabanExecutorServer -conf $conf $@ >> $logFile 2>&1 &
   echo $! > $azkaban_dir/currentpid
-  LOG INFO "AzkabanExecutorServer started successfully."
+  sleep 3s
+  processName=`jps|grep AzkabanExecutorServer`
+  if [ ! -n "$processName" ]
+  then
+      LOG INFO "AzkabanExecutorServer startup failed"
+      return 1
+  else
+      return 0
+  fi
 }
 
 function genServerId(){
@@ -126,27 +134,30 @@ function updataExecutorStatus(){
   runtime=0
   while [[ $start_finish != 1 ]]; do
       result=`curl -POST http://${LOCAL_HOSTNAME}:${EXECUTOR_PORT}/executor -d action=activate`
-      LOG INFO " 执行结果: ${result}"
+      LOG INFO " exectue result: ${result}"
       [[ "${result}" =~ .*success.* ]] && { break; }
-      sleep 5s
+      sleep 3s
       runtime=$(( $runtime + 1 ))
-      LOG INFO " 当前运行次数为: ${runtime}  超过30次将退出。"
-      if [ ${runtime} -gt 30 ] 
+      LOG INFO "It has been run: ${runtime}  and will exit after 10 times。"
+      if [ ${runtime} -gt 10 ]
       then
           LOG ERROR "update executor status time out."
           return 1
       fi
   done
-  LOG INFO " 执行节点启动成功,更新数据库状态。"
   LOG INFO "update executor success."
+  LOG INFO "AzkabanExecutorServer started successfully."
 }
 
 function preCheck(){
   LOG INFO "checking AzkabanExecutorServer status..."
-  if [ -f $azkaban_dir/currentpid ]
+  processName=`jps|grep AzkabanExecutorServer`
+  if [ -n "$processName" ]
   then
-    LOG INFO "AzkabanExecutorServer already started."
-    return 1
+      LOG INFO "AzkabanExecutorServer already started."
+      return 1
+  else
+      return 0
   fi
 }
 
diff --git a/azkaban-exec-server/src/conf/azkaban.properties b/azkaban-exec-server/src/conf/azkaban.properties
index 4f7c13b..3f66b0f 100644
--- a/azkaban-exec-server/src/conf/azkaban.properties
+++ b/azkaban-exec-server/src/conf/azkaban.properties
@@ -21,6 +21,7 @@ executor.maxThreads=60
 executor.port=12321
 executor.flow.threads=30
 jetty.headerBufferSize=65536
+jetty.send.server.version=false
 flow.num.job.threads=50
 checkers.num.threads=10
 executor.server.id=[#SERVER_ID]
@@ -63,3 +64,6 @@ proxy.user.lock.down=true
 
 # Automatically resume execution interval after pause.
 flow.paused.max.time.ms=3600000
+azkaban.ip.whiteList.enabled=false
+azkaban.ip.whiteList=
+dss.secret=
diff --git a/azkaban-exec-server/src/conf/log4j2.xml b/azkaban-exec-server/src/conf/log4j2.xml
new file mode 100644
index 0000000..291d603
--- /dev/null
+++ b/azkaban-exec-server/src/conf/log4j2.xml
@@ -0,0 +1,25 @@
+
+
+    
+        
+            
+            
+        
+        
+            
+            
+                
+                
+            
+            
+        
+    
+    
+        
+            
+            
+        
+    
+
+
diff --git a/azkaban-exec-server/src/main/bash/internal/internal-start-executor.sh b/azkaban-exec-server/src/main/bash/internal/internal-start-executor.sh
index 48cb5fa..14a441f 100644
--- a/azkaban-exec-server/src/main/bash/internal/internal-start-executor.sh
+++ b/azkaban-exec-server/src/main/bash/internal/internal-start-executor.sh
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-export JAVA_HOME="/nemo/jdk8"
 verify_java_home() {
   if [ -z "$JAVA_HOME" ]; then
     cat 1>&2 <> {} , path >> {}",servletRequest.getRemoteAddr(),((HttpServletRequest) servletRequest).getRequestURI());
+                    return;
+                }
+            }else{
+                logger.error("Illegal access without token detected, ip >> {} , path >> {}",servletRequest.getRemoteAddr(),((HttpServletRequest) servletRequest).getRequestURI());
+                return;
+            }
+        } catch (Exception e) {
+             logger.error("a fatal error had happen when execute ExecutorAccessFilter, caused by:", e);
+        }
+    }
+
+    @Override
+    public void destroy() {
+    }
+}
\ No newline at end of file
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java b/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
index c2c4e45..ee25ca2 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/ExecutorServlet.java
@@ -41,15 +41,18 @@
 import javax.servlet.http.HttpServletResponse;
 
 import azkaban.utils.Pair;
-import com.alibaba.fastjson.JSONObject;
-import org.apache.log4j.Logger;
+import com.google.gson.JsonObject;
+import com.google.gson.reflect.TypeToken;
+import com.webank.wedatasphere.schedulis.common.utils.GsonUtils;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.codehaus.jackson.map.ObjectMapper;
 
 
 public class ExecutorServlet extends HttpServlet implements ConnectorParams {
 
   public static final String JSON_MIME_TYPE = "application/json";
-  private static final Logger logger = Logger.getLogger(ExecutorServlet.class
+  private static final Logger logger = LoggerFactory.getLogger(ExecutorServlet.class
       .getName());
   private static final long serialVersionUID = -3528600004096666451L;
   private AzkabanExecutorServer application;
@@ -398,8 +401,8 @@ private void handleAjaxSetFlowFailed(final Map respMap, final Ht
       return;
     }
     try {
-      JSONObject jsonObject = new JSONObject();
-      jsonObject.put("flowFailed", Boolean.valueOf(getParam(req, "flowFailed")));
+      JsonObject jsonObject = new JsonObject();
+      jsonObject.addProperty("flowFailed", Boolean.valueOf(getParam(req, "flowFailed")));
       this.flowRunnerManager.setFlowFailed(execid, jsonObject);
       respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPONSE_SUCCESS);
     } catch (final Exception e) {
@@ -415,8 +418,8 @@ private void handleAjaxDisableJob(final Map respMap, final HttpS
       return;
     }
     try {
-      JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req);
-      String disableJob = jsonObject.getString("disableJob");
+      JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req);
+      String disableJob = jsonObject.get("disableJob").getAsString();
       this.flowRunnerManager.setJobDisabled(execid, disableJob, respMap, user);
     } catch (final Exception e) {
       logger.error(e.getMessage(), e);
@@ -431,8 +434,8 @@ private void handleAjaxRetryFailedJobs(final Map respMap, final
       return;
     }
     try {
-      JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req);
-      List retryFailedJobs = jsonObject.getJSONArray("retryFailedJobs").toJavaList(String.class);
+      JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req);
+      List retryFailedJobs = GsonUtils.jsonToJavaObject(jsonObject.getAsJsonArray("retryFailedJobs"), new TypeToken>() {}.getType());
       this.flowRunnerManager.retryJobs(execid, retryFailedJobs);
       respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPONSE_SUCCESS);
     } catch (final Exception e) {
@@ -448,8 +451,8 @@ private void handleAjaxSkipFailedJobs(final Map respMap, final H
       return;
     }
     try {
-      JSONObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req);
-      List skipFailedJobs = jsonObject.getJSONArray("skipFailedJobs").toJavaList(String.class);
+      JsonObject jsonObject = HttpRequestUtils.parseRequestToJsonObject(req);
+      List skipFailedJobs = GsonUtils.jsonToJavaObject(jsonObject.getAsJsonArray("skipFailedJobs"), new TypeToken>() {}.getType());
       this.flowRunnerManager.skipFailedJobs(execid, skipFailedJobs);
       respMap.put(ConnectorParams.STATUS_PARAM, ConnectorParams.RESPONSE_SUCCESS);
     } catch (final Exception e) {
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java b/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
index d79d34e..50856e7 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/FlowPreparer.java
@@ -37,8 +37,8 @@
 import java.util.Optional;
 import java.util.zip.ZipFile;
 import org.apache.commons.io.FileUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 class FlowPreparer {
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java b/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
index 71f4248..b86766d 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunner.java
@@ -60,11 +60,7 @@
 import azkaban.sla.SlaOption;
 import azkaban.spi.AzkabanEventReporter;
 import azkaban.spi.EventType;
-import azkaban.utils.FileIOUtils;
-import azkaban.utils.Props;
-import azkaban.utils.SwapQueue;
-import azkaban.utils.Utils;
-import com.alibaba.fastjson.JSONObject;
+import azkaban.utils.*;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -72,6 +68,7 @@
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.webank.wedatasphere.schedulis.common.executor.ExecutionCycle;
 import com.webank.wedatasphere.schedulis.common.jobExecutor.utils.SystemBuiltInParamJodeTimeUtils;
+import com.webank.wedatasphere.schedulis.common.utils.LogUtils;
 import com.webank.wedatasphere.schedulis.exec.execapp.KillFlowTrigger;
 import java.io.File;
 import java.io.IOException;
@@ -79,16 +76,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
 import java.security.ProtectionDomain;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -103,13 +91,10 @@
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 import javax.script.ScriptException;
+import com.google.gson.JsonObject;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Appender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Layout;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -117,8 +102,6 @@
  */
 public class FlowRunner extends EventHandler implements Runnable {
 
-  private static final Layout DEFAULT_LAYOUT = new PatternLayout(
-          "%d{dd-MM-yyyy HH:mm:ss z} %c{1} %p - %m\n");
   // We check update every 5 minutes, just in case things get stuck. But for the
   // most part, we'll be idling.
   private static final long CHECK_WAIT_MS = 5 * 60 * 1000;
@@ -126,7 +109,6 @@ public class FlowRunner extends EventHandler implements Runnable {
   // Sync object for queuing
   private final Object mainSyncObj = new Object();
   private final JobTypeManager jobtypeManager;
-  private final Layout loggerLayout = DEFAULT_LAYOUT;
   private final ExecutorLoader executorLoader;
   private final ProjectLoader projectLoader;
   private final int execId;
@@ -143,8 +125,7 @@ public class FlowRunner extends EventHandler implements Runnable {
   private final SwapQueue finishedNodes;
   private final AzkabanEventReporter azkabanEventReporter;
   private final AlerterHolder alerterHolder;
-  private Logger logger;
-  private Appender flowAppender;
+  private org.slf4j.Logger logger;
   private File logFile;
   private ExecutorService executorService;
   private Thread flowRunnerThread;
@@ -187,6 +168,9 @@ public class FlowRunner extends EventHandler implements Runnable {
 
   private volatile boolean isFailedPaused = false;
 
+  private String loggerName;
+  private String logFileName;
+
   /**
    * Constructor. This will create its own ExecutorService for thread pools
    */
@@ -336,7 +320,7 @@ private void alertOnIMSRegistStart(){
       }
       mailAlerter.alertOnIMSRegistStart(this.flow, this.sharedProps, logger);
     } catch (Exception e) {
-      logger.error("The flow report IMS faild in the end {} "+e);
+      logger.error("The flow report IMS faild in the end {} ",e);
     }
   }
 
@@ -350,7 +334,7 @@ private void alertOnIMSRegistFinish(){
       mailAlerter.alertOnIMSRegistFinish(this.flow, this.sharedProps, this.logger);
 
     }catch (Exception e) {
-      logger.error("The flow report IMS faild in the end {} "+e);
+      logger.error("The flow report IMS faild in the end {} ",e);
     }
   }
 
@@ -533,29 +517,16 @@ private synchronized void updateFlow(final long time) {
    * setup logger and execution dir for the flowId
    */
   private void createLogger(final String flowId) {
-    // Create logger
-    final String loggerName = this.execId + "." + flowId;
-    this.logger = Logger.getLogger(loggerName);
-
-    // Create file appender
-    final String logName = "_flow." + loggerName + ".log";
-    this.logFile = new File(this.execDir, logName);
-    final String absolutePath = this.logFile.getAbsolutePath();
-
-    this.flowAppender = null;
-    try {
-      this.flowAppender = new FileAppender(this.loggerLayout, absolutePath, false);
-      this.logger.addAppender(this.flowAppender);
-    } catch (final IOException e) {
-      this.logger.error("Could not open log file in " + this.execDir, e);
-    }
+    this.loggerName = UUID.randomUUID().toString() + "." + this.execId + "." + flowId;
+    this.logFileName = "_flow." + loggerName + ".log";
+    this.logFile = new File(this.execDir, logFileName);
+    LogUtils.createFlowLog(this.execDir.getAbsolutePath(), logFileName, loggerName);
+    this.logger = LoggerFactory.getLogger(loggerName);
   }
 
   public void closeLogger() {
     if (this.logger != null) {
-      this.logger.removeAppender(this.flowAppender);
-      this.flowAppender.close();
-
+      LogUtils.stopLog(loggerName);
       try {
         this.executorLoader.uploadLogFile(this.execId, "", 0, this.logFile);
       } catch (final ExecutorManagerException e) {
@@ -813,8 +784,8 @@ public void setJobDisabled(String nodePath, Map respMap, String
     }
   }
 
-  public boolean setFlowFailed(final JSONObject json){
-    boolean flowFailed = json.getBooleanValue("flowFailed");
+  public boolean setFlowFailed(final JsonObject json){
+    boolean flowFailed = json.get("flowFailed").getAsBoolean();
     boolean ret = true;
     synchronized (this.mainSyncObj) {
       if (!this.flowFinished && this.flowPaused) {
@@ -1430,7 +1401,7 @@ private void runExecutableNode(final ExecutableNode node) throws IOException {
       this.activeJobRunners.add(runner);
 
     } catch (final RejectedExecutionException e) {
-      this.logger.error(e);
+      this.logger.error("", e);
     }
   }
 
@@ -2453,7 +2424,7 @@ private void runExecutableNodeByPriority(final ExecutableNode node) throws IOExc
       this.activeJobRunners.add(runner);
 
     } catch (final RejectedExecutionException e) {
-      this.logger.error(e);
+      this.logger.error("", e);
     }
   }
 
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunnerManager.java b/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunnerManager.java
index d1d5ca5..414f4b3 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunnerManager.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/FlowRunnerManager.java
@@ -54,7 +54,6 @@
 import azkaban.utils.ThreadPoolExecutingListener;
 import azkaban.utils.TrackingThreadPool;
 import azkaban.utils.UndefinedPropertyException;
-import com.alibaba.fastjson.JSONObject;
 import com.codahale.metrics.Timer;
 import com.google.common.base.Preconditions;
 import com.webank.wedatasphere.schedulis.common.executor.ExecutionCycleDao;
@@ -81,8 +80,11 @@
 import javax.annotation.Nullable;
 import javax.inject.Inject;
 import javax.inject.Singleton;
+
+import com.google.gson.JsonObject;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Execution manager for the server side execution.
@@ -106,7 +108,7 @@
 public class FlowRunnerManager implements EventListener,
     ThreadPoolExecutingListener {
 
-  private static final Logger logger = Logger.getLogger(FlowRunnerManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(FlowRunnerManager.class);
 
   private static final String EXECUTOR_USE_BOUNDED_THREADPOOL_QUEUE = "executor.use.bounded.threadpool.queue";
   private static final String EXECUTOR_THREADPOOL_WORKQUEUE_SIZE = "executor.threadpool.workqueue.size";
@@ -565,7 +567,7 @@ public void pauseFlow(final int execId, final String user)
     runner.pause(user);
   }
 
-  public void setFlowFailed(final int execId, final JSONObject json) throws ExecutorManagerException {
+  public void setFlowFailed(final int execId, final JsonObject json) throws ExecutorManagerException {
     final FlowRunner runner = this.runningFlows.get(execId);
 
     if (runner == null) {
@@ -973,7 +975,7 @@ public void shutdown() {
       try {
         result = this.executorService.awaitTermination(1, TimeUnit.MINUTES);
       } catch (final InterruptedException e) {
-        logger.error(e);
+        logger.error("", e);
       }
     }
     logger.warn("Shutdown FlowRunnerManager complete.");
@@ -1013,7 +1015,7 @@ public void shutdownNow() {
           break;
         }
       } catch (final InterruptedException e) {
-        logger.error(e);
+        logger.error("", e);
       }
     }
     logger.warn("Shutdown FlowRunnerManager complete, now executing flows size: " + getNumRunningFlows());
@@ -1027,7 +1029,7 @@ public void deleteExecutionDirectory() {
     try {
       FileUtils.deleteDirectory(this.executionDirectory);
     } catch (final IOException e) {
-      logger.error(e);
+      logger.error("", e);
     }
   }
 
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/JMXHttpServlet.java b/azkaban-exec-server/src/main/java/azkaban/execapp/JMXHttpServlet.java
index 7da64d1..4faca57 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/JMXHttpServlet.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/JMXHttpServlet.java
@@ -32,12 +32,13 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 public class JMXHttpServlet extends HttpServlet implements ConnectorParams {
 
   private static final long serialVersionUID = -3085603824826446270L;
-  private static final Logger logger = Logger.getLogger(JMXHttpServlet.class);
+  private static final Logger logger = LoggerFactory.getLogger(JMXHttpServlet.class);
   private AzkabanExecutorServer server;
 
   @Override
@@ -92,7 +93,7 @@ protected void doPost(final HttpServletRequest req, final HttpServletResponse re
 
           ret.put("attributes", attributes);
         } catch (final Exception e) {
-          logger.error(e);
+          logger.error("", e);
           ret.put("error", "'" + mbeanName + "' is not a valid mBean name");
         }
       }
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java b/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
index fa8a709..4ceadcd 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
@@ -16,7 +16,6 @@
 
 package azkaban.execapp;
 
-import azkaban.Constants;
 import azkaban.Constants.JobProperties;
 import azkaban.event.Event;
 import azkaban.event.EventData;
@@ -35,34 +34,19 @@
 import azkaban.jobtype.JobTypeManager;
 import azkaban.jobtype.JobTypeManagerException;
 import azkaban.spi.EventType;
-import azkaban.utils.ExternalLinkUtils;
-import azkaban.utils.PatternLayoutEscaped;
-import azkaban.utils.Props;
-import azkaban.utils.StringUtils;
-import azkaban.utils.UndefinedPropertyException;
+import azkaban.utils.*;
+
 import com.webank.wedatasphere.schedulis.common.log.LogFilterEntity;
 import com.webank.wedatasphere.schedulis.common.log.OperateType;
 import java.io.File;
 import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
+import java.util.*;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
-import org.apache.kafka.log4jappender.KafkaLog4jAppender;
-import org.apache.log4j.Appender;
-import org.apache.log4j.EnhancedPatternLayout;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Layout;
-import org.apache.log4j.Logger;
-import org.apache.log4j.RollingFileAppender;
-import org.apache.log4j.spi.Filter;
-import org.apache.log4j.spi.LoggingEvent;
+
+import com.webank.wedatasphere.schedulis.common.utils.LogUtils;
+import org.slf4j.LoggerFactory;
+
 
 public class JobRunner extends EventHandler implements Runnable {
 
@@ -71,12 +55,9 @@ public class JobRunner extends EventHandler implements Runnable {
   public static final String JOB_FAILED_RETRY_COUNT = "job.failed.retry.count";
   public static final String JOB_FAILED_RETRY_INTERVAL = "job.failed.retry.interval";
 
-  private static final Logger serverLogger = Logger.getLogger(JobRunner.class);
+  private static final org.slf4j.Logger serverLogger = LoggerFactory.getLogger(JobRunner.class);
   private static final Object logCreatorLock = new Object();
 
-  private static final String DEFAULT_LAYOUT =
-      "%d{dd-MM-yyyy HH:mm:ss z} %c{1} %p - %m\n";
-
   private final Object syncObject = new Object();
   private final JobTypeManager jobtypeManager;
   private final ExecutorLoader loader;
@@ -84,13 +65,10 @@ public class JobRunner extends EventHandler implements Runnable {
   private final Props azkabanProps;
   private final ExecutableNode node;
   private final File workingDir;
-  private final Layout loggerLayout;
   private final String jobId;
   private final Set pipelineJobs = new HashSet<>();
-  private Logger logger = null;
-  private Logger flowLogger = null;
-  private Appender jobAppender = null;
-  private Optional kafkaAppender = Optional.empty();
+  private org.slf4j.Logger logger = null;
+  private org.slf4j.Logger flowLogger = null;
   private File logFile;
   private String attachmentFileName;
   private Job job;
@@ -114,6 +92,9 @@ public class JobRunner extends EventHandler implements Runnable {
   private boolean restartFaildOpen = false;
   private int retryConut = 0;
 
+  private String loggerName;
+  private String logFileName;
+
   public JobRunner(final ExecutableNode node, final File workingDir, final ExecutorLoader loader,
       final JobTypeManager jobtypeManager, final Props azkabanProps) {
     this.props = node.getInputProps();
@@ -125,10 +106,9 @@ public JobRunner(final ExecutableNode node, final File workingDir, final Executo
     this.loader = loader;
     this.jobtypeManager = jobtypeManager;
     this.azkabanProps = azkabanProps;
-    final String jobLogLayout = props.getString(
-        JobProperties.JOB_LOG_LAYOUT, DEFAULT_LAYOUT);
+//    final String jobLogLayout = props.getString(
+//        JobProperties.JOB_LOG_LAYOUT, DEFAULT_LAYOUT);
 
-    this.loggerLayout = new EnhancedPatternLayout(jobLogLayout);
   }
 
   public static String createLogFileName(final ExecutableNode node, final int attempt) {
@@ -183,7 +163,7 @@ public void setValidatedProxyUsers(final Set proxyUsers) {
     this.proxyUsers = proxyUsers;
   }
 
-  public void setLogSettings(final Logger flowLogger, final String logFileChuckSize,
+  public void setLogSettings(final org.slf4j.Logger flowLogger, final String logFileChuckSize,
       final int numLogBackup) {
     this.flowLogger = flowLogger;
     this.jobLogChunkSize = logFileChuckSize;
@@ -281,36 +261,22 @@ public String getLogFilePath() {
   private void createLogger() {
     // Create logger
     synchronized (logCreatorLock) {
-      final String loggerName =
-          System.currentTimeMillis() + "." + this.executionId + "."
-              + this.jobId;
-      this.logger = Logger.getLogger(loggerName);
-
       try {
-        attachFileAppender(createFileAppender());
-      } catch (final IOException e) {
-        removeAppender(this.jobAppender);
+        this.logFileName = createLogFileName(this.node);
+        this.loggerName = String.format("%s.%s.%s.%s", UUID.randomUUID().toString(), this.executionId, node.getAttempt(), node.getId());
+        this.logFile = new File(this.workingDir, logFileName);
+        final String absolutePath = this.logFile.getAbsolutePath();
+        this.flowLogger.info("Log file path for job: " + this.jobId + " is: " + absolutePath);
+        // todo Added log filtering.
+        List logFilterEntities = loader.listAllLogFilter().stream()
+          .filter(x -> x.getOperateType() == OperateType.REMOVE_ALL).collect(Collectors.toList());
+        LogUtils.createJobLog(this.workingDir.getAbsolutePath(), logFileName, loggerName, jobLogChunkSize, jobLogBackupIndex, logFilterEntities);
+        this.logger = LoggerFactory.getLogger(loggerName);
+        this.flowLogger.info("Created file appender for job " + this.jobId);
+      } catch (final Exception e) {
         this.flowLogger.error("Could not open log file in " + this.workingDir
             + " for job " + this.jobId, e);
       }
-
-      if (this.props.getBoolean(Constants.JobProperties.AZKABAN_JOB_LOGGING_KAFKA_ENABLE, false)) {
-        // Only attempt appender construction if required properties are present
-        if (this.azkabanProps
-            .containsKey(Constants.ConfigurationKeys.AZKABAN_SERVER_LOGGING_KAFKA_BROKERLIST)
-            && this.azkabanProps
-            .containsKey(Constants.ConfigurationKeys.AZKABAN_SERVER_LOGGING_KAFKA_TOPIC)) {
-          try {
-            attachKafkaAppender(createKafkaAppender());
-          } catch (final Exception e) {
-            removeAppender(this.kafkaAppender);
-            this.flowLogger.error("Failed to create Kafka appender for job " + this.jobId, e);
-          }
-        } else {
-          this.flowLogger.info(
-              "Kafka appender not created as brokerlist or topic not provided by executor server");
-        }
-      }
     }
 
     final String externalViewer = ExternalLinkUtils
@@ -323,54 +289,6 @@ private void createLogger() {
     }
   }
 
-  private void attachFileAppender(final FileAppender appender) {
-    // If present, remove the existing file appender
-    assert (this.jobAppender == null);
-
-    this.jobAppender = appender;
-    this.logger.addAppender(this.jobAppender);
-    this.logger.setAdditivity(false);
-    this.flowLogger.info("Attached file appender for job " + this.jobId);
-  }
-
-  private FileAppender createFileAppender() throws IOException {
-    // Set up log files
-    final String logName = createLogFileName(this.node);
-    this.logFile = new File(this.workingDir, logName);
-    final String absolutePath = this.logFile.getAbsolutePath();
-    this.flowLogger.info("Log file path for job: " + this.jobId + " is: " + absolutePath);
-
-    // Attempt to create FileAppender
-    final RollingFileAppender fileAppender =
-        new RollingFileAppender(this.loggerLayout, absolutePath, true);
-    fileAppender.setMaxBackupIndex(this.jobLogBackupIndex);
-    fileAppender.setMaxFileSize(this.jobLogChunkSize);
-    // FIXME Added log filtering.
-    addFilter(fileAppender);
-
-    this.flowLogger.info("Created file appender for job " + this.jobId);
-    return fileAppender;
-  }
-
-  private void addFilter(RollingFileAppender fileAppender){
-    try {
-      List logFilterEntities = loader.listAllLogFilter().stream()
-          .filter(x -> x.getOperateType() == OperateType.REMOVE_ALL).collect(Collectors.toList());
-      fileAppender.addFilter(new Filter() {
-        @Override
-        public int decide(LoggingEvent loggingEvent) {
-          for (LogFilterEntity entity: logFilterEntities){
-            if(loggingEvent.getMessage().toString().contains(entity.getCompareText())){
-              return -1;
-            }
-          }
-          return 0;
-        }
-      });
-    } catch (Exception e){
-      this.flowLogger.error("设置日志过滤失败" + e);
-    }
-  }
 
   private void createAttachmentFile() {
     final String fileName = createAttachmentFileName(this.node);
@@ -378,53 +296,9 @@ private void createAttachmentFile() {
     this.attachmentFileName = file.getAbsolutePath();
   }
 
-  private void attachKafkaAppender(final KafkaLog4jAppender appender) {
-    // This should only be called once
-    assert (!this.kafkaAppender.isPresent());
-
-    this.kafkaAppender = Optional.of(appender);
-    this.logger.addAppender(this.kafkaAppender.get());
-    this.logger.setAdditivity(false);
-    this.flowLogger.info("Attached new Kafka appender for job " + this.jobId);
-  }
-
-  private KafkaLog4jAppender createKafkaAppender() throws UndefinedPropertyException {
-    final KafkaLog4jAppender kafkaProducer = new KafkaLog4jAppender();
-    kafkaProducer.setSyncSend(false);
-    kafkaProducer.setBrokerList(this.azkabanProps
-        .getString(Constants.ConfigurationKeys.AZKABAN_SERVER_LOGGING_KAFKA_BROKERLIST));
-    kafkaProducer.setTopic(
-        this.azkabanProps
-            .getString(Constants.ConfigurationKeys.AZKABAN_SERVER_LOGGING_KAFKA_TOPIC));
-
-    final String layoutString = LogUtil.createLogPatternLayoutJsonString(this.props, this.jobId);
-
-    kafkaProducer.setLayout(new PatternLayoutEscaped(layoutString));
-    kafkaProducer.activateOptions();
-
-    this.flowLogger.info("Created kafka appender for " + this.jobId);
-    return kafkaProducer;
-  }
-
-  private void removeAppender(final Optional appender) {
-    if (appender.isPresent()) {
-      removeAppender(appender.get());
-    }
-  }
-
-  private void removeAppender(final Appender appender) {
-    if (appender != null) {
-      this.logger.removeAppender(appender);
-      appender.close();
-    }
-  }
-
   private void closeLogger() {
-    if (this.jobAppender != null) {
-      removeAppender(this.jobAppender);
-    }
-    if (this.kafkaAppender.isPresent()) {
-      removeAppender(this.kafkaAppender);
+    if (this.logger != null) {
+      LogUtils.stopLog(loggerName);
     }
   }
 
@@ -1077,7 +951,7 @@ public File getLogFile() {
     return this.logFile;
   }
 
-  public Logger getLogger() {
+  public org.slf4j.Logger getLogger() {
     return this.logger;
   }
 
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/ProjectCacheCleaner.java b/azkaban-exec-server/src/main/java/azkaban/execapp/ProjectCacheCleaner.java
index 751b9c9..e73aa32 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/ProjectCacheCleaner.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/ProjectCacheCleaner.java
@@ -30,8 +30,9 @@
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-import org.slf4j.Logger;
+
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * This class is responsible for deleting least recently accessed projects in the shared project
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/ServerStatisticsServlet.java b/azkaban-exec-server/src/main/java/azkaban/execapp/ServerStatisticsServlet.java
index 0354bf3..2de38dd 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/ServerStatisticsServlet.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/ServerStatisticsServlet.java
@@ -28,14 +28,15 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 public class ServerStatisticsServlet extends HttpServlet {
 
   private static final long serialVersionUID = 1L;
   private static final int cacheTimeInMilliseconds = 1000;
-  private static final Logger logger = Logger.getLogger(ServerStatisticsServlet.class);
+  private static final Logger logger = LoggerFactory.getLogger(ServerStatisticsServlet.class);
   private static final String noCacheParamName = "nocache";
   private static final boolean exists_Bash = new File("/bin/bash").exists();
   private static final boolean exists_Cat = new File("/bin/cat").exists();
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/StatsServlet.java b/azkaban-exec-server/src/main/java/azkaban/execapp/StatsServlet.java
index dee7511..c848d56 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/StatsServlet.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/StatsServlet.java
@@ -25,6 +25,9 @@
 import azkaban.metric.inmemoryemitter.InMemoryMetricEmitter;
 import azkaban.server.HttpRequestUtils;
 import azkaban.utils.JSONUtils;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.io.IOException;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -38,7 +41,6 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
 
 /**
  * Servlet to communicate with Azkaban exec server This servlet get requests from stats servlet in
@@ -47,7 +49,7 @@
 public class StatsServlet extends HttpServlet implements ConnectorParams {
 
   private static final long serialVersionUID = 2L;
-  private static final Logger logger = Logger.getLogger(StatsServlet.class);
+  private static final Logger logger = LoggerFactory.getLogger(StatsServlet.class);
 
   public boolean hasParam(final HttpServletRequest request, final String param) {
     return HttpRequestUtils.hasParam(request, param);
@@ -130,7 +132,7 @@ private void handleChangeManagerStatusRequest(final HttpServletRequest req,
         ret.put(RESPONSE_ERROR, "MetricManager is not available");
       }
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("", e);
       ret.put(RESPONSE_ERROR, e.getMessage());
     }
   }
@@ -152,7 +154,7 @@ private void handleChangeEmitterPoints(final HttpServletRequest req,
         ret.put(RESPONSE_ERROR, "MetricManager is not available");
       }
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("", e);
       ret.put(RESPONSE_ERROR, e.getMessage());
     }
   }
@@ -174,7 +176,7 @@ private void handleChangeCleaningInterval(final HttpServletRequest req,
         ret.put(RESPONSE_ERROR, "MetricManager is not available");
       }
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("", e);
       ret.put(RESPONSE_ERROR, e.getMessage());
     }
   }
@@ -272,7 +274,7 @@ private void handleChangeMetricInterval(final HttpServletRequest req,
         ret.put(RESPONSE_ERROR, "MetricManager is not available");
       }
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("", e);
       ret.put(RESPONSE_ERROR, e.getMessage());
     }
   }
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/Trigger.java b/azkaban-exec-server/src/main/java/azkaban/execapp/Trigger.java
index c9add41..a7f7dfe 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/Trigger.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/Trigger.java
@@ -21,12 +21,13 @@
 import azkaban.trigger.Condition;
 import azkaban.trigger.TriggerAction;
 import java.util.List;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 public class Trigger implements Runnable {
 
-  private static final Logger logger = Logger.getLogger(azkaban.execapp.Trigger.class);
+  private static final Logger logger = LoggerFactory.getLogger(azkaban.execapp.Trigger.class);
   private final int execId;
 //  private final ExecutorLoader executorLoader ;
 
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/TriggerManager.java b/azkaban-exec-server/src/main/java/azkaban/execapp/TriggerManager.java
index 2bc7712..317ac92 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/TriggerManager.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/TriggerManager.java
@@ -33,7 +33,8 @@
 import java.util.concurrent.TimeUnit;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.ReadablePeriod;
 
 
@@ -41,7 +42,7 @@
 public class TriggerManager {
 
   private static final int SCHEDULED_THREAD_POOL_SIZE = 4;
-  private static final Logger logger = Logger.getLogger(TriggerManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(TriggerManager.class);
   private final ScheduledExecutorService scheduledService;
   private final ExecutorLoader executorLoader;
 
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillExecutionAction.java b/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillExecutionAction.java
index 232afb3..59de589 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillExecutionAction.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillExecutionAction.java
@@ -22,15 +22,15 @@
 import azkaban.trigger.TriggerAction;
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 public class KillExecutionAction implements TriggerAction {
 
   public static final String type = "KillExecutionAction";
 
-  private static final Logger logger = Logger
-      .getLogger(KillExecutionAction.class);
+  private static final Logger logger = LoggerFactory.getLogger(KillExecutionAction.class);
 
   private final String actionId;
   private final int execId;
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillJobAction.java b/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillJobAction.java
index c33e8c0..6bed43d 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillJobAction.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/action/KillJobAction.java
@@ -21,15 +21,15 @@
 import azkaban.trigger.TriggerAction;
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 public class KillJobAction implements TriggerAction {
 
   public static final String type = "KillJobAction";
 
-  private static final Logger logger = Logger
-      .getLogger(KillJobAction.class);
+  private static final Logger logger = LoggerFactory.getLogger(KillJobAction.class);
 
   private final String actionId;
   private final int execId;
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/event/FlowWatcher.java b/azkaban-exec-server/src/main/java/azkaban/execapp/event/FlowWatcher.java
index 984eb8e..972a7dc 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/event/FlowWatcher.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/event/FlowWatcher.java
@@ -20,16 +20,16 @@
 import azkaban.executor.ExecutableFlowBase;
 import azkaban.executor.ExecutableNode;
 import azkaban.executor.Status;
+
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
-import org.apache.log4j.Logger;
 
 public abstract class FlowWatcher {
 
   private final int execId;
   private final Map map =
       new ConcurrentHashMap<>();
-  private Logger logger;
+  private org.slf4j.Logger logger;
   private ExecutableFlow flow;
   private boolean cancelWatch = false;
 
@@ -41,11 +41,11 @@ public void setFlow(final ExecutableFlow flow) {
     this.flow = flow;
   }
 
-  protected Logger getLogger() {
+  protected org.slf4j.Logger getLogger() {
     return this.logger;
   }
 
-  public void setLogger(final Logger logger) {
+  public void setLogger(final org.slf4j.Logger logger) {
     this.logger = logger;
   }
 
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackManager.java b/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackManager.java
index 3debe1a..c828016 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackManager.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackManager.java
@@ -26,7 +26,8 @@
 import java.util.TimeZone;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.message.BasicHeader;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Responsible processing job callback properties on job status change events.
@@ -43,8 +44,8 @@
  */
 public class JobCallbackManager implements EventListener {
 
-  private static final Logger logger = Logger
-      .getLogger(JobCallbackManager.class);
+  private static final org.slf4j.Logger logger = LoggerFactory.getLogger(JobCallbackManager.class);
+
   private static final JobCallbackStatusEnum[] ON_COMPLETION_JOB_CALLBACK_STATUS =
       {SUCCESS, FAILURE, COMPLETED};
   private static boolean isInitialized = false;
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackRequestMaker.java b/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackRequestMaker.java
index 0fb42f7..7603afb 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackRequestMaker.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackRequestMaker.java
@@ -31,7 +31,8 @@
 import org.apache.http.impl.client.FutureRequestExecutionService;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.client.HttpRequestFutureTask;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Responsible for making the job callback HTTP requests.
@@ -43,8 +44,7 @@
  */
 public class JobCallbackRequestMaker {
 
-  private static final Logger logger = Logger
-      .getLogger(JobCallbackRequestMaker.class);
+  private static final Logger logger = LoggerFactory.getLogger(JobCallbackRequestMaker.class);
 
   private static final int DEFAULT_TIME_OUT_MS = 3000;
   private static final int DEFAULT_RESPONSE_WAIT_TIME_OUT_MS = 5000;
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackUtil.java b/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackUtil.java
index f6db5bc..f906c3b 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackUtil.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackUtil.java
@@ -38,11 +38,12 @@
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.message.BasicHeader;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class JobCallbackUtil {
 
-  private static final Logger logger = Logger.getLogger(JobCallbackUtil.class);
+  private static final Logger logger = LoggerFactory.getLogger(JobCallbackUtil.class);
 
   private static final Map firstJobcallbackPropertyMap =
       new HashMap<>(
diff --git a/azkaban-exec-server/src/main/java/azkaban/execapp/jmx/JmxJobMBeanManager.java b/azkaban-exec-server/src/main/java/azkaban/execapp/jmx/JmxJobMBeanManager.java
index 6d5c499..88aa480 100644
--- a/azkaban-exec-server/src/main/java/azkaban/execapp/jmx/JmxJobMBeanManager.java
+++ b/azkaban-exec-server/src/main/java/azkaban/execapp/jmx/JmxJobMBeanManager.java
@@ -11,7 +11,8 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 /**
  * Responsible keeping track of job related MBean attributes through listening to job related
@@ -21,8 +22,7 @@
  */
 public class JmxJobMBeanManager implements JmxJobMXBean, EventListener {
 
-  private static final Logger logger = Logger
-      .getLogger(JmxJobMBeanManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(JmxJobMBeanManager.class);
 
   private static final JmxJobMBeanManager INSTANCE = new JmxJobMBeanManager();
 
diff --git a/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/CycleFlowRunnerEventListener.java b/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/CycleFlowRunnerEventListener.java
index d9b540b..22110da 100644
--- a/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/CycleFlowRunnerEventListener.java
+++ b/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/CycleFlowRunnerEventListener.java
@@ -58,11 +58,12 @@
 import okhttp3.Response;
 import okhttp3.ResponseBody;
 import org.apache.commons.collections.MapUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CycleFlowRunnerEventListener implements EventListener {
 
-    private static final Logger logger = Logger.getLogger(CycleFlowRunnerEventListener.class);
+    private static final Logger logger = LoggerFactory.getLogger(CycleFlowRunnerEventListener.class);
 
     private static final String AZKABAN_WEBSERVER_URL = "azkaban.webserver.url";
     private static final String EXECUTE_CYCLE_INTERVAL = "execute.cycle.interval";
diff --git a/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/KillFlowTrigger.java b/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/KillFlowTrigger.java
index 14d7c3d..a27326e 100644
--- a/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/KillFlowTrigger.java
+++ b/azkaban-exec-server/src/main/java/com/webank/wedatasphere/schedulis/exec/execapp/KillFlowTrigger.java
@@ -19,7 +19,8 @@
 import azkaban.execapp.FlowRunner;
 import azkaban.execapp.JobRunner;
 import azkaban.executor.Status;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 
 import java.util.Set;
diff --git a/azkaban-exec-server/src/test/java/azkaban/InteractiveTestJob.java b/azkaban-exec-server/src/test/java/azkaban/InteractiveTestJob.java
index c1888fa..080f176 100644
--- a/azkaban-exec-server/src/test/java/azkaban/InteractiveTestJob.java
+++ b/azkaban-exec-server/src/test/java/azkaban/InteractiveTestJob.java
@@ -19,7 +19,7 @@
 import azkaban.flow.CommonJobProperties;
 import azkaban.jobExecutor.AbstractProcessJob;
 import azkaban.utils.Props;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 import java.io.File;
 import java.util.Collection;
diff --git a/azkaban-exec-server/src/test/java/azkaban/MockExecutorLoader.java b/azkaban-exec-server/src/test/java/azkaban/MockExecutorLoader.java
index 7643577..4050eac 100644
--- a/azkaban-exec-server/src/test/java/azkaban/MockExecutorLoader.java
+++ b/azkaban-exec-server/src/test/java/azkaban/MockExecutorLoader.java
@@ -30,7 +30,8 @@
 import com.webank.wedatasphere.schedulis.common.log.LogFilterEntity;
 import com.webank.wedatasphere.schedulis.common.system.entity.WtssUser;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import java.io.File;
 import java.io.IOException;
@@ -46,7 +47,7 @@
  */
 public class MockExecutorLoader implements ExecutorLoader {
 
-  private static final Logger logger = Logger.getLogger(MockExecutorLoader.class);
+  private static final Logger logger = LoggerFactory.getLogger(MockExecutorLoader.class);
 
   Map executionExecutorMapping = new ConcurrentHashMap<>();
   Map flows = new ConcurrentHashMap<>();
diff --git a/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/HadoopSecurityManager_H_2_0.java b/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/HadoopSecurityManager_H_2_0.java
index dca294f..efc89eb 100644
--- a/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/HadoopSecurityManager_H_2_0.java
+++ b/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/HadoopSecurityManager_H_2_0.java
@@ -78,8 +78,9 @@
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
 import org.apache.hadoop.yarn.ipc.YarnRPC;
 import org.apache.hadoop.yarn.util.ConverterUtils;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class HadoopSecurityManager_H_2_0 extends HadoopSecurityManager {
 
@@ -125,8 +126,7 @@ public class HadoopSecurityManager_H_2_0 extends HadoopSecurityManager {
   private static final String AZKABAN_PRINCIPAL = "proxy.user";
   private static final String OBTAIN_JOBHISTORYSERVER_TOKEN =
       "obtain.jobhistoryserver.token";
-  private final static Logger logger = Logger
-      .getLogger(HadoopSecurityManager_H_2_0.class);
+  private final static org.slf4j.Logger logger = LoggerFactory.getLogger(HadoopSecurityManager_H_2_0.class);
   private static volatile HadoopSecurityManager hsmInstance = null;
   private static URLClassLoader ucl;
 
diff --git a/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/HadoopSecurityManager.java b/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/HadoopSecurityManager.java
index aec2f78..ebb9356 100644
--- a/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/HadoopSecurityManager.java
+++ b/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/HadoopSecurityManager.java
@@ -22,7 +22,7 @@
 import java.util.Properties;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 public abstract class HadoopSecurityManager {
 
diff --git a/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/SecurityUtils.java b/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/SecurityUtils.java
index 86fc949..c89e96c 100644
--- a/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/SecurityUtils.java
+++ b/azkaban-hadoop-security-plugin/src/main/java/azkaban/security/commons/SecurityUtils.java
@@ -33,8 +33,7 @@
 import org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
-import org.apache.log4j.Logger;
-
+import org.slf4j.Logger;
 public class SecurityUtils {
 
   // Secure Hadoop proxy user params
diff --git a/azkaban-jobtype/pom.xml b/azkaban-jobtype/pom.xml
index b5ce8c7..62ecf92 100644
--- a/azkaban-jobtype/pom.xml
+++ b/azkaban-jobtype/pom.xml
@@ -256,17 +256,6 @@
         
       
     
-    
-      org.apache.kafka
-      kafka-log4j-appender
-      ${kafkaLog4jAppender.version}
-      
-        
-          slf4j-log4j12
-          org.slf4j
-        
-      
-    
     
       org.apache.pig
       pig
@@ -285,11 +274,6 @@
       druid
       1.1.21
     
-    
-      com.alibaba
-      fastjson
-      1.2.61
-    
 
     
       com.squareup.okhttp3
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheck.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheck.java
index 9b81834..ab02c89 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheck.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheck.java
@@ -18,7 +18,8 @@
 
 import com.alibaba.druid.pool.DruidDataSource;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheckReceiver.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheckReceiver.java
index 399304c..e181666 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheckReceiver.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/AbstractEventCheckReceiver.java
@@ -18,7 +18,8 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.time.DateFormatUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.sql.Connection;
 import java.sql.PreparedStatement;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/DefaultEventcheckReceiver.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/DefaultEventcheckReceiver.java
index 10c0582..27d1df4 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/DefaultEventcheckReceiver.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/DefaultEventcheckReceiver.java
@@ -17,7 +17,8 @@
 package com.webank.wedatasphere.schedulis.eventcheck;
 
 import org.apache.commons.lang.time.DateFormatUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.text.DateFormat;
 import java.text.ParseException;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckAdapter.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckAdapter.java
index b4b19b4..8be89b0 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckAdapter.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckAdapter.java
@@ -16,7 +16,8 @@
 
 package com.webank.wedatasphere.schedulis.eventcheck;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.Properties;
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckSender.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckSender.java
index 989854b..07a129e 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckSender.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/eventcheck/EventCheckSender.java
@@ -17,7 +17,8 @@
 package com.webank.wedatasphere.schedulis.eventcheck;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.sql.Connection;
 import java.sql.PreparedStatement;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopConfigurationInjector.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopConfigurationInjector.java
index d088383..99901af 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopConfigurationInjector.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopConfigurationInjector.java
@@ -24,7 +24,8 @@
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -39,7 +40,7 @@
  * constructed.
  */
 public class HadoopConfigurationInjector {
-  private static Logger _logger = Logger.getLogger(HadoopConfigurationInjector.class);
+  private static Logger _logger = LoggerFactory.getLogger(HadoopConfigurationInjector.class);
 
   // File to which the Hadoop configuration to inject will be written.
   private static final String INJECT_FILE = "hadoop-inject.xml";
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopHiveJob.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopHiveJob.java
index 62339b6..d7c6708 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopHiveJob.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopHiveJob.java
@@ -26,7 +26,8 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.flow.CommonJobProperties;
 import azkaban.jobExecutor.JavaProcessJob;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJob.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJob.java
index 5cf1df3..d5b3329 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJob.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJob.java
@@ -23,7 +23,8 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.flow.CommonJobProperties;
 import azkaban.jobExecutor.JavaProcessJob;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJobRunnerMain.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJobRunnerMain.java
index 2a18b35..d0b9afa 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJobRunnerMain.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJavaJobRunnerMain.java
@@ -37,16 +37,14 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Layout;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
 
 import azkaban.jobExecutor.ProcessJob;
 import azkaban.security.commons.HadoopSecurityManager;
 import azkaban.utils.JSONUtils;
 import azkaban.utils.Props;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 public class HadoopJavaJobRunnerMain {
 
@@ -64,8 +62,6 @@ public class HadoopJavaJobRunnerMain {
   public static final String[] PROPS_CLASSES = new String[] {
       "azkaban.utils.Props", "azkaban.common.utils.Props" };
 
-  private static final Layout DEFAULT_LAYOUT = new PatternLayout("%p %m\n");
-
   public final Logger _logger;
 
   public String _cancelMethod;
@@ -92,12 +88,7 @@ public void run() {
       _jobName = System.getenv(ProcessJob.JOB_NAME_ENV);
       String propsFile = System.getenv(ProcessJob.JOB_PROP_ENV);
 
-      _logger = Logger.getRootLogger();
-      _logger.removeAllAppenders();
-      ConsoleAppender appender = new ConsoleAppender(DEFAULT_LAYOUT);
-      appender.activateOptions();
-      _logger.addAppender(appender);
-      _logger.setLevel(Level.INFO); //Explicitly setting level to INFO
+      _logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
 
       Properties props = new Properties();
       props.load(new BufferedReader(new FileReader(propsFile)));
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJobUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJobUtils.java
index 8c1da5b..2ed07a8 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJobUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopJobUtils.java
@@ -40,7 +40,8 @@
 import org.apache.hadoop.yarn.client.api.YarnClient;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.security.commons.HadoopSecurityManager;
 import azkaban.security.commons.HadoopSecurityManagerException;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureHiveWrapper.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureHiveWrapper.java
index 70cb354..ff7a2d4 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureHiveWrapper.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureHiveWrapper.java
@@ -39,7 +39,8 @@
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.utils.Props;
 
@@ -50,7 +51,7 @@ public class HadoopSecureHiveWrapper {
   private static final String SINGLE_QUOTE_STRING = Character
       .toString(SINGLE_QUOTE);
 
-  private static final Logger logger = Logger.getRootLogger();
+  private static final Logger logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
 
   private static CliSessionState ss;
   private static String hiveScript;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureSparkWrapper.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureSparkWrapper.java
index 7d3445e..f5f53b3 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureSparkWrapper.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureSparkWrapper.java
@@ -28,7 +28,8 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.spark.SparkConf;
 import org.apache.spark.network.util.JavaUtils;
 import org.apache.spark.util.Utils;
@@ -55,7 +56,7 @@
  */
 public class HadoopSecureSparkWrapper {
 
-  private static final Logger logger = Logger.getRootLogger();
+  private static final Logger logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
   private static final String EMPTY_STRING = "";
 
   //SPARK CONF PARAM
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureWrapperUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureWrapperUtils.java
index 76785aa..4ba3351 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureWrapperUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSecureWrapperUtils.java
@@ -26,7 +26,8 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.jobExecutor.ProcessJob;
 import azkaban.security.commons.HadoopSecurityManager;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopShell.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopShell.java
index 641e2f7..0c6e4b1 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopShell.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopShell.java
@@ -21,7 +21,8 @@
 import java.io.File;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.flow.CommonJobProperties;
 import azkaban.jobExecutor.ProcessJob;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSparkJob.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSparkJob.java
index a2c7cf1..7b2860a 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSparkJob.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/HadoopSparkJob.java
@@ -29,7 +29,8 @@
 import java.util.StringTokenizer;
 
 import org.apache.commons.lang.math.NumberUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.flow.CommonJobProperties;
 import azkaban.jobExecutor.JavaProcessJob;
@@ -286,7 +287,7 @@ static String testableGetMainArguments(Props jobProps, String workingDir,
       Logger log) {
 
     // if we ever need to recreate a failure scenario in the test case
-    log.debug(jobProps);
+    log.debug(jobProps.toString());
     log.debug(workingDir);
 
     List argList = new ArrayList();
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJob.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJob.java
index 8382371..4fa305f 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJob.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJob.java
@@ -20,7 +20,8 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.flow.CommonJobProperties;
 import azkaban.jobExecutor.JavaProcessJob;
@@ -73,8 +74,8 @@ protected List getClassPaths() {
 
     classPath.add(HadoopConfigurationInjector.getPath(getJobProps(),
         getWorkingDirectory()));
-
-    String loggerPath = getSourcePathFromClass(org.apache.log4j.Logger.class);
+    // todo ?
+    String loggerPath = getSourcePathFromClass(Logger.class);
     if (!classPath.contains(loggerPath)) {
       classPath.add(loggerPath);
     }
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJobRunnerMain.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJobRunnerMain.java
index 8d3d720..e393382 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJobRunnerMain.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/JavaJobRunnerMain.java
@@ -19,10 +19,8 @@
 import azkaban.jobExecutor.ProcessJob;
 import azkaban.utils.JSONUtils;
 import azkaban.utils.Props;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Layout;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.*;
 import java.lang.reflect.Constructor;
@@ -51,7 +49,6 @@ public class JavaJobRunnerMain {
     "azkaban.common.utils.Props"
   };
 
-  private static final Layout DEFAULT_LAYOUT = new PatternLayout("%p %m\n");
 
   public final Logger _logger;
 
@@ -77,11 +74,7 @@ public void run() {
       _jobName = System.getenv(ProcessJob.JOB_NAME_ENV);
       String propsFile = System.getenv(ProcessJob.JOB_PROP_ENV);
 
-      _logger = Logger.getRootLogger();
-      _logger.removeAllAppenders();
-      ConsoleAppender appender = new ConsoleAppender(DEFAULT_LAYOUT);
-      appender.activateOptions();
-      _logger.addAppender(appender);
+      _logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
 
       Properties props = new Properties();
       props.load(new BufferedReader(new FileReader(propsFile)));
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/StatsUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/StatsUtils.java
index 5ff0939..3d0696e 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/StatsUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/StatsUtils.java
@@ -35,12 +35,13 @@
 import org.apache.hadoop.mapred.Counters.Counter;
 import org.apache.hadoop.mapred.Counters.Group;
 import org.apache.hadoop.mapred.RunningJob;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.pig.impl.util.ObjectSerializer;
 
 public class StatsUtils {
 
-  private static Logger logger = Logger.getLogger(StatsUtils.class);
+  private static Logger logger = LoggerFactory.getLogger(StatsUtils.class);
 
   private static final Set JOB_CONF_KEYS = new HashSet(
       Arrays.asList(new String[] { 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/commons/LogGobbler.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/commons/LogGobbler.java
index 2687d1e..2793807 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/commons/LogGobbler.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/commons/LogGobbler.java
@@ -17,22 +17,21 @@
 package com.webank.wedatasphere.schedulis.jobtype.commons;
 
 import com.google.common.base.Joiner;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
 
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.Reader;
+import org.slf4j.Logger;
 
 public class LogGobbler extends Thread {
 
   private final BufferedReader inputReader;
   private final Logger logger;
-  private final Level loggingLevel;
+  private final String loggingLevel;
   private final CircularBuffer buffer;
 
   public LogGobbler(final Reader inputReader, final Logger logger,
-      final Level level, final int bufferLines) {
+      final String level, final int bufferLines) {
     this.inputReader = new BufferedReader(inputReader);
     this.logger = logger;
     this.loggingLevel = level;
@@ -58,7 +57,17 @@ public void run() {
 
   private void log(final String message) {
     if (this.logger != null) {
-      this.logger.log(this.loggingLevel, message);
+      if (this.loggingLevel.equals("INFO")) {
+        this.logger.info(message);
+      } else if (this.loggingLevel.equals("ERROR")) {
+        this.logger.error(message);
+      } else if (this.loggingLevel.equals("DEBUG")) {
+        this.logger.debug(message);
+      } else if (this.loggingLevel.equals("WARN")) {
+        this.logger.warn(message);
+      } else {
+        this.logger.trace(message);
+      }
     }
   }
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDataCheckerDao.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDataCheckerDao.java
index 1cbbbee..23da28b 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDataCheckerDao.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDataCheckerDao.java
@@ -34,8 +34,7 @@
 import okhttp3.RequestBody;
 import okhttp3.Response;
 import okhttp3.ResponseBody;
-import org.apache.log4j.Logger;
-
+import org.slf4j.Logger;
 import com.alibaba.druid.pool.DruidDataSource;
 
 public class WBDataCheckerDao {
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDruidFactory.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDruidFactory.java
index 8d17bcc..1b866d9 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDruidFactory.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBDruidFactory.java
@@ -20,7 +20,7 @@
 import java.util.Properties;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 import com.alibaba.druid.pool.DruidDataSource;
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBEventCheckerDao.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBEventCheckerDao.java
index eaa7b8b..f9cccf3 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBEventCheckerDao.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/connectors/druid/WBEventCheckerDao.java
@@ -16,12 +16,12 @@
 
 package com.webank.wedatasphere.schedulis.jobtype.connectors.druid;
 
-import org.apache.log4j.Logger;
 
 import java.util.Properties;
 
 import com.webank.wedatasphere.schedulis.eventcheck.DefaultEventcheckReceiver;
 import com.webank.wedatasphere.schedulis.eventcheck.EventCheckSender;
+import org.slf4j.Logger;
 
 
 public class WBEventCheckerDao {
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/examples/java/WordCount.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/examples/java/WordCount.java
index a842cb0..d750555 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/examples/java/WordCount.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/examples/java/WordCount.java
@@ -35,14 +35,15 @@
 import org.apache.hadoop.mapred.TextInputFormat;
 import org.apache.hadoop.mapred.FileOutputFormat;
 import org.apache.hadoop.mapred.TextOutputFormat;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 import com.webank.wedatasphere.schedulis.jobtype.javautils.AbstractHadoopJob;
 import azkaban.utils.Props;
 
 public class WordCount extends AbstractHadoopJob {
 
-  private static final Logger logger = Logger.getLogger(WordCount.class);
+  private static final Logger logger = LoggerFactory.getLogger(WordCount.class);
 
   private final String inputPath;
   private final String outputPath;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/HiveUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/HiveUtils.java
index bfd4454..32d42b6 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/HiveUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/HiveUtils.java
@@ -20,15 +20,15 @@
 import java.io.IOException;
 
 import org.apache.hadoop.hive.cli.CliDriver;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Grab bag of utilities for working with Hive. End users should obtain
  * instances of the provided interfaces from these methods.
  */
 public class HiveUtils {
-  private final static Logger LOG =
-      Logger.getLogger("com.linkedin.hive.HiveUtils");
+  private final static Logger logger = LoggerFactory.getLogger("com.linkedin.hive.HiveUtils");
 
   private HiveUtils() {
   }
@@ -59,7 +59,7 @@ static String expandHiveAuxJarsPath(String original) throws IOException {
     File[] files = new File(original).listFiles();
 
     if (files == null || files.length == 0) {
-      LOG.info("No files in to expand in aux jar path. Returning original parameter");
+      logger.info("No files in to expand in aux jar path. Returning original parameter");
       return original;
     }
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/RealHiveQueryExecutor.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/RealHiveQueryExecutor.java
index dc502ad..c0ecb54 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/RealHiveQueryExecutor.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/RealHiveQueryExecutor.java
@@ -20,7 +20,8 @@
 import org.apache.hadoop.hive.cli.CliSessionState;
 import org.apache.hadoop.hive.cli.OptionsProcessor;
 import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.InputStream;
 import java.io.PrintStream;
@@ -29,15 +30,14 @@
 import static org.apache.hadoop.hive.conf.HiveConf.ConfVars.METASTORECONNECTURLKEY;
 
 class RealHiveQueryExecutor implements HiveQueryExecutor {
-  private final static Logger LOG = Logger
-      .getLogger("com.linkedin.hive.HiveQueryExecutor");
+  private final static Logger logger = LoggerFactory.getLogger("com.linkedin.hive.HiveQueryExecutor");
   private final CliDriver cli;
   private final CliSessionState ss;
 
   public RealHiveQueryExecutor(HiveConf hiveConf, CliSessionState ss,
       CliDriver cli) throws Exception {
-    LOG.info("HiveConf = " + hiveConf);
-    LOG.info("According to the conf, we're talking to the Hive hosted at: "
+    logger.info("HiveConf = " + hiveConf);
+    logger.info("According to the conf, we're talking to the Hive hosted at: "
         + HiveConf.getVar(hiveConf, METASTORECONNECTURLKEY));
 
     // Expand out the hive aux jars since there was no shell script to do it
@@ -45,9 +45,9 @@ public RealHiveQueryExecutor(HiveConf hiveConf, CliSessionState ss,
     String orig = HiveConf.getVar(hiveConf, HIVEAUXJARS);
     String expanded = HiveUtils.expandHiveAuxJarsPath(orig);
     if (orig == null || orig.equals(expanded)) {
-      LOG.info("Hive aux jars variable not expanded");
+      logger.info("Hive aux jars variable not expanded");
     } else {
-      LOG.info("Expanded aux jars variable from [" + orig + "] to [" + expanded
+      logger.info("Expanded aux jars variable from [" + orig + "] to [" + expanded
           + "]");
       HiveConf.setVar(hiveConf, HIVEAUXJARS, expanded);
     }
@@ -65,7 +65,7 @@ public RealHiveQueryExecutor(HiveConf hiveConf, CliSessionState ss,
       // see also: code in ExecDriver.java
       ClassLoader loader = hiveConf.getClassLoader();
       String auxJars = HiveConf.getVar(hiveConf, HiveConf.ConfVars.HIVEAUXJARS);
-      LOG.info("Got auxJars = " + auxJars);
+      logger.info("Got auxJars = " + auxJars);
 
       if (StringUtils.isNotBlank(auxJars)) {
         loader =
@@ -76,7 +76,7 @@ public RealHiveQueryExecutor(HiveConf hiveConf, CliSessionState ss,
     }*/
 
     this.ss = ss;
-    LOG.info("SessionState = " + ss);
+    logger.info("SessionState = " + ss);
     ss.out = System.out;
     ss.err = System.err;
     ss.in = System.in;
@@ -86,7 +86,7 @@ public RealHiveQueryExecutor(HiveConf hiveConf, CliSessionState ss,
           "Can't process arguments from session state");
     }
     this.cli = cli;
-    LOG.info("Cli = " + cli);
+    logger.info("Cli = " + cli);
   }
 
   /**
@@ -94,11 +94,11 @@ public RealHiveQueryExecutor(HiveConf hiveConf, CliSessionState ss,
    */
   @Override
   public void executeQuery(String q) throws HiveQueryExecutionException {
-    LOG.info("Executing query: " + q);
+    logger.info("Executing query: " + q);
 
     int returnCode = cli.processLine(q);
     if (returnCode != 0) {
-      LOG.warn("Got exception " + returnCode + " from line: " + q);
+      logger.warn("Got exception " + returnCode + " from line: " + q);
       throw new HiveQueryExecutionException(returnCode, q);
     }
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/DropAllPartitionsAddLatest.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/DropAllPartitionsAddLatest.java
index c6356e7..29ac91a 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/DropAllPartitionsAddLatest.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/DropAllPartitionsAddLatest.java
@@ -24,7 +24,8 @@
 import com.webank.wedatasphere.schedulis.jobtype.hiveutils.util.AzkabanJobPropertyDescription;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -57,8 +58,7 @@
 @AzkHiveAction(Constants.DROP_ALL_PARTITIONS_AND_ADD_LATEST)
 public class DropAllPartitionsAddLatest implements HiveAction {
   private final static Logger LOG =
-      Logger
-          .getLogger("com.linkedin.hive.azkaban.hive.actions.DropAllPartitionsAddLatest");
+      LoggerFactory.getLogger("com.linkedin.hive.azkaban.hive.actions.DropAllPartitionsAddLatest");
 
   public static final String DROP_AND_ADD = Constants.DROP_ALL_PARTITIONS_AND_ADD_LATEST;
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/ExecuteHiveQuery.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/ExecuteHiveQuery.java
index f9c6c02..54ab831 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/ExecuteHiveQuery.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/ExecuteHiveQuery.java
@@ -22,7 +22,8 @@
 import com.webank.wedatasphere.schedulis.jobtype.hiveutils.azkaban.HiveViaAzkabanException;
 import com.webank.wedatasphere.schedulis.jobtype.hiveutils.azkaban.Utils;
 import com.webank.wedatasphere.schedulis.jobtype.hiveutils.util.AzkabanJobPropertyDescription;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
@@ -37,8 +38,7 @@
  * directly or as a pointer to a file provided with workflow.
  */
 public class ExecuteHiveQuery implements HiveAction {
-  private final static Logger LOG = Logger
-      .getLogger("com.linkedin.hive.azkaban.hive.actions.ExecuteHiveQuery");
+  private final static Logger logger = LoggerFactory.getLogger("com.linkedin.hive.azkaban.hive.actions.ExecuteHiveQuery");
   @AzkabanJobPropertyDescription("Verbatim query to execute. Can also specify hive.query.nn where nn is a series of padded numbers, which will be executed in order")
   public static final String HIVE_QUERY = "hive.query";
   @AzkabanJobPropertyDescription("File to load query from.  Should be in same zip.")
@@ -67,7 +67,7 @@ private String extractQueryFromFile(Properties properties)
     if (file == null)
       return null;
 
-    LOG.info("Attempting to read query from file: " + file);
+    logger.info("Attempting to read query from file: " + file);
 
     StringBuilder contents = new StringBuilder();
     BufferedReader br = null;
@@ -88,7 +88,7 @@ private String extractQueryFromFile(Properties properties)
         try {
           br.close();
         } catch (IOException e) {
-          LOG.info("IOException in close io stream, caused by: " + e);
+          logger.info("IOException in close io stream, caused by: " + e);
         }
     }
 
@@ -102,7 +102,7 @@ private String extractQueryFromURL(Properties properties)
     if (url == null)
       return null;
 
-    LOG.info("Attempting to retrieve query from URL: " + url);
+    logger.info("Attempting to retrieve query from URL: " + url);
 
     StringBuilder contents = new StringBuilder();
     BufferedReader br = null;
@@ -124,7 +124,7 @@ private String extractQueryFromURL(Properties properties)
         try {
           br.close();
         } catch (IOException e) {
-          LOG.info("IOException in close io stream, caused by: " + e);
+          logger.info("IOException in close io stream, caused by: " + e);
         }
     }
 
@@ -152,16 +152,16 @@ private String determineQuery(String singleLine, String multiLine,
           + HIVE_QUERY_URL + " in properties, not more than one. Exiting.");
 
     if (singleLine != null) {
-      LOG.info("Returning " + HIVE_QUERY + " = " + singleLine);
+      logger.info("Returning " + HIVE_QUERY + " = " + singleLine);
       return singleLine;
     } else if (multiLine != null) {
-      LOG.info("Returning consolidated " + HIVE_QUERY + ".nn = " + multiLine);
+      logger.info("Returning consolidated " + HIVE_QUERY + ".nn = " + multiLine);
       return multiLine;
     } else if (queryFromFile != null) {
-      LOG.info("Returning query from file " + queryFromFile);
+      logger.info("Returning query from file " + queryFromFile);
       return queryFromFile;
     } else {
-      LOG.info("Returning query from URL " + queryFromURL);
+      logger.info("Returning query from URL " + queryFromURL);
       return queryFromURL;
     }
   }
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/UpdateTableLocationToLatest.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/UpdateTableLocationToLatest.java
index 9e2c574..c50badc 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/UpdateTableLocationToLatest.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/UpdateTableLocationToLatest.java
@@ -24,7 +24,8 @@
 import com.webank.wedatasphere.schedulis.jobtype.hiveutils.util.AzkabanJobPropertyDescription;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -45,8 +46,7 @@
  */
 @AzkHiveAction(Constants.UPDATE_TABLE_LOCATION_TO_LATEST)
 public class UpdateTableLocationToLatest implements HiveAction {
-  private final static Logger LOG = Logger
-      .getLogger(UpdateTableLocationToLatest.class);
+  private final static Logger logger = LoggerFactory.getLogger(UpdateTableLocationToLatest.class);
 
   public static final String UPDATE_TABLE_LOCATION_TO_LATEST =
       Constants.UPDATE_TABLE_LOCATION_TO_LATEST;
@@ -87,7 +87,7 @@ public void execute() throws HiveViaAzkabanException {
       FileSystem fs = FileSystem.get(conf);
 
       for (int i = 0; i < tables.length; i++) {
-        LOG.info("Determining HQL commands for table " + tables[i]);
+        logger.info("Determining HQL commands for table " + tables[i]);
         hql.add(latestURI(fs, tablesLocations[i], tables[i]));
       }
       fs.close();
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/Utils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/Utils.java
index af61fd2..5f8c7c0 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/Utils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/hiveutils/azkaban/hive/actions/Utils.java
@@ -20,13 +20,14 @@
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
 import java.util.ArrayList;
 
 class Utils {
-  private final static Logger LOG = Logger.getLogger(Utils.class);
+  private final static Logger LOG = LoggerFactory.getLogger(Utils.class);
 
   static ArrayList fetchDirectories(FileSystem fs, String location,
       boolean returnFullPath) throws IOException, HiveViaAzkabanException {
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/AbstractHadoopJob.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/AbstractHadoopJob.java
index 1cdbd1a..fcd9688 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/AbstractHadoopJob.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/AbstractHadoopJob.java
@@ -43,7 +43,8 @@
 import org.apache.hadoop.mapred.TaskReport;
 import org.apache.hadoop.mapred.Mapper;
 import org.apache.hadoop.mapred.Reducer;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.utils.Props;
 import azkaban.utils.JSONUtils;
@@ -52,8 +53,7 @@
 import static org.apache.hadoop.security.UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION;
 
 public abstract class AbstractHadoopJob {
-  private static final Logger logger = Logger
-      .getLogger(AbstractHadoopJob.class);
+  private static final Logger logger = LoggerFactory.getLogger(AbstractHadoopJob.class);
 
   public static String COMMON_FILE_DATE_PATTERN = "yyyy-MM-dd-HH-mm";
   public static final String HADOOP_PREFIX = "hadoop-conf.";
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/FileUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/FileUtils.java
index 429be97..91f9fa1 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/FileUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/FileUtils.java
@@ -26,11 +26,12 @@
 import org.apache.commons.io.filefilter.AndFileFilter;
 import org.apache.commons.io.filefilter.FileFileFilter;
 import org.apache.commons.io.filefilter.WildcardFileFilter;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class FileUtils {
-  private static Logger logger = Logger.getLogger(FileUtils.class);
+  private static Logger logger = LoggerFactory.getLogger(FileUtils.class);
 
   /**
    * Delete file or directory.
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/HadoopUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/HadoopUtils.java
index 8a6fdc7..39923c9 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/HadoopUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/HadoopUtils.java
@@ -29,13 +29,14 @@
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapred.FileInputFormat;
 import org.apache.hadoop.mapred.JobConf;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.utils.Props;
 
 public class HadoopUtils {
 
-  private static final Logger logger = Logger.getLogger(HadoopUtils.class);
+  private static final Logger logger = LoggerFactory.getLogger(HadoopUtils.class);
 
   public static void setClassLoaderAndJar(JobConf conf, Class jobClass) {
     conf.setClassLoader(Thread.currentThread().getContextClassLoader());
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/JobUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/JobUtils.java
deleted file mode 100644
index 8f3de51..0000000
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/JobUtils.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2020 WeBank
- *
- * Licensed 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 com.webank.wedatasphere.schedulis.jobtype.javautils;
-
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-
-public class JobUtils {
-
-  public static Logger initJobLogger() {
-    Logger rootLogger = Logger.getRootLogger();
-    rootLogger.removeAllAppenders();
-    ConsoleAppender appender = new ConsoleAppender(new PatternLayout("%p %m\n"));
-    appender.activateOptions();
-    rootLogger.addAppender(appender);
-    return rootLogger;
-  }
-}
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/Whitelist.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/Whitelist.java
index 56bd7c8..5d034d8 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/Whitelist.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/javautils/Whitelist.java
@@ -23,7 +23,8 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import azkaban.flow.CommonJobProperties;
 import azkaban.utils.Props;
@@ -40,7 +41,7 @@ public class Whitelist {
   public static final String WHITE_LIST_FILE_PATH_KEY = "whitelist.file.path";
 
   private static final String PROXY_USER_KEY = "user.to.proxy";
-  private static Logger logger = Logger.getLogger(Whitelist.class);
+  private static Logger logger = LoggerFactory.getLogger(Whitelist.class);
 
   private final Set whitelistSet;
 
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/AzkabanDssJobType.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/AzkabanDssJobType.java
index 877484b..b97785e 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/AzkabanDssJobType.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/AzkabanDssJobType.java
@@ -28,7 +28,8 @@
 
 import com.webank.wedatasphere.schedulis.linkis.job.JobBuilder;
 import com.webank.wedatasphere.schedulis.linkis.log.AzkabanAppjointLog;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import java.util.Map;
 
 public class AzkabanDssJobType extends AbstractJob {
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/DataChecker.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/DataChecker.java
index f273ebc..64b9f74 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/DataChecker.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/DataChecker.java
@@ -18,7 +18,8 @@
 
 import com.webank.wedatasphere.schedulis.jobtype.connectors.druid.WBDataCheckerDao;
 import java.util.Properties;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DataChecker {
 	public final static String SOURCE_TYPE = "source.type";
@@ -31,8 +32,8 @@ public class DataChecker {
 	public final static String MASK_APP_TOKEN = "bdp.mask.app.token";
 
 	private Properties p;
-	private static final Logger logger = Logger.getRootLogger();
-	
+	private static final Logger logger = LoggerFactory.getLogger(DataChecker.class);
+
 	public DataChecker(String jobName, Properties p) {
 		this.p = p;
 	}
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/EventChecker.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/EventChecker.java
index 379a517..10100fa 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/EventChecker.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/EventChecker.java
@@ -18,7 +18,8 @@
 
 import com.webank.wedatasphere.schedulis.jobtype.connectors.druid.WBEventCheckerDao;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.lang.management.ManagementFactory;
 import java.util.Properties;
@@ -27,6 +28,8 @@
 
 import com.webank.wedatasphere.schedulis.eventcheck.AbstractEventCheck;
 import azkaban.utils.Props;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class EventChecker {
 	public final static String WAIT_TIME = "wait.time";
@@ -50,7 +53,7 @@ public class EventChecker {
 	private String jobId;
 	private WBEventCheckerDao wbDao=null;
 
-	private static final Logger logger = Logger.getRootLogger();
+	private static final Logger logger = LoggerFactory.getLogger(EventChecker.class);
 
 	public EventChecker(String jobName, Properties p) {
 		this.p = p;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/Export.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/Export.java
index a39ce26..6adc86b 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/Export.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/Export.java
@@ -16,7 +16,6 @@
 
 package com.webank.wedatasphere.schedulis.jobtype.util;
 
-import com.alibaba.fastjson.JSONObject;
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -28,7 +27,8 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Export {
 
@@ -41,7 +41,7 @@ public class Export {
 
   private Properties p;
 
-  private static final Logger logger = Logger.getRootLogger();
+  private static final Logger logger = LoggerFactory.getLogger(Export.class);
 
   public Export(String jobName, Properties p) {
     this.p = p;
@@ -125,16 +125,6 @@ private boolean checkParamMap(Properties p, String key) {
     return checkFlag;
   }
 
-  public boolean isJson(String content) {
-    try {
-      JSONObject jsonStr = JSONObject.parseObject(content);
-      logger.info("Message is Json Format ");
-      return true;
-    } catch (Exception e) {
-      logger.error("Message isn't Json Format ");
-      return false;
-    }
-  }
 
   /**
    * 从 HDFS 下载文件
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HiveExport.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HiveExport.java
index 2b3a2b9..dfb94cb 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HiveExport.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HiveExport.java
@@ -27,8 +27,9 @@
 import com.webank.wedatasphere.schedulis.jobtype.commons.LogGobbler;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.hadoop.util.Shell;
 
 public class HiveExport {
@@ -59,7 +60,7 @@ public class HiveExport {
 
   private Properties p;
 
-  private static final Logger logger = Logger.getRootLogger();
+  private static final Logger logger = LoggerFactory.getLogger(HiveExport.class);
 
   public HiveExport(Properties p) {
     this.p = p;
@@ -188,7 +189,7 @@ public static String executeHqlCommand(String cmd) throws Exception {
     try {
       result = Shell.execCommand(cmd);
     }catch(Exception e){
-      logger.info(e);
+      logger.info("", e);
       throw new Exception(e);
     }
     logger.info("Run Hive shell script result" + result);
@@ -210,11 +211,11 @@ public static void exeCmd(String cmd) throws Exception {
       final LogGobbler outputGobbler =
               new LogGobbler(
                       new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8),
-                      logger, Level.INFO, 30);
+                      logger, "INFO", 30);
       final LogGobbler errorGobbler =
               new LogGobbler(
                       new InputStreamReader(process.getErrorStream(), StandardCharsets.UTF_8),
-                      logger, Level.ERROR, 30);
+                      logger, "ERROR", 30);
       outputGobbler.start();
       errorGobbler.start();
       int exitCode = -1;
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HttpUtils.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HttpUtils.java
index 6cd4e8f..391033d 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HttpUtils.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/jobtype/util/HttpUtils.java
@@ -34,11 +34,12 @@
 import okhttp3.Response;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class HttpUtils {
 
-  private static final Logger logger = Logger.getLogger(HttpUtils.class);
+  private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class);
 
   /**
    * HTTP异步远程执行方法
diff --git a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/linkis/log/AzkabanAppjointLog.java b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/linkis/log/AzkabanAppjointLog.java
index f5abf0d..2aad0a2 100644
--- a/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/linkis/log/AzkabanAppjointLog.java
+++ b/azkaban-jobtype/src/main/java/com/webank/wedatasphere/schedulis/linkis/log/AzkabanAppjointLog.java
@@ -17,7 +17,8 @@
 package com.webank.wedatasphere.schedulis.linkis.log;
 
 import com.webank.wedatasphere.dss.linkis.node.execution.log.LinkisJobExecutionLog;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Created by peacewong on 2019/11/3.
@@ -34,16 +35,16 @@ public AzkabanAppjointLog(Logger log){
 
     @Override
     public void info(Object message, Throwable t) {
-        log.info(message, t);
+        log.info(message.toString(), t);
     }
 
     @Override
     public void warn(Object message, Throwable t) {
-        log.warn(message, t);
+        log.warn(message.toString(), t);
     }
 
     @Override
     public void error(Object message, Throwable t) {
-        log.error(message, t);
+        log.error(message.toString(), t);
     }
 }
diff --git a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsExecutionJar.java b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsExecutionJar.java
index d032fb7..7a1bf00 100644
--- a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsExecutionJar.java
+++ b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsExecutionJar.java
@@ -9,7 +9,8 @@
 import java.util.HashSet;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFilterCommands.java b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFilterCommands.java
index db308cf..724b8f8 100644
--- a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFilterCommands.java
+++ b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFilterCommands.java
@@ -6,7 +6,8 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.junit.Before;
 import org.junit.Test;
 
diff --git a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFindApplicationIdFromLog.java b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFindApplicationIdFromLog.java
index bcb6fb2..4025b10 100644
--- a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFindApplicationIdFromLog.java
+++ b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsFindApplicationIdFromLog.java
@@ -7,7 +7,8 @@
 import java.io.IOException;
 import java.util.Set;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsResolveJarSpec.java b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsResolveJarSpec.java
index 074a635..927b4d4 100644
--- a/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsResolveJarSpec.java
+++ b/azkaban-jobtype/src/test/java/azkaban/jobtype/TestHadoopJobUtilsResolveJarSpec.java
@@ -6,7 +6,8 @@
 import java.io.IOException;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.junit.Before;
 import org.junit.Test;
 
diff --git a/azkaban-jobtype/src/test/java/azkaban/jobtype/connectors/gobblin/TestGobblinHadoopJob.java b/azkaban-jobtype/src/test/java/azkaban/jobtype/connectors/gobblin/TestGobblinHadoopJob.java
index f537d93..a41c9d4 100644
--- a/azkaban-jobtype/src/test/java/azkaban/jobtype/connectors/gobblin/TestGobblinHadoopJob.java
+++ b/azkaban-jobtype/src/test/java/azkaban/jobtype/connectors/gobblin/TestGobblinHadoopJob.java
@@ -3,7 +3,7 @@
 
 public class TestGobblinHadoopJob {
 //  private static final String JOB_ID = "test_job_id";
-//  private static final Logger LOG = Logger.getLogger(TestGobblinHadoopJob.class);
+//  private static final Logger LOG = LoggerFactory.getLogger(TestGobblinHadoopJob.class);
 //
 //  @Test
 //  public void testPrintableJobProperties() {
diff --git a/azkaban-web-server/pom.xml b/azkaban-web-server/pom.xml
index c1f312c..f7cb822 100644
--- a/azkaban-web-server/pom.xml
+++ b/azkaban-web-server/pom.xml
@@ -20,26 +20,56 @@
             com.webank.wedatasphere.schedulis
             az-core
             ${schedulis.version}
+            
+                
+                    *
+                    *
+                
+            
         
         
             com.webank.wedatasphere.schedulis
             azkaban-common
             ${schedulis.version}
+            
+                
+                    *
+                    *
+                
+            
         
         
             com.webank.wedatasphere.schedulis
             azkaban-db
             ${schedulis.version}
+            
+                
+                    *
+                    *
+                
+            
         
         
             com.webank.wedatasphere.schedulis
             azkaban-spi
             ${schedulis.version}
+            
+                
+                    *
+                    *
+                
+            
         
         
             com.webank.wedatasphere.schedulis
             az-flow-trigger-dependency-plugin
             ${schedulis.version}
+            
+                
+                    *
+                    *
+                
+            
         
 
         
@@ -56,11 +86,51 @@
             com.linkedin.pegasus
             restli-server
             ${restli.version}
+            
+                
+                    jackson-core
+                    com.fasterxml.jackson.core
+                
+                
+                    netty
+                    org.jboss.netty
+                
+                
+                    commons-compress
+                    org.apache.commons
+                
+                
+                    jackson-core-asl
+                    org.codehaus.jackson
+                
+                
+                    jackson-mapper-asl
+                    org.codehaus.jackson
+                
+            
         
         
             com.linkedin.pegasus
             restli-tools
             ${restli.version}
+            
+                
+                    com.fasterxml.jackson.core
+                    jackson-databind
+                
+                
+                    jackson-core
+                    com.fasterxml.jackson.core
+                
+                
+                    log4j
+                    log4j
+                
+                
+                    slf4j-log4j12
+                    org.slf4j
+                
+            
         
         
             com.google.code.gson
@@ -76,7 +146,42 @@
             org.quartz-scheduler
             quartz
             ${quartz.version}
+            
+                
+                    c3p0
+                    c3p0
+                
+            
+        
+
+        
+            com.mchange
+            c3p0
+            ${c3p0.version}
+        
+        
+            commons-beanutils
+            commons-beanutils
+            ${commons-beanutils.version}
         
+        
+            org.apache.poi
+            poi
+            ${poi.version}
+        
+        
+            org.apache.poi
+            poi-ooxml-schemas
+            ${poi.version}
+        
+        
+            org.apache.poi
+            poi-ooxml
+            ${poi.version}
+        
+
+
+
         
             joda-time
             joda-time
@@ -122,21 +227,7 @@
             jetty-servlet
             ${jetty.version}
         
-        
-            org.eclipse.jetty
-            jetty-http
-            ${jetty.version}
-        
-        
-            org.eclipse.jetty
-            jetty-io
-            ${jetty.version}
-        
-        
-            org.eclipse.jetty
-            jetty-webapp
-            ${jetty.version}
-        
+
 
         
             commons-collections
@@ -147,6 +238,20 @@
             org.apache.commons
             commons-dbcp2
             ${commons.dbcp2.version}
+            
+                
+                    org.apache.struts
+                    struts-core
+                
+                
+                    org.apache.struts
+                    struts-taglib
+                
+                
+                    org.apache.struts
+                    struts-tiles
+                
+            
         
         
             commons-dbutils
@@ -179,20 +284,6 @@
             org.apache.velocity
             velocity
             ${velocity.version}
-            
-                
-                    org.apache.struts
-                    struts-core
-                
-                
-                    org.apache.struts
-                    struts-taglib
-                
-                
-                    org.apache.struts
-                    struts-tiles
-                
-            
         
         
             org.apache.velocity
@@ -211,6 +302,10 @@
                     org.apache.struts
                     struts-tiles
                 
+                
+                    commons-beanutils
+                    commons-beanutils
+                
             
         
         
@@ -228,6 +323,7 @@
             grizzly-framework
             2.3.32
         
+
         
             org.forgerock.commons
             i18n-slf4j
@@ -261,12 +357,6 @@
             test
         
 
-        
-            com.alibaba
-            fastjson
-            1.2.61
-        
-
         
             com.squareup.okhttp3
             okhttp
@@ -276,12 +366,64 @@
         
             com.alibaba
             easyexcel
-            1.1.1
+            2.2.3
+            
+                
+                    poi
+                    org.apache.poi
+                
+                
+                    poi-ooxml-schemas
+                    org.apache.poi
+                
+            
         
         
             com.webank.wedatasphere.dss
             dss-appjoint-auth
-            0.6.0
+            ${dss.version}
+            
+                
+                    jackson-annotations
+                    com.fasterxml.jackson.core
+                
+                
+                    jackson-core
+                    com.fasterxml.jackson.core
+                
+                
+                    jackson-databind
+                    com.fasterxml.jackson.core
+                
+                
+                    log4j
+                    log4j
+                
+                
+                    jetty-servlet
+                    org.eclipse.jetty
+                
+                
+                    commons-beanutils
+                    commons-beanutils
+                
+                
+                    ooxml-schemas
+                    org.apache.poi
+                
+                
+                    poi
+                    org.apache.poi
+                
+                
+                    poi-ooxml-schemas
+                    org.apache.poi
+                
+                
+                    poi-ooxml
+                    org.apache.poi
+                
+            
         
     
 
diff --git a/azkaban-web-server/src/bin/internal/internal-start-web.sh b/azkaban-web-server/src/bin/internal/internal-start-web.sh
index 4303c5d..41f7e6a 100644
--- a/azkaban-web-server/src/bin/internal/internal-start-web.sh
+++ b/azkaban-web-server/src/bin/internal/internal-start-web.sh
@@ -27,11 +27,14 @@ logFile=/appcom/logs/azkaban/webServerLog_`date +%F+%T`.out
 
 
 function preCheck(){
-  LOG INFO "checking AzkabanWebServer process status..."
-  if [ -f $azkaban_dir/currentpid ]
+  LOG INFO "checking AzkabanWebServer status..."
+  processName=`jps|grep AzkabanWebServer`
+  if [ -n "$processName" ]
   then
-    LOG INFO "AzkabanWebServer already started."
-    return 1
+      LOG INFO "AzkabanWebServer already started."
+      return 1
+  else
+      return 0
   fi
 }
 
@@ -80,8 +83,8 @@ function javaOption(){
     AZKABAN_OPTS="-Xmx16G -Xloggc:/appcom/logs/azkaban/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC"
   fi
   # Set the log4j configuration file
-  if [ -f $conf/log4j.properties ]; then
-    AZKABAN_OPTS="$AZKABAN_OPTS -Dlog4j.configuration=file:$conf/log4j.properties -Dlog4j.log.dir=/appcom/logs/azkaban"
+  if [ -f $conf/log4j2.xml ]; then
+    AZKABAN_OPTS="$AZKABAN_OPTS -Dlog4j.configurationFile=$conf/log4j2.xml"
   else
     LOG ERROR "$conf/log4j.properties file doesn't exist."
     return 1
@@ -99,7 +102,15 @@ function start(){
     LOG INFO "starting AzkabanWebServer..."
     java $AZKABAN_OPTS $JAVA_LIB_PATH -cp $CLASSPATH azkaban.webapp.AzkabanWebServer -conf $conf $cycle_stop $@ >> $logFile 2>&1 &
     echo $! > $azkaban_dir/currentpid
-    LOG INFO "AzkabanWebServer started successfully."
+    sleep 3s
+    processName=`jps|grep AzkabanWebServer`
+    if [ ! -n "$processName" ]
+    then
+        LOG INFO "AzkabanWebServer startup failed"
+        return 1
+    else
+        return 0
+    fi
 }
 
 function LOG(){
diff --git a/azkaban-web-server/src/conf/azkaban.properties b/azkaban-web-server/src/conf/azkaban.properties
index 7ab7398..52bad7a 100644
--- a/azkaban-web-server/src/conf/azkaban.properties
+++ b/azkaban-web-server/src/conf/azkaban.properties
@@ -31,6 +31,7 @@ jetty.use.ssl=false
 jetty.maxThreads=25
 jetty.ssl.port=8443
 jetty.port=8080
+jetty.send.server.version=false
 jetty.keystore=keystore/azkabanjetty.keystore
 jetty.password=hadoop
 jetty.keypassword=hadoop
@@ -65,6 +66,8 @@ lockdown.create.projects=false
 
 wtss.project.privilege.check=false
 
+department.maintainer.check.switch=true
+
 cache.directory=cache
 
 # JMX stats
@@ -82,6 +85,10 @@ ladp.port=2389
 azkaban.header.referer.url=https://
 nginx.ssl.module=close
 
+dss.secret=
+wtss.private.key=
+azkaban.ip.whiteList.enabled=false
+azkaban.ip.whiteList=
 
 #HA settings
 webserver.ha.model=false
diff --git a/azkaban-web-server/src/conf/log4j2.xml b/azkaban-web-server/src/conf/log4j2.xml
new file mode 100644
index 0000000..bfb7452
--- /dev/null
+++ b/azkaban-web-server/src/conf/log4j2.xml
@@ -0,0 +1,37 @@
+
+
+    
+        
+            
+            
+        
+        
+            
+            
+                
+                
+            
+            
+        
+        
+            
+            
+                
+                
+            
+            
+        
+    
+    
+        
+            
+            
+        
+        
+            
+        
+    
+
+
diff --git a/azkaban-web-server/src/main/java/azkaban/flowtrigger/FlowTriggerService.java b/azkaban-web-server/src/main/java/azkaban/flowtrigger/FlowTriggerService.java
index ce3fd76..9d256f6 100644
--- a/azkaban-web-server/src/main/java/azkaban/flowtrigger/FlowTriggerService.java
+++ b/azkaban-web-server/src/main/java/azkaban/flowtrigger/FlowTriggerService.java
@@ -26,6 +26,9 @@
 import azkaban.project.Project;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.time.Duration;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -43,8 +46,6 @@
 import java.util.stream.Collectors;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
diff --git a/azkaban-web-server/src/main/java/azkaban/flowtrigger/TriggerInstanceProcessor.java b/azkaban-web-server/src/main/java/azkaban/flowtrigger/TriggerInstanceProcessor.java
index 1338c64..56f8c10 100644
--- a/azkaban-web-server/src/main/java/azkaban/flowtrigger/TriggerInstanceProcessor.java
+++ b/azkaban-web-server/src/main/java/azkaban/flowtrigger/TriggerInstanceProcessor.java
@@ -27,6 +27,9 @@
 import azkaban.utils.Emailer;
 import azkaban.utils.Utils;
 import com.google.common.base.Preconditions;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
@@ -34,14 +37,13 @@
 import java.util.concurrent.Executors;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @Singleton
 @SuppressWarnings("FutureReturnValueIgnored")
 public class TriggerInstanceProcessor {
 
   private static final Logger logger = LoggerFactory.getLogger(TriggerInstanceProcessor.class);
+
   private static final String FAILURE_EMAIL_SUBJECT = "flow trigger for flow '%s', project '%s' "
       + "has been cancelled on %s";
   private final static int THREAD_POOL_SIZE = 32;
diff --git a/azkaban-web-server/src/main/java/azkaban/flowtrigger/database/JdbcFlowTriggerInstanceLoaderImpl.java b/azkaban-web-server/src/main/java/azkaban/flowtrigger/database/JdbcFlowTriggerInstanceLoaderImpl.java
index 8144cc1..a918991 100644
--- a/azkaban-web-server/src/main/java/azkaban/flowtrigger/database/JdbcFlowTriggerInstanceLoaderImpl.java
+++ b/azkaban-web-server/src/main/java/azkaban/flowtrigger/database/JdbcFlowTriggerInstanceLoaderImpl.java
@@ -49,15 +49,15 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.builder.EqualsBuilder;
 import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 @Singleton
 public class JdbcFlowTriggerInstanceLoaderImpl implements FlowTriggerInstanceLoader {
 
-  private static final Logger logger = LoggerFactory
-      .getLogger(JdbcFlowTriggerInstanceLoaderImpl.class);
+  private static final Logger logger = LoggerFactory.getLogger(JdbcFlowTriggerInstanceLoaderImpl.class);
+
   private static final String[] DEPENDENCY_EXECUTIONS_COLUMNS = {"trigger_instance_id", "dep_name",
       "starttime", "endtime", "dep_status", "cancelleation_cause", "project_id", "project_version",
       "flow_id", "flow_version", "flow_exec_id"};
diff --git a/azkaban-web-server/src/main/java/azkaban/flowtrigger/plugin/FlowTriggerDependencyPluginManager.java b/azkaban-web-server/src/main/java/azkaban/flowtrigger/plugin/FlowTriggerDependencyPluginManager.java
index af30d9f..9eb3a67 100644
--- a/azkaban-web-server/src/main/java/azkaban/flowtrigger/plugin/FlowTriggerDependencyPluginManager.java
+++ b/azkaban-web-server/src/main/java/azkaban/flowtrigger/plugin/FlowTriggerDependencyPluginManager.java
@@ -39,8 +39,8 @@
 import javax.inject.Singleton;
 import org.apache.commons.io.filefilter.WildcardFileFilter;
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 @Singleton
 public class FlowTriggerDependencyPluginManager {
@@ -49,8 +49,7 @@ public class FlowTriggerDependencyPluginManager {
   public static final String PRIVATE_CONFIG_FILE = "private.properties";
   public static final String DEPENDENCY_CLASS = "dependency.class";
   public static final String CLASS_PATH = "dependency.classpath";
-  private static final Logger logger = LoggerFactory
-      .getLogger(FlowTriggerDependencyPluginManager.class);
+  private static final Logger logger = LoggerFactory.getLogger(FlowTriggerDependencyPluginManager.class);
   private final String pluginDir;
   private final Map dependencyTypeMap;
   private final ClassLoader prevClassLoader;
diff --git a/azkaban-web-server/src/main/java/azkaban/flowtrigger/quartz/FlowTriggerScheduler.java b/azkaban-web-server/src/main/java/azkaban/flowtrigger/quartz/FlowTriggerScheduler.java
index 59ac61a..ad31dd2 100644
--- a/azkaban-web-server/src/main/java/azkaban/flowtrigger/quartz/FlowTriggerScheduler.java
+++ b/azkaban-web-server/src/main/java/azkaban/flowtrigger/quartz/FlowTriggerScheduler.java
@@ -36,14 +36,15 @@
 import java.util.Map;
 import javax.inject.Inject;
 import javax.inject.Singleton;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.quartz.JobDataMap;
 import org.quartz.JobDetail;
 import org.quartz.JobKey;
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
 import org.quartz.Trigger;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @Singleton
 public class FlowTriggerScheduler {
diff --git a/azkaban-web-server/src/main/java/azkaban/scheduler/QuartzScheduler.java b/azkaban-web-server/src/main/java/azkaban/scheduler/QuartzScheduler.java
index fb37741..443914c 100644
--- a/azkaban-web-server/src/main/java/azkaban/scheduler/QuartzScheduler.java
+++ b/azkaban-web-server/src/main/java/azkaban/scheduler/QuartzScheduler.java
@@ -24,6 +24,9 @@
 import java.util.List;
 import javax.inject.Inject;
 import javax.inject.Singleton;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.quartz.CronExpression;
 import org.quartz.CronScheduleBuilder;
 import org.quartz.JobBuilder;
@@ -35,8 +38,6 @@
 import org.quartz.Trigger.TriggerState;
 import org.quartz.TriggerBuilder;
 import org.quartz.impl.StdSchedulerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Manages Quartz schedules. Azkaban regards QuartzJob and QuartzTrigger as an one-to-one
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServer.java b/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServer.java
index 00edfd4..3669708 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServer.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServer.java
@@ -16,6 +16,52 @@
 
 package azkaban.webapp;
 
+import azkaban.executor.Status;
+import azkaban.server.HttpRequestUtils;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import com.linkedin.restli.server.RestliServlet;
+
+import joptsimple.internal.Strings;
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.jetty.io.EndPoint;
+import org.eclipse.jetty.server.HttpChannel;
+import org.eclipse.jetty.server.Request;
+import org.eclipse.jetty.server.handler.IPAccessHandler;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.apache.velocity.app.VelocityEngine;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.DefaultServlet;
+import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
+import org.joda.time.DateTimeZone;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.management.ManagementFactory;
+import java.lang.reflect.Constructor;
+import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.charset.StandardCharsets;
+import java.sql.SQLException;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.management.MBeanInfo;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.servlet.DispatcherType;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import static azkaban.ServiceProvider.SERVICE_PROVIDER;
 import static java.util.Objects.requireNonNull;
 
@@ -30,7 +76,6 @@
 import azkaban.executor.ExecutorManager;
 import azkaban.executor.ExecutorManagerAdapter;
 import azkaban.executor.ExecutorManagerException;
-import azkaban.executor.Status;
 import azkaban.flowtrigger.FlowTriggerService;
 import azkaban.flowtrigger.quartz.FlowTriggerScheduler;
 import azkaban.jmx.JmxExecutionController;
@@ -73,9 +118,6 @@
 import azkaban.webapp.servlet.StatsServlet;
 import azkaban.webapp.servlet.StatusServlet;
 import azkaban.webapp.servlet.TriggerManagerServlet;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.linkedin.restli.server.RestliServlet;
 import com.webank.wedatasphere.schedulis.common.executor.ExecutionCycle;
 import com.webank.wedatasphere.schedulis.common.executor.ExecutorManagerHA;
 import com.webank.wedatasphere.schedulis.common.jmx.JmxExecutorManagerAdapter;
@@ -83,17 +125,6 @@
 import com.webank.wedatasphere.schedulis.web.webapp.LocaleFilter;
 import com.webank.wedatasphere.schedulis.web.webapp.servlet.CycleServlet;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.management.ManagementFactory;
-import java.lang.reflect.Constructor;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.charset.StandardCharsets;
-import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.EnumSet;
@@ -101,23 +132,6 @@
 import java.util.Map;
 import java.util.TimeZone;
 import java.util.concurrent.CompletableFuture;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.management.MBeanInfo;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.servlet.DispatcherType;
-import joptsimple.internal.Strings;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.apache.log4j.jmx.HierarchyDynamicMBean;
-import org.apache.velocity.app.VelocityEngine;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.DefaultServlet;
-import org.eclipse.jetty.servlet.FilterHolder;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.joda.time.DateTimeZone;
 
 
 /**
@@ -143,7 +157,7 @@ public class AzkabanWebServer extends AzkabanServer {
   public static final String DEFAULT_CONF_PATH = "conf";
   private static final String AZKABAN_ACCESS_LOGGER_NAME =
       "azkaban.webapp.servlet.LoginAbstractAzkabanServlet";
-  private static final Logger logger = Logger.getLogger(AzkabanWebServer.class);
+  private static final Logger logger = LoggerFactory.getLogger(AzkabanWebServer.class);
   private static final int MAX_FORM_CONTENT_SIZE = 10 * 1024 * 1024;
   private static final String DEFAULT_TIMEZONE_ID = "default.timezone.id";
   private static final String DEFAULT_STATIC_DIR = "";
@@ -391,7 +405,7 @@ private static void loadViewerPlugins(final ServletContextHandler root, final St
             final URL url = files[i].toURI().toURL();
             urls.add(url);
           } catch (final MalformedURLException e) {
-            logger.error(e);
+            logger.error("MalformedURLException", e);
           }
         }
 
@@ -409,7 +423,7 @@ private static void loadViewerPlugins(final ServletContextHandler root, final St
                     final URL url = extLibFiles[i].toURI().toURL();
                     urls.add(url);
                   } catch (final MalformedURLException e) {
-                    logger.error(e);
+                    logger.error("MalformedURLException", e);
                   }
                 }
               } else { // extLibFile is a file
@@ -417,7 +431,7 @@ private static void loadViewerPlugins(final ServletContextHandler root, final St
                   final URL url = extLibFile.toURI().toURL();
                   urls.add(url);
                 } catch (final MalformedURLException e) {
-                  logger.error(e);
+                  logger.error("MalformedURLException", e);
                 }
               }
             } else {
@@ -460,8 +474,7 @@ private static void loadViewerPlugins(final ServletContextHandler root, final St
       try {//调用类的构造方法获取类实例
         obj = constructor.newInstance(pluginProps);
       } catch (final Exception e) {
-        logger.error(e);
-        logger.error(e.getCause());
+        logger.error("new instance failed", e);
       }
 
       if (!(obj instanceof AbstractAzkabanServlet)) {
@@ -530,7 +543,7 @@ private void prepareAndStartServer()
       this.server.start();
       logger.info("Server started");
     } catch (final Exception e) {
-      logger.warn(e);
+      logger.warn("serer start failed", e);
       Utils.croak(e.getMessage(), 1);
     }
   }
@@ -673,19 +686,19 @@ private void configureMBeanServer() {
 
     // Register Log4J loggers as JMX beans so the log level can be
     // updated via JConsole or Java VisualVM
-    final HierarchyDynamicMBean log4jMBean = new HierarchyDynamicMBean();
-    registerMbean("log4jmxbean", log4jMBean);
-    final ObjectName accessLogLoggerObjName =
-        log4jMBean.addLoggerMBean(AZKABAN_ACCESS_LOGGER_NAME);
-
-    if (accessLogLoggerObjName == null) {
-      logger.info(
-          "************* loginLoggerObjName is null, make sure there is a logger with name "
-              + AZKABAN_ACCESS_LOGGER_NAME);
-    } else {
-      logger.info("******** loginLoggerObjName: "
-          + accessLogLoggerObjName.getCanonicalName());
-    }
+//    final HierarchyDynamicMBean log4jMBean = new HierarchyDynamicMBean();
+//    registerMbean("log4jmxbean", log4jMBean);
+//    final ObjectName accessLogLoggerObjName =
+//        log4jMBean.addLoggerMBean(AZKABAN_ACCESS_LOGGER_NAME);
+//
+//    if (accessLogLoggerObjName == null) {
+//      logger.info(
+//          "************* loginLoggerObjName is null, make sure there is a logger with name "
+//              + AZKABAN_ACCESS_LOGGER_NAME);
+//    } else {
+//      logger.info("******** loginLoggerObjName: "
+//          + accessLogLoggerObjName.getCanonicalName());
+//    }
   }
 
   public void close() {
@@ -703,7 +716,7 @@ public void close() {
       this.server.stop();
     } catch (final Exception e) {
       // Catch all while closing server
-      logger.error(e);
+      logger.error("server stop failed", e);
     }
     this.server.destroy();
   }
@@ -730,7 +743,7 @@ public MBeanInfo getMBeanInfo(final ObjectName name) {
     try {
       return this.mbeanServer.getMBeanInfo(name);
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("getMBeanInfo failed", e);
       return null;
     }
   }
@@ -739,7 +752,7 @@ public Object getMBeanAttribute(final ObjectName name, final String attribute) {
     try {
       return this.mbeanServer.getAttribute(name, attribute);
     } catch (final Exception e) {
-      logger.error(e);
+      logger.error("getAttribute failed", e);
       return null;
     }
   }
@@ -801,6 +814,41 @@ private void configureRoutes() throws TriggerManagerException {
     getTriggerManager().start();
 
     root.setAttribute(Constants.AZKABAN_SERVLET_CONTEXT_KEY, this);
+
+    try {
+      if(this.props.getBoolean(ConfigurationKeys.IP_WHITELIST_ENABLED,false)){
+        String whiteListStr = this.props.getString(ConfigurationKeys.IP_WHITELIST, "");
+        String[] whiteListArr = whiteListStr.split(",");
+        IPAccessHandler ipAccessHandler = new IPAccessHandler(){
+          @Override
+          public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+            HttpChannel channel = baseRequest.getHttpChannel();
+            if (channel != null) {
+              EndPoint endp = channel.getEndPoint();
+              if (endp != null) {
+                InetSocketAddress address = endp.getRemoteAddress();
+                if("/executor".equals(baseRequest.getMetaData().getURI().getDecodedPath())
+                        && HttpRequestUtils.hasParam(request, "ajax")
+                        && "executeFlowCycleFromExecutor".equals(HttpRequestUtils.getParam(request,"ajax"))){
+                  if (address != null && !this.isAddrUriAllowed(address.getHostString(), baseRequest.getMetaData().getURI().getDecodedPath())) {
+                    logger.warn("Illegal access detected , ip >> {} , path >> {}",address.getHostString(),baseRequest.getMetaData().getURI());
+                    response.sendError(403);
+                    baseRequest.setHandled(true);
+                    return;
+                  }
+                }
+              }
+            }
+            this.getHandler().handle(target, baseRequest, request, response);
+          }
+        };
+        ipAccessHandler.setWhite(whiteListArr);
+        ipAccessHandler.setHandler(root);
+        server.setHandler(ipAccessHandler);
+      }
+    }catch (Exception e){
+      logger.error("setting Executor whiteList failed ,caused by {}" , e);
+    }
   }
 
   public AlerterHolder getAlerterHolder() {
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServerModule.java b/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServerModule.java
index 2162122..7bec065 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServerModule.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/AzkabanWebServerModule.java
@@ -22,7 +22,8 @@
 
 import com.webank.wedatasphere.schedulis.common.executor.ExecutorManagerHA;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.runtime.log.Log4JLogChute;
 import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
@@ -44,6 +45,8 @@
 import azkaban.scheduler.TriggerBasedScheduleLoader;
 import azkaban.utils.Props;
 
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 //import org.mortbay.jetty.Server;
 
 /**
@@ -53,7 +56,7 @@
  */
 public class AzkabanWebServerModule extends AbstractModule {
 
-  private static final Logger log = Logger.getLogger(AzkabanWebServerModule.class);
+  private static final Logger logger = LoggerFactory.getLogger(AzkabanWebServerModule.class);
   private static final String USER_MANAGER_CLASS_PARAM = "user.manager.class";
   private static final String VELOCITY_DEV_MODE_PARAM = "velocity.dev.mode";
   private final Props props;
@@ -125,8 +128,8 @@ public VelocityEngine createVelocityEngine(final Props props) {
     engine.setProperty("velocimacro.arguments.strict", true);
     engine.setProperty("runtime.log.invalid.references", devMode);
     engine.setProperty("runtime.log.logsystem.class", Log4JLogChute.class);
-    engine.setProperty("runtime.log.logsystem.log4j.logger",
-        Logger.getLogger("org.apache.velocity.Logger"));
+    // TODO: 2020/6/16 log
+    engine.setProperty("runtime.log.logsystem.log4j.logger", "velocity");
     engine.setProperty("parser.pool.size", 3);
     return engine;
   }
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/PluginCheckerAndActionsLoader.java b/azkaban-web-server/src/main/java/azkaban/webapp/PluginCheckerAndActionsLoader.java
index 1bd8bd8..cd4ad1c 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/PluginCheckerAndActionsLoader.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/PluginCheckerAndActionsLoader.java
@@ -21,17 +21,19 @@
 import azkaban.utils.Props;
 import azkaban.utils.PropsUtils;
 import azkaban.utils.Utils;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.log4j.Logger;
 
 public class PluginCheckerAndActionsLoader {
 
-  private static final Logger log = Logger.getLogger(PluginCheckerAndActionsLoader.class);
+  private static final Logger log = LoggerFactory.getLogger(PluginCheckerAndActionsLoader.class);
 
   public void load(final String pluginPath) {
     log.info("Loading plug-in checker and action types");
@@ -103,7 +105,7 @@ public void load(final String pluginPath) {
             final URL url = files[i].toURI().toURL();
             urls.add(url);
           } catch (final MalformedURLException e) {
-            log.error(e);
+            log.error("MalformedURLException", e);
           }
         }
         if (extLibClasspath != null) {
@@ -113,7 +115,7 @@ public void load(final String pluginPath) {
               final URL url = file.toURI().toURL();
               urls.add(url);
             } catch (final MalformedURLException e) {
-              log.error(e);
+              log.error("MalformedURLException", e);
             }
           }
         }
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java b/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
index 588cf76..cd926a8 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/StatusService.java
@@ -26,6 +26,9 @@
 import azkaban.executor.ExecutorManagerException;
 import azkaban.utils.Props;
 import com.google.common.io.Files;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import java.io.File;
@@ -35,13 +38,12 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @Singleton
 public class StatusService {
 
   private static final Logger log = LoggerFactory.getLogger(StatusService.class);
+
   private static final File PACKAGE_JAR = new File(
       StatusService.class.getProtectionDomain().getCodeSource().getLocation().getPath());
   private final ExecutorLoader executorLoader;
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/TriggerPluginLoader.java b/azkaban-web-server/src/main/java/azkaban/webapp/TriggerPluginLoader.java
index 960fd8b..999648a 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/TriggerPluginLoader.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/TriggerPluginLoader.java
@@ -33,14 +33,15 @@
 import java.util.List;
 import java.util.Map;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.apache.velocity.app.VelocityEngine;
 //import org.mortbay.jetty.servlet.Context;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 
 public class TriggerPluginLoader {
 
-  private static final Logger log = Logger.getLogger(TriggerPluginLoader.class);
+  private static final Logger log = LoggerFactory.getLogger(TriggerPluginLoader.class);
   private final String pluginPath;
 
   public TriggerPluginLoader(final Props props) {
@@ -122,7 +123,7 @@ public Map loadTriggerPlugins(final ServletContextHandler
             final URL url = files[i].toURI().toURL();
             urls.add(url);
           } catch (final MalformedURLException e) {
-            log.error(e);
+            log.error(e.getMessage(), e);
           }
         }
         if (extLibClasspath != null) {
@@ -132,7 +133,7 @@ public Map loadTriggerPlugins(final ServletContextHandler
               final URL url = file.toURI().toURL();
               urls.add(url);
             } catch (final MalformedURLException e) {
-              log.error(e);
+              log.error(e.getMessage(), e);
             }
           }
         }
@@ -172,7 +173,7 @@ public Map loadTriggerPlugins(final ServletContextHandler
             constructor.newInstance(pluginName, pluginProps, root,
                 azkabanWebServer);
       } catch (final Exception e) {
-        log.error(e);
+        log.error(e.getMessage(), e);
       }
 
       if (!(obj instanceof TriggerPlugin)) {
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/WebServerProvider.java b/azkaban-web-server/src/main/java/azkaban/webapp/WebServerProvider.java
index 23d1623..47f0910 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/WebServerProvider.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/WebServerProvider.java
@@ -23,12 +23,12 @@
 import azkaban.utils.Props;
 import javax.inject.Inject;
 import com.google.inject.Provider;
-import java.util.List;
-import org.apache.log4j.Logger;
 //import org.mortbay.jetty.Connector;
 //import org.mortbay.jetty.Server;
 //import org.mortbay.jetty.bio.SocketConnector;
 //import org.mortbay.jetty.security.SslSocketConnector;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.eclipse.jetty.server.*;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
@@ -36,8 +36,9 @@
 
 public class WebServerProvider implements Provider {
 
-  private static final Logger logger = Logger.getLogger(WebServerProvider.class);
+  private static final Logger logger = LoggerFactory.getLogger(WebServerProvider.class);
   private static final int MAX_HEADER_BUFFER_SIZE = 10 * 1024 * 1024;
+  private static final boolean JETTY_SEND_SERVER_VERSION = false;
 
   @Inject
   private Props props;
@@ -85,6 +86,7 @@ private ServerConnector createHttpConnector(Server server) {
 
     HttpConfiguration httpConfig = new HttpConfiguration();
     setHeaderBufferSize(httpConfig);
+    setSendServerVersion(httpConfig);
 
     int port = this.props.getInt("jetty.port", Constants.DEFAULT_PORT_NUMBER);
     String bindAddress = this.props.getString("jetty.hostname", "0.0.0.0");
@@ -120,6 +122,11 @@ private void setHeaderBufferSize(HttpConfiguration configuration) {
     configuration.setRequestHeaderSize(MAX_HEADER_BUFFER_SIZE);
   }
 
+  private void setSendServerVersion(HttpConfiguration configuration) {
+    final boolean sendServerVersion = props.getBoolean("jetty.send.server.version", JETTY_SEND_SERVER_VERSION);
+    configuration.setSendServerVersion(sendServerVersion);
+  }
+
   private ServerConnector createHttpsConnector(Server jettyServer) {
 
     SslContextFactory sslContextFactory = new SslContextFactory();
@@ -133,6 +140,7 @@ private ServerConnector createHttpsConnector(Server jettyServer) {
 
     HttpConfiguration httpConfig = new HttpConfiguration();
     setHeaderBufferSize(httpConfig);
+    setSendServerVersion(httpConfig);
     httpConfig.addCustomizer(new SecureRequestCustomizer());
     final int port = this.props.getInt("jetty.ssl.port", Constants.DEFAULT_SSL_PORT_NUMBER);
 
diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
index 899ea49..d3a8e15 100644
--- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
+++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ExecutorServlet.java
@@ -57,8 +57,7 @@
 import azkaban.webapp.WebMetrics;
 import azkaban.webapp.plugin.PluginRegistry;
 import azkaban.webapp.plugin.ViewerPlugin;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+
 import com.webank.wedatasphere.schedulis.common.executor.ExecutionCycle;
 import com.webank.wedatasphere.schedulis.common.executor.ExecutionRecover;
 import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils;
@@ -69,6 +68,7 @@
 import com.webank.wedatasphere.schedulis.common.system.entity.WtssUser;
 import com.webank.wedatasphere.schedulis.common.user.SystemUserManager;
 import com.webank.wedatasphere.schedulis.common.utils.AlertUtil;
+import com.webank.wedatasphere.schedulis.common.utils.GsonUtils;
 import com.webank.wedatasphere.schedulis.common.utils.LogErrorCodeFilterUtils;
 import java.io.File;
 import java.io.FileInputStream;
@@ -98,16 +98,20 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.reflect.TypeToken;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.MapUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringEscapeUtils;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 import org.joda.time.LocalDate;
 import org.joda.time.format.DateTimeFormat;
 import org.joda.time.format.DateTimeFormatter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 public class ExecutorServlet extends LoginAbstractAzkabanServlet {
@@ -454,8 +458,9 @@ private void ajaxUpdateQueueProcessor(final HttpServletRequest req, final HttpSe
     private void ajaxFetchscheduledflowgraphNew(final String projectName, final String flowName,
         final HashMap ret, final User user) throws ServletException {
         final Project project = getProjectAjaxByPermission(ret, projectName, user, Type.EXECUTE);
+        Map stringStringMap = loadExecutorServletI18nData();
         if (project == null) {
-            ret.put("error", "Project '" + projectName + "' doesn't exist.");
+            ret.put("error", stringStringMap.get("permissionForAction") + projectName);
             return;
         }
         try {
@@ -1387,14 +1392,14 @@ private void ajaxDisableJob(final HttpServletRequest req, final HttpServletRespo
         }
         String response = null;
         try {
-            JSONObject request = HttpRequestUtils.parseRequestToJsonObject(req);
-            response = this.executorManagerAdapter.setJobDisabled(exFlow, user.getUserId(), request.toJSONString());
+            JsonObject request = HttpRequestUtils.parseRequestToJsonObject(req);
+            response = this.executorManagerAdapter.setJobDisabled(exFlow, user.getUserId(), request.toString());
             if(response == null){
                 ret.put("error", "Request Failed");
             }
-            JSONObject result = JSONObject.parseObject(response);
-            if (result.containsKey("error")) {
-                ret.put("error", result.getString("error"));
+            JsonObject result = new JsonParser().parse(response).getAsJsonObject();
+            if (result.has("error")) {
+                ret.put("error", result.get("error").getAsString());
             }
         } catch (final Exception e) {
             ret.put("error", e.getMessage());
@@ -1411,14 +1416,14 @@ private void ajaxRetryFailedJobs(final HttpServletRequest req, final HttpServlet
         }
         String response = null;
         try {
-            JSONObject request = HttpRequestUtils.parseRequestToJsonObject(req);
-            response = this.executorManagerAdapter.retryFailedJobs(exFlow, user.getUserId(), request.toJSONString());
+            JsonObject request = HttpRequestUtils.parseRequestToJsonObject(req);
+            response = this.executorManagerAdapter.retryFailedJobs(exFlow, user.getUserId(), request.toString());
             if(response == null){
                 ret.put("error", "Request Failed");
             }
-            JSONObject result = JSONObject.parseObject(response);
-            if (result.containsKey("error")) {
-                ret.put("error", result.getString("error"));
+            JsonObject result = new JsonParser().parse(response).getAsJsonObject();
+            if (result.has("error")) {
+                ret.put("error", result.get("error").getAsString());
             }
         } catch (final Exception e) {
             ret.put("error", e.getMessage());
@@ -1435,14 +1440,14 @@ private void ajaxSkipFailedJobs(final HttpServletRequest req, final HttpServletR
         }
         String response = null;
         try {
-            JSONObject request = HttpRequestUtils.parseRequestToJsonObject(req);
-            response = this.executorManagerAdapter.skipFailedJobs(exFlow, user.getUserId(), request.toJSONString());
+            JsonObject request = HttpRequestUtils.parseRequestToJsonObject(req);
+            response = this.executorManagerAdapter.skipFailedJobs(exFlow, user.getUserId(), request.toString());
             if(response == null){
                 ret.put("error", "Request Failed");
             }
-            JSONObject result = JSONObject.parseObject(response);
-            if (result.containsKey("error")) {
-                ret.put("error", result.getString("error"));
+            JsonObject result = new JsonParser().parse(response).getAsJsonObject();
+            if (result.has("error")) {
+                ret.put("error", result.get("error").getAsString());
             }
         } catch (final Exception e) {
             ret.put("error", e.getMessage());
@@ -1697,8 +1702,8 @@ private void ajaxExecuteFlow(final HttpServletRequest req,
     */
     private void executeAllFlow(final HttpServletRequest req, final HttpServletResponse resp,
         final HashMap ret, final User user) throws ServletException {
-        JSONObject request = HttpRequestUtils.parseRequestToJsonObject(req);
-        String projectName = request.getString("project");
+        JsonObject request = HttpRequestUtils.parseRequestToJsonObject(req);
+        String projectName = request.get("project").getAsString();
         Project project = getProjectAjaxByPermission(ret, projectName, user, Type.EXECUTE);
         Map dataMap = loadExecutorServletI18nData();
 
@@ -1726,7 +1731,7 @@ private void executeAllFlow(final HttpServletRequest req, final HttpServletRespo
     }
 
     private boolean execFlow(Project project, Flow flow, Map ret,
-        JSONObject request, User user, StringBuilder msg) throws ServletException{
+                             JsonObject request, User user, StringBuilder msg) throws ServletException{
 
         ret.put("flow", flow.getId());
 
@@ -1766,30 +1771,30 @@ private boolean execFlow(Project project, Flow flow, Map ret,
         exflow.setOtherOption(otherOptions);
 
         //设置通用告警级别
-        if (request.containsKey("failureAlertLevel")) {
-            otherOptions.put("failureAlertLevel", request.get("failureAlertLevel"));
+        if (request.has("failureAlertLevel")) {
+            otherOptions.put("failureAlertLevel", request.get("failureAlertLevel").getAsString());
         }
-        if (request.containsKey("successAlertLevel")) {
-            otherOptions.put("successAlertLevel", request.get("successAlertLevel"));
+        if (request.has("successAlertLevel")) {
+            otherOptions.put("successAlertLevel", request.get("successAlertLevel").getAsString());
         }
 
         //---超时告警设置---
         boolean useTimeoutSetting = false;
-        if(request.containsKey("useTimeoutSetting")) {
-            useTimeoutSetting = request.getBoolean("useTimeoutSetting");
+        if(request.has("useTimeoutSetting")) {
+            useTimeoutSetting = request.get("useTimeoutSetting").getAsBoolean();
         }
         final List slaOptions = new ArrayList<>();
         if (useTimeoutSetting) {
             String emailStr = "";
-            if(request.containsKey("slaEmails")){
-                emailStr = request.getString("slaEmails");
+            if(request.has("slaEmails")){
+                emailStr = request.get("slaEmails").getAsString();
             }
             final String[] emailSplit = emailStr.split("\\s*,\\s*|\\s*;\\s*|\\s+");
             final List slaEmails = Arrays.asList(emailSplit);
             Map settings = new HashMap<>();
             try {
-                if(request.containsKey( "settings")){
-                    settings = (Map)request.get("settings");
+                if(request.has( "settings")){
+                    settings = GsonUtils.jsonToJavaObject(request.getAsJsonObject("settings"), new TypeToken>() {}.getType());
                 }
             } catch (Exception e){
                 logger.error("没有找到超时告警信息");
@@ -1818,10 +1823,10 @@ private boolean execFlow(Project project, Flow flow, Map ret,
 
         //设置flowType
         //对于单次执行,假如提交的json中含有cycleErrorOption,表示是循环执行,需要设置flowType为4; 设置cycleOption
-        if (request.containsKey("cycleErrorOption")) {
+        if (request.has("cycleErrorOption")) {
             exflow.setFlowType(4);
             HashMap cycleOption = new HashMap<>();
-            cycleOption.put("cycleErrorOption", (String) request.get("cycleErrorOption"));
+            cycleOption.put("cycleErrorOption", request.get("cycleErrorOption").getAsString());
             exflow.setCycleOption(cycleOption);
         }
 
@@ -1834,7 +1839,7 @@ private boolean execFlow(Project project, Flow flow, Map ret,
             final String message = this.executorManagerAdapter.submitExecutableFlow(exflow, user.getUserId());
             msg.append(String.format("Success, flow:%s, execId:%s .
", flow.getId(), exflow.getExecutionId())); } catch (final Exception e) { - logger.error("submit executableFlow failed, " + e); + logger.error("submit executableFlow failed, ", e); msg.append(String.format("Error, flow:%s, msg:%s .
", flow.getId(), e.getMessage())); return false; } @@ -1874,11 +1879,11 @@ private void ajaxExecuteFlow(final HttpServletRequest req, final HttpServletResp try { wtssUser = transitionService.getSystemUserByUserName(user.getUserId()); } catch (SystemUserManagerException e){ - logger.error("get wtssUser failed, caused by: " + e); + logger.error("get wtssUser failed, caused by: ", e); } if(wtssUser != null && wtssUser.getProxyUsers() != null) { String[] proxySplit = wtssUser.getProxyUsers().split("\\s*,\\s*"); - logger.info("add proxyUsers," + JSON.toJSONString(proxySplit)); + logger.info("add proxyUsers," + ArrayUtils.toString(proxySplit)); exflow.addAllProxyUsers(Arrays.asList(proxySplit)); } @@ -2070,13 +2075,13 @@ private void recursionFindNode(List executableNodes, Map ret, User user) throws ServletException { - JSONObject json = HttpRequestUtils.parseRequestToJsonObject(req); + JsonObject json = HttpRequestUtils.parseRequestToJsonObject(req); if (json == null) { - json = new JSONObject(); + json = new JsonObject(); String projectName = getParam(req, "project"); String flowId = getParam(req, "flow"); - json.put("project", projectName); - json.put("flow", flowId); + json.addProperty("project", projectName); + json.addProperty("flow", flowId); } Optional> validateCycleFlowRes = validateCycleFlowParams(json, user, ret); if (!validateCycleFlowRes.isPresent()) { @@ -2141,9 +2146,9 @@ private void ajaxSubmitCycleFlow(HttpServletRequest req, HttpServletResponse res } } - private Optional> validateCycleFlowParams(JSONObject json, User user, Map ret) { - final String projectName = json.getString("project"); - final String flowId = json.getString("flow"); + private Optional> validateCycleFlowParams(JsonObject json, User user, Map ret) { + final String projectName = json.get("project").getAsString(); + final String flowId = json.get("flow").getAsString(); final Project project = getProjectAjaxByPermission(ret, projectName, user, Type.EXECUTE); if (project == null) { logger.error("Project '" + projectName + "' doesn't exist."); @@ -2346,30 +2351,26 @@ private ExecutableFlow ajaxRepeatExecuteFlow(final Map reqMap, f * @param jsonObject 开始时间,结束时间,执行间隔 * @return 按照时间执行顺序返回一个时间参数集合 */ - private Map repeatDateCompute(final JSONObject jsonObject) { + private Map repeatDateCompute(final JsonObject jsonObject) { Map repeatOptionMap = new HashMap<>(); List> repeatTimeList = new LinkedList<>(); Set timeList = new HashSet<>(); - List runDateTimeList = jsonObject.getJSONArray("runDateTimeList").toJavaList(Long.class); + List runDateTimeList = GsonUtils.jsonToJavaObject(jsonObject.getAsJsonArray("runDateTimeList"), new TypeToken>() {}.getType()); timeList.addAll(runDateTimeList); try { -// String month = getParam(req, "month"); -// String day = getParam(req, "day"); -// String hour = "0";//getParam(req, "hour"); -// String min = "0";//getParam(req, "min"); - String recoverNum = jsonObject.getString("recoverNum"); - String recoverInterval = jsonObject.getString("recoverInterval"); + String recoverNum = jsonObject.get("recoverNum").getAsString(); + String recoverInterval = jsonObject.get("recoverInterval").getAsString(); - final String begin = jsonObject.getString("begin"); + final String begin = jsonObject.get("begin").getAsString(); final long beginTimeLong = DateTimeFormat.forPattern(FILTER_BY_REPEAT_DATE_PATTERN_NEW).parseDateTime(begin).getMillis(); repeatOptionMap.put("recoverStartTime", beginTimeLong); - final String end = jsonObject.getString("end"); + final String end = jsonObject.get("end").getAsString(); final long endTimeLong = DateTimeFormat.forPattern(FILTER_BY_REPEAT_DATE_PATTERN_NEW).parseDateTime(end).getMillis(); diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java index 1ebd8e8..aa902f1 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/FlowTriggerInstanceServlet.java @@ -37,14 +37,16 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; + +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; public class FlowTriggerInstanceServlet extends LoginAbstractAzkabanServlet { private static final long serialVersionUID = 1L; - private static final Logger logger = Logger.getLogger(FlowTriggerInstanceServlet.class); + private static final Logger logger = LoggerFactory.getLogger(FlowTriggerInstanceServlet.class); private FlowTriggerService triggerService; private ProjectManager projectManager; diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/HistoryServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/HistoryServlet.java index 39b880b..67e1de3 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/HistoryServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/HistoryServlet.java @@ -27,7 +27,6 @@ import azkaban.utils.Utils; import azkaban.utils.WebUtils; import azkaban.webapp.AzkabanWebServer; -import com.alibaba.fastjson.JSON; import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; import com.webank.wedatasphere.schedulis.common.jobExecutor.utils.SystemBuiltInParamJodeTimeUtils; import com.webank.wedatasphere.schedulis.common.system.SystemManager; @@ -48,13 +47,14 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.joda.time.LocalDateTime; import org.joda.time.format.DateTimeFormat; public class HistoryServlet extends LoginAbstractAzkabanServlet { - private static final Logger logger = Logger.getLogger(HistoryServlet.class); + private static final Logger logger = LoggerFactory.getLogger(HistoryServlet.class); private static final String FILTER_BY_DATE_PATTERN = "MM/dd/yyyy hh:mm aa"; private static final String EMPRY_ADVANCED_FILTER = "0-1"; private static final long serialVersionUID = 1L; @@ -183,7 +183,7 @@ private void handleHistoryPage(final HttpServletRequest req, final HttpServletRe final long endTime = "".equals(end) ? -1 : DateTimeFormat.forPattern(FILTER_BY_DATE_PATTERN).parseDateTime(end).getMillis(); //添加权限判断 admin 用户能查看所有flow历史 user用户只能查看自己的flow历史 - logger.info("userRoleSet value=" + JSON.toJSONString(userRoleSet)); + logger.info("userRoleSet value=" + userRoleSet.toString()); if(userRoleSet.contains("admin")){ List tempData = this.executorManagerAdapter.getExecutableFlows(projContain, flowContain, execIdcontain, userContain, status, beginTime, endTime, (pageNum - 1) * pageSize, pageSize, flowType); @@ -255,7 +255,7 @@ private void handleHistoryPage(final HttpServletRequest req, final HttpServletRe } } } catch (final ExecutorManagerException e) { - logger.error("find flow executed history error,caused by:" + e); + logger.error("find flow executed history error,caused by:", e); page.add("error", e.getMessage()); } } else if (hasParam(req, "search") && StringUtils.isNotBlank(getParam(req, "searchterm").trim())) { @@ -282,7 +282,7 @@ private void handleHistoryPage(final HttpServletRequest req, final HttpServletRe history = this.executorManagerAdapter.getUserExecutableFlows((pageNum - 1) * pageSize, pageSize, user.getUserId()); } } catch (final ExecutorManagerException e) { - logger.error("find flow by role error,caused by:" + e); + logger.error("find flow by role error,caused by:", e); } } if(null != history && !history.isEmpty()){ @@ -760,7 +760,7 @@ private void handleHistoryPage(final HttpServletRequest req, total = this.executorManagerAdapter.getUserExecHistoryTotal(userMap); } } catch (final ExecutorManagerException e) { - logger.error("find flow by role error,caused by:" + e); + logger.error("find flow by role error,caused by:", e); } } //计算RunDate日期 @@ -779,7 +779,7 @@ private void handleHistoryPage(final HttpServletRequest req, try { executableFlow.setUpdateTime(Long.parseLong(runDatestr)); } catch (Exception e) { - logger.error("rundate convert failed (String to long)" + runDatestr + "{}"+e); + logger.error("rundate convert failed (String to long) {}", runDatestr, e); }finally { executableFlow.setUpdateTime(0); executableFlow.getOtherOption().put("run_date",runDatestr); @@ -826,7 +826,7 @@ private void handleHistoryPage(final HttpServletRequest req, historyInfo.put("runDate", executableFlow.getUpdateTime()== 0 ? executableFlow.getOtherOption().get("run_date") : webUtils.formatRunDate(executableFlow.getUpdateTime())); }catch (Exception e) { - logger.error("put rundate failed" + "{}" + e); + logger.error("put rundate failed", e); } historyInfo.put("difftime", Utils.formatDuration(executableFlow.getStartTime(), executableFlow.getEndTime())); historyInfo.put("status", executableFlow.getStatus()); diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/JMXHttpServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/JMXHttpServlet.java index b90ac72..014d328 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/JMXHttpServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/JMXHttpServlet.java @@ -33,7 +33,9 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; + +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; /** * Limited set of jmx calls for when you cannot attach to the jvm @@ -45,7 +47,7 @@ public class JMXHttpServlet extends LoginAbstractAzkabanServlet implements Conne */ private static final long serialVersionUID = 1L; - private static final Logger logger = Logger.getLogger(JMXHttpServlet.class.getName()); + private static final Logger logger = LoggerFactory.getLogger(JMXHttpServlet.class.getName()); private AzkabanWebServer server; private ExecutorManagerAdapter executorManagerAdapter; @@ -99,7 +101,7 @@ protected void handleGet(final HttpServletRequest req, final HttpServletResponse ret.put("attributes", info.getAttributes()); ret.put("description", info.getDescription()); } catch (final Exception e) { - logger.error(e); + logger.error("", e); ret.put("error", "'" + mbeanName + "' is not a valid mBean name"); } } else { @@ -117,7 +119,7 @@ protected void handleGet(final HttpServletRequest req, final HttpServletResponse final Object obj = this.server.getMBeanAttribute(name, attribute); ret.put("value", obj); } catch (final Exception e) { - logger.error(e); + logger.error("", e); ret.put("error", "'" + mbeanName + "' is not a valid mBean name"); } } @@ -140,7 +142,7 @@ protected void handleGet(final HttpServletRequest req, final HttpServletResponse ret.put("attributes", attributes); } catch (final Exception e) { - logger.error(e); + logger.error("", e); ret.put("error", "'" + mbeanName + "' is not a valid mBean name"); } } diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java index 39fde1e..3811fe4 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java @@ -37,6 +37,7 @@ import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; import com.webank.wedatasphere.schedulis.common.system.SystemManager; import com.webank.wedatasphere.schedulis.common.user.SystemUserManager; +import com.webank.wedatasphere.schedulis.common.utils.RSAUtils; import com.webank.wedatasphere.schedulis.common.utils.XSSFilterUtils; import java.io.BufferedInputStream; import java.io.File; @@ -58,7 +59,8 @@ import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.ObjectUtils; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; /** * Abstract Servlet that handles auto login when the session hasn't been verified. @@ -67,7 +69,7 @@ public abstract class LoginAbstractAzkabanServlet extends AbstractAzkabanServlet private static final long serialVersionUID = 1L; - private static final Logger logger = Logger.getLogger(LoginAbstractAzkabanServlet.class.getName()); + private static final Logger logger = LoggerFactory.getLogger("LoginAccessLogger"); private static final String SESSION_ID_NAME = "azkaban.browser.session.id"; private static final int DEFAULT_UPLOAD_DISK_SPOOL_SIZE = 20 * 1024 * 1024; @@ -136,7 +138,7 @@ protected void doGet(final HttpServletRequest req, final HttpServletResponse res } if("/api/v1/redirect".equals(req.getRequestURI())){ - logger.info("ingore the auth of DSS request: {}" + req.getRequestURI()); + logger.info("ingore the auth of DSS request: {}", req.getRequestURI()); handleDssRequest(req,resp,session); } @@ -155,7 +157,7 @@ protected void doGet(final HttpServletRequest req, final HttpServletResponse res } } if (logger.isDebugEnabled() && session != null) { - logger.debug("Found session " + session.getUser()); + logger.debug("Found session {}", session.getUser()); } if (handleFileGet(req, resp)) { return; @@ -358,8 +360,8 @@ private void handleDssRequest(final HttpServletRequest req, final HttpServletRes RedirectMsg redirectMsg = appJointAuth.getRedirectMsg(req); String redirectUrl = redirectMsg.getRedirectUrl(); String username = redirectMsg.getUser(); - logger.info("Succeed to get redirect url: {}, and username: {}" + redirectUrl + "," + username); - // 通过用户名,完成无密码登录(将用户信息写入HttpSession) + logger.info("Succeed to get redirect url: {}, and username: {}", redirectUrl, username); + // 通过用户名,在你的系统完成无密码登录(将用户信息写入HttpSession) if(session == null){ handleDssLoginAction(username, req,resp); } @@ -434,11 +436,36 @@ protected void doPost(final HttpServletRequest req, final HttpServletResponse re final String password = (String) params.get("userpwd"); final String ip = getRealClientIpAddr(req); - try { - session = createSession(username, password, ip); - } catch (final UserManagerException e) { - writeResponse(resp, "Login error: " + e.getMessage()); - return; + String wtss_secret_de = props.getString("dss.secret", ""); + String wtss_private_key = props.getString("wtss.private.key", ""); + String from_dss_secret_de = ""; + if(params.containsKey("dss_secret")){ + String from_dss_secret_en = (String)params.get("dss_secret"); + logger.info("handle dss login , secret > {}" , from_dss_secret_en); + try { + if(from_dss_secret_en!=null){ + from_dss_secret_en = from_dss_secret_en.replaceAll(" ","+"); + } + from_dss_secret_de = RSAUtils.decrypt(from_dss_secret_en,wtss_private_key); + } catch (Exception e) { + logger.error("parse dss.secret failed , caused by {} " , e); + } + } + if(wtss_secret_de.equals(from_dss_secret_de)){ + logger.info("handle dss login , dss_secret pass check" ); + try{ + session = createSession(username, password, ip, wtss_secret_de); + } catch(final Exception e){ + writeResponse(resp, "Login error: " + e.getMessage()); + return; + } + }else{ + try { + session = createSession(username, password, ip); + } catch (final UserManagerException e) { + writeResponse(resp, "Login error: " + e.getMessage()); + return; + } } } handleMultiformPost(req, resp, params, session); @@ -515,8 +542,61 @@ private Session createDssSession(final String username, final HttpServletRequest private Session createSession(final HttpServletRequest req) throws UserManagerException, ServletException, IOException { final String username = getParam(req, "username"); - final String password = getParam(req, "userpwd"); + String password = getParam(req, "userpwd"); + + final Props props = this.application.getServerProps(); + + if (hasParam(req, "encryption") && "true".equals(getParam(req, "encryption"))){ + String wtss_private_key = props.getString("wtss.private.key", ""); + logger.debug("encryption is enable , decode password {}" , password); + try { + if(password!=null){ + password = password.replaceAll(" ","+"); + } + password = RSAUtils.decrypt(password,wtss_private_key); + } catch (Exception e) { + throw new RuntimeException("parse encryption secret info failed , caused by {} " + e.getMessage()); + } + } + final String ip = getRealClientIpAddr(req); + + try{ + String wtss_secret_de = props.getString("dss.secret", ""); + String wtss_private_key = props.getString("wtss.private.key", ""); + String from_dss_secret_de = ""; + if(hasParam(req, "dss_secret")){ + String from_dss_secret_en = (String)getParam(req, "dss_secret"); + logger.debug("handle dss login , secret > {}" , from_dss_secret_en); + try { + if(from_dss_secret_en!=null){ + from_dss_secret_en = from_dss_secret_en.replaceAll(" ","+"); + } + from_dss_secret_de = RSAUtils.decrypt(from_dss_secret_en,wtss_private_key); + } catch (Exception e) { + throw new RuntimeException("parse dss.secret failed , caused by " , e); + } + } + + if(wtss_secret_de.equals(from_dss_secret_de)){ + logger.debug("handle dss login , dss_secret pass check" ); + //如果超级用户用户名和密码都是对的,那么我们直接放行 + if(!StringUtils.isFromBrowser(req.getHeader("User-Agent"))){ + logger.info("not browser."); + Session cacheSession = this.application.getSessionCache().getSessionByUsername(username); + if(cacheSession != null){ + logger.info("session not found."); + return cacheSession; + } + } + Session newSession = createSession(username, password, ip, wtss_secret_de); + getApplication().getSessionCache().addSession(newSession); + return newSession; + } + }catch(final Exception e){ + logger.error("no super user", e); + //没有超级用户,直接ignore + } return createSession(username, password, ip, req); } @@ -554,6 +634,26 @@ private Session createSession(final String username, final String password, fina return session; } + + private Session createSession(final String username, final String password, final String ip, + final String superUser) throws UserManagerException{ + + UserManager manager = getApplication().getTransitionService().getUserManager(); + if (manager instanceof SystemUserManager){ + //不改接口,直接改SystemUserManager,这样做到少侵入 + SystemUserManager userManager = (SystemUserManager)manager; + final User user = userManager.getUser(username, password, superUser); + logger.info("User is {}", user.toString()); + final String uuid = UUID.randomUUID().toString(); + return new Session(uuid, user, ip); + }else{ + logger.warn("user manager 不是 WebankXmlUserManager 实例,不能进行创建session"); + return null; + } + } + + + protected boolean hasPermission(final Project project, final User user, final Permission.Type type) { if (project.hasPermission(user, type)) { return true; @@ -599,6 +699,11 @@ protected void handleAjaxLoginAction(final HttpServletRequest req, ret.put("error", "Login in error. " + e.getMessage()); return; } + if (null == session){ + logger.error("session is null"); + ret.put("error","Login in error, session is null."); + return; + } final Cookie cookie = new Cookie(SESSION_ID_NAME, session.getSessionId()); cookie.setPath("/"); if("open".equals(nginxSSL)) { @@ -646,7 +751,7 @@ protected void handleDssLoginAction(String username,final HttpServletRequest req try { session = createDssSession(username,req); } catch (final UserManagerException | IOException e) { - logger.error("Dss Login in error. " + e.getMessage()); + logger.error("Dss Login in error.", e); return; } if (null == session){ @@ -656,9 +761,9 @@ protected void handleDssLoginAction(String username,final HttpServletRequest req final Cookie cookie = new Cookie(SESSION_ID_NAME, session.getSessionId()); cookie.setPath("/"); resp.addCookie(cookie); - logger.info("session.id {} " + session.getSessionId()); + logger.info("session.id {} ", session.getSessionId()); } else { - logger.error("Login in error,invalid username {}" + username); + logger.error("Login in error,invalid username {}", username); } } @@ -671,7 +776,7 @@ protected void writeResponse(final HttpServletResponse resp, final String respon protected boolean isAjaxCall(final HttpServletRequest req) throws ServletException { final String value = req.getHeader("X-Requested-With"); if (value != null) { - logger.info("has X-Requested-With " + value); + logger.info("has X-Requested-With {}", value); return value.equals("XMLHttpRequest"); } final String ajaxString = req.getParameter("ajax"); diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/NoteServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/NoteServlet.java index dfbfb41..6e14055 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/NoteServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/NoteServlet.java @@ -21,6 +21,8 @@ import azkaban.user.Permission.Type; import azkaban.user.User; import azkaban.webapp.AzkabanWebServer; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; import java.io.IOException; import java.util.HashMap; @@ -29,12 +31,11 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; public class NoteServlet extends LoginAbstractAzkabanServlet { private static final long serialVersionUID = 1L; - private static final Logger logger = Logger.getLogger(NoteServlet.class); + private static final Logger logger = LoggerFactory.getLogger(NoteServlet.class); public static String type = null; public static String message = null; diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java index 91a9da6..0c2cba7 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java @@ -89,7 +89,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.joda.time.LocalDateTime; import org.quartz.SchedulerException; @@ -98,8 +99,7 @@ public class ProjectManagerServlet extends LoginAbstractAzkabanServlet { private static final String APPLICATION_ZIP_MIME_TYPE = "application/zip"; private static String RE_SPACE = "(\u0020|\u3000)"; private static final long serialVersionUID = 1; - private static final Logger logger = Logger - .getLogger(ProjectManagerServlet.class); + private static final Logger logger = LoggerFactory.getLogger(ProjectManagerServlet.class); private static final NodeLevelComparator NODE_LEVEL_COMPARATOR = new NodeLevelComparator(); private static final String LOCKDOWN_CREATE_PROJECTS_KEY = "lockdown.create.projects"; @@ -420,6 +420,9 @@ private void handleAJAXAction(final HttpServletRequest req, }else if (ajaxName.equals("checkRunningPageKillFlowPermission")) { // 检查用户Kill运行中的工作流权限 ajaxCheckRunningPageKillFlowPermission(req, resp, ret, session); + } else if (ajaxName.equals("checkUserSwitchScheduleFlowPermission")) { + // 检查用户开启或关闭定时调度权限 + ajaxcheckUserSwitchScheduleFlowPermission(req, resp, ret, session); } else { ret.put("error", "Cannot execute command " + ajaxName); } @@ -560,7 +563,7 @@ private int checkUserOperatorFlag(User user) { } } } catch (SystemUserManagerException e) { - logger.error("系统用户信息不存在." + e); + logger.error("系统用户信息不存在.", e); } } return operatorFlag; @@ -700,6 +703,7 @@ private void ajaxCheckUserDeleteScheduleFlowPermission(HttpServletRequest req, H final User user = session.getUser(); if (wtss_project_privilege_check) { int deleteScheduleFlowFlag = checkUserOperatorFlag(user); + resultMap.put("deleteScheduleFlowFlag", deleteScheduleFlowFlag); logger.info("current user delete schedule flow permission flag is deleteScheduleFlowFlag=" + deleteScheduleFlowFlag); } else { resultMap.put("deleteScheduleFlowFlag", 1); @@ -892,6 +896,59 @@ private void ajaxCheckDeleteScheduleInDescriptionFlagPermission(HttpServletReque } + /** + * 检查用户开启或关闭定时调度权限 + * + * @param req + * @param resp + * @param resultMap + * @param session wtss_project_privilege_check + */ + private void ajaxcheckUserSwitchScheduleFlowPermission(HttpServletRequest req, HttpServletResponse resp, + HashMap resultMap, Session session) { + + try { + if (session != null) { + final String projectName = getParam(req, "project"); + final User user = session.getUser(); + final Project project = getProjectAjaxByPermission(resultMap, projectName, user, Type.SCHEDULE); + Map stringStringMap = loadProjectManagerServletI18nData(); + if (project == null) { + resultMap.put("error", stringStringMap.get("permissionForAction") + projectName); + resultMap.put("switchScheduleFlowFlag", 3); + return; + } + if (wtss_project_privilege_check) { + int switchScheduleFlowFlag = checkUserOperatorFlag(user); + resultMap.put("switchScheduleFlowFlag", switchScheduleFlowFlag); + logger.info("current user active schedule flow permission flag is switchScheduleFlowFlag=" + switchScheduleFlowFlag); + } else { + resultMap.put("switchScheduleFlowFlag", 1); + } + } + } catch (Exception e) { + logger.error("Failed to find current user active schedule flow flow permission flag, caused by:{}", e); + } + } + + protected Project getProjectAjaxByPermission(final Map ret, final String projectName, + final User user, final Permission.Type type) { + final Project project = this.projectManager.getProject(projectName); + + Map dataMap = loadProjectManagerServletI18nData(); + + if (project == null) { + ret.put("error", dataMap.get("project") + projectName + dataMap.get("notExist")); + } else if (!hasPermission(project, user, type)) { + ret.put("error", "User " + user.getUserId() + " doesn't have " + project.getName() + " of " + type.name() + + " permissions, please contact with the project creator."); + } else { + return project; + } + + return null; + } + /** * 检查用户KILL正在运行页面flow权限 * @@ -1417,7 +1474,7 @@ private void ajaxFetchProjectSchedules(final Project project, final HashMap ret, final User user) throws ServletException { - JSONObject request = HttpRequestUtils.parseRequestToJsonObject(req); - String projectName = request.getString("project"); + JsonObject request = HttpRequestUtils.parseRequestToJsonObject(req); + String projectName = request.get("project").getAsString(); final Project project = this.projectManager.getProject(projectName); Map dataMap = loadScheduleServletI18nData(); if (project == null) { @@ -941,7 +944,7 @@ private void ajaxScheduleCronAllFlow(final HttpServletRequest req, ret.put("message", sb.toString()); } - private boolean scheduleAllFlow(Project project, Flow flow, Map ret, JSONObject json, User user, StringBuilder msg) throws ServletException { + private boolean scheduleAllFlow(Project project, Flow flow, Map ret, JsonObject json, User user, StringBuilder msg) throws ServletException { final String projectName = project.getName(); final String flowName = flow.getId(); final int projectId = project.getId(); @@ -952,7 +955,7 @@ private boolean scheduleAllFlow(Project project, Flow flow, Map try { hasFlowTrigger = this.projectManager.hasFlowTrigger(project, flow); } catch (final Exception ex) { - logger.error(ex); + logger.error(ex.getMessage(), ex); msg.append(String.format("Error, looking for flow trigger of flow: %s.%s.
", projectName, flowName)); return false; @@ -970,10 +973,10 @@ private boolean scheduleAllFlow(Project project, Flow flow, Map String cronExpression = null; try { - if (json.containsKey("cronExpression")) { + if (json.has("cronExpression")) { // everything in Azkaban functions is at the minute granularity, so we add 0 here // to let the expression to be complete. - cronExpression = json.getString("cronExpression"); + cronExpression = json.get("cronExpression").getAsString(); if (azkaban.utils.Utils.isCronExpressionValid(cronExpression, timezone) == false) { ret.put("error", "Error," + dataMap.get("thisExpress") + cronExpression + dataMap.get("outRuleQuartz") + "
"); return false; @@ -985,19 +988,21 @@ private boolean scheduleAllFlow(Project project, Flow flow, Map } } catch (final Exception e) { msg.append(e.getMessage() + "
"); - logger.error(e); + logger.error(e.getMessage(), e); return false; } - final long endSchedTime = (Long) json.getOrDefault("endSchedTime", - Constants.DEFAULT_SCHEDULE_END_EPOCH_TIME); + long endSchedTime = Constants.DEFAULT_SCHEDULE_END_EPOCH_TIME; + if(json.has("endSchedTime")){ + endSchedTime = json.get("endSchedTime").getAsLong(); + } ExecutionOptions flowOptions = null; try { flowOptions = HttpRequestUtils.parseFlowOptions(json); HttpRequestUtils.filterAdminOnlyFlowParams(flowOptions, user); } catch (final Exception e) { - logger.error(e); + logger.error(e.getMessage(), e); } //设置其他参数配置 Map otherOptions = new HashMap<>(); @@ -1010,19 +1015,21 @@ private boolean scheduleAllFlow(Project project, Flow flow, Map otherOptions.put("jobSkipFailedOptions", jobSkipList); //设置通用告警级别 - if (json.containsKey("failureAlertLevel")) { - otherOptions.put("failureAlertLevel", json.getString("failureAlertLevel")); + if (json.has("failureAlertLevel")) { + otherOptions.put("failureAlertLevel", json.get("failureAlertLevel").getAsString()); } - if (json.containsKey("successAlertLevel")) { - otherOptions.put("successAlertLevel", json.getString("successAlertLevel")); + if (json.has("successAlertLevel")) { + otherOptions.put("successAlertLevel", json.get("successAlertLevel").getAsString()); } + otherOptions.put("activeFlag", true); + try { //设置告警用户部门信息 String userDep = transitionService.getUserDepartmentByUsername(user.getUserId()); otherOptions.put("alertUserDeparment", userDep); } catch (SystemUserManagerException e) { - logger.error("setting department info failed, " + e.getMessage()); + logger.error("setting department info failed, " , e); msg.append("setting department info failed.
"); return false; } @@ -1083,7 +1090,7 @@ private void ajaxScheduleCronFlow(final HttpServletRequest req, try { hasFlowTrigger = this.projectManager.hasFlowTrigger(project, flow); } catch (final Exception ex) { - logger.error(ex); + logger.error(ex.getMessage(), ex); ret.put("status", "error"); ret.put("message", String.format("Error looking for flow trigger of flow: %s.%s ", projectName, flowName)); @@ -1202,7 +1209,7 @@ private void ajaxScheduleCronFlow(final HttpServletRequest req, String userDep = transitionService.getUserDepartmentByUsername(user.getUserId()); otherOptions.put("alertUserDeparment", userDep); } catch (SystemUserManagerException e) { - logger.error("setting department info failed, " + e.getMessage()); + logger.error("setting department info failed, ", e); ret.put("status", "failed"); ret.put("message", "setting department info failed."); return; diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatsServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatsServlet.java index a73bfda..48db139 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatsServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatsServlet.java @@ -24,6 +24,8 @@ import azkaban.user.User; import azkaban.utils.Pair; import azkaban.webapp.AzkabanWebServer; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; import java.io.IOException; import java.util.Collection; @@ -36,14 +38,13 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; /** * User facing servlet for Azkaban default metric display */ public class StatsServlet extends LoginAbstractAzkabanServlet { - private static final Logger logger = Logger.getLogger(StatsServlet.class); + private static final Logger logger = LoggerFactory.getLogger(StatsServlet.class); private static final long serialVersionUID = 1L; private ExecutorManagerAdapter execManagerAdapter; diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatusServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatusServlet.java index 3514eec..791a7d4 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatusServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/StatusServlet.java @@ -21,13 +21,14 @@ import azkaban.webapp.StatusService; import com.google.gson.GsonBuilder; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class StatusServlet extends HttpServlet { diff --git a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/TriggerManagerServlet.java b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/TriggerManagerServlet.java index 6b97088..c680777 100644 --- a/azkaban-web-server/src/main/java/azkaban/webapp/servlet/TriggerManagerServlet.java +++ b/azkaban-web-server/src/main/java/azkaban/webapp/servlet/TriggerManagerServlet.java @@ -22,6 +22,8 @@ import azkaban.trigger.TriggerManagerException; import azkaban.user.User; import azkaban.webapp.AzkabanWebServer; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import com.webank.wedatasphere.schedulis.common.i18nutils.LoadJsonUtils; import java.io.IOException; import java.util.HashMap; @@ -31,13 +33,12 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; public class TriggerManagerServlet extends LoginAbstractAzkabanServlet { + private static final Logger logger = LoggerFactory.getLogger(TriggerManagerServlet.class); + private static final long serialVersionUID = 1L; - private static final Logger logger = Logger - .getLogger(TriggerManagerServlet.class); private TriggerManager triggerManager; @Override diff --git a/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/LocaleFilter.java b/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/LocaleFilter.java index 16f5c78..eb5a990 100644 --- a/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/LocaleFilter.java +++ b/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/LocaleFilter.java @@ -26,11 +26,12 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class LocaleFilter implements Filter { - private static final Logger logger = Logger.getLogger(LocaleFilter.class.getName()); + private static final Logger logger = LoggerFactory.getLogger(LocaleFilter.class.getName()); @Override public void init(FilterConfig filterConfig) throws ServletException { @@ -88,7 +89,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo req.getSession().setAttribute("TRANS_I18N_LOCALE", languageType); LoadJsonUtils.setLanguageType(languageType); } catch (Exception e) { - logger.error("a fatal error had happen when init locale"); + logger.error("a fatal error had happen when init locale languageType, caused by:" , e); LoadJsonUtils.setLanguageType("zh_CN"); } } diff --git a/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/error/SessionFilter.java b/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/error/SessionFilter.java index ea8a808..b6fa48a 100644 --- a/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/error/SessionFilter.java +++ b/azkaban-web-server/src/main/java/com/webank/wedatasphere/schedulis/web/webapp/error/SessionFilter.java @@ -23,7 +23,8 @@ import java.util.Map; import java.util.Map.Entry; import javax.servlet.FilterConfig; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.ServletException; @@ -41,7 +42,7 @@ public class SessionFilter extends HttpServlet implements Filter { private static final long serialVersionUID = 831349987977760012L; static ServletRequest request; private String url; - private static final Logger logger = Logger.getLogger(SessionFilter.class); + private static final Logger logger = LoggerFactory.getLogger(SessionFilter.class); public static final String NEW_SESSION_INDICATOR = "com.filter.NewSessionFilter"; static HttpServletRequest request2 = (HttpServletRequest) request; diff --git a/azkaban-web-server/src/restli/java/azkaban/restli/ProjectManagerResource.java b/azkaban-web-server/src/restli/java/azkaban/restli/ProjectManagerResource.java index 0cc0d6e..a9b71a1 100644 --- a/azkaban-web-server/src/restli/java/azkaban/restli/ProjectManagerResource.java +++ b/azkaban-web-server/src/restli/java/azkaban/restli/ProjectManagerResource.java @@ -41,14 +41,14 @@ import java.util.Map; import javax.servlet.ServletException; import org.apache.commons.io.FileUtils; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; import org.quartz.SchedulerException; @RestLiActions(name = "project", namespace = "azkaban.restli") public class ProjectManagerResource extends ResourceContextHolder { - private static final Logger logger = Logger - .getLogger(ProjectManagerResource.class); + private static final Logger logger = LoggerFactory.getLogger(ProjectManagerResource.class); public AzkabanWebServer getAzkaban() { return AzkabanWebServer.getInstance(); diff --git a/azkaban-web-server/src/restli/java/azkaban/restli/UserManagerResource.java b/azkaban-web-server/src/restli/java/azkaban/restli/UserManagerResource.java index 58649d5..085e709 100644 --- a/azkaban-web-server/src/restli/java/azkaban/restli/UserManagerResource.java +++ b/azkaban-web-server/src/restli/java/azkaban/restli/UserManagerResource.java @@ -27,13 +27,13 @@ import com.linkedin.restli.server.resources.ResourceContextHolder; import java.util.UUID; import javax.servlet.ServletException; -import org.apache.log4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; @RestLiActions(name = "user", namespace = "azkaban.restli") public class UserManagerResource extends ResourceContextHolder { - private static final Logger logger = Logger - .getLogger(UserManagerResource.class); + private static final Logger logger = LoggerFactory.getLogger(UserManagerResource.class); public AzkabanWebServer getAzkaban() { return AzkabanWebServer.getInstance(); diff --git a/azkaban-web-server/src/web/js/azkaban/util/schedule.js b/azkaban-web-server/src/web/js/azkaban/util/schedule.js index 6d9d5d7..9b43513 100644 --- a/azkaban-web-server/src/web/js/azkaban/util/schedule.js +++ b/azkaban-web-server/src/web/js/azkaban/util/schedule.js @@ -105,6 +105,56 @@ function editScheduleClick(scheduleId, projectName, flowName, cronExpression) { } +// 定时调度页面, 定时调度工作流列表, 对显示的调度任务点击调度开启关闭 +function switchScheduleClick (index, scheduleId, projectName, flowName, cronExpression) { + + // 需要校验是否具有修改项目调度权限 1:允许, 2:不允许 + var requestURL = "/manager?ajax=checkUserSwitchScheduleFlowPermission&project=" + projectName; + $.ajax({ + url: requestURL, + type: "get", + async: false, + dataType: "json", + success: function (data) { + if (data["switchScheduleFlowFlag"] == 1) { + console.log("click switch schedule button."); + var currentActiveFlag = document.getElementById("schedules-tbody").rows[index].cells[8].innerHTML; + console.log("currentActiveFlag=" + currentActiveFlag); + var destActiveFlag = false; + if (currentActiveFlag == "false") { + destActiveFlag = true; + } + + var scheduleActiveData = { + scheduleId: scheduleId, + ajax: "setScheduleActiveFlag", + activeFlag: destActiveFlag + }; + + var scheduleURL = "/schedule" + var successHandler = function (data) { + if (data.error) { + alert(data.error); + } else { + // 触发变更就行, 不是刷新所有页面 + scheduleListView.handlePageChange(); + } + }; + $.post(scheduleURL, scheduleActiveData, successHandler, "json"); + } else if (data["switchScheduleFlowFlag"] == 2) { + $('#user-operator-schedule-flow-permit-panel').modal(); + $('#title-user-operator-schedule-flow-permit').text(wtssI18n.view.scheduleActivePermission); + $('#body-user-operator-schedule-flow-permit').html(wtssI18n.view.noScheSwitchConfigPermission); + } else if(data["switchScheduleFlowFlag"] == 3){ + $('#user-operator-schedule-flow-permit-panel').modal(); + $('#title-user-operator-schedule-flow-permit').text(wtssI18n.view.scheduleActivePermission); + $('#body-user-operator-schedule-flow-permit').html(data.error); + } + } + }); + +} + $(function () { scheduleView = new azkaban.ScheduleView({ diff --git a/azkaban-web-server/src/web/js/azkaban/view/history-recover.js b/azkaban-web-server/src/web/js/azkaban/view/history-recover.js index 75ce040..fd7c6dd 100644 --- a/azkaban-web-server/src/web/js/azkaban/view/history-recover.js +++ b/azkaban-web-server/src/web/js/azkaban/view/history-recover.js @@ -178,7 +178,7 @@ function HistoryRecoverExecute(executingData) { function repeatFlow(recoverData) { executeURL = contextURL + "/executor?ajax=repeatCollection"; - + recoverData.disabled = JSON.parse(recoverData.disabled); $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", diff --git a/azkaban-web-server/src/web/js/azkaban/view/schedule-flow-edit-dialog.js b/azkaban-web-server/src/web/js/azkaban/view/schedule-flow-edit-dialog.js index 3582829..9f03006 100644 --- a/azkaban-web-server/src/web/js/azkaban/view/schedule-flow-edit-dialog.js +++ b/azkaban-web-server/src/web/js/azkaban/view/schedule-flow-edit-dialog.js @@ -302,29 +302,35 @@ azkaban.FlowScheduleDialogView = Backbone.View.extend({ }; var self = this; var successHandler = function (data) { - console.log("data fetched"); - graphModel.addFlow(data); + if (data.error) { + $('#user-operator-schedule-flow-permit-panel').modal(); + $('#title-user-operator-schedule-flow-permit').text(wtssI18n.view.scheduleConfigPermission); + $('#body-user-operator-schedule-flow-permit').html(data.error); + } else { + console.log("data fetched"); + graphModel.addFlow(data); - if (exgraph) { - self.assignInitialStatus(data, exgraph); - } + if (exgraph) { + self.assignInitialStatus(data, exgraph); + } - // Auto disable jobs that are finished. - disableFinishedJobs(data); - executingSvgGraphView = new azkaban.SvgGraphView({ - el: $('#schedule-flow-executing-graph'), - model: graphModel, - render: false, - rightClick: { - "node": expanelNodeClickCallback, - "edge": expanelEdgeClickCallback, - "graph": expanelGraphClickCallback - }, - tooltipcontainer: "#schedule-svg-div-custom" - }); + // Auto disable jobs that are finished. + disableFinishedJobs(data); + executingSvgGraphView = new azkaban.SvgGraphView({ + el: $('#schedule-flow-executing-graph'), + model: graphModel, + render: false, + rightClick: { + "node": expanelNodeClickCallback, + "edge": expanelEdgeClickCallback, + "graph": expanelGraphClickCallback + }, + tooltipcontainer: "#schedule-svg-div-custom" + }); - if (callback) { - callback.call(this); + if (callback) { + callback.call(this); + } } }; $.get(requestURL, requestData, successHandler, "json"); diff --git a/bin/config/wtss-web/web_plugin_system.properties b/bin/config/wtss-web/web_plugin_system.properties index 8963828..ff20b08 100644 --- a/bin/config/wtss-web/web_plugin_system.properties +++ b/bin/config/wtss-web/web_plugin_system.properties @@ -7,6 +7,9 @@ viewer.servlet.class=azkaban.viewer.system.SystemServlet wtss.db.jdbc.url=[#SYSTEM_DB_URL] wtss.db.username=[#SYSTEM_DB_USERNAME] wtss.db.password=[#SYSTEM_DB_PASSWORD] +esb.app.domain=[#ESB_APP_URL] +esb.app.id= +esb.app.token= diff --git a/pom.xml b/pom.xml index 5161549..f755685 100755 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ 2.0.1 3.2.2 4.1 - 1.16.1 + 1.20 1.3.1 2.1.1 1.5 @@ -44,54 +44,70 @@ 2.6 2.1.1 3.0.2 - 2.8.1 + 2.8.6 4.1.0 28.1-jre 1.4.193 4.5.3 - 0.10.0.0 3.0 2.10.0 2.14.0 - 5.1.48 + 8.0.18 3.1.0 1.4.5 - 9.4.24.v20191120 + 9.4.30.v20200611 1.9.13 4.3 2.0 4.3 3.0.2 0.11.0 - 1.7.18 + 1.7.30 1.15.7 - 0.10.0.0 2.2.1 1.18 1.6.1 1.7 2.0 3.0.0 - 0.0.4-SNAPSHOT + 3.0.0 + 2.13.3 + 4.1.2 + 0.9.5.5 + 1.9.4 + 2.11.2 + 0.7.0 - org.apache.commons - commons-lang3 - ${commons.lang3.version} + com.google.code.gson + gson + ${gson.version} + + + org.apache.logging.log4j + log4j-core + ${log4j-api.version} + + + + org.apache.logging.log4j + log4j-api + ${log4j-api.version} + + org.slf4j slf4j-api ${slf4j.version} - org.slf4j - slf4j-log4j12 - ${slf4j.version} + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j-api.version} - com.google.inject guice @@ -127,12 +143,17 @@ ${awaitility.version} test + + org.forgerock.opendj + opendj-core + ${opendjcore.version} + + com.jcraft jsch 0.1.55 - commons-collections commons-collections @@ -148,12 +169,45 @@ commons-lang ${common.lang.version} - org.apache.commons commons-lang3 ${commons.lang3.version} + + io.jsonwebtoken + jjwt + 0.9.1 + + + jackson-annotations + com.fasterxml.jackson.core + + + jackson-core + com.fasterxml.jackson.core + + + jackson-databind + com.fasterxml.jackson.core + + + + + com.fasterxml.jackson.core + jackson-databind + ${fasterxml.jackson.version} + + + com.fasterxml.jackson.core + jackson-core + ${fasterxml.jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${fasterxml.jackson.version} +