parent
145c5ac8cb
commit
fe3e93861f
|
|
@ -137,6 +137,8 @@ public final class Constants {
|
|||
*/
|
||||
public static final String SUDO_ENABLE = "sudo.enable";
|
||||
|
||||
public static final String SET_TASK_DIR_TO_TENANT_ENABLE = "setTaskDirToTenant.enable";
|
||||
|
||||
/**
|
||||
* resource storage type
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ support.hive.oneSession=false
|
|||
|
||||
# use sudo or not, if set true, executing user is tenant user and deploy user needs sudo permissions; if set false, executing user is the deploy user and doesn't need sudo permissions
|
||||
sudo.enable=true
|
||||
setTaskDirToTenant.enable=false
|
||||
|
||||
# network interface preferred like eth0, default: empty
|
||||
#dolphin.scheduler.network.interface.preferred=
|
||||
|
|
|
|||
|
|
@ -73,6 +73,10 @@ public class CommonUtils {
|
|||
return PropertyUtils.getBoolean(Constants.DEVELOPMENT_STATE, true);
|
||||
}
|
||||
|
||||
public static boolean isSetTaskDirToTenantEnable() {
|
||||
return PropertyUtils.getBoolean(Constants.SET_TASK_DIR_TO_TENANT_ENABLE, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* if upload resource is HDFS and kerberos startup is true , else false
|
||||
*
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public class TaskExecutionCheckerUtils {
|
|||
}
|
||||
try {
|
||||
Files.createDirectories(filePath);
|
||||
if (!OSUtils.isSudoEnable()) {
|
||||
if (!CommonUtils.isSetTaskDirToTenantEnable()) {
|
||||
// we need to open sudo, then we can change the owner.
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue