You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/06/24 07:05:05 UTC

[27/50] kylin git commit: KYLIN-1645 Enlarge default timeout for querying cube

KYLIN-1645 Enlarge default timeout for querying cube


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ff1c8139
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ff1c8139
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ff1c8139

Branch: refs/heads/stream_m1
Commit: ff1c81395259ba7e1d26a91bc9dbe47d18397f32
Parents: ce7fcdf
Author: Li Yang <li...@apache.org>
Authored: Wed Jun 22 11:47:02 2016 +0800
Committer: Li Yang <li...@apache.org>
Committed: Wed Jun 22 11:47:02 2016 +0800

----------------------------------------------------------------------
 .../kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/ff1c8139/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 42e2149..202313b 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -33,6 +33,7 @@ import java.util.zip.DataFormatException;
 import javax.annotation.Nullable;
 
 import org.apache.commons.lang.NotImplementedException;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.client.HConnection;
 import org.apache.hadoop.hbase.client.HTableInterface;
@@ -92,14 +93,16 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
             this.expectedSize = expectedSize;
             this.queue = new ArrayBlockingQueue<byte[]>(expectedSize);
 
-            this.timeout = HBaseConnection.getCurrentHBaseConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
+            Configuration hconf = HBaseConnection.getCurrentHBaseConfiguration();
+            this.timeout = hconf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 5) * hconf.getInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, 60000);
+            this.timeout = Math.max(this.timeout, 5 * 60000);
             this.timeout *= KylinConfig.getInstanceFromEnv().getCubeVisitTimeoutTimes();
 
             if (BackdoorToggles.getQueryTimeout() != -1) {
                 this.timeout = BackdoorToggles.getQueryTimeout();
             }
 
-            this.timeout *= 1.1;//allow for some delay 
+            this.timeout *= 1.1; // allow for some delay
 
             logger.info("Timeout for ExpectedSizeIterator is: " + this.timeout);