当前位置: 首页>>代码示例>>Java>>正文


Java ServiceOperations.stop方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:31,代码来源:TestSecureRegistry.java

示例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();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:TestNodeStatusUpdater.java

示例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;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:AbstractSecureRegistryTest.java

示例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);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:32,代码来源:TestSecureRegistry.java

示例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);
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:8,代码来源:TestJvmMetrics.java

示例6: teardown

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void teardown() {
  ServiceOperations.stop(asyncClient);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:TestNMClientAsync.java

示例7: stopCurator

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void stopCurator() {
  ServiceOperations.stop(curatorService);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:TestCuratorService.java

示例8: destroyZKServer

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void destroyZKServer() throws IOException {

  ServiceOperations.stop(zookeeper);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:TestMicroZookeeperService.java

示例9: serviceStop

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@Override
protected void serviceStop() throws Exception {
  ServiceOperations.stop((Service) this.containerAllocator);
  super.serviceStop();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:MRAppMaster.java

示例10: tearDown

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void tearDown() {
  if (null != nm) {
    ServiceOperations.stop(nm);
  }
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:7,代码来源:TestNodeStatusUpdaterForLabels.java

示例11: serviceStop

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@Override
protected void serviceStop() throws Exception {
  ServiceOperations.stop((Service) this.containerLauncher);
  super.serviceStop();
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:6,代码来源:MRAppMaster.java

示例12: stopProcesses

import org.apache.hadoop.service.ServiceOperations; //导入方法依赖的package包/类
@After
public void stopProcesses() {
  ServiceOperations.stop(process);
}
 
开发者ID:apache,项目名称:incubator-slider,代码行数:5,代码来源:TestWorkflowForkedProcessService.java


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