org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(173)

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

ZKRMStateStore.<init>介绍

暂无

代码示例

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

private void initStore(String hostPort) {
 Optional<String> optHostPort = Optional.fromNullable(hostPort);
 RMContext rmContext = mock(RMContext.class);
 conf = new YarnConfiguration();
 conf.set(YarnConfiguration.RM_ZK_ADDRESS, optHostPort.or(this.hostPort));
 conf.set(YarnConfiguration.ZK_RM_STATE_STORE_PARENT_PATH, workingZnode);
 store = new ZKRMStateStore();
 store.init(conf);
 store.start();
 when(rmContext.getStateStore()).thenReturn(store);
 appTokenMgr = new AMRMTokenSecretManager(conf, rmContext);
 appTokenMgr.start();
 clientToAMTokenMgr = new ClientToAMTokenSecretManagerInRM();
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

private void initStore(String hostPort) {
 Optional<String> optHostPort = Optional.fromNullable(hostPort);
 RMContext rmContext = mock(RMContext.class);
 conf = new YarnConfiguration();
 conf.set(YarnConfiguration.RM_ZK_ADDRESS, optHostPort
   .or((curatorTestingServer == null) ? "" : curatorTestingServer
     .getConnectString()));
 conf.set(YarnConfiguration.ZK_RM_STATE_STORE_PARENT_PATH, workingZnode);
 store = new ZKRMStateStore();
 store.setResourceManager(new ResourceManager());
 store.init(conf);
 store.start();
 when(rmContext.getStateStore()).thenReturn(store);
 appTokenMgr = new AMRMTokenSecretManager(conf, rmContext);
 appTokenMgr.start();
 clientToAMTokenMgr = new ClientToAMTokenSecretManagerInRM();
}

相关文章