Skip to content

Commit 27a3098

Browse files
HanTang1det101
authored andcommitted
add notes in English
1 parent bdba82f commit 27a3098

File tree

8 files changed

+20
-17
lines changed

8 files changed

+20
-17
lines changed

dss-server/src/main/java/com/webank/wedatasphere/dss/server/constant/DSSServerConstant.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public class DSSServerConstant {
2424
public static final String DSS_PROJECT_SOURCE = "create by user";
2525
public static final String DSS_WORKSPACE_SOURCE = "create by user";
2626
public static final String PROJECT_VERSION_ID = "projectVersionID";
27-
public static final String PUBLISH_FLOW_REPORT_FORMATE = "工作流名:%s,版本号:%s,工作流内容为空,请自行修改或者删除";
27+
public static final String PUBLISH_FLOW_REPORT_FORMATE = "the workflow name is% s, the version number is% s, and the workflow content is empty. Please modify or delete it by yourself";
2828
public static final String EMVEDDEDFLOWID = "\"embeddedFlowId\":";
2929
public static final String VERSION_FORMAT = "%06d";
3030
public static final String VERSION_PREFIX = "v";
31-
public static final String SUPER_USER_LOGIN_ERROR = "没有创建权限,请使用超级用户登录";
31+
public static final String SUPER_USER_LOGIN_ERROR = "please login with super user";
3232

3333
}

dss-server/src/main/resources/linkis.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ wds.linkis.kerberos.kdc.user.password=
6868
wds.linkis.kerberos.ssh.port=22
6969
wds.dss.deploy.path=/usr/local/dss_linkis
7070
wds.dss.user.account.command.class=com.webank.wedatasphpere.dss.user.service.impl.LinuxUserCommand,com.webank.wedatasphpere.dss.user.service.impl.KerberosCommand,com.webank.wedatasphpere.dss.user.service.impl.LdapCommand,com.webank.wedatasphpere.dss.user.service.impl.WorkspaceCommand,com.webank.wedatasphpere.dss.user.service.impl.MetastoreCommand,com.webank.wedatasphpere.dss.user.service.impl.AzkabanCommand
71-
71+
wds.dss.scheduler.url=/luban/schedule/system

dss-user-manager/src/main/java/com/webank/wedatasphpere/dss/user/conf/DSSUserManagerConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ public class DSSUserManagerConfig {
3333
public static final String KERBEROS_KDC_NODE = CommonVars.apply("wds.linkis.kerberos.kdc.node", "null").getValue().trim();
3434
public static final String KERBEROS_KDC_USER_NAME = CommonVars.apply("wds.linkis.kerberos.kdc.user.name", "null").getValue().trim();
3535
public static final String KERBEROS_KDC_USER_PASSWORD = CommonVars.apply("wds.linkis.kerberos.kdc.user.password", "null").getValue().trim();
36-
public static final String KEBBEROS_ENABLE_SWITCH = CommonVars.apply("wds.linkis.kerberos.enable.switch", "null").getValue().trim();
36+
public static final String KERBEROS_ENABLE_SWITCH = CommonVars.apply("wds.linkis.kerberos.enable.switch", "null").getValue().trim();
3737
public static final String DSS_DEPLOY_PATH = CommonVars.apply("wds.dss.deploy.path", "null").getValue().trim();
38+
public static final String DSS_SCHEDULER_URL = CommonVars.apply("wds.dss.scheduler.url", "/luban/schedule/system").getValue().trim();
39+
40+
3841

3942
}

dss-user-manager/src/main/java/com/webank/wedatasphpere/dss/user/service/AbsCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public String renew(AuthorizationBody body) {
3737
public String authorization(AuthorizationBody body) throws IOException, Exception { return Command.SUCCESS; }
3838

3939
public String toMessage(String msg) {
40-
return this.getClass().getSimpleName() + "模块开始执行:"+ msg;
40+
return this.getClass().getSimpleName() + "the module starts execution"+ msg;
4141
}
4242

4343
protected String runShell(String scriptPath, String[] args){

dss-user-manager/src/main/java/com/webank/wedatasphpere/dss/user/service/impl/KerberosCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private String createKt(AuthorizationBody body) throws Exception {
3030
if(userName != null){
3131
res = callShell(DSSUserManagerConfig.KERBEROS_SCRIPT_PATH, userName,hostName,
3232
DSSUserManagerConfig.KERBEROS_KEYTAB_PATH,DSSUserManagerConfig.KERBEROS_SSH_PORT,
33-
DSSUserManagerConfig.KERBEROS_KDC_NODE,DSSUserManagerConfig.KERBEROS_KDC_USER_NAME,DSSUserManagerConfig.KERBEROS_KDC_USER_PASSWORD,DSSUserManagerConfig.KERBEROS_REALM,DSSUserManagerConfig.KEBBEROS_ENABLE_SWITCH);
33+
DSSUserManagerConfig.KERBEROS_KDC_NODE,DSSUserManagerConfig.KERBEROS_KDC_USER_NAME,DSSUserManagerConfig.KERBEROS_KDC_USER_PASSWORD,DSSUserManagerConfig.KERBEROS_REALM,DSSUserManagerConfig.KERBEROS_ENABLE_SWITCH);
3434
}
3535
return res;
3636
}

dss-user-manager/src/main/java/com/webank/wedatasphpere/dss/user/service/impl/MetastoreCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ private String createDb(AuthorizationBody body) throws Exception {
2828
String[] args = null;
2929
String userName = body.getUsername();
3030
if (userName != null) {
31-
String dbName = userName + DSSUserManagerConfig.METASTORE_DB_TAIL;
32-
String path = DSSUserManagerConfig.METASTORE_HDFS_PATH + "/"+dbName+".db";
33-
bashCommand = getResource(DSSUserManagerConfig.METASTORE_SCRIPT_PAHT);
34-
args = new String[]{ userName,dbName,path,
35-
DSSUserManagerConfig.KERBEROS_REALM,DSSUserManagerConfig.KERBEROS_ADMIN,DSSUserManagerConfig.KERBEROS_KEYTAB_PATH,DSSUserManagerConfig.KEBBEROS_ENABLE_SWITCH};
31+
String dbName = userName + DSSUserManagerConfig.METASTORE_DB_TAIL;
32+
String path = DSSUserManagerConfig.METASTORE_HDFS_PATH + "/"+dbName+".db";
33+
bashCommand = getResource(DSSUserManagerConfig.METASTORE_SCRIPT_PAHT);
34+
args = new String[]{ userName,dbName,path,
35+
DSSUserManagerConfig.KERBEROS_REALM,DSSUserManagerConfig.KERBEROS_ADMIN,DSSUserManagerConfig.KERBEROS_KEYTAB_PATH,DSSUserManagerConfig.KERBEROS_ENABLE_SWITCH};
3636
}
3737
return this.runShell(bashCommand, args);
3838
}

dss-user-manager/src/main/java/com/webank/wedatasphpere/dss/user/service/impl/SchedulisCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ private static Connection getConnection() {
8383
}
8484

8585
private boolean addSchedulisUser(String username, String password) {
86+
String schedulerUrl = DSSUserManagerConfig.DSS_SCHEDULER_URL;
8687
RestTemplate restTemplate = new RestTemplate();
8788
String schedulisUrl = DSSUserManagerConfig.SCHEDULER_ADDRESS;
8889
String url = new StringBuilder().append(schedulisUrl)
89-
.append("/luban/schedule/system")
90+
.append(schedulerUrl)
9091
.toString();
9192
Map<String, String> params = new HashMap<>(4);
9293
params.put("userId", username);

dss-user-manager/src/main/resources/default/CreateLinuxUser.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ do
1515
echo "${server_host},${server_user_name},${server_user_password}"
1616

1717
sudo sshpass -p $server_user_password ssh -o ConnectTimeout=1 $server_user_name@$server_host "echo success"
18-
[ $? -ne 0 ] && echo "登录主机${server_host}失败" && exit 254
18+
[ $? -ne 0 ] && echo "logon server:${server_host} failed" && exit 254
1919
done
2020

21-
echo "************服务器网络校验通过,开始创建用户*****************"
21+
echo "************Start creating user*****************"
2222

2323
for server_user_str in ${server_user_array[@]}
2424
do
@@ -27,9 +27,8 @@ do
2727
server_host=${server_user_info[0]}
2828
server_user_name=${server_user_info[1]}
2929
server_user_password=${server_user_info[2]}
30-
3130
#sshpass -p $server_user_password ssh $server_user_name@$server_host "sudo useradd $add_user_name && echo $add_user_password |sudo -i passwd --stdin $add_user_name"
32-
sshpass -p $server_user_password ssh $server_user_name@$server_host "sudo useradd $add_user_name -s /sbin/nologin"
31+
sshpass -p $server_user_password ssh $server_user_name@$server_host "sudo useradd $add_user_name -s /sbin/nologin"
3332

34-
[ $? -ne 0 ] && echo "创建用户失败:${host}失败" && exit 254
33+
[ $? -ne 0 ] && echo "create user failed:${host}" && exit 254
3534
done

0 commit comments

Comments
 (0)