[48/50] hbase git commit: HBASE-15958 Implement ClaimQueues on top of HBase
HBASE-15958 Implement ClaimQueues on top of HBase Building on HBase-15883. Now implementing the claim queues procedure within an HBase table. Also added UnitTests to test claimQueue. Peer tracking will still be performed by ZooKeeper though. Also modified the queueId tracking procedure so we no longer have to perform scans over the Replication Table. This does make our queue naming schema slightly different from ReplicationQueuesZKImpl though. Signed-off-by: Elliott Clark Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/babdedc1 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/babdedc1 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/babdedc1 Branch: refs/heads/hbase-12439 Commit: babdedc1b0f0159eb526fb5c9ee08525de7ce404 Parents: 108d39a Author: Joseph Hwang Authored: Thu May 19 17:14:33 2016 -0700 Committer: Elliott Clark Committed: Thu Jun 9 15:05:54 2016 -0700 -- .../hbase/replication/ReplicationQueues.java| 8 +- .../replication/ReplicationQueuesArguments.java | 4 +- .../replication/ReplicationQueuesHBaseImpl.java | 485 --- .../replication/ReplicationQueuesZKImpl.java| 26 +- .../regionserver/ReplicationSourceManager.java | 7 +- .../replication/TestReplicationStateBasic.java | 6 +- .../TestReplicationStateHBaseImpl.java | 302 +--- .../replication/TestReplicationStateZKImpl.java | 1 - .../TestReplicationSourceManager.java | 12 +- 9 files changed, 579 insertions(+), 272 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/babdedc1/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java index 809b122..0de0cc8 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java @@ -19,8 +19,8 @@ package org.apache.hadoop.hbase.replication; import java.util.List; -import java.util.SortedMap; -import java.util.SortedSet; +import java.util.Map; +import java.util.Set; import org.apache.hadoop.hbase.classification.InterfaceAudience; @@ -96,10 +96,10 @@ public interface ReplicationQueues { /** * Take ownership for the set of queues belonging to a dead region server. * @param regionserver the id of the dead region server - * @return A SortedMap of the queues that have been claimed, including a SortedSet of WALs in + * @return A Map of the queues that have been claimed, including a Set of WALs in * each queue. Returns an empty map if no queues were failed-over. */ - SortedMap> claimQueues(String regionserver); + Map> claimQueues(String regionserver); /** * Get a list of all region servers that have outstanding replication queues. These servers could http://git-wip-us.apache.org/repos/asf/hbase/blob/babdedc1/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java index 4907b73..4fdc4e7 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java @@ -56,11 +56,11 @@ public class ReplicationQueuesArguments { this.conf = conf; } - public Abortable getAbort() { + public Abortable getAbortable() { return abort; } - public void setAbort(Abortable abort) { + public void setAbortable(Abortable abort) { this.abort = abort; } } http://git-wip-us.apache.org/repos/asf/hbase/blob/babdedc1/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java index 29f0632..34a5289 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java @@ -19,6 +19,8 @@ package org.apache.hadoop.hbase.replication; +import or
hbase git commit: HBASE-15958 Implement ClaimQueues on top of HBase
Repository: hbase Updated Branches: refs/heads/master 108d39a72 -> babdedc1b HBASE-15958 Implement ClaimQueues on top of HBase Building on HBase-15883. Now implementing the claim queues procedure within an HBase table. Also added UnitTests to test claimQueue. Peer tracking will still be performed by ZooKeeper though. Also modified the queueId tracking procedure so we no longer have to perform scans over the Replication Table. This does make our queue naming schema slightly different from ReplicationQueuesZKImpl though. Signed-off-by: Elliott Clark Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/babdedc1 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/babdedc1 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/babdedc1 Branch: refs/heads/master Commit: babdedc1b0f0159eb526fb5c9ee08525de7ce404 Parents: 108d39a Author: Joseph Hwang Authored: Thu May 19 17:14:33 2016 -0700 Committer: Elliott Clark Committed: Thu Jun 9 15:05:54 2016 -0700 -- .../hbase/replication/ReplicationQueues.java| 8 +- .../replication/ReplicationQueuesArguments.java | 4 +- .../replication/ReplicationQueuesHBaseImpl.java | 485 --- .../replication/ReplicationQueuesZKImpl.java| 26 +- .../regionserver/ReplicationSourceManager.java | 7 +- .../replication/TestReplicationStateBasic.java | 6 +- .../TestReplicationStateHBaseImpl.java | 302 +--- .../replication/TestReplicationStateZKImpl.java | 1 - .../TestReplicationSourceManager.java | 12 +- 9 files changed, 579 insertions(+), 272 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/babdedc1/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java index 809b122..0de0cc8 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java @@ -19,8 +19,8 @@ package org.apache.hadoop.hbase.replication; import java.util.List; -import java.util.SortedMap; -import java.util.SortedSet; +import java.util.Map; +import java.util.Set; import org.apache.hadoop.hbase.classification.InterfaceAudience; @@ -96,10 +96,10 @@ public interface ReplicationQueues { /** * Take ownership for the set of queues belonging to a dead region server. * @param regionserver the id of the dead region server - * @return A SortedMap of the queues that have been claimed, including a SortedSet of WALs in + * @return A Map of the queues that have been claimed, including a Set of WALs in * each queue. Returns an empty map if no queues were failed-over. */ - SortedMap> claimQueues(String regionserver); + Map> claimQueues(String regionserver); /** * Get a list of all region servers that have outstanding replication queues. These servers could http://git-wip-us.apache.org/repos/asf/hbase/blob/babdedc1/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java index 4907b73..4fdc4e7 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesArguments.java @@ -56,11 +56,11 @@ public class ReplicationQueuesArguments { this.conf = conf; } - public Abortable getAbort() { + public Abortable getAbortable() { return abort; } - public void setAbort(Abortable abort) { + public void setAbortable(Abortable abort) { this.abort = abort; } } http://git-wip-us.apache.org/repos/asf/hbase/blob/babdedc1/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java index 29f0632..34a5289 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesHBaseImpl.java @@