[13/50] [abbrv] hbase git commit: HBASE-16505 Pass deadline to HRegion operations
HBASE-16505 Pass deadline to HRegion operations Signed-off-by: Michael Stack Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a3c29da0 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a3c29da0 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a3c29da0 Branch: refs/heads/branch-1 Commit: a3c29da0b6c829a8c52012d50bdb81e9c07ceee3 Parents: 3830890 Author: Phil Yang Authored: Mon Oct 10 18:38:50 2016 +0800 Committer: Michael Stack Committed: Wed Oct 12 12:17:38 2016 -0700 -- .../main/java/org/apache/hadoop/hbase/ipc/CallRunner.java| 8 ++-- .../java/org/apache/hadoop/hbase/ipc/RpcCallContext.java | 7 +++ .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 8 +++- 3 files changed, 20 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/a3c29da0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java index 5e91beb..1a9d8b2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.HBaseInterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceStability; +import org.apache.hadoop.hbase.exceptions.TimeoutIOException; import org.apache.hadoop.hbase.ipc.RpcServer.Call; import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler; import org.apache.hadoop.hbase.util.Pair; @@ -95,7 +96,7 @@ public class CallRunner { } call.startTime = System.currentTimeMillis(); if (call.startTime > call.deadline) { -RpcServer.LOG.info("Drop timeout call: " + call); +RpcServer.LOG.warn("Drop timeout call: " + call); return; } this.status.setStatus("Setting up call"); @@ -121,7 +122,10 @@ public class CallRunner { } // make the call resultPair = this.rpcServer.call(call.service, call.md, call.param, call.cellScanner, - call.timestamp, this.status, call.startTime, call.timeout); +call.timestamp, this.status, call.startTime, call.timeout); + } catch (TimeoutIOException e){ +RpcServer.LOG.warn("Can not complete this request in time, drop it: " + call); +return; } catch (Throwable e) { RpcServer.LOG.debug(Thread.currentThread().getName() + ": " + call.toShortString(), e); errorThrowable = e; http://git-wip-us.apache.org/repos/asf/hbase/blob/a3c29da0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java index b08afc2..508b1e8 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java @@ -85,4 +85,11 @@ public interface RpcCallContext { long getResponseBlockSize(); void incrementResponseBlockSize(long blockSize); + + /** + * Return the deadline of this call. If we can not complete this call in time, we can throw a + * TimeoutIOException and RPCServer will drop it. + * @return The system timestamp of deadline. + */ + long getDeadline(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/a3c29da0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 564639f..90a53bc 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -407,7 +407,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { return "callId: " + this.id + " service: " + serviceName + " methodName: " + ((this.md != null) ? this.md.getName() : "n/a") + " size: " + StringUtils.TraditionalBinaryPrefix.long2String(this.size, "", 1) + - " connection: " + connection.toString(); + " connection: " + connection.toString() + + " deadline: " + deadline; } String toTraceString() { @@ -573,6 +574,11 @@ public
hbase git commit: HBASE-16505 Pass deadline to HRegion operations
Repository: hbase Updated Branches: refs/heads/branch-1 383089063 -> a3c29da0b HBASE-16505 Pass deadline to HRegion operations Signed-off-by: Michael Stack Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a3c29da0 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a3c29da0 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a3c29da0 Branch: refs/heads/branch-1 Commit: a3c29da0b6c829a8c52012d50bdb81e9c07ceee3 Parents: 3830890 Author: Phil Yang Authored: Mon Oct 10 18:38:50 2016 +0800 Committer: Michael Stack Committed: Wed Oct 12 12:17:38 2016 -0700 -- .../main/java/org/apache/hadoop/hbase/ipc/CallRunner.java| 8 ++-- .../java/org/apache/hadoop/hbase/ipc/RpcCallContext.java | 7 +++ .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 8 +++- 3 files changed, 20 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/a3c29da0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java index 5e91beb..1a9d8b2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.HBaseInterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceStability; +import org.apache.hadoop.hbase.exceptions.TimeoutIOException; import org.apache.hadoop.hbase.ipc.RpcServer.Call; import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler; import org.apache.hadoop.hbase.util.Pair; @@ -95,7 +96,7 @@ public class CallRunner { } call.startTime = System.currentTimeMillis(); if (call.startTime > call.deadline) { -RpcServer.LOG.info("Drop timeout call: " + call); +RpcServer.LOG.warn("Drop timeout call: " + call); return; } this.status.setStatus("Setting up call"); @@ -121,7 +122,10 @@ public class CallRunner { } // make the call resultPair = this.rpcServer.call(call.service, call.md, call.param, call.cellScanner, - call.timestamp, this.status, call.startTime, call.timeout); +call.timestamp, this.status, call.startTime, call.timeout); + } catch (TimeoutIOException e){ +RpcServer.LOG.warn("Can not complete this request in time, drop it: " + call); +return; } catch (Throwable e) { RpcServer.LOG.debug(Thread.currentThread().getName() + ": " + call.toShortString(), e); errorThrowable = e; http://git-wip-us.apache.org/repos/asf/hbase/blob/a3c29da0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java index b08afc2..508b1e8 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java @@ -85,4 +85,11 @@ public interface RpcCallContext { long getResponseBlockSize(); void incrementResponseBlockSize(long blockSize); + + /** + * Return the deadline of this call. If we can not complete this call in time, we can throw a + * TimeoutIOException and RPCServer will drop it. + * @return The system timestamp of deadline. + */ + long getDeadline(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/a3c29da0/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 564639f..90a53bc 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -407,7 +407,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { return "callId: " + this.id + " service: " + serviceName + " methodName: " + ((this.md != null) ? this.md.getName() : "n/a") + " size: " + StringUtils.TraditionalBinaryPrefix.long2String(this.size, "", 1) + - " connection: " + connection.toString(); + " connection: " + connection.toString() + + " deadline
hbase git commit: HBASE-16505 Pass deadline to HRegion operations
Repository: hbase Updated Branches: refs/heads/master e868d9586 -> b8173a548 HBASE-16505 Pass deadline to HRegion operations Signed-off-by: Michael Stack Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b8173a54 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b8173a54 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b8173a54 Branch: refs/heads/master Commit: b8173a548c6bcc86cd4ca77b40bcabe3f0bd85fd Parents: e868d95 Author: Phil Yang Authored: Mon Oct 10 18:35:37 2016 +0800 Committer: Michael Stack Committed: Wed Oct 12 12:16:18 2016 -0700 -- .../main/java/org/apache/hadoop/hbase/ipc/CallRunner.java| 8 ++-- .../java/org/apache/hadoop/hbase/ipc/RpcCallContext.java | 7 +++ .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 8 +++- 3 files changed, 20 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/b8173a54/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java index 2c7aa35..34140a9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.HBaseInterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceStability; +import org.apache.hadoop.hbase.exceptions.TimeoutIOException; import org.apache.hadoop.hbase.ipc.RpcServer.Call; import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler; import org.apache.hadoop.hbase.util.Pair; @@ -95,7 +96,7 @@ public class CallRunner { } call.startTime = System.currentTimeMillis(); if (call.startTime > call.deadline) { -RpcServer.LOG.info("Dropping timed out call: " + call); +RpcServer.LOG.warn("Dropping timed out call: " + call); return; } this.status.setStatus("Setting up call"); @@ -121,7 +122,10 @@ public class CallRunner { } // make the call resultPair = this.rpcServer.call(call.service, call.md, call.param, call.cellScanner, - call.timestamp, this.status, call.startTime, call.timeout); +call.timestamp, this.status, call.startTime, call.timeout); + } catch (TimeoutIOException e){ +RpcServer.LOG.warn("Can not complete this request in time, drop it: " + call); +return; } catch (Throwable e) { RpcServer.LOG.debug(Thread.currentThread().getName() + ": " + call.toShortString(), e); errorThrowable = e; http://git-wip-us.apache.org/repos/asf/hbase/blob/b8173a54/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java index df219f1..9bc8ee7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java @@ -93,4 +93,11 @@ public interface RpcCallContext { long getResponseBlockSize(); void incrementResponseBlockSize(long blockSize); + + /** + * Return the deadline of this call. If we can not complete this call in time, we can throw a + * TimeoutIOException and RPCServer will drop it. + * @return The system timestamp of deadline. + */ + long getDeadline(); } http://git-wip-us.apache.org/repos/asf/hbase/blob/b8173a54/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index dd9bb01..b026475 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -401,7 +401,8 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { return "callId: " + this.id + " service: " + serviceName + " methodName: " + ((this.md != null) ? this.md.getName() : "n/a") + " size: " + StringUtils.TraditionalBinaryPrefix.long2String(this.size, "", 1) + - " connection: " + connection.toString(); + " connection: " + connection.toString() + + "