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


Java NodeHealthCheckerService.stop方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService.stop方法的典型用法代码示例。如果您正苦于以下问题:Java NodeHealthCheckerService.stop方法的具体用法?Java NodeHealthCheckerService.stop怎么用?Java NodeHealthCheckerService.stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService的用法示例。


在下文中一共展示了NodeHealthCheckerService.stop方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = new NodeHealthCheckerService();
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:39,代码来源:TestNMWebServer.java

示例2: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null, null, null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = new NodeHealthCheckerService();
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:39,代码来源:TestNMWebServer.java

示例3: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null, null, null,
      null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getVCoresAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getGCoresAllocatedForContainers() {
      return 0;
    }
    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:48,代码来源:TestNMWebServer.java

示例4: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null, null, null,
      null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getVCoresAllocatedForContainers() {
      return 0;
    }
    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:44,代码来源:TestNMWebServer.java

示例5: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null, null, null,
      null, null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getVCoresAllocatedForContainers() {
      return 0;
    }
    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = new NodeHealthCheckerService();
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:44,代码来源:TestNMWebServer.java

示例6: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null, null, null,
      null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getVCoresAllocatedForContainers() {
      return 0;
    }
    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = new NodeHealthCheckerService();
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:44,代码来源:TestNMWebServer.java

示例7: startNMWebAppServer

import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService; //导入方法依赖的package包/类
private int startNMWebAppServer(String webAddr) {
  Context nmContext = new NodeManager.NMContext(null, null, null, null,
      null);
  ResourceView resourceView = new ResourceView() {
    @Override
    public long getVmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getPmemAllocatedForContainers() {
      return 0;
    }
    @Override
    public long getVCoresAllocatedForContainers() {
      return 0;
    }

    @Override
    public long getGPUsAllocatedForContainers() {
      return 0;
    }

    @Override
    public boolean isVmemCheckEnabled() {
      return true;
    }
    @Override
    public boolean isPmemCheckEnabled() {
      return true;
    }
  };
  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
  conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
  NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
  healthChecker.init(conf);
  LocalDirsHandlerService dirsHandler = healthChecker.getDiskHandler();
  conf.set(YarnConfiguration.NM_WEBAPP_ADDRESS, webAddr);
  WebServer server = new WebServer(nmContext, resourceView,
      new ApplicationACLsManager(conf), dirsHandler);
  try {
    server.init(conf);
    server.start();
    return server.getPort();
  } finally {
    server.stop();
    healthChecker.stop();
  }
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:50,代码来源:TestNMWebServer.java


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