|
|
@ -230,6 +230,13 @@ public class TenantService extends BaseService{ |
|
|
|
|
|
|
|
|
|
|
|
Tenant tenant = tenantMapper.queryById(id); |
|
|
|
Tenant tenant = tenantMapper.queryById(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tenant == null){ |
|
|
|
|
|
|
|
putMsg(result, Status.TENANT_NOT_EXIST); |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if hdfs startup
|
|
|
|
|
|
|
|
if (PropertyUtils.getBoolean(cn.escheduler.common.Constants.HDFS_STARTUP_STATE)){ |
|
|
|
String tenantPath = HadoopUtils.getHdfsDataBasePath() + "/" + tenant.getTenantCode(); |
|
|
|
String tenantPath = HadoopUtils.getHdfsDataBasePath() + "/" + tenant.getTenantCode(); |
|
|
|
|
|
|
|
|
|
|
|
String resourcePath = HadoopUtils.getHdfsDir(tenant.getTenantCode()); |
|
|
|
String resourcePath = HadoopUtils.getHdfsDir(tenant.getTenantCode()); |
|
|
@ -245,6 +252,7 @@ public class TenantService extends BaseService{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HadoopUtils.getInstance().delete(tenantPath, true); |
|
|
|
HadoopUtils.getInstance().delete(tenantPath, true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tenantMapper.deleteById(id); |
|
|
|
tenantMapper.deleteById(id); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|