Package org.apache.hadoop.hbase.client

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


      HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      if (expectedState == CompactionState.MINOR) {
        if (singleFamily) {
          admin.compact(table, family);
        } else {
          admin.compact(table);
        }
      } else {
        if (singleFamily) {
          admin.majorCompact(table, family);
        } else {
View Full Code Here


      System.out.println(result);
    }
    for (String store : storeFileList) {
      Threads.sleepWithoutInterrupt(TTL_MS);
    }
    admin.compact(userTableName + "_idx");

    onlineRegions = regionServer.getOnlineRegions(Bytes.toBytes(userTableName + "_idx"));
    storeFileList = regionServer.getStoreFileList(onlineRegions.get(0).getRegionName());
    while (storeFileList.size() != 1) {
      Thread.sleep(1000);
View Full Code Here

         g.addColumn(fam, col2);
         Result r = tt.get(g);
         int size = r.getColumn(fam, col2).size();
         LOG.info("Size before compaction : " + size);

         admin.compact(TEST_TABLE);
        
         Thread.sleep(2000);
        
         g = new Get(row);
         g.setMaxVersions();
View Full Code Here

         g.addColumn(fam, col1);
         Result r = tt.get(g);
         int size = r.getColumn(fam, col1).size();
         LOG.info("Size before compaction : " + size);

         admin.compact(TEST_TABLE);

         Thread.sleep(2000);

         Scan s = new Scan(row);
         s.setMaxVersions();
View Full Code Here

      // should have a second StoreFile now
      assertEquals(2, fs.listStatus(storePath).length);

      // minor compactions shouldn't get rid of the file
      admin.compact(TABLE_NAME.getName());
      try {
        quickPoll(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return fs.listStatus(storePath).length == 1;
          }
View Full Code Here

      // should have a second StoreFile now
      assertEquals(2, fs.listStatus(storePath).length);

      // minor compactions shouldn't get rid of the file
      admin.compact(TABLE_NAME.getName());
      try {
        quickPoll(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return fs.listStatus(storePath).length == 1;
          }
View Full Code Here

      // should have a second StoreFile now
      assertEquals(2, fs.listStatus(storePath).length);

      // minor compactions shouldn't get rid of the file
      admin.compact(TABLE_NAME.getName());
      try {
        quickPoll(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return fs.listStatus(storePath).length == 1;
          }
View Full Code Here

      // should have a second StoreFile now
      assertEquals(2, fs.listStatus(storePath).length);

      // minor compactions shouldn't get rid of the file
      admin.compact(TABLE_NAME.getName());
      try {
        quickPoll(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return fs.listStatus(storePath).length == 1;
          }
View Full Code Here

    if (major) {
      LOG.debug("Major compacting region " + region.getRegionNameAsString());
      admin.majorCompact(region.getRegionName());
    } else {
      LOG.debug("Compacting region " + region.getRegionNameAsString());
      admin.compact(region.getRegionName());
    }
    if (sleepTime > 0) {
      Thread.sleep(sleepTime);
    }
  }
View Full Code Here

      // should have a second StoreFile now
      assertEquals(2, fs.listStatus(storePath).length);

      // minor compactions shouldn't get rid of the file
      admin.compact(TABLE_NAME.getName());
      try {
        quickPoll(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return fs.listStatus(storePath).length == 1;
          }
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.