Examples of moveRegion()


Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

      Assert.assertTrue(regionsOnDrainingServer > 0);
      List<HRegionInfo> hris = ProtobufUtil.getOnlineRegions(drainingServer);
      for (HRegionInfo hri : hris) {
        // Pass null and AssignmentManager will chose a random server BUT it
        // should exclude draining servers.
        master.moveRegion(null,
          RequestConverter.buildMoveRegionRequest(hri.getEncodedNameAsBytes(), null));
        // Save off region to move back.
        hriToMoveBack = hri;
      }
      // Wait for regions to come back on line again.
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

    } finally {
      unsetDrainingServer(drainingServer);
    }
    // Now we've unset the draining server, we should be able to move a region
    // to what was the draining server.
    master.moveRegion(null,
      RequestConverter.buildMoveRegionRequest(hriToMoveBack.getEncodedNameAsBytes(),
      Bytes.toBytes(drainingServer.getServerName().toString())));
    // Wait for regions to come back on line again.
    waitForAllRegionsOnline();
    Assert.assertEquals(1, drainingServer.getNumberOfOnlineRegions());
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

          break;
        }
      }
      assertTrue("Found server", found);
      LOG.info("Found " + destName);
      master.moveRegion(null,RequestConverter.buildMoveRegionRequest(
        firstGoodPair.getKey().getEncodedNameAsBytes(),Bytes.toBytes(destName)));
      assertTrue("Coprocessor should have been called on region move",
        cp.wasMoveCalled());
 
      // make sure balancer is on
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

      List<HRegionInfo> openRegions = ProtobufUtil.getOnlineRegions(rs);
      int moveCnt = openRegions.size()/2;
      for (int i=0; i<moveCnt; i++) {
        HRegionInfo info = openRegions.get(i);
        if (!info.isMetaTable()) {
          master.moveRegion(null,RequestConverter.buildMoveRegionRequest(
            openRegions.get(i).getEncodedNameAsBytes(), destRS));
        }
      }
      //Make sure no regions are in transition now
      waitForRITtoBeZero(master);
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

      Assert.assertTrue(regionsOnDrainingServer > 0);
      List<HRegionInfo> hris = ProtobufUtil.getOnlineRegions(drainingServer);
      for (HRegionInfo hri : hris) {
        // Pass null and AssignmentManager will chose a random server BUT it
        // should exclude draining servers.
        master.moveRegion(null,
          RequestConverter.buildMoveRegionRequest(hri.getEncodedNameAsBytes(), null));
        // Save off region to move back.
        hriToMoveBack = hri;
      }
      // Wait for regions to come back on line again.
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

    } finally {
      unsetDrainingServer(drainingServer);
    }
    // Now we've unset the draining server, we should be able to move a region
    // to what was the draining server.
    master.moveRegion(null,
      RequestConverter.buildMoveRegionRequest(hriToMoveBack.getEncodedNameAsBytes(),
      Bytes.toBytes(drainingServer.getServerName().toString())));
    // Wait for regions to come back on line again.
    waitForAllRegionsOnline();
    Assert.assertEquals(1, drainingServer.getNumberOfOnlineRegions());
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

          break;
        }
      }
      assertTrue("Found server", found);
      LOG.info("Found " + destName);
      master.moveRegion(null,RequestConverter.buildMoveRegionRequest(
        firstGoodPair.getKey().getEncodedNameAsBytes(),Bytes.toBytes(destName)));
      assertTrue("Coprocessor should have been called on region move",
        cp.wasMoveCalled());
 
      // make sure balancer is on
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

      List<HRegionInfo> openRegions = ProtobufUtil.getOnlineRegions(rs);
      int moveCnt = openRegions.size()/2;
      for (int i=0; i<moveCnt; i++) {
        HRegionInfo info = openRegions.get(i);
        if (!info.isMetaTable()) {
          master.moveRegion(null,RequestConverter.buildMoveRegionRequest(
            openRegions.get(i).getEncodedNameAsBytes(), destRS));
        }
      }
      //Make sure no regions are in transition now
      waitForRITtoBeZero(master);
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

          break;
        }
      }
      assertTrue("Found server", found);
      LOG.info("Found " + destName);
      master.moveRegion(null,RequestConverter.buildMoveRegionRequest(
        firstGoodPair.getKey().getEncodedNameAsBytes(),Bytes.toBytes(destName)));
      assertTrue("Coprocessor should have been called on region move",
        cp.wasMoveCalled());
 
      // make sure balancer is on
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.moveRegion()

      List<HRegionInfo> openRegions = ProtobufUtil.getOnlineRegions(rs);
      int moveCnt = openRegions.size()/2;
      for (int i=0; i<moveCnt; i++) {
        HRegionInfo info = openRegions.get(i);
        if (!info.isMetaTable()) {
          master.moveRegion(null,RequestConverter.buildMoveRegionRequest(
            openRegions.get(i).getEncodedNameAsBytes(), destRS));
        }
      }
      //Make sure no regions are in transition now
      waitForRITtoBeZero(master);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.