Package org.apache.hadoop.hbase.client

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


    CountDownLatch proceed = new CountDownLatch(1);
    RegionOpenListener list = new RegionOpenListener(aboutToOpen, proceed);
    m.getRegionServerOperationQueue().registerRegionServerOperationListener(list);

    LOG.info("Splitting table");
    admin.split(TABLENAME);
    LOG.info("Waiting for split result to be about to open");
    aboutToOpen.await(60, TimeUnit.SECONDS);
    try {
      LOG.info("Making sure we can call getTableRegions while opening");
      tableRegions = m.getTableRegions(TABLENAME);
View Full Code Here


          // we have a good region, time to split!
          byte[] split = dr.getSecond();
          LOG.debug("Splitting at " + splitAlgo.rowToStr(split));
          HBaseAdmin admin = new HBaseAdmin(table.getConfiguration());
          admin.split(table.getTableName(), split);

          LinkedList<Pair<byte[], byte[]>> finished = Lists.newLinkedList();
          if (conf.getBoolean("split.verify", true)) {
            // we need to verify and rate-limit our splits
            outstanding.addLast(dr);
View Full Code Here

          // we have a good region, time to split!
          byte[] split = dr.getSecond();
          LOG.debug("Splitting at " + splitAlgo.rowToStr(split));
          HBaseAdmin admin = new HBaseAdmin(table.getConfiguration());
          admin.split(table.getTableName(), split);

          LinkedList<Pair<byte[], byte[]>> finished = Lists.newLinkedList();
          if (conf.getBoolean("split.verify", true)) {
            // we need to verify and rate-limit our splits
            outstanding.addLast(dr);
View Full Code Here

          HRegion region = TEST_UTIL.getSplittableRegion(tableName, -1);
          if (region != null) {
            byte[] regionName = region.getRegionName();
            admin.flush(regionName);
            admin.compact(regionName);
            admin.split(regionName);
          } else {
            LOG.warn("Could not find suitable region for the table.  Possibly the " +
              "region got closed and the attempts got over before " +
              "the region could have got reassigned.");
          }
View Full Code Here

    table.put(new Put(Bytes.toBytes("row1"))
        .add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes("v1")));
    table.put(new Put(Bytes.toBytes("row2"))
        .add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes("v2")));
    HBaseAdmin admin = UTIL.getHBaseAdmin();
    admin.split(TEST_TABLE);

    // wait for split
    Thread.sleep(10000);

    ListMultimap<String,TablePermission> postperms =
View Full Code Here

    table.put(new Put(Bytes.toBytes("row1"))
        .add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes("v1")));
    table.put(new Put(Bytes.toBytes("row2"))
        .add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes("v2")));
    HBaseAdmin admin = UTIL.getHBaseAdmin();
    admin.split(TEST_TABLE);

    // wait for split
    Thread.sleep(10000);

    ListMultimap<String,TablePermission> postperms =
View Full Code Here

    PrivilegedExceptionAction splitIndexRegion = new PrivilegedExceptionAction() {
      @Override
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(conf);
        admin.split("testSplitOp_idx");
        return null;
      }
    };

    PrivilegedExceptionAction splitMainRegion = new PrivilegedExceptionAction() {
View Full Code Here

    PrivilegedExceptionAction splitMainRegion = new PrivilegedExceptionAction() {
      @Override
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(conf);
        admin.split("testSplitOp");
        return null;
      }
    };

    try {
View Full Code Here

    int i = 0;
    ResultScanner scanner = table.getScanner(s);
    for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
      i++;
    }
    admin.split(hRegionInfo.getRegionName(), "row5".getBytes());
    Scan s1 = new Scan();
    int i1 = 0;
    String indexTable = userTableName + "_idx";
    List<HRegionInfo> mainTableRegions =
        UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager()
View Full Code Here

    int i = 0;
    ResultScanner scanner = table.getScanner(s);
    for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
      i++;
    }
    admin.split(hRegionInfo.getRegionName(), "row5".getBytes());
    Scan s1 = new Scan();
    int i1 = 0;
    String indexTable = userTableName + "_idx";
    List<HRegionInfo> mainTableRegions =
        UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager()
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.