Browse Source

only kerberos startup and sql task type is hive or spark

pull/2/head
qiaozhanwei 5 years ago
parent
commit
b6eb215779
  1. 5
      escheduler-api/src/main/java/cn/escheduler/api/service/DataSourceService.java

5
escheduler-api/src/main/java/cn/escheduler/api/service/DataSourceService.java

@ -522,7 +522,10 @@ public class DataSourceService extends BaseService{
parameterMap.put(Constants.JDBC_URL, jdbcUrl);
parameterMap.put(Constants.USER, userName);
parameterMap.put(Constants.PASSWORD, password);
parameterMap.put(Constants.PRINCIPAL,principal);
if (CommonUtils.getKerberosStartupState() &&
(type == DbType.HIVE || type == DbType.SPARK)){
parameterMap.put(Constants.PRINCIPAL,principal);
}
if (other != null && !"".equals(other)) {
Map map = JSONObject.parseObject(other, new TypeReference<LinkedHashMap<String, String>>() {
});

Loading…
Cancel
Save