本文整理汇总了Java中org.apache.hadoop.yarn.client.api.impl.NMClientImpl类的典型用法代码示例。如果您正苦于以下问题:Java NMClientImpl类的具体用法?Java NMClientImpl怎么用?Java NMClientImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NMClientImpl类属于org.apache.hadoop.yarn.client.api.impl包,在下文中一共展示了NMClientImpl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: StormAMRMClient
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
public StormAMRMClient(ApplicationAttemptId appAttemptId,
@SuppressWarnings("rawtypes") Map storm_conf,
YarnConfiguration hadoopConf) {
this.appAttemptId = appAttemptId;
this.storm_conf = storm_conf;
this.hadoopConf = hadoopConf;
Integer pri = Utils.getInt(storm_conf.get(Config.MASTER_CONTAINER_PRIORITY));
this.DEFAULT_PRIORITY.setPriority(pri);
this.containers = new TreeSet<Container>();
numSupervisors = new AtomicInteger(0);
// start am nm client
nmClient = (NMClientImpl) NMClient.createNMClient();
nmClient.init(hadoopConf);
nmClient.start();
}
示例2: serviceStop
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
@Override
protected void serviceStop() throws Exception {
if (stopped.getAndSet(true)) {
// return if already stopped
return;
}
if (eventDispatcherThread != null) {
eventDispatcherThread.interrupt();
try {
eventDispatcherThread.join();
} catch (InterruptedException e) {
LOG.error("The thread of " + eventDispatcherThread.getName() +
" didn't finish normally.", e);
}
}
if (threadPool != null) {
threadPool.shutdownNow();
}
if (client != null) {
// If NMClientImpl doesn't stop running containers, the states doesn't
// need to be cleared.
if (!(client instanceof NMClientImpl) ||
((NMClientImpl) client).getCleanupRunningContainers().get()) {
if (containers != null) {
containers.clear();
}
}
client.stop();
}
super.serviceStop();
}
示例3: StormAMRMClient
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
public StormAMRMClient(ApplicationAttemptId appAttemptID, @SuppressWarnings("rawtypes") Map storm_conf,
YarnConfiguration hadoopConf) {
this.appAttemptId = appAttemptID;
this.storm_conf = storm_conf;
this.hadoopConf = hadoopConf;
Integer pri = Utils.getInt(storm_conf.get(Config.MASTER_CONTAINER_PRIORITY));
this.DEFAULT_PRIORITY.setPriority(pri);
this.containers = new TreeSet<Container>();
numSupervisors = new AtomicInteger(0);
// start am nm client
nmClient = (NMClientImpl) NMClient.createNMClient();
nmClient.init(hadoopConf);
nmClient.start();
}
示例4: createNMClient
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
/**
* Create a new instance of NMClient.
*/
@Public
public static NMClient createNMClient() {
NMClient client = new NMClientImpl();
return client;
}
示例5: NMClientAsyncImpl
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
public NMClientAsyncImpl(String name, CallbackHandler callbackHandler) {
this(name, new NMClientImpl(), callbackHandler);
}
示例6: NMClientAsync
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
protected NMClientAsync(String name, CallbackHandler callbackHandler) {
this (name, new NMClientImpl(), callbackHandler);
}
示例7: NMClientAsyncImpl
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
public NMClientAsyncImpl(
String name, AbstractCallbackHandler callbackHandler) {
this(name, new NMClientImpl(), callbackHandler);
}
示例8: NMClientAsync
import org.apache.hadoop.yarn.client.api.impl.NMClientImpl; //导入依赖的package包/类
protected NMClientAsync(
String name, AbstractCallbackHandler callbackHandler) {
this (name, new NMClientImpl(), callbackHandler);
}