Examples of compactRegion()


Examples of org.apache.hadoop.hbase.client.Admin.compactRegion()

        try {
          HRegion region = TEST_UTIL.getSplittableRegion(tableName, -1);
          if (region != null) {
            byte[] regionName = region.getRegionName();
            admin.flushRegion(regionName);
            admin.compactRegion(regionName);
            admin.splitRegion(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

Examples of org.apache.hadoop.hbase.client.Admin.compactRegion()

      if (major) {
        LOG.debug("Major compacting region " + region.getRegionNameAsString());
        admin.majorCompactRegion(region.getRegionName());
      } else {
        LOG.debug("Compacting region " + region.getRegionNameAsString());
        admin.compactRegion(region.getRegionName());
      }
    } catch (Exception ex) {
      LOG.warn("Compaction failed, might be caused by other chaos: " + ex.getMessage());
    }
    if (sleepTime > 0) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Admin.compactRegion()

        try {
          HRegion region = TEST_UTIL.getSplittableRegion(tableName, -1);
          if (region != null) {
            byte[] regionName = region.getRegionName();
            admin.flushRegion(regionName);
            admin.compactRegion(regionName);
            admin.splitRegion(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

Examples of org.apache.hadoop.hbase.client.AdminProtocol.compactRegion()

                + Bytes.toStringBinary(row));
            AdminProtocol server = connection.getAdmin(location.getServerName());
            CompactRegionRequest request =
              RequestConverter.buildCompactRegionRequest(
                location.getRegionInfo().getRegionName(), true, null);
            server.compactRegion(null, request);
            numCompactions.incrementAndGet();
            return null;
          }
        }.withRetries();
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.compactRegion()

  throws IOException {
    HRegionInterface rs =
      this.connection.getHRegionConnection(sn.getHostname(), sn.getPort());
    if (family != null) {
      try {
        rs.compactRegion(hri, major, family);
      } catch (IOException ioe) {
        String notFoundMsg = "java.lang.NoSuchMethodException: org.apache.hadoop.hbase.ipc.HRegionInterface."
          + "compactRegion(org.apache.hadoop.hbase.HRegionInfo, boolean, [B)";
        if (ioe.getMessage().contains(notFoundMsg)) {
          throw new IOException("per-column family compaction not supported on this version "
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.compactRegion()

            + "omitting the column family name.  Alternatively, you can upgrade the HBase server");
        }
        throw ioe;
      }
    } else {
      rs.compactRegion(hri, major);
    }
  }

  /**
   * Move the region <code>r</code> to <code>dest</code>.
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.compactRegion()

  private void compact(final ServerName sn, final HRegionInfo hri,
      final boolean major)
  throws IOException {
    HRegionInterface rs =
      this.connection.getHRegionConnection(sn.getHostname(), sn.getPort());
    rs.compactRegion(hri, major);
  }

  /**
   * Move the region <code>r</code> to <code>dest</code>.
   * @param encodedRegionName The encoded region name; i.e. the hash that makes
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.compactRegion()

  throws IOException {
    HRegionInterface rs =
      this.connection.getHRegionConnection(sn.getHostname(), sn.getPort());
    if (family != null) {
      try {
        rs.compactRegion(hri, major, family);
      } catch (IOException ioe) {
        String notFoundMsg = "java.lang.NoSuchMethodException: org.apache.hadoop.hbase.ipc.HRegionInterface."
          + "compactRegion(org.apache.hadoop.hbase.HRegionInfo, boolean, [B)";
        if (ioe.getMessage().contains(notFoundMsg)) {
          throw new IOException("per-column family compaction not supported on this version "
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.compactRegion()

            + "omitting the column family name.  Alternatively, you can upgrade the HBase server");
        }
        throw ioe;
      }
    } else {
      rs.compactRegion(hri, major);
    }
  }

  /**
   * Move the region <code>r</code> to <code>dest</code>.
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.HRegionInterface.compactRegion()

  throws IOException {
    HRegionInterface rs =
      this.connection.getHRegionConnection(sn.getHostname(), sn.getPort());
    if (family != null) {
      try {
        rs.compactRegion(hri, major, family);
      } catch (IOException ioe) {
        String notFoundMsg = "java.lang.NoSuchMethodException: org.apache.hadoop.hbase.ipc.HRegionInterface."
          + "compactRegion(org.apache.hadoop.hbase.HRegionInfo, boolean, [B)";
        if (ioe.getMessage().contains(notFoundMsg)) {
          throw new IOException("per-column family compaction not supported on this version "
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.