Unverified Commit 44f1eb94 authored by bao liang's avatar bao liang Committed by GitHub
Browse files

Merge pull request #446 from lenboo/branch-1.0.2

update the process of getting result of yarn.
parents 1a3362b9 5d837067
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ conf/common/hadoop.properties
## 安全中心(权限系统)

  - 安全中心是只有管理员账户才有权限的功能,有队列管理、租户管理、用户管理、告警组管理、worker分组、令牌管理等功能,还可以对资源、数据源、项目等授权
  - 管理员登录,默认用户名密码:admin/esheduler123
  - 管理员登录,默认用户名密码:admin/escheduler123
  
### 创建队列
  - 队列是在执行spark、mapreduce等程序,需要用到“队列”参数时使用的。
+14 −6
Original line number Diff line number Diff line
@@ -380,14 +380,22 @@ public abstract class AbstractCommandExecutor {
        boolean result = true;
        try {
            for (String appId : appIds) {
                while(true){
                    ExecutionStatus applicationStatus = HadoopUtils.getInstance().getApplicationStatus(appId);
                    logger.info("appId:{}, final state:{}",appId,applicationStatus.name());
                if (!applicationStatus.equals(ExecutionStatus.SUCCESS)) {
                    result = false;
                    if (applicationStatus.equals(ExecutionStatus.FAILURE) ||
                            applicationStatus.equals(ExecutionStatus.KILL)) {
                        return false;
                    }

                    if (applicationStatus.equals(ExecutionStatus.SUCCESS)){
                        break;
                    }
                    Thread.sleep(Constants.SLEEP_TIME_MILLIS);
                }
           }
        } catch (Exception e) {
            logger.error(String.format("mapreduce applications: %s  status failed : " + e.getMessage(), appIds.toString()),e);
            logger.error(String.format("yarn applications: %s  status failed : " + e.getMessage(), appIds.toString()),e);
            result = false;
        }
        return result;