org.apache.hadoop.yarn.server.webapp.WebServices.getUser()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中org.apache.hadoop.yarn.server.webapp.WebServices.getUser()方法的一些代码示例,展示了WebServices.getUser()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServices.getUser()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.server.webapp.WebServices
类名称:WebServices
方法名:getUser

WebServices.getUser介绍

暂无

代码示例

代码示例来源:origin: io.hops/hadoop-yarn-server-common

public AppInfo getApp(HttpServletRequest req, HttpServletResponse res,
  String appId) {
 UserGroupInformation callerUGI = getUser(req);
 final ApplicationId id = parseApplicationId(appId);
 ApplicationReport app = null;
 try {
  if (callerUGI == null) {
   GetApplicationReportRequest request =
     GetApplicationReportRequest.newInstance(id);
   app = appBaseProt.getApplicationReport(request).getApplicationReport();
  } else {
   app = callerUGI.doAs(
     new PrivilegedExceptionAction<ApplicationReport> () {
    @Override
    public ApplicationReport run() throws Exception {
     GetApplicationReportRequest request =
       GetApplicationReportRequest.newInstance(id);
     return appBaseProt.getApplicationReport(request).getApplicationReport();
    }
   });
  }
 } catch (Exception e) {
  rewrapAndThrowException(e);
 }
 if (app == null) {
  throw new NotFoundException("app with id: " + appId + " not found");
 }
 return new AppInfo(app);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common

public AppInfo getApp(HttpServletRequest req, HttpServletResponse res,
  String appId) {
 UserGroupInformation callerUGI = getUser(req);
 final ApplicationId id = parseApplicationId(appId);
 ApplicationReport app = null;
 try {
  if (callerUGI == null) {
   GetApplicationReportRequest request =
     GetApplicationReportRequest.newInstance(id);
   app = appBaseProt.getApplicationReport(request).getApplicationReport();
  } else {
   app = callerUGI.doAs(
     new PrivilegedExceptionAction<ApplicationReport> () {
    @Override
    public ApplicationReport run() throws Exception {
     GetApplicationReportRequest request =
       GetApplicationReportRequest.newInstance(id);
     return appBaseProt.getApplicationReport(request).getApplicationReport();
    }
   });
  }
 } catch (Exception e) {
  rewrapAndThrowException(e);
 }
 if (app == null) {
  throw new NotFoundException("app with id: " + appId + " not found");
 }
 return new AppInfo(app);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common

public AppInfo getApp(HttpServletRequest req, HttpServletResponse res,
  String appId) {
 UserGroupInformation callerUGI = getUser(req);
 final ApplicationId id = parseApplicationId(appId);
 ApplicationReport app = null;
 try {
  if (callerUGI == null) {
   GetApplicationReportRequest request =
     GetApplicationReportRequest.newInstance(id);
   app = appBaseProt.getApplicationReport(request).getApplicationReport();
  } else {
   app = callerUGI.doAs(
     new PrivilegedExceptionAction<ApplicationReport> () {
    @Override
    public ApplicationReport run() throws Exception {
     GetApplicationReportRequest request =
       GetApplicationReportRequest.newInstance(id);
     return appBaseProt.getApplicationReport(request).getApplicationReport();
    }
   });
  }
 } catch (Exception e) {
  rewrapAndThrowException(e);
 }
 if (app == null) {
  throw new NotFoundException("app with id: " + appId + " not found");
 }
 return new AppInfo(app);
}

代码示例来源:origin: io.hops/hadoop-yarn-server-common

String startedEnd, String finishBegin, String finishEnd,
 Set<String> applicationTypes) {
UserGroupInformation callerUGI = getUser(req);
boolean checkEnd = false;
boolean checkAppTypes = false;

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common

String startedEnd, String finishBegin, String finishEnd,
 Set<String> applicationTypes) {
UserGroupInformation callerUGI = getUser(req);
boolean checkStart = false;
boolean checkEnd = false;

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common

String startedEnd, String finishBegin, String finishEnd,
 Set<String> applicationTypes) {
UserGroupInformation callerUGI = getUser(req);
boolean checkStart = false;
boolean checkEnd = false;

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common

public AppAttemptsInfo getAppAttempts(HttpServletRequest req,
  HttpServletResponse res, String appId) {
 UserGroupInformation callerUGI = getUser(req);
 final ApplicationId id = parseApplicationId(appId);
 Collection<ApplicationAttemptReport> appAttemptReports = null;

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common

public AppAttemptsInfo getAppAttempts(HttpServletRequest req,
  HttpServletResponse res, String appId) {
 UserGroupInformation callerUGI = getUser(req);
 final ApplicationId id = parseApplicationId(appId);
 Collection<ApplicationAttemptReport> appAttemptReports = null;

代码示例来源:origin: io.hops/hadoop-yarn-server-common

public AppAttemptsInfo getAppAttempts(HttpServletRequest req,
  HttpServletResponse res, String appId) {
 UserGroupInformation callerUGI = getUser(req);
 final ApplicationId id = parseApplicationId(appId);
 Collection<ApplicationAttemptReport> appAttemptReports = null;

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common

public AppAttemptInfo getAppAttempt(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common

public AppAttemptInfo getAppAttempt(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: io.hops/hadoop-yarn-server-common

public AppAttemptInfo getAppAttempt(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: io.hops/hadoop-yarn-server-common

public ContainersInfo getContainers(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common

public ContainersInfo getContainers(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common

public ContainersInfo getContainers(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-common

public ContainerInfo getContainer(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId,
  String containerId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-common

public ContainerInfo getContainer(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId,
  String containerId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

代码示例来源:origin: io.hops/hadoop-yarn-server-common

public ContainerInfo getContainer(HttpServletRequest req,
  HttpServletResponse res, String appId, String appAttemptId,
  String containerId) {
 UserGroupInformation callerUGI = getUser(req);
 ApplicationId aid = parseApplicationId(appId);
 ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);

相关文章