From 41ae8344d9dad372f2748e77df0ec1c3e846ca4d Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 12 Jan 2017 15:36:02 -0800 Subject: [PATCH] hbase-replication module --- .../hbase/client/replication/ReplicationAdmin.java | 9 +- hbase-replication/README.txt | 18 ++ hbase-replication/pom.xml | 343 +++++++++++++++++++++ .../regionserver/ReplicationSyncUp.java | 197 ++++++++++++ hbase-replication/src/main/protobuf/RSGroup.proto | 34 ++ .../src/main/protobuf/RSGroupAdmin.proto | 136 ++++++++ .../regionserver/ReplicationObserver.java | 3 +- .../regionserver/ReplicationSyncUp.java | 197 ------------ .../hadoop/hbase/util/ServerRegionReplicaUtil.java | 4 +- pom.xml | 1 + 10 files changed, 735 insertions(+), 207 deletions(-) create mode 100644 hbase-replication/README.txt create mode 100644 hbase-replication/pom.xml create mode 100644 hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java create mode 100644 hbase-replication/src/main/protobuf/RSGroup.proto create mode 100644 hbase-replication/src/main/protobuf/RSGroupAdmin.proto delete mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java index f9ca443..6c9e4f2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationAdmin.java @@ -18,9 +18,6 @@ */ package org.apache.hadoop.hbase.client.replication; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.Lists; - import java.io.Closeable; import java.io.IOException; import java.util.ArrayList; @@ -29,9 +26,9 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.TreeMap; import java.util.Map.Entry; import java.util.Set; +import java.util.TreeMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -48,7 +45,6 @@ import org.apache.hadoop.hbase.classification.InterfaceStability; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; -import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.RegionLocator; import org.apache.hadoop.hbase.replication.ReplicationException; import org.apache.hadoop.hbase.replication.ReplicationFactory; @@ -62,6 +58,9 @@ import org.apache.hadoop.hbase.replication.ReplicationQueuesClientArguments; import org.apache.hadoop.hbase.util.Pair; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.Lists; + /** *

* This class provides the administrative interface to HBase cluster diff --git a/hbase-replication/README.txt b/hbase-replication/README.txt new file mode 100644 index 0000000..7b5b19f --- /dev/null +++ b/hbase-replication/README.txt @@ -0,0 +1,18 @@ +ON PROTOBUFS +This maven module has core protobuf definition files ('.protos') used by hbase +replication. + +Generation of java files from protobuf .proto files included here is done apart +from the build. Run the generation whenever you make changes to the .orotos files +and then check in the produced java (The reasoning is that change is infrequent +so why pay the price of generating files anew on each build. + +To generate java files from protos run: + + $ mvn compile -Dcompile-protobuf +or + $ mvn compile -Pcompile-protobuf + +After you've done the above, check it and then check in changes (or post a patch +on a JIRA with your definition file changes and the generated files). Be careful +to notice new files and files removed and do appropriate git rm/adds. diff --git a/hbase-replication/pom.xml b/hbase-replication/pom.xml new file mode 100644 index 0000000..ad0ebc4 --- /dev/null +++ b/hbase-replication/pom.xml @@ -0,0 +1,343 @@ + + + + 4.0.0 + + hbase + org.apache.hbase + 2.0.0-SNAPSHOT + .. + + + hbase-replication + Apache HBase - Replication + HBase Replication Support + + + + + org.apache.maven.plugins + maven-site-plugin + + true + + + + + maven-assembly-plugin + ${maven.assembly.version} + + true + + + + maven-surefire-plugin + + + + secondPartTestsExecution + test + + test + + + true + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + [3.2,) + + compile + + + + + + + + + + + + + + + + + + org.apache.hbase + hbase-annotations + + + jdk.tools + jdk.tools + + + + + org.apache.hbase + hbase-annotations + test-jar + test + + + org.apache.hbase + hbase-client + + + org.apache.hbase + hbase-server + + + org.apache.hbase + hbase-common + + + org.apache.hbase + hbase-common + test-jar + + + org.apache.hbase + hbase-testing-util + test + + + + commons-codec + commons-codec + + + commons-io + commons-io + + + commons-lang + commons-lang + + + commons-logging + commons-logging + + + com.google.guava + guava + + + com.google.protobuf + protobuf-java + + + io.netty + netty-all + + + org.apache.zookeeper + zookeeper + + + org.apache.htrace + htrace-core + + + org.codehaus.jackson + jackson-mapper-asl + + + log4j + log4j + test + + + io.dropwizard.metrics + metrics-core + + + org.mockito + mockito-all + test + + + + + + + skipRSGroupTests + + + skipRSGroupTests + + + + true + + + + compile-protobuf + + + compile-protobuf + + + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + + + compile-protoc + generate-sources + + compile + + + + ${basedir}/../hbase-protocol/src/main/protobuf + + + + + + + + + + + + hadoop-2.0 + + + + !hadoop.profile + + + + + com.github.stephenc.findbugs + findbugs-annotations + true + + + org.apache.hadoop + hadoop-auth + + + org.apache.hadoop + hadoop-common + + + net.java.dev.jets3t + jets3t + + + javax.servlet.jsp + jsp-api + + + org.mortbay.jetty + jetty + + + com.sun.jersey + jersey-server + + + com.sun.jersey + jersey-core + + + com.sun.jersey + jersey-json + + + javax.servlet + servlet-api + + + tomcat + jasper-compiler + + + tomcat + jasper-runtime + + + com.google.code.findbugs + jsr305 + + + + + + + + + hadoop-3.0 + + + hadoop.profile + 3.0 + + + + 3.0-SNAPSHOT + + + + org.apache.hadoop + hadoop-auth + + + org.apache.hadoop + hadoop-common + + + + + diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java new file mode 100644 index 0000000..bfc6421 --- /dev/null +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java @@ -0,0 +1,197 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.replication.regionserver; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.conf.Configured; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hbase.Abortable; +import org.apache.hadoop.hbase.ChoreService; +import org.apache.hadoop.hbase.CoordinatedStateManager; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.Server; +import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.client.ClusterConnection; +import org.apache.hadoop.hbase.util.FSUtils; +import org.apache.hadoop.hbase.zookeeper.MetaTableLocator; +import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; +import org.apache.hadoop.util.Tool; +import org.apache.hadoop.util.ToolRunner; + +/** + * In a scenario of Replication based Disaster/Recovery, when hbase + * Master-Cluster crashes, this tool is used to sync-up the delta from Master to + * Slave using the info from ZooKeeper. The tool will run on Master-Cluser, and + * assume ZK, Filesystem and NetWork still available after hbase crashes + * + * hbase org.apache.hadoop.hbase.replication.regionserver.ReplicationSyncUp + */ + +public class ReplicationSyncUp extends Configured implements Tool { + + private static final Log LOG = LogFactory.getLog(ReplicationSyncUp.class.getName()); + + private static Configuration conf; + + private static final long SLEEP_TIME = 10000; + + // although the tool is designed to be run on command line + // this api is provided for executing the tool through another app + public static void setConfigure(Configuration config) { + conf = config; + } + + /** + * Main program + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + if (conf == null) conf = HBaseConfiguration.create(); + int ret = ToolRunner.run(conf, new ReplicationSyncUp(), args); + System.exit(ret); + } + + @Override + public int run(String[] args) throws Exception { + Replication replication; + ReplicationSourceManager manager; + FileSystem fs; + Path oldLogDir, logDir, rootDir; + ZooKeeperWatcher zkw; + + Abortable abortable = new Abortable() { + @Override + public void abort(String why, Throwable e) { + } + + @Override + public boolean isAborted() { + return false; + } + }; + + zkw = + new ZooKeeperWatcher(conf, "syncupReplication" + System.currentTimeMillis(), abortable, + true); + + rootDir = FSUtils.getRootDir(conf); + fs = FileSystem.get(conf); + oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME); + logDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); + + System.out.println("Start Replication Server start"); + replication = new Replication(new DummyServer(zkw), fs, logDir, oldLogDir); + manager = replication.getReplicationManager(); + manager.init(); + + try { + int numberOfOldSource = 1; // default wait once + while (numberOfOldSource > 0) { + Thread.sleep(SLEEP_TIME); + numberOfOldSource = manager.getOldSources().size(); + } + } catch (InterruptedException e) { + System.err.println("didn't wait long enough:" + e); + return (-1); + } + + manager.join(); + zkw.close(); + + return (0); + } + + static class DummyServer implements Server { + String hostname; + ZooKeeperWatcher zkw; + + DummyServer(ZooKeeperWatcher zkw) { + // an unique name in case the first run fails + hostname = System.currentTimeMillis() + ".SyncUpTool.replication.org"; + this.zkw = zkw; + } + + DummyServer(String hostname) { + this.hostname = hostname; + } + + @Override + public Configuration getConfiguration() { + return conf; + } + + @Override + public ZooKeeperWatcher getZooKeeper() { + return zkw; + } + + @Override + public CoordinatedStateManager getCoordinatedStateManager() { + return null; + } + + @Override + public MetaTableLocator getMetaTableLocator() { + return null; + } + + @Override + public ServerName getServerName() { + return ServerName.valueOf(hostname, 1234, 1L); + } + + @Override + public void abort(String why, Throwable e) { + } + + @Override + public boolean isAborted() { + return false; + } + + @Override + public void stop(String why) { + } + + @Override + public boolean isStopped() { + return false; + } + + @Override + public ClusterConnection getConnection() { + return null; + } + + @Override + public ChoreService getChoreService() { + return null; + } + + @Override + public ClusterConnection getClusterConnection() { + // TODO Auto-generated method stub + return null; + } + } +} diff --git a/hbase-replication/src/main/protobuf/RSGroup.proto b/hbase-replication/src/main/protobuf/RSGroup.proto new file mode 100644 index 0000000..7358941 --- /dev/null +++ b/hbase-replication/src/main/protobuf/RSGroup.proto @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package hbase.pb; + +option java_package = "org.apache.hadoop.hbase.protobuf.generated"; +option java_outer_classname = "RSGroupProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; +option optimize_for = SPEED; + +import "HBase.proto"; + +message RSGroupInfo { + required string name = 1; + repeated ServerName servers = 4; + repeated TableName tables = 3; +} + diff --git a/hbase-replication/src/main/protobuf/RSGroupAdmin.proto b/hbase-replication/src/main/protobuf/RSGroupAdmin.proto new file mode 100644 index 0000000..fda9b09 --- /dev/null +++ b/hbase-replication/src/main/protobuf/RSGroupAdmin.proto @@ -0,0 +1,136 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package hbase.pb; + +option java_package = "org.apache.hadoop.hbase.protobuf.generated"; +option java_outer_classname = "RSGroupAdminProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; +option optimize_for = SPEED; + +import "HBase.proto"; +import "RSGroup.proto"; + +/** Group level protobufs */ + +message ListTablesOfRSGroupRequest { + required string r_s_group_name = 1; +} + +message ListTablesOfRSGroupResponse { + repeated TableName table_name = 1; +} + +message GetRSGroupInfoRequest { + required string r_s_group_name = 1; +} + +message GetRSGroupInfoResponse { + optional RSGroupInfo r_s_group_info = 1; +} + +message GetRSGroupInfoOfTableRequest { + required TableName table_name = 1; +} + +message GetRSGroupInfoOfTableResponse { + optional RSGroupInfo r_s_group_info = 1; +} + +message MoveServersRequest { + required string target_group = 1; + repeated ServerName servers = 3; +} + +message MoveServersResponse { +} + +message MoveTablesRequest { + required string target_group = 1; + repeated TableName table_name = 2; +} + +message MoveTablesResponse { +} + +message AddRSGroupRequest { + required string r_s_group_name = 1; +} + +message AddRSGroupResponse { +} + +message RemoveRSGroupRequest { + required string r_s_group_name = 1; +} + +message RemoveRSGroupResponse { +} + +message BalanceRSGroupRequest { + required string r_s_group_name = 1; +} + +message BalanceRSGroupResponse { + required bool balanceRan = 1; +} + +message ListRSGroupInfosRequest { +} + +message ListRSGroupInfosResponse { + repeated RSGroupInfo r_s_group_info = 1; +} + +message GetRSGroupInfoOfServerRequest { + required ServerName server = 2; +} + +message GetRSGroupInfoOfServerResponse { + optional RSGroupInfo r_s_group_info = 1; +} + +service RSGroupAdminService { + rpc GetRSGroupInfo(GetRSGroupInfoRequest) + returns (GetRSGroupInfoResponse); + + rpc GetRSGroupInfoOfTable(GetRSGroupInfoOfTableRequest) + returns (GetRSGroupInfoOfTableResponse); + + rpc GetRSGroupInfoOfServer(GetRSGroupInfoOfServerRequest) + returns (GetRSGroupInfoOfServerResponse); + + rpc MoveServers(MoveServersRequest) + returns (MoveServersResponse); + + rpc MoveTables(MoveTablesRequest) + returns (MoveTablesResponse); + + rpc AddRSGroup(AddRSGroupRequest) + returns (AddRSGroupResponse); + + rpc RemoveRSGroup(RemoveRSGroupRequest) + returns (RemoveRSGroupResponse); + + rpc BalanceRSGroup(BalanceRSGroupRequest) + returns (BalanceRSGroupResponse); + + rpc ListRSGroupInfos(ListRSGroupInfosRequest) + returns (ListRSGroupInfosResponse); +} diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationObserver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationObserver.java index 03046b4..c7f751a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationObserver.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationObserver.java @@ -38,7 +38,6 @@ import org.apache.hadoop.hbase.util.Pair; /** * An Observer to facilitate replication operations */ - @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG) public class ReplicationObserver extends BaseRegionObserver { private static final Log LOG = LogFactory.getLog(ReplicationObserver.class); @@ -59,4 +58,4 @@ public class ReplicationObserver extends BaseRegionObserver { Replication rep = (Replication) rs.getReplicationSourceService(); rep.addHFileRefsToQueue(env.getRegionInfo().getTable(), family, pairs); } -} +} \ No newline at end of file diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java deleted file mode 100644 index bfc6421..0000000 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase.replication.regionserver; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.conf.Configured; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.hbase.Abortable; -import org.apache.hadoop.hbase.ChoreService; -import org.apache.hadoop.hbase.CoordinatedStateManager; -import org.apache.hadoop.hbase.HBaseConfiguration; -import org.apache.hadoop.hbase.HConstants; -import org.apache.hadoop.hbase.Server; -import org.apache.hadoop.hbase.ServerName; -import org.apache.hadoop.hbase.client.ClusterConnection; -import org.apache.hadoop.hbase.util.FSUtils; -import org.apache.hadoop.hbase.zookeeper.MetaTableLocator; -import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; -import org.apache.hadoop.util.Tool; -import org.apache.hadoop.util.ToolRunner; - -/** - * In a scenario of Replication based Disaster/Recovery, when hbase - * Master-Cluster crashes, this tool is used to sync-up the delta from Master to - * Slave using the info from ZooKeeper. The tool will run on Master-Cluser, and - * assume ZK, Filesystem and NetWork still available after hbase crashes - * - * hbase org.apache.hadoop.hbase.replication.regionserver.ReplicationSyncUp - */ - -public class ReplicationSyncUp extends Configured implements Tool { - - private static final Log LOG = LogFactory.getLog(ReplicationSyncUp.class.getName()); - - private static Configuration conf; - - private static final long SLEEP_TIME = 10000; - - // although the tool is designed to be run on command line - // this api is provided for executing the tool through another app - public static void setConfigure(Configuration config) { - conf = config; - } - - /** - * Main program - * @param args - * @throws Exception - */ - public static void main(String[] args) throws Exception { - if (conf == null) conf = HBaseConfiguration.create(); - int ret = ToolRunner.run(conf, new ReplicationSyncUp(), args); - System.exit(ret); - } - - @Override - public int run(String[] args) throws Exception { - Replication replication; - ReplicationSourceManager manager; - FileSystem fs; - Path oldLogDir, logDir, rootDir; - ZooKeeperWatcher zkw; - - Abortable abortable = new Abortable() { - @Override - public void abort(String why, Throwable e) { - } - - @Override - public boolean isAborted() { - return false; - } - }; - - zkw = - new ZooKeeperWatcher(conf, "syncupReplication" + System.currentTimeMillis(), abortable, - true); - - rootDir = FSUtils.getRootDir(conf); - fs = FileSystem.get(conf); - oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME); - logDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); - - System.out.println("Start Replication Server start"); - replication = new Replication(new DummyServer(zkw), fs, logDir, oldLogDir); - manager = replication.getReplicationManager(); - manager.init(); - - try { - int numberOfOldSource = 1; // default wait once - while (numberOfOldSource > 0) { - Thread.sleep(SLEEP_TIME); - numberOfOldSource = manager.getOldSources().size(); - } - } catch (InterruptedException e) { - System.err.println("didn't wait long enough:" + e); - return (-1); - } - - manager.join(); - zkw.close(); - - return (0); - } - - static class DummyServer implements Server { - String hostname; - ZooKeeperWatcher zkw; - - DummyServer(ZooKeeperWatcher zkw) { - // an unique name in case the first run fails - hostname = System.currentTimeMillis() + ".SyncUpTool.replication.org"; - this.zkw = zkw; - } - - DummyServer(String hostname) { - this.hostname = hostname; - } - - @Override - public Configuration getConfiguration() { - return conf; - } - - @Override - public ZooKeeperWatcher getZooKeeper() { - return zkw; - } - - @Override - public CoordinatedStateManager getCoordinatedStateManager() { - return null; - } - - @Override - public MetaTableLocator getMetaTableLocator() { - return null; - } - - @Override - public ServerName getServerName() { - return ServerName.valueOf(hostname, 1234, 1L); - } - - @Override - public void abort(String why, Throwable e) { - } - - @Override - public boolean isAborted() { - return false; - } - - @Override - public void stop(String why) { - } - - @Override - public boolean isStopped() { - return false; - } - - @Override - public ClusterConnection getConnection() { - return null; - } - - @Override - public ChoreService getChoreService() { - return null; - } - - @Override - public ClusterConnection getClusterConnection() { - // TODO Auto-generated method stub - return null; - } - } -} diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ServerRegionReplicaUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ServerRegionReplicaUtil.java index 9ecc9eb..e093efc 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ServerRegionReplicaUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ServerRegionReplicaUtil.java @@ -31,7 +31,6 @@ import org.apache.hadoop.hbase.client.RegionReplicaUtil; import org.apache.hadoop.hbase.client.replication.ReplicationAdmin; import org.apache.hadoop.hbase.io.HFileLink; import org.apache.hadoop.hbase.io.Reference; -import org.apache.hadoop.hbase.quotas.MasterQuotaManager; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.regionserver.StoreFileInfo; import org.apache.hadoop.hbase.replication.ReplicationException; @@ -198,5 +197,4 @@ public class ServerRegionReplicaUtil extends RegionReplicaUtil { public static String getReplicationPeerId() { return REGION_REPLICA_REPLICATION_PEER; } - -} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 285e358..11e2701 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,7 @@ hbase-resource-bundle + hbase-replication hbase-server hbase-thrift hbase-shell -- 2.8.4 (Apple Git-73)