Package org.apache.hadoop.hbase.client

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


      } catch (AssertionError ae) {
        // this is expected behavior
      }

      // a major compaction should work though
      admin.majorCompact(TABLE_NAME.getName());
      quickPoll(new Callable<Boolean>() {
        public Boolean call() throws Exception {
          return fs.listStatus(storePath).length == 1;
        }
      }, 5000);
View Full Code Here


      } catch (AssertionError ae) {
        // this is expected behavior
      }

      // a major compaction should work though
      admin.majorCompact(TABLE_NAME.getName());
      quickPoll(new Callable<Boolean>() {
        public Boolean call() throws Exception {
          return fs.listStatus(storePath).length == 1;
        }
      }, 5000);
View Full Code Here

        admin.compact(table, fakecf);
      } catch (IOException ioe) {
        caughtMinorCompact = true;
      }
      try {
        admin.majorCompact(table, fakecf);
      } catch (IOException ioe) {
        caughtMajorCompact = true;
      }
    } finally {
      if (ht != null) {
View Full Code Here

        } else {
          admin.compact(table.getName());
        }
      } else {
        if (singleFamily) {
          admin.majorCompact(table.getName(), family);
        } else {
          admin.majorCompact(table.getName());
        }
      }
      long curt = System.currentTimeMillis();
View Full Code Here

        }
      } else {
        if (singleFamily) {
          admin.majorCompact(table.getName(), family);
        } else {
          admin.majorCompact(table.getName());
        }
      }
      long curt = System.currentTimeMillis();
      long waitTime = 5000;
      long endt = curt + waitTime;
View Full Code Here

      } catch (AssertionError ae) {
        // this is expected behavior
      }

      // a major compaction should work though
      admin.majorCompact(TABLE_NAME.getName());
      quickPoll(new Callable<Boolean>() {
        public Boolean call() throws Exception {
          return fs.listStatus(storePath).length == 1;
        }
      }, 5000);
View Full Code Here

      } catch (AssertionError ae) {
        // this is expected behavior
      }

      // a major compaction should work though
      admin.majorCompact(TABLE_NAME.getName());
      quickPoll(new Callable<Boolean>() {
        public Boolean call() throws Exception {
          return fs.listStatus(storePath).length == 1;
        }
      }, 5000);
View Full Code Here

    // The table may not have all regions on line yet.  Assert online before
    // moving to major compact.
    assertAllOnLine(t);

    System.err.println("\nCompacting the table\n");
    admin.majorCompact(TABLE.getName());
    // Wait until compaction completes
    Threads.sleepWithoutInterrupt(5000);
    HRegionServer rs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(0);
    while (rs.compactSplitThread.getCompactionQueueSize() > 0) {
      Threads.sleep(50);
View Full Code Here

                    htable.close();

                    if (timestampReusingTables.containsKey(table.getNameAsString())) {
                        admin.flush(table.getNameAsString());
                        admin.majorCompact(table.getName());
                    }
                }
            }

            truncateReport.insert(0, "Truncated the following tables: ");
View Full Code Here

                    HBaseAdmin admin = new HBaseAdmin(conf);
                    try {
                        CompactionState compactionState = admin.getCompactionState(tableName);
                        if (compactionState != CompactionState.MAJOR && compactionState != CompactionState.MAJOR_AND_MINOR) {
                            System.out.println("Re-requesting major compaction on " + tableName);
                            admin.majorCompact(tableName);
                        }
                    } finally {
                        Closer.close(admin);
                    }
                    waitStart = System.currentTimeMillis();
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.