[10/20] hbase git commit: HBASE-20125 Add UT for serial replication after region split and merge
HBASE-20125 Add UT for serial replication after region split and merge Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6b541275 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6b541275 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6b541275 Branch: refs/heads/branch-2 Commit: 6b5412759fdc2accc15f2fb4dd3ed0138f34e555 Parents: 8b61a06 Author: zhangduoAuthored: Tue Mar 6 21:31:05 2018 +0800 Committer: zhangduo Committed: Mon Apr 9 15:18:44 2018 +0800 -- .../hbase/replication/WALEntryFilter.java | 17 +- .../regionserver/ReplicationSourceShipper.java | 4 +- .../ReplicationSourceWALReader.java | 54 +++-- .../regionserver/WALEntryStream.java| 73 --- .../replication/TestSerialReplication.java | 200 --- 5 files changed, 270 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/6b541275/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java index 417f868..cd3f1bd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.replication; import org.apache.yetus.audience.InterfaceAudience; @@ -35,12 +34,20 @@ import org.apache.hadoop.hbase.wal.WAL.Entry; */ @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION) public interface WALEntryFilter { + /** - * Applies the filter, possibly returning a different Entry instance. - * If null is returned, the entry will be skipped. + * + * Applies the filter, possibly returning a different Entry instance. If null is returned, the + * entry will be skipped. + * + * + * Notice that you are free to modify the cell list of the give entry, but do not change the + * content of the cell, it may be used by others at the same time(and usually you can not modify a + * cell unless you cast it to the implementation class, which is not a good idea). + * * @param entry Entry to filter - * @return a (possibly modified) Entry to use. Returning null or an entry with - * no cells will cause the entry to be skipped for replication. + * @return a (possibly modified) Entry to use. Returning null or an entry with no cells will cause + * the entry to be skipped for replication. */ public Entry filter(Entry entry); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b541275/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java index d207d77..50aaf95 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java @@ -120,7 +120,7 @@ public class ReplicationSourceShipper extends Thread { /** * Do the shipping logic */ - protected void shipEdits(WALEntryBatch entryBatch) { + protected final void shipEdits(WALEntryBatch entryBatch) { List entries = entryBatch.getWalEntries(); long lastReadPosition = entryBatch.getLastWalPosition(); currentPath = entryBatch.getLastWalPath(); @@ -253,7 +253,7 @@ public class ReplicationSourceShipper extends Thread { return 0; } - protected boolean isActive() { + protected final boolean isActive() { return source.isSourceActive() && state == WorkerState.RUNNING && !isInterrupted(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b541275/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java index fe87aec..ad3baaf 100644 ---
[12/22] hbase git commit: HBASE-20125 Add UT for serial replication after region split and merge
HBASE-20125 Add UT for serial replication after region split and merge Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6b541275 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6b541275 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6b541275 Branch: refs/heads/HBASE-20046-branch-2 Commit: 6b5412759fdc2accc15f2fb4dd3ed0138f34e555 Parents: 8b61a06 Author: zhangduoAuthored: Tue Mar 6 21:31:05 2018 +0800 Committer: zhangduo Committed: Mon Apr 9 15:18:44 2018 +0800 -- .../hbase/replication/WALEntryFilter.java | 17 +- .../regionserver/ReplicationSourceShipper.java | 4 +- .../ReplicationSourceWALReader.java | 54 +++-- .../regionserver/WALEntryStream.java| 73 --- .../replication/TestSerialReplication.java | 200 --- 5 files changed, 270 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/6b541275/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java index 417f868..cd3f1bd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.replication; import org.apache.yetus.audience.InterfaceAudience; @@ -35,12 +34,20 @@ import org.apache.hadoop.hbase.wal.WAL.Entry; */ @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION) public interface WALEntryFilter { + /** - * Applies the filter, possibly returning a different Entry instance. - * If null is returned, the entry will be skipped. + * + * Applies the filter, possibly returning a different Entry instance. If null is returned, the + * entry will be skipped. + * + * + * Notice that you are free to modify the cell list of the give entry, but do not change the + * content of the cell, it may be used by others at the same time(and usually you can not modify a + * cell unless you cast it to the implementation class, which is not a good idea). + * * @param entry Entry to filter - * @return a (possibly modified) Entry to use. Returning null or an entry with - * no cells will cause the entry to be skipped for replication. + * @return a (possibly modified) Entry to use. Returning null or an entry with no cells will cause + * the entry to be skipped for replication. */ public Entry filter(Entry entry); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b541275/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java index d207d77..50aaf95 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java @@ -120,7 +120,7 @@ public class ReplicationSourceShipper extends Thread { /** * Do the shipping logic */ - protected void shipEdits(WALEntryBatch entryBatch) { + protected final void shipEdits(WALEntryBatch entryBatch) { List entries = entryBatch.getWalEntries(); long lastReadPosition = entryBatch.getLastWalPosition(); currentPath = entryBatch.getLastWalPath(); @@ -253,7 +253,7 @@ public class ReplicationSourceShipper extends Thread { return 0; } - protected boolean isActive() { + protected final boolean isActive() { return source.isSourceActive() && state == WorkerState.RUNNING && !isInterrupted(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b541275/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java index fe87aec..ad3baaf 100644 ---
[05/20] hbase git commit: HBASE-20125 Add UT for serial replication after region split and merge
HBASE-20125 Add UT for serial replication after region split and merge Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/688287a6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/688287a6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/688287a6 Branch: refs/heads/HBASE-20046-branch-2 Commit: 688287a6b8ca27708f231203dbf7340a88fae173 Parents: 80e00ee Author: zhangduoAuthored: Tue Mar 6 21:31:05 2018 +0800 Committer: zhangduo Committed: Sun Apr 8 11:13:39 2018 +0800 -- .../hbase/replication/WALEntryFilter.java | 17 +- .../regionserver/ReplicationSourceShipper.java | 4 +- .../ReplicationSourceWALReader.java | 54 +++-- .../regionserver/WALEntryStream.java| 73 --- .../replication/TestSerialReplication.java | 200 --- 5 files changed, 270 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/688287a6/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java index 417f868..cd3f1bd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.replication; import org.apache.yetus.audience.InterfaceAudience; @@ -35,12 +34,20 @@ import org.apache.hadoop.hbase.wal.WAL.Entry; */ @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION) public interface WALEntryFilter { + /** - * Applies the filter, possibly returning a different Entry instance. - * If null is returned, the entry will be skipped. + * + * Applies the filter, possibly returning a different Entry instance. If null is returned, the + * entry will be skipped. + * + * + * Notice that you are free to modify the cell list of the give entry, but do not change the + * content of the cell, it may be used by others at the same time(and usually you can not modify a + * cell unless you cast it to the implementation class, which is not a good idea). + * * @param entry Entry to filter - * @return a (possibly modified) Entry to use. Returning null or an entry with - * no cells will cause the entry to be skipped for replication. + * @return a (possibly modified) Entry to use. Returning null or an entry with no cells will cause + * the entry to be skipped for replication. */ public Entry filter(Entry entry); } http://git-wip-us.apache.org/repos/asf/hbase/blob/688287a6/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java index d207d77..50aaf95 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java @@ -120,7 +120,7 @@ public class ReplicationSourceShipper extends Thread { /** * Do the shipping logic */ - protected void shipEdits(WALEntryBatch entryBatch) { + protected final void shipEdits(WALEntryBatch entryBatch) { List entries = entryBatch.getWalEntries(); long lastReadPosition = entryBatch.getLastWalPosition(); currentPath = entryBatch.getLastWalPath(); @@ -253,7 +253,7 @@ public class ReplicationSourceShipper extends Thread { return 0; } - protected boolean isActive() { + protected final boolean isActive() { return source.isSourceActive() && state == WorkerState.RUNNING && !isInterrupted(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/688287a6/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java index fe87aec..ad3baaf 100644 ---
[20/33] hbase git commit: HBASE-20125 Add UT for serial replication after region split and merge
HBASE-20125 Add UT for serial replication after region split and merge Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6b77786d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6b77786d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6b77786d Branch: refs/heads/HBASE-19064 Commit: 6b77786dfc46d25ac5bb5f1c8a4a9eb47b52a604 Parents: 1bafe4a Author: zhangduoAuthored: Tue Mar 6 21:31:05 2018 +0800 Committer: zhangduo Committed: Wed Mar 7 14:52:23 2018 +0800 -- .../hbase/replication/WALEntryFilter.java | 17 +- .../regionserver/ReplicationSourceShipper.java | 4 +- .../ReplicationSourceWALReader.java | 54 +++-- .../regionserver/WALEntryStream.java| 73 --- .../replication/TestSerialReplication.java | 200 --- 5 files changed, 270 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/6b77786d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java index 417f868..cd3f1bd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.replication; import org.apache.yetus.audience.InterfaceAudience; @@ -35,12 +34,20 @@ import org.apache.hadoop.hbase.wal.WAL.Entry; */ @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION) public interface WALEntryFilter { + /** - * Applies the filter, possibly returning a different Entry instance. - * If null is returned, the entry will be skipped. + * + * Applies the filter, possibly returning a different Entry instance. If null is returned, the + * entry will be skipped. + * + * + * Notice that you are free to modify the cell list of the give entry, but do not change the + * content of the cell, it may be used by others at the same time(and usually you can not modify a + * cell unless you cast it to the implementation class, which is not a good idea). + * * @param entry Entry to filter - * @return a (possibly modified) Entry to use. Returning null or an entry with - * no cells will cause the entry to be skipped for replication. + * @return a (possibly modified) Entry to use. Returning null or an entry with no cells will cause + * the entry to be skipped for replication. */ public Entry filter(Entry entry); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b77786d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java index d207d77..50aaf95 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java @@ -120,7 +120,7 @@ public class ReplicationSourceShipper extends Thread { /** * Do the shipping logic */ - protected void shipEdits(WALEntryBatch entryBatch) { + protected final void shipEdits(WALEntryBatch entryBatch) { List entries = entryBatch.getWalEntries(); long lastReadPosition = entryBatch.getLastWalPosition(); currentPath = entryBatch.getLastWalPath(); @@ -253,7 +253,7 @@ public class ReplicationSourceShipper extends Thread { return 0; } - protected boolean isActive() { + protected final boolean isActive() { return source.isSourceActive() && state == WorkerState.RUNNING && !isInterrupted(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b77786d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java index fe87aec..ad3baaf 100644 ---
hbase git commit: HBASE-20125 Add UT for serial replication after region split and merge
Repository: hbase Updated Branches: refs/heads/master 1bafe4a02 -> 6b77786df HBASE-20125 Add UT for serial replication after region split and merge Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6b77786d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6b77786d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6b77786d Branch: refs/heads/master Commit: 6b77786dfc46d25ac5bb5f1c8a4a9eb47b52a604 Parents: 1bafe4a Author: zhangduoAuthored: Tue Mar 6 21:31:05 2018 +0800 Committer: zhangduo Committed: Wed Mar 7 14:52:23 2018 +0800 -- .../hbase/replication/WALEntryFilter.java | 17 +- .../regionserver/ReplicationSourceShipper.java | 4 +- .../ReplicationSourceWALReader.java | 54 +++-- .../regionserver/WALEntryStream.java| 73 --- .../replication/TestSerialReplication.java | 200 --- 5 files changed, 270 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/6b77786d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java index 417f868..cd3f1bd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/WALEntryFilter.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.hadoop.hbase.replication; import org.apache.yetus.audience.InterfaceAudience; @@ -35,12 +34,20 @@ import org.apache.hadoop.hbase.wal.WAL.Entry; */ @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION) public interface WALEntryFilter { + /** - * Applies the filter, possibly returning a different Entry instance. - * If null is returned, the entry will be skipped. + * + * Applies the filter, possibly returning a different Entry instance. If null is returned, the + * entry will be skipped. + * + * + * Notice that you are free to modify the cell list of the give entry, but do not change the + * content of the cell, it may be used by others at the same time(and usually you can not modify a + * cell unless you cast it to the implementation class, which is not a good idea). + * * @param entry Entry to filter - * @return a (possibly modified) Entry to use. Returning null or an entry with - * no cells will cause the entry to be skipped for replication. + * @return a (possibly modified) Entry to use. Returning null or an entry with no cells will cause + * the entry to be skipped for replication. */ public Entry filter(Entry entry); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b77786d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java index d207d77..50aaf95 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java @@ -120,7 +120,7 @@ public class ReplicationSourceShipper extends Thread { /** * Do the shipping logic */ - protected void shipEdits(WALEntryBatch entryBatch) { + protected final void shipEdits(WALEntryBatch entryBatch) { List entries = entryBatch.getWalEntries(); long lastReadPosition = entryBatch.getLastWalPosition(); currentPath = entryBatch.getLastWalPath(); @@ -253,7 +253,7 @@ public class ReplicationSourceShipper extends Thread { return 0; } - protected boolean isActive() { + protected final boolean isActive() { return source.isSourceActive() && state == WorkerState.RUNNING && !isInterrupted(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/6b77786d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java