@BeforeClass public static void setupCluster() throws Exception { util = new HBaseTestingUtility(); util.getConfiguration().set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, ""); util.startMiniCluster(1); }
@BeforeClass public static void setUpBeforeClass() throws Exception { // Stack up three coprocessors just so I can check bypass skips subsequent calls. Configuration conf = HBaseConfiguration.create(); conf.setStrings(CoprocessorHost.USER_REGION_COPROCESSOR_CONF_KEY, new String [] {TestCoprocessor.class.getName(), TestCoprocessor2.class.getName(), TestCoprocessor3.class.getName()}); util = new HBaseTestingUtility(conf); util.startMiniCluster(); }
@Before public void setUp() throws Exception { UTIL = new HBaseTestingUtility(); conf = UTIL.getConfiguration(); }
@BeforeClass public static void setupBeforeClass() throws Exception { TEST_UTIL = new HBaseTestingUtility(); CONF = TEST_UTIL.getConfiguration(); CONF.setStrings(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, DummyCoprocessorService.class.getName()); CONF.setStrings(CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY, DummyCoprocessorService.class.getName()); CONF.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, DummyCoprocessorService.class.getName()); TEST_UTIL.startMiniCluster(); }
@Before public void setUp() { hbtu = new HBaseTestingUtility(); tableName = TableName.valueOf("Table-" + testName.getMethodName()); hbtu.getConfiguration().set( FlushThroughputControllerFactory.HBASE_FLUSH_THROUGHPUT_CONTROLLER_KEY, PressureAwareFlushThroughputController.class.getName()); }
@BeforeClass public static void setUpBeforeClass() throws Exception { Configuration conf = HBaseConfiguration.create(); conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, TestWALObserver.class.getName()); util = new HBaseTestingUtility(conf); util.startMiniCluster(); }
@BeforeClass public static void setupBeforeClass() throws Exception { TEST_UTIL = new HBaseTestingUtility(); CONF = TEST_UTIL.getConfiguration(); CONF.setStrings(CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY, DummyRegionServerEndpoint.class.getName()); TEST_UTIL.startMiniCluster(); }
@Before public void setUp() throws Exception { htu = new HBaseTestingUtility(); htu.getConfiguration().setInt("dfs.blocksize", 1024);// For the test with multiple blocks htu.getConfiguration().setInt("dfs.replication", 3); htu.startMiniDFSCluster(3, new String[]{"/r1", "/r2", "/r3"}, new String[]{host1, host2, host3}); conf = htu.getConfiguration(); cluster = htu.getDFSCluster(); dfs = (DistributedFileSystem) FileSystem.get(conf); }
@Before public void setUp() throws Exception { testingUtility = new HBaseTestingUtility(); testingUtility.startMiniCluster(); LogManager.getRootLogger().addAppender(mockAppender); }
@Before public void setUp() throws Exception { utility = new HBaseTestingUtility(); utility.getConfiguration().setInt("hbase.hfile.compaction.discharger.interval", 10); utility.startMiniCluster(); }
@Before public void setUp() throws Exception { htu = new HBaseTestingUtility(); htu.getConfiguration().setInt("dfs.blocksize", 1024);// For the test with multiple blocks htu.getConfiguration().setInt("dfs.replication", 3); htu.startMiniDFSCluster(3, new String[]{"/r1", "/r2", "/r3"}, new String[]{host1, host2, host3}); conf = htu.getConfiguration(); cluster = htu.getDFSCluster(); dfs = (DistributedFileSystem) FileSystem.get(conf); }
@Test public void testMiniCluster() throws Exception { HBaseTestingUtility hbt = new HBaseTestingUtility(); MiniHBaseCluster cluster = hbt.startMiniCluster(); try { assertEquals(1, cluster.getLiveRegionServerThreads().size()); } finally { hbt.shutdownMiniCluster(); } }
@BeforeClass public static void setUpBeforeClass() throws Exception { util = new HBaseTestingUtility(); util.getConfiguration().setBoolean(CoprocessorHost.ABORT_ON_ERROR_KEY, false); util.startMiniCluster(); }
@Before public void setUp() throws Exception { htu = new HBaseTestingUtility(); htu.getConfiguration().setInt("dfs.blocksize", 1024);// For the test with multiple blocks htu.getConfiguration().setInt("dfs.replication", 3); htu.startMiniDFSCluster(3, new String[]{"/r1", "/r2", "/r3"}, new String[]{host1, host2, host3}); conf = htu.getConfiguration(); cluster = htu.getDFSCluster(); dfs = (DistributedFileSystem) FileSystem.get(conf); }
@BeforeClass public static void setUp() throws Exception { TEST_UTIL = new HBaseTestingUtility(); TEST_UTIL.startMiniCluster(NUM_SLAVES_BASE); admin = TEST_UTIL.getAdmin(); cluster = TEST_UTIL.getHBaseCluster(); master = ((MiniHBaseCluster)cluster).getMaster(); LOG.info("Done initializing cluster"); }
@BeforeClass public static void setupBeforeClass() throws Exception { TEST_UTIL = new HBaseTestingUtility(); TEST_UTIL.getConfiguration().set( RpcServerFactory.CUSTOM_RPC_SERVER_IMPL_CONF_KEY, NettyRpcServer.class.getName()); TEST_UTIL.startMiniCluster(); }
@Before public void setUp() throws Exception { TEST_UTIL = new HBaseTestingUtility(); conf = TEST_UTIL.getConfiguration(); testDir = TEST_UTIL.getDataTestDir("TestBlocksScanned"); }
@SuppressWarnings("resource") private void startMiniClusters(int numClusters) throws Exception { Random random = new Random(); utilities = new HBaseTestingUtility[numClusters]; configurations = new Configuration[numClusters]; for (int i = 0; i < numClusters; i++) { Configuration conf = new Configuration(baseConfiguration); conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/" + i + random.nextInt()); HBaseTestingUtility utility = new HBaseTestingUtility(conf); if (i == 0) { utility.startMiniZKCluster(); miniZK = utility.getZkCluster(); } else { utility.setZkCluster(miniZK); } utility.startMiniCluster(); utilities[i] = utility; configurations[i] = conf; new ZKWatcher(conf, "cluster" + i, null, true); } }
@BeforeClass public static void beforeClass() throws Exception { util = new HBaseTestingUtility(); util.getConfiguration().setInt(CompactionConfiguration.HBASE_HSTORE_COMPACTION_MIN_KEY,100); util.getConfiguration().set("dfs.blocksize", "64000"); util.getConfiguration().set("dfs.namenode.fs-limits.min-block-size", "1024"); util.getConfiguration().set(TimeToLiveHFileCleaner.TTL_CONF_KEY,"0"); util.startMiniCluster(2); }
@Before public void setUp() throws IOException { htu = new HBaseTestingUtility(); fs = htu.getTestFileSystem(); conf = htu.getConfiguration(); }