@Before public void setup() { Configuration conf = HBaseConfiguration.create(); conf.setBoolean("hbase.testing.nocluster", true); // No need to do ZK final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(conf); TEST_UTIL.getDataTestDir(this.getClass().getName()); regionServer = HRegionServer.constructRegionServer(HRegionServer.class, conf); priority = regionServer.rpcServices.getPriority(); }
private int start() throws Exception { Configuration conf = getConf(); TraceUtil.initTracer(conf); try { // If 'local', don't start a region server here. Defer to // LocalHBaseCluster. It manages 'local' clusters. if (LocalHBaseCluster.isLocal(conf)) { LOG.warn("Not starting a distinct region server because " + HConstants.CLUSTER_DISTRIBUTED + " is false"); } else { logProcessInfo(getConf()); HRegionServer hrs = HRegionServer.constructRegionServer(regionServerClass, conf); hrs.start(); hrs.join(); if (hrs.isAborted()) { throw new RuntimeException("HRegionServer Aborted"); } } } catch (Throwable t) { LOG.error("Region server exiting", t); return 1; } return 0; }
private int start() throws Exception { Configuration conf = getConf(); // If 'local', don't start a region server here. Defer to // LocalHBaseCluster. It manages 'local' clusters. if (LocalHBaseCluster.isLocal(conf)) { LOG.warn("Not starting a distinct region server because " + HConstants.CLUSTER_DISTRIBUTED + " is false"); } else { logJVMInfo(); HRegionServer hrs = HRegionServer.constructRegionServer(regionServerClass, conf); HRegionServer.startRegionServer(hrs); } return 0; }
@Before public void setup() { Configuration conf = HBaseConfiguration.create(); conf.setBoolean("hbase.testing.nocluster", true); // No need to do ZK final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(conf); TEST_UTIL.getDataTestDir(this.getClass().getName()); regionServer = HRegionServer.constructRegionServer(HRegionServer.class, conf); priority = regionServer.rpcServices.getPriority(); }
private int start() throws Exception { Configuration conf = getConf(); CoordinatedStateManager cp = CoordinatedStateManagerFactory.getCoordinatedStateManager(conf); try { // If 'local', don't start a region server here. Defer to // LocalHBaseCluster. It manages 'local' clusters. if (LocalHBaseCluster.isLocal(conf)) { LOG.warn("Not starting a distinct region server because " + HConstants.CLUSTER_DISTRIBUTED + " is false"); } else { logProcessInfo(getConf()); HRegionServer hrs = HRegionServer.constructRegionServer(regionServerClass, conf, cp); hrs.start(); hrs.join(); if (hrs.isAborted()) { throw new RuntimeException("HRegionServer Aborted"); } } } catch (Throwable t) { LOG.error("Region server exiting", t); return 1; } return 0; }