@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); }
DefaultMetricsSystem.setMiniClusterMode(true); final MiniZooKeeperCluster zooKeeperCluster = new MiniZooKeeperCluster(conf); File zkDataPath = new File(conf.get(HConstants.ZOOKEEPER_DATA_DIR));
@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(); }
@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); }
@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(); }
@Before public void setup() throws IOException { QueueMetrics.clearQueueMetrics(); DefaultMetricsSystem.setMiniClusterMode(true); configuration = new YarnConfiguration(); configuration.set(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class.getCanonicalName()); fs = FileSystem.get(configuration); workingPath = new Path(new File("target", this.getClass().getSimpleName() + "-remoteDir").getAbsolutePath()); configuration.set(YarnConfiguration.FS_BASED_RM_CONF_STORE, workingPath.toString()); tmpDir = new Path(new File("target", this.getClass().getSimpleName() + "-tmpDir").getAbsolutePath()); fs.delete(workingPath, true); fs.delete(tmpDir, true); fs.mkdirs(workingPath); fs.mkdirs(tmpDir); // reset the groups to what it default test settings MockUnixGroupsMapping.resetGroups(); }
@Before public void setup() { QueueMetrics.clearQueueMetrics(); DefaultMetricsSystem.setMiniClusterMode(true); }
@Before public void setup() { Logger rootLogger = LogManager.getRootLogger(); rootLogger.setLevel(Level.DEBUG); conf = getConf(); UserGroupInformation.setConfiguration(conf); DefaultMetricsSystem.setMiniClusterMode(true); }
DefaultMetricsSystem.setMiniClusterMode(true); final MiniZooKeeperCluster zooKeeperCluster = new MiniZooKeeperCluster(conf); File zkDataPath = new File(conf.get(HConstants.ZOOKEEPER_DATA_DIR));
@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); }
@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); }
@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(); }
@Before public void setUp() throws IOException { scheduler = initializeScheduler(); rmContext = getRMContext(); reservationSystem = configureReservationSystem(); reservationSystem.setRMContext(rmContext); DefaultMetricsSystem.setMiniClusterMode(true); }
public ParameterizedSchedulerTestBase(SchedulerType type) throws IOException { conf = new YarnConfiguration(); QueueMetrics.clearQueueMetrics(); DefaultMetricsSystem.setMiniClusterMode(true); schedulerType = type; switch (schedulerType) { case FAIR: configureFairScheduler(conf); scheduler = new FairScheduler(); conf.set(YarnConfiguration.RM_SCHEDULER, FairScheduler.class.getName()); break; case CAPACITY: scheduler = new CapacityScheduler(); ((CapacityScheduler)scheduler).setConf(conf); conf.set(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class.getName()); break; default: throw new IllegalArgumentException("Invalid type: " + type); } }