Commit 015c7815 authored by lenboo's avatar lenboo
Browse files

Merge remote-tracking branch 'upstream/branch-1.0.2' into 102

parents efc2223c 44f1eb94
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ public class TenantService extends BaseService{
    Tenant tenant = tenantMapper.queryById(id);

    if (tenant == null){
      putMsg(result, Status.USER_NOT_EXIST, id);
      putMsg(result, Status.TENANT_NOT_EXIST);
      return result;
    }

@@ -230,6 +230,13 @@ public class TenantService extends BaseService{

    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 resourcePath = HadoopUtils.getHdfsDir(tenant.getTenantCode());
@@ -245,6 +252,7 @@ public class TenantService extends BaseService{
      }

      HadoopUtils.getInstance().delete(tenantPath, true);
    }

    tenantMapper.deleteById(id);
    putMsg(result, Status.SUCCESS);
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ public class ProcessDefinitionMapperProvider {
            if(userId != null && 0 != Integer.parseInt(userId.toString())){
                WHERE("td.user_id = #{userId}");
            }
            ORDER_BY(" td.update_time desc limit #{offset},#{pageSize} ");
            ORDER_BY(" sc.schedule_release_state desc,td.update_time desc limit #{offset},#{pageSize} ");
        }}.toString();
    }
    /**