hbase git commit: HBASE-20941 Created and implemented HbckService in master
Repository: hbase Updated Branches: refs/heads/branch-2.1 2479282fb -> 589c1e407 HBASE-20941 Created and implemented HbckService in master Added API setTableStateInMeta() to update table state only in Meta. This will be used by hbck2 tool. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/589c1e40 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/589c1e40 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/589c1e40 Branch: refs/heads/branch-2.1 Commit: 589c1e40785aab5ea7b0a18e5261970b408a09d5 Parents: 2479282 Author: Umesh Agashe Authored: Tue Aug 7 11:46:42 2018 -0700 Committer: Michael Stack Committed: Wed Sep 12 21:31:13 2018 -0700 -- .../hadoop/hbase/client/ClusterConnection.java | 32 ++ .../hbase/client/ConnectionImplementation.java | 22 .../apache/hadoop/hbase/client/HBaseHbck.java | 95 + .../org/apache/hadoop/hbase/client/Hbck.java| 50 + .../hbase/shaded/protobuf/RequestConverter.java | 12 +++ .../hadoop/hbase/HBaseInterfaceAudience.java| 5 + .../src/main/protobuf/Master.proto | 11 ++ .../hadoop/hbase/master/MasterRpcServices.java | 31 +- .../hadoop/hbase/HBaseTestingUtility.java | 9 +- .../apache/hadoop/hbase/client/TestHbck.java| 104 +++ .../hadoop/hbase/master/TestMasterMetrics.java | 1 + 11 files changed, 370 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/589c1e40/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java index adf47ca..d3e675c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java @@ -326,4 +326,36 @@ public interface ClusterConnection extends Connection { * @throws IOException if a remote or network exception occurs */ int getCurrentNrHRS() throws IOException; + + /** + * Retrieve an Hbck implementation to fix an HBase cluster. + * The returned Hbck is not guaranteed to be thread-safe. A new instance should be created by + * each thread. This is a lightweight operation. Pooling or caching of the returned Hbck instance + * is not recommended. + * + * The caller is responsible for calling {@link Hbck#close()} on the returned Hbck instance. + * + * This will be used mostly by hbck tool. + * + * @return an Hbck instance for active master. Active master is fetched from the zookeeper. + */ + Hbck getHbck() throws IOException; + + /** + * Retrieve an Hbck implementation to fix an HBase cluster. + * The returned Hbck is not guaranteed to be thread-safe. A new instance should be created by + * each thread. This is a lightweight operation. Pooling or caching of the returned Hbck instance + * is not recommended. + * + * The caller is responsible for calling {@link Hbck#close()} on the returned Hbck instance. + * + * This will be used mostly by hbck tool. This may only be used to by pass getting + * registered master from ZK. In situations where ZK is not available or active master is not + * registered with ZK and user can get master address by other means, master can be explicitly + * specified. + * + * @param masterServer explicit {@link ServerName} for master server + * @return an Hbck instance for a specified master server + */ + Hbck getHbck(ServerName masterServer) throws IOException; } http://git-wip-us.apache.org/repos/asf/hbase/blob/589c1e40/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 1176cbd..21d796c 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 @@ -408,6 +408,28 @@ class ConnectionImplementation implements ClusterConnection, Closeable { } @Override + public Hbck getHbck() throws IOException { +return getHbck(get(registry.getMasterAddress())); + } + + @Override + public Hbck getHbck(ServerName masterServer) throws IOException { +checkClosed(); +if (isDeadServer(masterServer)) { + throw new RegionServerStoppedException(masterServer + " is
hbase git commit: HBASE-20941 Created and implemented HbckService in master
Repository: hbase Updated Branches: refs/heads/master 6dd538303 -> 3813f0ac3 HBASE-20941 Created and implemented HbckService in master Added API setTableStateInMeta() to update table state only in Meta. This will be used by hbck2 tool. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3813f0ac Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3813f0ac Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3813f0ac Branch: refs/heads/master Commit: 3813f0ac3d661f8a9985e6e67283d8556a5d08c1 Parents: 6dd5383 Author: Umesh Agashe Authored: Tue Aug 7 11:46:42 2018 -0700 Committer: Michael Stack Committed: Mon Aug 27 12:11:52 2018 -0700 -- .../hadoop/hbase/client/ClusterConnection.java | 32 ++ .../hbase/client/ConnectionImplementation.java | 22 .../apache/hadoop/hbase/client/HBaseHbck.java | 95 + .../org/apache/hadoop/hbase/client/Hbck.java| 50 + .../hbase/shaded/protobuf/RequestConverter.java | 12 +++ .../hadoop/hbase/HBaseInterfaceAudience.java| 5 + .../src/main/protobuf/Master.proto | 11 ++ .../hadoop/hbase/master/MasterRpcServices.java | 31 +- .../hadoop/hbase/HBaseTestingUtility.java | 9 +- .../apache/hadoop/hbase/client/TestHbck.java| 104 +++ .../hadoop/hbase/master/TestMasterMetrics.java | 1 + 11 files changed, 370 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/3813f0ac/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java index adf47ca..d3e675c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java @@ -326,4 +326,36 @@ public interface ClusterConnection extends Connection { * @throws IOException if a remote or network exception occurs */ int getCurrentNrHRS() throws IOException; + + /** + * Retrieve an Hbck implementation to fix an HBase cluster. + * The returned Hbck is not guaranteed to be thread-safe. A new instance should be created by + * each thread. This is a lightweight operation. Pooling or caching of the returned Hbck instance + * is not recommended. + * + * The caller is responsible for calling {@link Hbck#close()} on the returned Hbck instance. + * + * This will be used mostly by hbck tool. + * + * @return an Hbck instance for active master. Active master is fetched from the zookeeper. + */ + Hbck getHbck() throws IOException; + + /** + * Retrieve an Hbck implementation to fix an HBase cluster. + * The returned Hbck is not guaranteed to be thread-safe. A new instance should be created by + * each thread. This is a lightweight operation. Pooling or caching of the returned Hbck instance + * is not recommended. + * + * The caller is responsible for calling {@link Hbck#close()} on the returned Hbck instance. + * + * This will be used mostly by hbck tool. This may only be used to by pass getting + * registered master from ZK. In situations where ZK is not available or active master is not + * registered with ZK and user can get master address by other means, master can be explicitly + * specified. + * + * @param masterServer explicit {@link ServerName} for master server + * @return an Hbck instance for a specified master server + */ + Hbck getHbck(ServerName masterServer) throws IOException; } http://git-wip-us.apache.org/repos/asf/hbase/blob/3813f0ac/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 7e07daf..67fe551 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 @@ -423,6 +423,28 @@ class ConnectionImplementation implements ClusterConnection, Closeable { } @Override + public Hbck getHbck() throws IOException { +return getHbck(get(registry.getMasterAddress())); + } + + @Override + public Hbck getHbck(ServerName masterServer) throws IOException { +checkClosed(); +if (isDeadServer(masterServer)) { + throw new RegionServerStoppedException(masterServer + " is dead."); +}
hbase git commit: HBASE-20941 Created and implemented HbckService in master
Repository: hbase Updated Branches: refs/heads/branch-2 a0cbfb8ea -> cdf5cfa39 HBASE-20941 Created and implemented HbckService in master Added API setTableStateInMeta() to update table state only in Meta. This will be used by hbck2 tool. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cdf5cfa3 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cdf5cfa3 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cdf5cfa3 Branch: refs/heads/branch-2 Commit: cdf5cfa396b26d64541dcc793a250eea6ba891c3 Parents: a0cbfb8 Author: Umesh Agashe Authored: Tue Aug 7 11:46:42 2018 -0700 Committer: Michael Stack Committed: Mon Aug 27 12:10:33 2018 -0700 -- .../hadoop/hbase/client/ClusterConnection.java | 32 ++ .../hbase/client/ConnectionImplementation.java | 22 .../apache/hadoop/hbase/client/HBaseHbck.java | 95 + .../org/apache/hadoop/hbase/client/Hbck.java| 50 + .../hbase/shaded/protobuf/RequestConverter.java | 12 +++ .../hadoop/hbase/HBaseInterfaceAudience.java| 5 + .../src/main/protobuf/Master.proto | 11 ++ .../hadoop/hbase/master/MasterRpcServices.java | 31 +- .../hadoop/hbase/HBaseTestingUtility.java | 9 +- .../apache/hadoop/hbase/client/TestHbck.java| 104 +++ .../hadoop/hbase/master/TestMasterMetrics.java | 1 + 11 files changed, 370 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/cdf5cfa3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java index adf47ca..d3e675c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnection.java @@ -326,4 +326,36 @@ public interface ClusterConnection extends Connection { * @throws IOException if a remote or network exception occurs */ int getCurrentNrHRS() throws IOException; + + /** + * Retrieve an Hbck implementation to fix an HBase cluster. + * The returned Hbck is not guaranteed to be thread-safe. A new instance should be created by + * each thread. This is a lightweight operation. Pooling or caching of the returned Hbck instance + * is not recommended. + * + * The caller is responsible for calling {@link Hbck#close()} on the returned Hbck instance. + * + * This will be used mostly by hbck tool. + * + * @return an Hbck instance for active master. Active master is fetched from the zookeeper. + */ + Hbck getHbck() throws IOException; + + /** + * Retrieve an Hbck implementation to fix an HBase cluster. + * The returned Hbck is not guaranteed to be thread-safe. A new instance should be created by + * each thread. This is a lightweight operation. Pooling or caching of the returned Hbck instance + * is not recommended. + * + * The caller is responsible for calling {@link Hbck#close()} on the returned Hbck instance. + * + * This will be used mostly by hbck tool. This may only be used to by pass getting + * registered master from ZK. In situations where ZK is not available or active master is not + * registered with ZK and user can get master address by other means, master can be explicitly + * specified. + * + * @param masterServer explicit {@link ServerName} for master server + * @return an Hbck instance for a specified master server + */ + Hbck getHbck(ServerName masterServer) throws IOException; } http://git-wip-us.apache.org/repos/asf/hbase/blob/cdf5cfa3/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 a394211..2f35220 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 @@ -421,6 +421,28 @@ class ConnectionImplementation implements ClusterConnection, Closeable { } @Override + public Hbck getHbck() throws IOException { +return getHbck(get(registry.getMasterAddress())); + } + + @Override + public Hbck getHbck(ServerName masterServer) throws IOException { +checkClosed(); +if (isDeadServer(masterServer)) { + throw new RegionServerStoppedException(masterServer + " is dead."); +