本文整理汇总了Java中org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.setMiniClusterMode方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultMetricsSystem.setMiniClusterMode方法的具体用法?Java DefaultMetricsSystem.setMiniClusterMode怎么用?Java DefaultMetricsSystem.setMiniClusterMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.metrics2.lib.DefaultMetricsSystem
的用法示例。
在下文中一共展示了DefaultMetricsSystem.setMiniClusterMode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; //导入方法依赖的package包/类
@Before
public void setup() throws UnknownHostException {
Logger rootLogger = LogManager.getRootLogger();
rootLogger.setLevel(Level.DEBUG);
conf = getConf();
UserGroupInformation.setConfiguration(conf);
conf.set(YarnConfiguration.RECOVERY_ENABLED, "true");
conf.set(YarnConfiguration.RM_STORE, MemoryRMStateStore.class.getName());
conf.setBoolean(YarnConfiguration.RM_WORK_PRESERVING_RECOVERY_ENABLED, true);
conf.setLong(YarnConfiguration.RM_WORK_PRESERVING_RECOVERY_SCHEDULING_WAIT_MS, 0);
DefaultMetricsSystem.setMiniClusterMode(true);
}
示例2: setup
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws AccessControlException,
FileNotFoundException, IllegalArgumentException, IOException {
//Do not error out if metrics are inited multiple times
DefaultMetricsSystem.setMiniClusterMode(true);
File dir = new File(stagingDir);
stagingDir = dir.getAbsolutePath();
localFS = FileContext.getLocalFSFileContext();
localFS.delete(new Path(testDir.getAbsolutePath()), true);
testDir.mkdir();
}
示例3: setUpBeforeClass
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
Configuration c = TESTUTIL.getConfiguration();
// We use local filesystem. Set it so it writes into the testdir.
FSUtils.setRootDir(c, TESTUTIL.getDataTestDir());
DefaultMetricsSystem.setMiniClusterMode(true);
// Startup a mini zk cluster.
TESTUTIL.startMiniZKCluster();
}
示例4: setUp
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; //导入方法依赖的package包/类
@Before
public void setUp() throws IOException {
scheduler = initializeScheduler();
rmContext = getRMContext();
reservationSystem = configureReservationSystem();
reservationSystem.setRMContext(rmContext);
DefaultMetricsSystem.setMiniClusterMode(true);
}
示例5: setup
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws AccessControlException,
FileNotFoundException, IllegalArgumentException, IOException {
//Do not error out if metrics are inited multiple times
DefaultMetricsSystem.setMiniClusterMode(true);
File dir = new File(stagingDir);
stagingDir = dir.getAbsolutePath();
localFS = FileContext.getLocalFSFileContext();
localFS.delete(testDir, true);
new File(testDir.toString()).mkdir();
}
示例6: init
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; //导入方法依赖的package包/类
@Override
public void init() {
// Make sure that the metrics system doesn't throw an exception when
// registering a source with the same name
DefaultMetricsSystem.setMiniClusterMode(true);
}