• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StringHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.yarn.util.StringHelper的典型用法代码示例。如果您正苦于以下问题:Java StringHelper类的具体用法?Java StringHelper怎么用?Java StringHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StringHelper类属于org.apache.hadoop.yarn.util包,在下文中一共展示了StringHelper类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: scheduler

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
public void scheduler() {
  // limit applications to those in states relevant to scheduling
  set(YarnWebParams.APP_STATE, StringHelper.cjoin(
      YarnApplicationState.NEW.toString(),
      YarnApplicationState.NEW_SAVING.toString(),
      YarnApplicationState.SUBMITTED.toString(),
      YarnApplicationState.ACCEPTED.toString(),
      YarnApplicationState.RUNNING.toString()));

  ResourceManager rm = getInstance(ResourceManager.class);
  ResourceScheduler rs = rm.getResourceScheduler();
  if (rs == null || rs instanceof CapacityScheduler) {
    setTitle("Capacity Scheduler");
    render(CapacitySchedulerPage.class);
    return;
  }
  
  if (rs instanceof FairScheduler) {
    setTitle("Fair Scheduler");
    render(FairSchedulerPage.class);
    return;
  }
  
  setTitle("Default Scheduler");
  render(DefaultSchedulerPage.class);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:RmController.java


示例2: testView

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
@Test
public void testView() throws Exception {
  Injector injector =
      WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
        mockApplicationHistoryClientService(5, 1, 1));
  AHSView ahsViewInstance = injector.getInstance(AHSView.class);

  ahsViewInstance.render();
  WebAppTests.flushOutput(injector);

  ahsViewInstance.set(YarnWebParams.APP_STATE,
    YarnApplicationState.FAILED.toString());
  ahsViewInstance.render();
  WebAppTests.flushOutput(injector);

  ahsViewInstance.set(YarnWebParams.APP_STATE, StringHelper.cjoin(
    YarnApplicationState.FAILED.toString(), YarnApplicationState.KILLED));
  ahsViewInstance.render();
  WebAppTests.flushOutput(injector);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:TestAHSWebApp.java


示例3: singleJobCounter

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
/**
 * Render the /singlejobcounter page
 * @throws IOException on any error.
 */
public void singleJobCounter() throws IOException{
  try {
    requireJob();
  }
  catch (Exception e) {
    renderText(e.getMessage());
    return;
  }
  set(COUNTER_GROUP, URLDecoder.decode($(COUNTER_GROUP), "UTF-8"));
  set(COUNTER_NAME, URLDecoder.decode($(COUNTER_NAME), "UTF-8"));
  if (app.getJob() != null) {
    setTitle(StringHelper.join($(COUNTER_GROUP)," ",$(COUNTER_NAME),
        " for ", $(JOB_ID)));
  }
  render(singleCounterPage());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:AppController.java


示例4: singleTaskCounter

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
/**
 * Render the /singletaskcounter page
 * @throws IOException on any error.
 */
public void singleTaskCounter() throws IOException{
  try {
    requireTask();
  }
  catch (Exception e) {
    renderText(e.getMessage());
    return;
  }
  set(COUNTER_GROUP, URLDecoder.decode($(COUNTER_GROUP), "UTF-8"));
  set(COUNTER_NAME, URLDecoder.decode($(COUNTER_NAME), "UTF-8"));
  if (app.getTask() != null) {
    setTitle(StringHelper.join($(COUNTER_GROUP)," ",$(COUNTER_NAME),
        " for ", $(TASK_ID)));
  }
  render(singleCounterPage());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:AppController.java


示例5: testView

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
@Test public void testView() {
  Injector injector = WebAppTests.createMockInjector(RMContext.class,
      mockRMContext(15, 1, 2, 8*GiB),
      new Module() {
    @Override
    public void configure(Binder binder) {
      try {
        binder.bind(ResourceManager.class).toInstance(mockRm(3, 1, 2, 8*GiB));
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
    }
  });
  RmView rmViewInstance = injector.getInstance(RmView.class);
  rmViewInstance.set(YarnWebParams.APP_STATE,
      YarnApplicationState.RUNNING.toString());
  rmViewInstance.render();
  WebAppTests.flushOutput(injector);

  rmViewInstance.set(YarnWebParams.APP_STATE, StringHelper.cjoin(
      YarnApplicationState.ACCEPTED.toString(),
      YarnApplicationState.RUNNING.toString()));
  rmViewInstance.render();
  WebAppTests.flushOutput(injector);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:26,代码来源:TestRMWebApp.java


示例6: testView

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
@Test
public void testView() throws Exception {
  Injector injector =
      WebAppTests.createMockInjector(ApplicationContext.class,
        mockApplicationHistoryManager(5, 1, 1));
  AHSView ahsViewInstance = injector.getInstance(AHSView.class);

  ahsViewInstance.render();
  WebAppTests.flushOutput(injector);

  ahsViewInstance.set(YarnWebParams.APP_STATE,
    YarnApplicationState.FAILED.toString());
  ahsViewInstance.render();
  WebAppTests.flushOutput(injector);

  ahsViewInstance.set(YarnWebParams.APP_STATE, StringHelper.cjoin(
    YarnApplicationState.FAILED.toString(), YarnApplicationState.KILLED));
  ahsViewInstance.render();
  WebAppTests.flushOutput(injector);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:21,代码来源:TestAHSWebApp.java


示例7: testView

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
@Test public void testView() {
  Injector injector = WebAppTests.createMockInjector(RMContext.class,
      mockRMContext(15, 1, 2, 8*GiB),
      new Module() {
    @Override
    public void configure(Binder binder) {
      try {
        binder.bind(ResourceManager.class).toInstance(mockRm(3, 1, 2, 8*GiB));
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
    }
  });
  RmView rmViewInstance = injector.getInstance(RmView.class);
  rmViewInstance.set(YarnWebParams.APP_STATE, RMAppState.RUNNING.toString());
  rmViewInstance.render();
  WebAppTests.flushOutput(injector);

  rmViewInstance.set(YarnWebParams.APP_STATE, StringHelper.cjoin(
      RMAppState.ACCEPTED.toString(), RMAppState.RUNNING.toString()));
  rmViewInstance.render();
  WebAppTests.flushOutput(injector);
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:24,代码来源:TestRMWebApp.java


示例8: WebAppProxyServlet

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
/**
 * Default constructor
 */
public WebAppProxyServlet() {
  super();
  conf = new YarnConfiguration();
  this.trackingUriPlugins =
      conf.getInstances(YarnConfiguration.YARN_TRACKING_URL_GENERATOR,
          TrackingUriPlugin.class);
  this.rmAppPageUrlBase = StringHelper.pjoin(
      WebAppUtils.getResolvedRMWebAppURLWithScheme(conf), "cluster", "app");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:WebAppProxyServlet.java


示例9: testView

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
@Test public void testView() {
  Injector injector = WebAppTests.createMockInjector(RMContext.class,
      mockRMContext(15, 1, 2, 8*GiB),
      new Module() {
    @Override
    public void configure(Binder binder) {
      try {
        ResourceManager mockRm = mockRm(3, 1, 2, 8*GiB);
        binder.bind(ResourceManager.class).toInstance(mockRm);
        binder.bind(ApplicationBaseProtocol.class)
            .toInstance(mockRm.getClientRMService());
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
    }
  });
  RmView rmViewInstance = injector.getInstance(RmView.class);
  rmViewInstance.set(YarnWebParams.APP_STATE,
      YarnApplicationState.RUNNING.toString());
  rmViewInstance.render();
  WebAppTests.flushOutput(injector);

  rmViewInstance.set(YarnWebParams.APP_STATE, StringHelper.cjoin(
      YarnApplicationState.ACCEPTED.toString(),
      YarnApplicationState.RUNNING.toString()));
  rmViewInstance.render();
  WebAppTests.flushOutput(injector);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:29,代码来源:TestRMWebApp.java


示例10: putDomainIntoCache

import org.apache.hadoop.yarn.util.StringHelper; //导入依赖的package包/类
private AccessControlListExt putDomainIntoCache(
    TimelineDomain domain) {
  Map<ApplicationAccessType, AccessControlList> acls
  = new HashMap<ApplicationAccessType, AccessControlList>(2);
  acls.put(ApplicationAccessType.VIEW_APP,
      new AccessControlList(StringHelper.cjoin(domain.getReaders())));
  acls.put(ApplicationAccessType.MODIFY_APP,
      new AccessControlList(StringHelper.cjoin(domain.getWriters())));
  AccessControlListExt aclExt =
      new AccessControlListExt(domain.getOwner(), acls);
  aclExts.put(domain.getId(), aclExt);
  return aclExt;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TimelineACLsManager.java



注:本文中的org.apache.hadoop.yarn.util.StringHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java C03PacketPlayer类代码示例发布时间:2022-05-22
下一篇:
Java MapOptions类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap