Examples of ZeusException


Examples of com.taobao.zeus.client.ZeusException

        boolean success = resp.getStatus() == Status.OK ? true : false;

        if (!success) {
          // 运行失败,更新失败状态,发出失败消息
          if (exception != null) {
            exception = new ZeusException(String.format(
                "fileId:%s run failed ", history.getFileId()),
                exception);
          } else {
            exception = new ZeusException(String.format(
                "fileId:%s run failed ", history.getFileId()));
          }
          DebugInfoLog.info("debugId:" + debugId + " run fail ");
          history = context.getDebugHistoryManager()
              .findDebugHistory(debugId);
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

  @Override
  public List<String> getAllTables() throws ZeusException {
    try {
      return client.getAllTables(DEFAULT_DB);
    } catch (Exception e) {
      throw new ZeusException("获取所有表信息失败", e);
    }
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

  @Override
  public List<Table> getPagingTables(String pattern, int offset, int limit)
      throws ZeusException {
    if (offset < 0 || limit < 0) {
      throw new ZeusException("获取分页表信息失败,参数不正确");
    }
    if (pattern == null) {
      pattern = "";
    }

    List<Table> tables = new ArrayList<Table>();
    try {
      List<String> tbs = client.getTables(DEFAULT_DB,
          getPatternFromQuery(pattern));
      limit = offset + limit > tbs.size() ? tbs.size() - offset : limit;
      for (String t : tbs.subList(offset, offset + limit)) {
        tables.add(client.getTable(DEFAULT_DB, t));
      }
    } catch (Exception e) {
      log.error("获取分页表信息失败", e);
      throw new ZeusException("获取所有表信息失败", e);
    }
    return tables;
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

        l = l.subList(l.size() - limit, l.size());
      }
      Collections.reverse(l);
    } catch (NoSuchObjectException e) {
      log.error("找不到该表:" + tableName, e);
      throw new ZeusException("没找到这张表!", e);
    } catch (Exception e) {
      log.error("取所有分区失败:" + tableName, e);
      throw new ZeusException("获取所有分区失败!", e);
    }
    return l;
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

  }

  @Override
  public Integer getTotalNumber(String pattern) throws ZeusException {
    if (pattern == null) {
      throw new ZeusException("参数不正确");
    }
    try {
      return client.getTables(DEFAULT_DB, getPatternFromQuery(pattern))
          .size();
    } catch (Exception e) {
      throw new ZeusException("获取表数量信息失败", e);
    }
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

  public GroupDescriptor createGroup(String user, String groupName,
      String parentGroup, boolean isDirectory) throws ZeusException {
    if(hasGroupPermission(user, parentGroup)){
      return groupManager.createGroup(user, groupName, parentGroup, isDirectory);
    }else{
      throw new ZeusException("您无权操作");
    }
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

  public JobDescriptor createJob(String user, String jobName,
      String parentGroup, JobRunType jobType) throws ZeusException {
    if(hasGroupPermission(user, parentGroup)){
      return groupManager.createJob(user, jobName, parentGroup, jobType)
    }else{
      throw new ZeusException("您无权操作");
    }
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

      GroupDescriptor gd=groupManager.getGroupDescriptor(groupId);
      if(gd!=null && gd.getOwner().equals(user)){
        groupManager.deleteGroup(user, groupId);
      }
    }else{
      throw new ZeusException("您无权操作");
    }
   
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

      Tuple<JobDescriptor, JobStatus> job=groupManager.getJobDescriptor(jobId);
      if(job!=null){
        groupManager.deleteJob(user, jobId);
      }
    }else{
      throw new ZeusException("没有删除的权限");
    }
  }
View Full Code Here

Examples of com.taobao.zeus.client.ZeusException

      GroupDescriptor gd=groupManager.getGroupDescriptor(group.getId());
      if(gd!=null){
        groupManager.updateGroup(user, group);
      }
    }else{
      throw new ZeusException("没有更新的权限");
    }
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.