コード例 #1
0
 public JVMClusterUtil.MasterThread addMaster(Configuration c, final int index)
     throws IOException {
   // Create each master with its own Configuration instance so each has
   // its HConnection instance rather than share (see HBASE_INSTANCES down in
   // the guts of HConnectionManager.
   JVMClusterUtil.MasterThread mt = JVMClusterUtil.createMasterThread(c, this.masterClass, index);
   this.masterThreads.add(mt);
   return mt;
 }
コード例 #2
0
 public JVMClusterUtil.RegionServerThread addRegionServer(Configuration config, final int index)
     throws IOException {
   // Create each regionserver with its own Configuration instance so each has
   // its HConnection instance rather than share (see HBASE_INSTANCES down in
   // the guts of HConnectionManager.
   JVMClusterUtil.RegionServerThread rst =
       JVMClusterUtil.createRegionServerThread(config, this.regionServerClass, index);
   this.regionThreads.add(rst);
   return rst;
 }
コード例 #3
0
 /** Shut down the mini HBase cluster */
 public void shutdown() {
   JVMClusterUtil.shutdown(this.masterThreads, this.regionThreads);
 }
コード例 #4
0
 /** Start the cluster. */
 public void startup() throws IOException {
   JVMClusterUtil.startup(this.masterThreads, this.regionThreads);
 }