Examples of mergeRegions()


Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

    int numRegions = admin.getTableRegions(TABLE_NAME).size();
    int numRegionsAfterMerge = numRegions - 2;
    admin.mergeRegions(regions.get(1).getEncodedNameAsBytes(),
        regions.get(2).getEncodedNameAsBytes(), true);
    admin.mergeRegions(regions.get(5).getEncodedNameAsBytes(),
        regions.get(6).getEncodedNameAsBytes(), true);

    waitRegionsAfterMerge(numRegionsAfterMerge);
    assertEquals(numRegionsAfterMerge, admin.getTableRegions(TABLE_NAME).size());
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

      assertNotEquals(region1, region2);

      // do a region merge
      HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
      admin.mergeRegions(region1.getEncodedNameAsBytes(),
          region2.getEncodedNameAsBytes(), false);

      // wait until region merged
      long timeout = System.currentTimeMillis() + 30 * 1000;
      while (true) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

    int i = RandomUtils.nextInt(regions.size() - 1);
    HRegionInfo a = regions.get(i++);
    HRegionInfo b = regions.get(i);
    LOG.debug("Merging " + a.getRegionNameAsString() + " and " + b.getRegionNameAsString());
    admin.mergeRegions(a.getEncodedNameAsBytes(), b.getEncodedNameAsBytes(), false);
    if (sleepTime > 0) {
      Thread.sleep(sleepTime);
    }
  }
}
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

    int i = RandomUtils.nextInt(regions.size() - 1);
    HRegionInfo a = regions.get(i++);
    HRegionInfo b = regions.get(i);
    LOG.debug("Merging " + a.getRegionNameAsString() + " and " + b.getRegionNameAsString());
    admin.mergeRegions(a.getEncodedNameAsBytes(), b.getEncodedNameAsBytes(), false);
    if (sleepTime > 0) {
      Thread.sleep(sleepTime);
    }
  }
}
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

      }
    });

    int numRegions = admin.getTableRegions(TABLE_NAME).size();
    int numRegionsAfterMerge = numRegions - 2;
    admin.mergeRegions(regions.get(1).getEncodedNameAsBytes(),
        regions.get(2).getEncodedNameAsBytes(), true);
    admin.mergeRegions(regions.get(5).getEncodedNameAsBytes(),
        regions.get(6).getEncodedNameAsBytes(), true);

    // Verify that there's one region less
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

    int numRegions = admin.getTableRegions(TABLE_NAME).size();
    int numRegionsAfterMerge = numRegions - 2;
    admin.mergeRegions(regions.get(1).getEncodedNameAsBytes(),
        regions.get(2).getEncodedNameAsBytes(), true);
    admin.mergeRegions(regions.get(5).getEncodedNameAsBytes(),
        regions.get(6).getEncodedNameAsBytes(), true);

    // Verify that there's one region less
    waitRegionsAfterMerge(numRegionsAfterMerge);
    assertEquals(numRegionsAfterMerge, admin.getTableRegions(TABLE_NAME).size());
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

      }
    });

    int numRegions = admin.getTableRegions(TABLE_NAME).size();
    int numRegionsAfterMerge = numRegions - 2;
    admin.mergeRegions(regions.get(1).getEncodedNameAsBytes(),
        regions.get(2).getEncodedNameAsBytes(), true);
    admin.mergeRegions(regions.get(5).getEncodedNameAsBytes(),
        regions.get(6).getEncodedNameAsBytes(), true);

    waitRegionsAfterMerge(numRegionsAfterMerge);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

    int numRegions = admin.getTableRegions(TABLE_NAME).size();
    int numRegionsAfterMerge = numRegions - 2;
    admin.mergeRegions(regions.get(1).getEncodedNameAsBytes(),
        regions.get(2).getEncodedNameAsBytes(), true);
    admin.mergeRegions(regions.get(5).getEncodedNameAsBytes(),
        regions.get(6).getEncodedNameAsBytes(), true);

    waitRegionsAfterMerge(numRegionsAfterMerge);
    assertEquals(numRegionsAfterMerge, admin.getTableRegions(TABLE_NAME).size());
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

      desc = new HTableDescriptor(TableName.valueOf(TABLENAME2));
      desc.addFamily(new HColumnDescriptor(FAM));
      admin.createTable(desc, new byte[][] { Bytes.toBytes("row") });
      assertFalse(regionServerObserver.wasRegionMergeCalled());
      List<HRegion> regions = regionServer.getOnlineRegions(TableName.valueOf(TABLENAME));
      admin.mergeRegions(regions.get(0).getRegionInfo().getEncodedNameAsBytes(), regions.get(1)
          .getRegionInfo().getEncodedNameAsBytes(), true);
      int regionsCount = regionServer.getOnlineRegions(TableName.valueOf(TABLENAME)).size();
      while (regionsCount != 1) {
        regionsCount = regionServer.getOnlineRegions(TableName.valueOf(TABLENAME)).size();
        Thread.sleep(1000);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.mergeRegions()

      assertNotEquals(region1, region2);

      // do a region merge
      HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
      admin.mergeRegions(region1.getEncodedNameAsBytes(),
          region2.getEncodedNameAsBytes(), false);

      // wait until region merged
      long timeout = System.currentTimeMillis() + 30 * 1000;
      while (true) {
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.