本文整理汇总了Java中org.apache.hadoop.service.ServiceOperations.stop方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceOperations.stop方法的具体用法?Java ServiceOperations.stop怎么用?Java ServiceOperations.stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.service.ServiceOperations
的用法示例。
在下文中一共展示了ServiceOperations.stop方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: userZookeeperToCreateRoot
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
/**
* have the ZK user create the root dir.
* This logs out the ZK user after and stops its curator instance,
* to avoid contamination
* @throws Throwable
*/
public void userZookeeperToCreateRoot() throws Throwable {
System.setProperty("curator-log-events", "true");
CuratorService curator = null;
LoginContext login = login(ZOOKEEPER_LOCALHOST,
ZOOKEEPER_CLIENT_CONTEXT,
keytab_zk);
try {
logLoginDetails(ZOOKEEPER, login);
RegistrySecurity.setZKSaslClientProperties(ZOOKEEPER,
ZOOKEEPER_CLIENT_CONTEXT);
curator = startCuratorServiceInstance("ZK", true);
LOG.info(curator.toString());
addToTeardown(curator);
curator.zkMkPath("/", CreateMode.PERSISTENT, false,
RegistrySecurity.WorldReadWriteACL);
ZKPathDumper pathDumper = curator.dumpPath(true);
LOG.info(pathDumper.toString());
} finally {
logout(login);
ServiceOperations.stop(curator);
}
}
示例2: tearDown
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void tearDown() {
this.registeredNodes.clear();
heartBeatID = 0;
ServiceOperations.stop(nm);
assertionFailedInThread.set(false);
DefaultMetricsSystem.shutdown();
}
示例3: stopSecureZK
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
/**
* Stop the secure ZK and log out the ZK account
*/
public synchronized void stopSecureZK() {
ServiceOperations.stop(secureZK);
secureZK = null;
logout(zookeeperLogin);
zookeeperLogin = null;
}
示例4: testZookeeperCanWrite
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
/**
* test that ZK can write as itself
* @throws Throwable
*/
@Test
public void testZookeeperCanWrite() throws Throwable {
System.setProperty("curator-log-events", "true");
startSecureZK();
CuratorService curator = null;
LoginContext login = login(ZOOKEEPER_LOCALHOST,
ZOOKEEPER_CLIENT_CONTEXT,
keytab_zk);
try {
logLoginDetails(ZOOKEEPER, login);
RegistrySecurity.setZKSaslClientProperties(ZOOKEEPER,
ZOOKEEPER_CLIENT_CONTEXT);
curator = startCuratorServiceInstance("ZK", true);
LOG.info(curator.toString());
addToTeardown(curator);
curator.zkMkPath("/", CreateMode.PERSISTENT, false,
RegistrySecurity.WorldReadWriteACL);
curator.zkList("/");
curator.zkMkPath("/zookeeper", CreateMode.PERSISTENT, false,
RegistrySecurity.WorldReadWriteACL);
} finally {
logout(login);
ServiceOperations.stop(curator);
}
}
示例5: teardown
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
/**
* Robust shutdown of the pause monitor if it hasn't been stopped already.
*/
@After
public void teardown() {
ServiceOperations.stop(pauseMonitor);
}
示例6: teardown
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void teardown() {
ServiceOperations.stop(asyncClient);
}
示例7: stopCurator
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void stopCurator() {
ServiceOperations.stop(curatorService);
}
示例8: destroyZKServer
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void destroyZKServer() throws IOException {
ServiceOperations.stop(zookeeper);
}
示例9: serviceStop
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@Override
protected void serviceStop() throws Exception {
ServiceOperations.stop((Service) this.containerAllocator);
super.serviceStop();
}
示例10: tearDown
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void tearDown() {
if (null != nm) {
ServiceOperations.stop(nm);
}
}
示例11: serviceStop
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@Override
protected void serviceStop() throws Exception {
ServiceOperations.stop((Service) this.containerLauncher);
super.serviceStop();
}
示例12: stopProcesses
import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void stopProcesses() {
ServiceOperations.stop(process);
}