This is an automated email from the ASF dual-hosted git repository. kadir pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new 6063dcb PHOENIX-5478 IndexTool mapper task should not timeout (addendum for setting config params) 6063dcb is described below commit 6063dcbb52d371d008b44169eae4fe9d43dfb95c 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 6f5913a..1961fe3 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 @@ -500,6 +500,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 981afe0..8a2cbec 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 @@ -357,7 +357,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;