This is an automated email from the ASF dual-hosted git repository.

kadir pushed a commit to branch 4.x-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.3 by this push:
     new d8c4653  PHOENIX-5478 IndexTool mapper task should not timeout 
(addendum for setting config params)
d8c4653 is described below

commit d8c465322f3b0677621a67ab194004fb628a474e
Author: Kadir <kozde...@salesforce.com>
AuthorDate: Fri Oct 25 08:49:50 2019 -0700

    PHOENIX-5478 IndexTool mapper task should not timeout (addendum for setting 
config params)
---
 .../apache/phoenix/mapreduce/index/IndexTool.java  | 22 ++++++++++++++++++++++
 .../apache/phoenix/query/QueryServicesOptions.java |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
index 22013e8..864036c 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
@@ -499,6 +499,28 @@ public class IndexTool extends Configured implements Tool {
 
         private Job configureJobForServerBuildIndex()
                 throws Exception {
+            long indexRebuildQueryTimeoutMs =
+                    
configuration.getLong(QueryServices.INDEX_REBUILD_QUERY_TIMEOUT_ATTRIB,
+                            
QueryServicesOptions.DEFAULT_INDEX_REBUILD_QUERY_TIMEOUT);
+            long indexRebuildRPCTimeoutMs =
+                    
configuration.getLong(QueryServices.INDEX_REBUILD_RPC_TIMEOUT_ATTRIB,
+                            
QueryServicesOptions.DEFAULT_INDEX_REBUILD_RPC_TIMEOUT);
+            long indexRebuildClientScannerTimeOutMs =
+                    
configuration.getLong(QueryServices.INDEX_REBUILD_CLIENT_SCANNER_TIMEOUT_ATTRIB,
+                            
QueryServicesOptions.DEFAULT_INDEX_REBUILD_CLIENT_SCANNER_TIMEOUT);
+            int indexRebuildRpcRetriesCounter =
+                    
configuration.getInt(QueryServices.INDEX_REBUILD_RPC_RETRIES_COUNTER,
+                            
QueryServicesOptions.DEFAULT_INDEX_REBUILD_RPC_RETRIES_COUNTER);
+            // Set various phoenix and hbase level timeouts and rpc retries
+            configuration.set(QueryServices.THREAD_TIMEOUT_MS_ATTRIB,
+                    Long.toString(indexRebuildQueryTimeoutMs));
+            configuration.set(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD,
+                    Long.toString(indexRebuildClientScannerTimeOutMs));
+            configuration.set(HConstants.HBASE_RPC_TIMEOUT_KEY,
+                    Long.toString(indexRebuildRPCTimeoutMs));
+            configuration.set(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
+                    Long.toString(indexRebuildRpcRetriesCounter));
+            configuration.set("mapreduce.task.timeout", 
Long.toString(indexRebuildQueryTimeoutMs));
 
             PhoenixConfigurationUtil.setIndexToolDataTableName(configuration, 
qDataTable);
             PhoenixConfigurationUtil.setIndexToolIndexTableName(configuration, 
qIndexTable);
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
index e1f56fb..dd5c9a9 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
@@ -356,7 +356,7 @@ public class QueryServicesOptions {
 
     public static final long 
DEFAULT_GLOBAL_INDEX_ROW_AGE_THRESHOLD_TO_DELETE_MS = 7*24*60*60*1000; /* 7 
days */
     public static final boolean DEFAULT_INDEX_REGION_OBSERVER_ENABLED = true;
-    public static final long DEFAULT_INDEX_REBUILD_PAGE_SIZE_IN_ROWS = 
1024*1024;
+    public static final long DEFAULT_INDEX_REBUILD_PAGE_SIZE_IN_ROWS = 16*1024;
 
     public static final boolean 
DEFAULT_ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK = false;
 

Reply via email to