You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2015/05/22 07:04:15 UTC
[1/4] hbase git commit: HBASE-13703 ReplicateContext should not be a
member of ReplicationSource.
Repository: hbase
Updated Branches:
refs/heads/branch-1 c695d1c24 -> e5df9bb2e
refs/heads/branch-1.0 dc47beb6c -> fb09dead1
refs/heads/branch-1.1 7a67e6c9d -> 47c0105d6
refs/heads/master b886bac53 -> f8893e001
HBASE-13703 ReplicateContext should not be a member of ReplicationSource.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f8893e00
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f8893e00
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f8893e00
Branch: refs/heads/master
Commit: f8893e0012031a8c623d9da3839e757006878396
Parents: b886bac
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu May 21 21:56:21 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu May 21 21:56:21 2015 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/replication/ReplicationEndpoint.java | 2 +-
.../hbase/replication/regionserver/ReplicationSource.java | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/f8893e00/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
index 978e853..e8a7ddc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
@@ -134,7 +134,7 @@ public interface ReplicationEndpoint extends Service {
* A context for {@link ReplicationEndpoint#replicate(ReplicateContext)} method.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION)
- class ReplicateContext {
+ static class ReplicateContext {
List<Entry> entries;
int size;
@InterfaceAudience.Private
http://git-wip-us.apache.org/repos/asf/hbase/blob/f8893e00/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index 4603fa8..f7230ab 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -131,8 +131,6 @@ public class ReplicationSource extends Thread
private ReplicationEndpoint replicationEndpoint;
// A filter (or a chain of filters) for the WAL entries.
private WALEntryFilter walEntryFilter;
- // Context for ReplicationEndpoint#replicate()
- private ReplicationEndpoint.ReplicateContext replicateContext;
// throttler
private ReplicationThrottler throttler;
@@ -187,8 +185,6 @@ public class ReplicationSource extends Thread
this.peerId = this.replicationQueueInfo.getPeerId();
this.logQueueWarnThreshold = this.conf.getInt("replication.source.log.queue.warn", 2);
this.replicationEndpoint = replicationEndpoint;
-
- this.replicateContext = new ReplicationEndpoint.ReplicateContext();
}
private void decorateConf() {
@@ -689,6 +685,8 @@ public class ReplicationSource extends Thread
this.throttler.resetStartTick();
}
}
+ // create replicateContext here, so the entries can be GC'd upon return from this call stack
+ ReplicationEndpoint.ReplicateContext replicateContext = new ReplicationEndpoint.ReplicateContext();
replicateContext.setEntries(entries).setSize(currentSize);
long startTimeNs = System.nanoTime();
[4/4] hbase git commit: HBASE-13703 ReplicateContext should not be a
member of ReplicationSource.
Posted by la...@apache.org.
HBASE-13703 ReplicateContext should not be a member of ReplicationSource.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fb09dead
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fb09dead
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fb09dead
Branch: refs/heads/branch-1.0
Commit: fb09dead1d464d972adf14c018ad8edbc2aa5c2d
Parents: dc47beb
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu May 21 21:56:21 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu May 21 22:04:02 2015 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/replication/ReplicationEndpoint.java | 2 +-
.../hbase/replication/regionserver/ReplicationSource.java | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/fb09dead/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
index c3ec976..ef2dcc0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
@@ -127,7 +127,7 @@ public interface ReplicationEndpoint extends Service {
* A context for {@link ReplicationEndpoint#replicate(ReplicateContext)} method.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION)
- class ReplicateContext {
+ static class ReplicateContext {
List<Entry> entries;
int size;
@InterfaceAudience.Private
http://git-wip-us.apache.org/repos/asf/hbase/blob/fb09dead/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index ccde5c8..d332279 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -131,8 +131,6 @@ public class ReplicationSource extends Thread
private ReplicationEndpoint replicationEndpoint;
// A filter (or a chain of filters) for the WAL entries.
private WALEntryFilter walEntryFilter;
- // Context for ReplicationEndpoint#replicate()
- private ReplicationEndpoint.ReplicateContext replicateContext;
// throttler
private ReplicationThrottler throttler;
@@ -187,8 +185,6 @@ public class ReplicationSource extends Thread
this.peerId = this.replicationQueueInfo.getPeerId();
this.logQueueWarnThreshold = this.conf.getInt("replication.source.log.queue.warn", 2);
this.replicationEndpoint = replicationEndpoint;
-
- this.replicateContext = new ReplicationEndpoint.ReplicateContext();
}
private void decorateConf() {
@@ -689,6 +685,8 @@ public class ReplicationSource extends Thread
this.throttler.resetStartTick();
}
}
+ // create replicateContext here, so the entries can be GC'd upon return from this call stack
+ ReplicationEndpoint.ReplicateContext replicateContext = new ReplicationEndpoint.ReplicateContext();
replicateContext.setEntries(entries).setSize(currentSize);
// send the edits to the endpoint. Will block until the edits are shipped and acknowledged
[2/4] hbase git commit: HBASE-13703 ReplicateContext should not be a
member of ReplicationSource.
Posted by la...@apache.org.
HBASE-13703 ReplicateContext should not be a member of ReplicationSource.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e5df9bb2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e5df9bb2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e5df9bb2
Branch: refs/heads/branch-1
Commit: e5df9bb2e2303d3b182ba80ee31e7fa155aa29fc
Parents: c695d1c
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu May 21 21:56:21 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu May 21 22:01:50 2015 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/replication/ReplicationEndpoint.java | 2 +-
.../hbase/replication/regionserver/ReplicationSource.java | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/e5df9bb2/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
index 978e853..e8a7ddc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
@@ -134,7 +134,7 @@ public interface ReplicationEndpoint extends Service {
* A context for {@link ReplicationEndpoint#replicate(ReplicateContext)} method.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION)
- class ReplicateContext {
+ static class ReplicateContext {
List<Entry> entries;
int size;
@InterfaceAudience.Private
http://git-wip-us.apache.org/repos/asf/hbase/blob/e5df9bb2/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index 4603fa8..f7230ab 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -131,8 +131,6 @@ public class ReplicationSource extends Thread
private ReplicationEndpoint replicationEndpoint;
// A filter (or a chain of filters) for the WAL entries.
private WALEntryFilter walEntryFilter;
- // Context for ReplicationEndpoint#replicate()
- private ReplicationEndpoint.ReplicateContext replicateContext;
// throttler
private ReplicationThrottler throttler;
@@ -187,8 +185,6 @@ public class ReplicationSource extends Thread
this.peerId = this.replicationQueueInfo.getPeerId();
this.logQueueWarnThreshold = this.conf.getInt("replication.source.log.queue.warn", 2);
this.replicationEndpoint = replicationEndpoint;
-
- this.replicateContext = new ReplicationEndpoint.ReplicateContext();
}
private void decorateConf() {
@@ -689,6 +685,8 @@ public class ReplicationSource extends Thread
this.throttler.resetStartTick();
}
}
+ // create replicateContext here, so the entries can be GC'd upon return from this call stack
+ ReplicationEndpoint.ReplicateContext replicateContext = new ReplicationEndpoint.ReplicateContext();
replicateContext.setEntries(entries).setSize(currentSize);
long startTimeNs = System.nanoTime();
[3/4] hbase git commit: HBASE-13703 ReplicateContext should not be a
member of ReplicationSource.
Posted by la...@apache.org.
HBASE-13703 ReplicateContext should not be a member of ReplicationSource.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/47c0105d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/47c0105d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/47c0105d
Branch: refs/heads/branch-1.1
Commit: 47c0105d65d3f1ec8ea5fdb0998f7c2965c09fa7
Parents: 7a67e6c
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu May 21 21:56:21 2015 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu May 21 22:03:13 2015 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/replication/ReplicationEndpoint.java | 2 +-
.../hbase/replication/regionserver/ReplicationSource.java | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/47c0105d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
index 978e853..e8a7ddc 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ReplicationEndpoint.java
@@ -134,7 +134,7 @@ public interface ReplicationEndpoint extends Service {
* A context for {@link ReplicationEndpoint#replicate(ReplicateContext)} method.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION)
- class ReplicateContext {
+ static class ReplicateContext {
List<Entry> entries;
int size;
@InterfaceAudience.Private
http://git-wip-us.apache.org/repos/asf/hbase/blob/47c0105d/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index 794a3e1..833eae6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -131,8 +131,6 @@ public class ReplicationSource extends Thread
private ReplicationEndpoint replicationEndpoint;
// A filter (or a chain of filters) for the WAL entries.
private WALEntryFilter walEntryFilter;
- // Context for ReplicationEndpoint#replicate()
- private ReplicationEndpoint.ReplicateContext replicateContext;
// throttler
private ReplicationThrottler throttler;
@@ -187,8 +185,6 @@ public class ReplicationSource extends Thread
this.peerId = this.replicationQueueInfo.getPeerId();
this.logQueueWarnThreshold = this.conf.getInt("replication.source.log.queue.warn", 2);
this.replicationEndpoint = replicationEndpoint;
-
- this.replicateContext = new ReplicationEndpoint.ReplicateContext();
}
private void decorateConf() {
@@ -689,6 +685,8 @@ public class ReplicationSource extends Thread
this.throttler.resetStartTick();
}
}
+ // create replicateContext here, so the entries can be GC'd upon return from this call stack
+ ReplicationEndpoint.ReplicateContext replicateContext = new ReplicationEndpoint.ReplicateContext();
replicateContext.setEntries(entries).setSize(currentSize);
long startTimeNs = System.nanoTime();