Package org.apache.hadoop.hbase.client

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


    HTable ht = null;
    try {
      ht = TEST_UTIL.createTable(table, family);
      HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      try {
        admin.compact(table, fakecf);
      } catch (IOException ioe) {
        caughtMinorCompact = true;
      }
      try {
        admin.majorCompact(table, fakecf);
View Full Code Here


      int countBeforeSingleFamily = countStoreFilesInFamily(regions, family);
      assertTrue(countBefore > 0); // there should be some data files
      HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration());
      if (expectedState == CompactionState.MINOR) {
        if (singleFamily) {
          admin.compact(table, family);
        } else {
          admin.compact(table);
        }
      } else {
        if (singleFamily) {
View Full Code Here

      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

    PrivilegedExceptionAction compactIndexTable = new PrivilegedExceptionAction() {
      @Override
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(conf);
        admin.compact("testCompactionOp_idx");
        return null;
      }
    };

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

    PrivilegedExceptionAction compactMainTable = new PrivilegedExceptionAction() {
      @Override
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(conf);
        admin.compact("testCompactionOp");
        return null;
      }
    };

    try {
View Full Code Here

    byte[] encodedNameAsBytes = hRegion.getRegionInfo().getEncodedNameAsBytes();
    int serverWith = hBaseCluster.getServerWith(hRegion.getRegionName());
    int destServerNo = (serverWith == 1 ? 0 : 1);
    HRegionServer destServer = hBaseCluster.getRegionServer(destServerNo);

    admin.compact(userTableName);

    while (!compactionCalled) {
      Thread.sleep(1000);
    }
View Full Code Here

    while (!regionOnline) {
      regionOnline =
          hBaseCluster.getMaster().getAssignmentManager()
              .isRegionAssigned(indexHRegion.getRegionInfo());
    }
    admin.compact(userTableName + "_idx");
    List<HRegion> onlineRegions =
        regionServer.getOnlineRegions(Bytes.toBytes(userTableName + "_idx"));
    List<String> storeFileList =
        regionServer.getStoreFileList(onlineRegions.get(0).getRegionName());
    while (storeFileList.size() != 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

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.