From 759c904aee2ffb17ff11409be203aa441d5cbf38 Mon Sep 17 00:00:00 2001 From: Tanuj Khurana Date: Wed, 7 Oct 2020 11:59:12 -0700 Subject: [PATCH] PHOENIX-6183 Page size tests are not propagating test override values to server Tests are creating a new conf object and setting the INDEX_REBUILD_PAGE_SIZE_IN_ROWS parameter. Pass that conf object to the IndexTool. --- .../end2end/IndexToolForNonTxGlobalIndexIT.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolForNonTxGlobalIndexIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolForNonTxGlobalIndexIT.java index a8cfbc6e5a2..f4a38348129 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolForNonTxGlobalIndexIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolForNonTxGlobalIndexIT.java @@ -1135,7 +1135,8 @@ public void testOverrideIndexRebuildPageSizeFromIndexTool() throws Exception { // Run the index MR job and verify that the index table is built correctly Configuration conf = new Configuration(getUtility().getConfiguration()); conf.set(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(2)); - IndexTool indexTool = IndexToolIT.runIndexTool(directApi, useSnapshot, schemaName, dataTableName, indexTableName, null, 0, IndexTool.IndexVerifyType.BEFORE, new String[0]); + IndexTool indexTool = IndexToolIT.runIndexTool(conf, directApi, useSnapshot, schemaName, dataTableName, + indexTableName, null, 0, IndexTool.IndexVerifyType.BEFORE, IndexTool.IndexDisableLoggingType.NONE, new String[0]); assertEquals(NROWS, indexTool.getJob().getCounters().findCounter(INPUT_RECORDS).getValue()); assertEquals(NROWS, indexTool.getJob().getCounters().findCounter(SCANNED_DATA_ROW_COUNT).getValue()); assertEquals(NROWS, indexTool.getJob().getCounters().findCounter(REBUILT_INDEX_ROW_COUNT).getValue()); @@ -1167,9 +1168,9 @@ public void testPointDeleteRebuildWithPageSize() throws Exception { Configuration conf = new Configuration(getUtility().getConfiguration()); conf.set(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(1)); IndexTool indexTool = - IndexToolIT.runIndexTool(directApi, useSnapshot, schemaName, + IndexToolIT.runIndexTool(conf, directApi, useSnapshot, schemaName, dataTableName, indexTableName, null, 0, IndexTool.IndexVerifyType.BEFORE, - new String[0]); + IndexTool.IndexDisableLoggingType.NONE ,new String[0]); assertEquals(3, indexTool.getJob().getCounters().findCounter(INPUT_RECORDS).getValue()); assertEquals(3, indexTool.getJob().getCounters().findCounter(SCANNED_DATA_ROW_COUNT).getValue()); @@ -1221,9 +1222,9 @@ public void testIncrementalRebuildWithPageSize() throws Exception { Configuration conf = new Configuration(getUtility().getConfiguration()); conf.set(QueryServices.INDEX_REBUILD_PAGE_SIZE_IN_ROWS, Long.toString(2)); IndexTool indexTool = - IndexToolIT.runIndexTool(directApi, useSnapshot, schemaName, + IndexToolIT.runIndexTool(conf, directApi, useSnapshot, schemaName, dataTableName, indexTableName, null, 0, IndexTool.IndexVerifyType.AFTER, - "-st", String.valueOf(minTs), "-et", + IndexTool.IndexDisableLoggingType.NONE, "-st", String.valueOf(minTs), "-et", String.valueOf(EnvironmentEdgeManager.currentTimeMillis())); assertEquals(3, indexTool.getJob().getCounters().findCounter(INPUT_RECORDS).getValue()); assertEquals(3,