hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [3/6] hbase git commit: Revert "Add mechanism to control hbase cleaner behavior"
Date Thu, 02 Feb 2017 04:24:30 GMT
Revert "Add mechanism to control hbase cleaner behavior"

This reverts commit ef052521cd3b1ae086770aabfad14804ee8d4ac6.

Bad commit message.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2c799fb7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2c799fb7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2c799fb7

Branch: refs/heads/master
Commit: 2c799fb70aa47f9109714dc410862af24b4a0321
Parents: ef05252
Author: Sean Busbey <busbey@apache.org>
Authored: Wed Feb 1 22:11:48 2017 -0600
Committer: Sean Busbey <busbey@apache.org>
Committed: Wed Feb 1 22:11:48 2017 -0600

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/Admin.java   |   24 -
 .../hbase/client/ConnectionImplementation.java  |   25 +-
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |   36 +-
 .../hbase/shaded/protobuf/RequestConverter.java |   39 -
 .../shaded/protobuf/ResponseConverter.java      |    9 -
 .../shaded/protobuf/generated/MasterProtos.java | 4912 ++++--------------
 .../src/main/protobuf/Master.proto              |   38 -
 .../org/apache/hadoop/hbase/master/HMaster.java |   22 +-
 .../hadoop/hbase/master/MasterRpcServices.java  |   36 -
 .../hbase/master/cleaner/CleanerChore.java      |   23 -
 .../hbase/master/cleaner/TestCleanerChore.java  |   66 -
 hbase-shell/src/main/ruby/hbase/admin.rb        |   20 -
 hbase-shell/src/main/ruby/shell.rb              |    3 -
 .../shell/commands/cleaner_chore_enabled.rb     |   36 -
 .../ruby/shell/commands/cleaner_chore_run.rb    |   35 -
 .../ruby/shell/commands/cleaner_chore_switch.rb |   37 -
 16 files changed, 983 insertions(+), 4378 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2c799fb7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 232dbf4..583ee52 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -897,30 +897,6 @@ public interface Admin extends Abortable, Closeable {
   boolean isCatalogJanitorEnabled() throws IOException;
 
   /**
-   * Enable/Disable the cleaner chore
-   *
-   * @param on if true enables the cleaner chore
-   * @return the previous state
-   * @throws IOException
-   */
-  public boolean setCleanerChoreRunning(final boolean on) throws IOException;
-
-  /**
-   * Ask for cleaner chore to run
-   *
-   * @return True if cleaner chore ran, false otherwise
-   * @throws IOException
-   */
-  public boolean runCleanerChore() throws IOException;
-
-  /**
-   * Query on the cleaner chore state (Enabled/Disabled?)
-   *
-   * @throws IOException
-   */
-  public boolean isCleanerChoreEnabled() throws IOException;
-
-  /**
    * Merge two regions. Asynchronous operation.
    *
    * @param nameOfRegionA encoded or full name of region a

http://git-wip-us.apache.org/repos/asf/hbase/blob/2c799fb7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 9142ec9..ca21365 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -80,12 +80,12 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientServ
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DrainRegionServersRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DrainRegionServersResponse;
+import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersRequest;
+import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsBalancerEnabledRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsBalancerEnabledResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsNormalizerEnabledRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsNormalizerEnabledResponse;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersRequest;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ListDrainingRegionServersResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.NormalizeRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.NormalizeResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RemoveDrainFromRegionServersRequest;
@@ -1444,27 +1444,6 @@ class ConnectionImplementation implements ClusterConnection, Closeable
{
       }
 
       @Override
-      public MasterProtos.RunCleanerChoreResponse runCleanerChore(RpcController controller,
-          MasterProtos.RunCleanerChoreRequest request)
-          throws ServiceException {
-        return stub.runCleanerChore(controller, request);
-      }
-
-      @Override
-      public MasterProtos.SetCleanerChoreRunningResponse setCleanerChoreRunning(
-          RpcController controller, MasterProtos.SetCleanerChoreRunningRequest request)
-          throws ServiceException {
-        return stub.setCleanerChoreRunning(controller, request);
-      }
-
-      @Override
-      public MasterProtos.IsCleanerChoreEnabledResponse isCleanerChoreEnabled(
-          RpcController controller, MasterProtos.IsCleanerChoreEnabledRequest request)
-          throws ServiceException {
-        return stub.isCleanerChoreEnabled(controller, request);
-      }
-
-      @Override
       public ClientProtos.CoprocessorServiceResponse execMasterService(
           RpcController controller, ClientProtos.CoprocessorServiceRequest request)
           throws ServiceException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2c799fb7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index 4e0a6c7..6e1f254 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -58,8 +58,8 @@ import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.NamespaceNotFoundException;
 import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.ProcedureInfo;
-import org.apache.hadoop.hbase.RegionLoad;
 import org.apache.hadoop.hbase.RegionLocations;
+import org.apache.hadoop.hbase.RegionLoad;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableExistsException;
 import org.apache.hadoop.hbase.TableName;
@@ -1459,40 +1459,6 @@ public class HBaseAdmin implements Admin {
     });
   }
 
-  @Override
-  public boolean setCleanerChoreRunning(final boolean on) throws IOException {
-    return executeCallable(new MasterCallable<Boolean>(getConnection(), getRpcControllerFactory())
{
-      @Override public Boolean rpcCall() throws Exception {
-        return master.setCleanerChoreRunning(getRpcController(), RequestConverter
-                                                                   .buildSetCleanerChoreRunningRequest(
-                                                                     on)).getPrevValue();
-      }
-    });
-  }
-
-  @Override
-  public boolean runCleanerChore() throws IOException {
-    return executeCallable(new MasterCallable<Boolean>(getConnection(), getRpcControllerFactory())
{
-      @Override public Boolean rpcCall() throws Exception {
-        return master
-                 .runCleanerChore(getRpcController(), RequestConverter
-                                                        .buildRunCleanerChoreRequest())
-                 .getCleanerChoreRan();
-      }
-    });
-  }
-
-  @Override
-  public boolean isCleanerChoreEnabled() throws IOException {
-    return executeCallable(new MasterCallable<Boolean>(getConnection(), getRpcControllerFactory())
{
-      @Override public Boolean rpcCall() throws Exception {
-        return master.isCleanerChoreEnabled(getRpcController(),
-                                            RequestConverter.buildIsCleanerChoreEnabledRequest())
-                     .getValue();
-      }
-    });
-  }
-
   private boolean isEncodedRegionName(byte[] regionName) throws IOException {
     try {
       HRegionInfo.parseRegionName(regionName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/2c799fb7/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
index d3ef7b8..8de9ad8 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
@@ -85,7 +85,6 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DeleteColu
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DeleteTableRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DisableTableRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.EnableCatalogJanitorRequest;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetCleanerChoreRunningRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.EnableTableRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetSchemaAlterStatusRequest;
@@ -94,7 +93,6 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableNa
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsBalancerEnabledRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsCatalogJanitorEnabledRequest;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsCleanerChoreEnabledRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsMasterRunningRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsNormalizerEnabledRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSplitOrMergeEnabledRequest;
@@ -105,7 +103,6 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MoveRegion
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.NormalizeRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.OfflineRegionRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RunCatalogScanRequest;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RunCleanerChoreRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetBalancerRunningRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetNormalizerRunningRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetSplitOrMergeEnabledRequest;
@@ -1455,42 +1452,6 @@ public final class RequestConverter {
   }
 
   /**
-   * @see {@link #buildCleanerChoreRequest}
-   */
-  private static final RunCleanerChoreRequest CLEANER_CHORE_REQUEST =
-    RunCleanerChoreRequest.newBuilder().build();
-
-  /**
-   * Creates a request for running cleaner chore
-   * @return A {@link RunCleanerChoreRequest}
-   */
-  public static RunCleanerChoreRequest buildRunCleanerChoreRequest() {
-    return CLEANER_CHORE_REQUEST;
-  }
-
-  /**
-   * Creates a request for enabling/disabling the cleaner chore
-   * @return A {@link SetCleanerChoreRunningRequest}
-   */
-  public static SetCleanerChoreRunningRequest buildSetCleanerChoreRunningRequest(boolean
on) {
-    return SetCleanerChoreRunningRequest.newBuilder().setOn(on).build();
-  }
-
-  /**
-   * @see {@link #buildIsCleanerChoreEnabledRequest()}
-   */
-  private static final IsCleanerChoreEnabledRequest IS_CLEANER_CHORE_ENABLED_REQUEST =
-    IsCleanerChoreEnabledRequest.newBuilder().build();
-
-  /**
-   * Creates a request for querying the master whether the cleaner chore is enabled
-   * @return A {@link IsCleanerChoreEnabledRequest}
-   */
-  public static IsCleanerChoreEnabledRequest buildIsCleanerChoreEnabledRequest() {
-    return IS_CLEANER_CHORE_ENABLED_REQUEST;
-  }
-
-  /**
    * Creates a request for querying the master the last flushed sequence Id for a region
    * @param regionName
    * @return A {@link GetLastFlushedSequenceIdRequest}

http://git-wip-us.apache.org/repos/asf/hbase/blob/2c799fb7/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java
index cbcad80..a83667d 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java
@@ -54,7 +54,6 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameInt64Pa
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MapReduceProtos.ScanMetrics;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.EnableCatalogJanitorResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RunCatalogScanResponse;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.RunCleanerChoreResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.GetLastFlushedSequenceIdResponse;
 import org.apache.hadoop.hbase.regionserver.RegionOpeningState;
 import org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString;
@@ -315,14 +314,6 @@ public final class ResponseConverter {
     return EnableCatalogJanitorResponse.newBuilder().setPrevValue(prevValue).build();
   }
 
-  /**
-   * Creates a response for the cleaner chore request
-   * @return A RunCleanerChoreResponse
-   */
-  public static RunCleanerChoreResponse buildRunCleanerChoreResponse(boolean ran) {
-    return RunCleanerChoreResponse.newBuilder().setCleanerChoreRan(ran).build();
-  }
-
 // End utilities for Admin
 
   /**


Mime
View raw message