This is an automated email from the ASF dual-hosted git repository.
palashc 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 ba340dd31c PHOENIX-7474 addendum (#2363)
ba340dd31c is described below
commit ba340dd31cd4bcc6aec5a69fabc5c5e58a078ce5
Author: Palash Chauhan <[email protected]>
AuthorDate: Wed Feb 4 09:08:57 2026 -0800
PHOENIX-7474 addendum (#2363)
Co-authored-by: Palash Chauhan
<[email protected]>
---
.../mapreduce/index/IndexToolTableUtil.java | 7 +++-
.../apache/phoenix/mapreduce/index/IndexTool.java | 2 +-
.../index/IndexVerificationOutputRepository.java | 15 ++++---
.../index/IndexVerificationResultRepository.java | 12 ++++--
.../end2end/IndexRepairRegionScannerIT.java | 20 +++++-----
.../end2end/IndexToolForNonTxGlobalIndexIT.java | 46 ++++++++++++----------
.../org/apache/phoenix/end2end/IndexToolIT.java | 10 ++---
.../index/IndexVerificationOutputRepositoryIT.java | 13 +++---
.../index/IndexVerificationResultRepositoryIT.java | 17 ++++----
9 files changed, 85 insertions(+), 57 deletions(-)
diff --git
a/phoenix-core-client/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolTableUtil.java
b/phoenix-core-client/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolTableUtil.java
index e679e46870..68e18eb35f 100644
---
a/phoenix-core-client/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolTableUtil.java
+++
b/phoenix-core-client/src/main/java/org/apache/phoenix/mapreduce/index/IndexToolTableUtil.java
@@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.NamespaceDescriptor;
import org.apache.hadoop.hbase.TableExistsException;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.*;
+import org.apache.hadoop.hbase.util.Bytes;
import org.apache.phoenix.coprocessorclient.MetaDataProtocol;
import org.apache.phoenix.jdbc.PhoenixConnection;
import org.apache.phoenix.query.ConnectionQueryServices;
@@ -49,10 +50,12 @@ public class IndexToolTableUtil extends Configured {
public final static String OUTPUT_TABLE_NAME = "PHOENIX_INDEX_TOOL";
public static String OUTPUT_TABLE_FULL_NAME =
SchemaUtil.getTableName(SYSTEM_SCHEMA_NAME, OUTPUT_TABLE_NAME);
+ public static byte[] OUTPUT_TABLE_FULL_NAME_BYTES =
Bytes.toBytes(OUTPUT_TABLE_FULL_NAME);
- public final static String RESULT_TABLE_NAME = "PHOENIX_INDEX_TOOL_RESULT";
+ public static final String RESULT_TABLE_NAME = "PHOENIX_INDEX_TOOL_RESULT";
public static String RESULT_TABLE_FULL_NAME =
SchemaUtil.getTableName(SYSTEM_SCHEMA_NAME, RESULT_TABLE_NAME);
+ public static byte[] RESULT_TABLE_FULL_NAME_BYTES =
Bytes.toBytes(RESULT_TABLE_FULL_NAME);
public static void setIndexToolTableName(Connection connection) throws
Exception {
ConnectionQueryServices queryServices =
@@ -66,6 +69,8 @@ public class IndexToolTableUtil extends Configured {
OUTPUT_TABLE_FULL_NAME = SchemaUtil.getTableName(SYSTEM_SCHEMA_NAME,
OUTPUT_TABLE_NAME);
RESULT_TABLE_FULL_NAME = SchemaUtil.getTableName(SYSTEM_SCHEMA_NAME,
RESULT_TABLE_NAME);
}
+ OUTPUT_TABLE_FULL_NAME_BYTES = Bytes.toBytes(OUTPUT_TABLE_FULL_NAME);
+ RESULT_TABLE_FULL_NAME_BYTES = Bytes.toBytes(RESULT_TABLE_FULL_NAME);
}
public static Table createResultTable(Connection connection) throws
IOException, SQLException {
diff --git
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
index 9ca210ae40..2ca544e0ee 100644
---
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
+++
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
@@ -971,7 +971,7 @@ public class IndexTool extends Configured implements Tool {
public boolean isValidLastVerifyTime(Long lastVerifyTime) throws Exception {
try (Connection conn = getConnection(configuration);
Table hIndexToolTable =
conn.unwrap(PhoenixConnection.class).getQueryServices()
- .getTable(IndexVerificationResultRepository.RESULT_TABLE_NAME_BYTES)) {
+
.getTable(IndexVerificationResultRepository.getResultTableNameBytes())) {
Scan s = new Scan();
ConnectionQueryServices cqs =
conn.unwrap(PhoenixConnection.class).getQueryServices();
boolean isNamespaceMapped = SchemaUtil.isNamespaceMappingEnabled(null,
cqs.getProps());
diff --git
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationOutputRepository.java
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationOutputRepository.java
index f59ae64fc2..784823993e 100644
---
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationOutputRepository.java
+++
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationOutputRepository.java
@@ -52,12 +52,17 @@ public class IndexVerificationOutputRepository implements
AutoCloseable {
IndexTool.IndexDisableLoggingType.NONE;
private boolean shouldLogBeyondMaxLookback = true;
- public final static String OUTPUT_TABLE_NAME =
IndexToolTableUtil.OUTPUT_TABLE_FULL_NAME;
- public final static byte[] OUTPUT_TABLE_NAME_BYTES =
- Bytes.toBytes(IndexToolTableUtil.OUTPUT_TABLE_FULL_NAME);
public final static byte[] OUTPUT_TABLE_COLUMN_FAMILY =
QueryConstants.DEFAULT_COLUMN_FAMILY_BYTES;
+ public static String getOutputTableName() {
+ return IndexToolTableUtil.OUTPUT_TABLE_FULL_NAME;
+ }
+
+ public static byte[] getOutputTableNameBytes() {
+ return IndexToolTableUtil.OUTPUT_TABLE_FULL_NAME_BYTES;
+ }
+
public final static String DATA_TABLE_NAME = "DTName";
public final static byte[] DATA_TABLE_NAME_BYTES =
Bytes.toBytes(DATA_TABLE_NAME);
public final static String INDEX_TABLE_NAME = "ITName";
@@ -109,7 +114,7 @@ public class IndexVerificationOutputRepository implements
AutoCloseable {
@VisibleForTesting
public IndexVerificationOutputRepository(byte[] indexName, Connection conn)
throws SQLException {
ConnectionQueryServices queryServices =
conn.unwrap(PhoenixConnection.class).getQueryServices();
- outputTable = queryServices.getTable(OUTPUT_TABLE_NAME_BYTES);
+ outputTable = queryServices.getTable(getOutputTableNameBytes());
indexTable = queryServices.getTable(indexName);
}
@@ -124,7 +129,7 @@ public class IndexVerificationOutputRepository implements
AutoCloseable {
public IndexVerificationOutputRepository(byte[] indexName, HTableFactory
hTableFactory,
IndexTool.IndexDisableLoggingType disableLoggingVerifyType) throws
IOException {
this.indexName = indexName;
- outputTable = hTableFactory.getTable(new
ImmutableBytesPtr(OUTPUT_TABLE_NAME_BYTES));
+ outputTable = hTableFactory.getTable(new
ImmutableBytesPtr(getOutputTableNameBytes()));
indexTable = hTableFactory.getTable(new ImmutableBytesPtr(indexName));
this.disableLoggingVerifyType = disableLoggingVerifyType;
}
diff --git
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationResultRepository.java
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationResultRepository.java
index 0fc9940bd0..9a81b7e91d 100644
---
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationResultRepository.java
+++
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/index/IndexVerificationResultRepository.java
@@ -44,11 +44,17 @@ public class IndexVerificationResultRepository implements
AutoCloseable {
private Table indexTable;
public static final String ROW_KEY_SEPARATOR = "|";
public static final byte[] ROW_KEY_SEPARATOR_BYTE =
Bytes.toBytes(ROW_KEY_SEPARATOR);
- public static String RESULT_TABLE_NAME =
IndexToolTableUtil.RESULT_TABLE_FULL_NAME;
- public static byte[] RESULT_TABLE_NAME_BYTES =
- Bytes.toBytes(IndexToolTableUtil.RESULT_TABLE_FULL_NAME);
public final static byte[] RESULT_TABLE_COLUMN_FAMILY =
QueryConstants.DEFAULT_COLUMN_FAMILY_BYTES;
+
+ public static String getResultTableName() {
+ return IndexToolTableUtil.RESULT_TABLE_FULL_NAME;
+ }
+
+ public static byte[] getResultTableNameBytes() {
+ return IndexToolTableUtil.RESULT_TABLE_FULL_NAME_BYTES;
+ }
+
public final static String SCANNED_DATA_ROW_COUNT = "ScannedDataRowCount";
public final static byte[] SCANNED_DATA_ROW_COUNT_BYTES =
Bytes.toBytes(SCANNED_DATA_ROW_COUNT);
public final static String REBUILT_INDEX_ROW_COUNT = "RebuiltIndexRowCount";
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexRepairRegionScannerIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexRepairRegionScannerIT.java
index b8f2830a49..f514c772ef 100644
---
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexRepairRegionScannerIT.java
+++
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexRepairRegionScannerIT.java
@@ -17,7 +17,6 @@
*/
package org.apache.phoenix.end2end;
-import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RESULT_TABLE_NAME;
import static
org.apache.phoenix.mapreduce.index.PhoenixIndexToolJobCounters.AFTER_REPAIR_EXTRA_UNVERIFIED_INDEX_ROW_COUNT;
import static
org.apache.phoenix.mapreduce.index.PhoenixIndexToolJobCounters.AFTER_REPAIR_EXTRA_VERIFIED_INDEX_ROW_COUNT;
import static
org.apache.phoenix.mapreduce.index.PhoenixIndexToolJobCounters.BEFORE_REBUILD_BEYOND_MAXLOOKBACK_INVALID_INDEX_ROW_COUNT;
@@ -159,8 +158,9 @@ public class IndexRepairRegionScannerIT extends
ParallelStatsDisabledIT {
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
deleteAllRows(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME_BYTES));
- deleteAllRows(conn,
TableName.valueOf(IndexVerificationResultRepository.RESULT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableNameBytes()));
+ deleteAllRows(conn,
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableNameBytes()));
}
EnvironmentEdgeManager.reset();
resetIndexRegionObserverFailPoints();
@@ -227,11 +227,13 @@ public class IndexRepairRegionScannerIT extends
ParallelStatsDisabledIT {
private void truncateIndexToolTables() throws IOException {
getUtility().getAdmin()
-
.disableTable(TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
.disableTable(TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
+ getUtility().getAdmin().truncateTable(
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()),
true);
getUtility().getAdmin()
-
.truncateTable(TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME),
true);
- getUtility().getAdmin().disableTable(TableName.valueOf(RESULT_TABLE_NAME));
-
getUtility().getAdmin().truncateTable(TableName.valueOf(RESULT_TABLE_NAME),
true);
+
.disableTable(TableName.valueOf(IndexVerificationResultRepository.getResultTableName()));
+ getUtility().getAdmin().truncateTable(
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableName()),
true);
}
private void assertExtraCounters(IndexTool indexTool, long extraVerified,
long extraUnverified,
@@ -281,7 +283,7 @@ public class IndexRepairRegionScannerIT extends
ParallelStatsDisabledIT {
}
} catch (AssertionError e) {
TestUtil.dumpTable(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
throw e;
}
if (expectedPITRows > 0) {
@@ -678,7 +680,7 @@ public class IndexRepairRegionScannerIT extends
ParallelStatsDisabledIT {
assertEquals(2, rows.size());
} catch (AssertionError e) {
TestUtil.dumpTable(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
throw e;
}
}
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 6d3a47d961..d6061a8380 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
@@ -20,8 +20,6 @@ package org.apache.phoenix.end2end;
import static org.apache.phoenix.mapreduce.PhoenixJobCounters.INPUT_RECORDS;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.INDEX_TOOL_RUN_STATUS_BYTES;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RESULT_TABLE_COLUMN_FAMILY;
-import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RESULT_TABLE_NAME;
-import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RESULT_TABLE_NAME_BYTES;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.ROW_KEY_SEPARATOR;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RUN_STATUS_EXECUTED;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RUN_STATUS_SKIPPED;
@@ -201,8 +199,9 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
deleteAllRows(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME_BYTES));
- deleteAllRows(conn,
TableName.valueOf(IndexVerificationResultRepository.RESULT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableNameBytes()));
+ deleteAllRows(conn,
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableName()));
}
EnvironmentEdgeManager.reset();
}
@@ -325,7 +324,7 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
modifyColumnFams.get(41000, TimeUnit.MILLISECONDS);
TableName indexToolOutputTable =
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME_BYTES);
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableNameBytes());
admin.disableTable(indexToolOutputTable);
admin.deleteTable(indexToolOutputTable);
// Run the index tool using the only-verify option, verify it gives no
mismatch
@@ -760,7 +759,8 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
Assert.assertEquals(PIndexState.BUILDING, TestUtil.getIndexState(conn,
indexTableFullName));
// Delete the output table for the next test
- deleteAllRows(conn,
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+ deleteAllRows(conn,
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
// Run the index tool to populate the index while verifying rows
IndexToolIT.runIndexTool(useSnapshot, schemaName, dataTableName,
indexTableName, null, 0,
IndexTool.IndexVerifyType.AFTER);
@@ -801,7 +801,8 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
try {
verifyRunStatusFromResultTable(conn, scn, indexTableFullName, 3,
expectedStatus);
} catch (AssertionError ae) {
- TestUtil.dumpTable(conn, TableName.valueOf(RESULT_TABLE_NAME));
+ TestUtil.dumpTable(conn,
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableName()));
throw ae;
}
@@ -1093,7 +1094,8 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
- deleteAllRows(conn,
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+ deleteAllRows(conn,
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
String stmString1 = "CREATE TABLE " + dataTableFullName
+ " (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR, ZIP INTEGER) " +
tableDDLOptions;
conn.createStatement().execute(stmString1);
@@ -1181,7 +1183,8 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
try (Connection conn = DriverManager.getConnection(getUrl())) {
- deleteAllRows(conn,
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+ deleteAllRows(conn,
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
String stmString1 = "CREATE TABLE " + dataTableFullName
+ " (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR, ZIP INTEGER) ";
conn.createStatement().execute(stmString1);
@@ -1206,13 +1209,14 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
EnvironmentEdgeManager.injectEdge(injectEdge);
injectEdge.incrementValue(1L);
injectEdge.incrementValue(MAX_LOOKBACK_AGE * 1000);
- deleteAllRows(conn,
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+ deleteAllRows(conn,
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
getUtility().getConfiguration()
.set(IndexRebuildRegionScanner.PHOENIX_INDEX_MR_LOG_BEYOND_MAX_LOOKBACK_ERRORS,
"true");
IndexTool it = IndexToolIT.runIndexTool(useSnapshot, schemaName,
dataTableName,
indexTableName, null, 0, IndexTool.IndexVerifyType.ONLY);
TestUtil.dumpTable(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
Counters counters = it.getJob().getCounters();
System.out.println(counters.toString());
assertEquals(2L,
@@ -1574,11 +1578,13 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
private void truncateIndexToolTables() throws IOException {
getUtility().getAdmin()
-
.disableTable(TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
.disableTable(TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
+ getUtility().getAdmin().truncateTable(
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()),
true);
getUtility().getAdmin()
-
.truncateTable(TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME),
true);
- getUtility().getAdmin().disableTable(TableName.valueOf(RESULT_TABLE_NAME));
-
getUtility().getAdmin().truncateTable(TableName.valueOf(RESULT_TABLE_NAME),
true);
+
.disableTable(TableName.valueOf(IndexVerificationResultRepository.getResultTableName()));
+ getUtility().getAdmin().truncateTable(
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableName()),
true);
}
private void assertDisableLogging(Connection conn, int expectedRows,
@@ -1599,7 +1605,7 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
assertEquals(expectedRows, rows.size());
} catch (AssertionError e) {
TestUtil.dumpTable(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
throw e;
}
if (expectedRows > 0) {
@@ -1609,8 +1615,8 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
private void deleteOneRowFromResultTable(Connection conn, Long scn, String
indexTable)
throws SQLException, IOException {
- Table hIndexToolTable =
-
conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(RESULT_TABLE_NAME_BYTES);
+ Table hIndexToolTable =
conn.unwrap(PhoenixConnection.class).getQueryServices()
+ .getTable(IndexVerificationResultRepository.getResultTableNameBytes());
Scan s = new Scan();
s.setRowPrefixFilter(
Bytes.toBytes(String.format("%s%s%s", scn, ROW_KEY_SEPARATOR,
indexTable)));
@@ -1620,8 +1626,8 @@ public class IndexToolForNonTxGlobalIndexIT extends
BaseTest {
private List<String> verifyRunStatusFromResultTable(Connection conn, Long
scn, String indexTable,
int totalRows, List<String> expectedStatus) throws SQLException,
IOException {
- Table hIndexToolTable =
-
conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(RESULT_TABLE_NAME_BYTES);
+ Table hIndexToolTable =
conn.unwrap(PhoenixConnection.class).getQueryServices()
+ .getTable(IndexVerificationResultRepository.getResultTableNameBytes());
Assert.assertEquals(totalRows, TestUtil.getRowCount(hIndexToolTable,
false));
List<String> output = new ArrayList<>();
Scan s = new Scan();
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java
index 8533b59c7c..d8225e1458 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java
@@ -394,11 +394,11 @@ public class IndexToolIT extends BaseTest {
protected static void dropIndexToolTables(Connection conn) throws Exception {
Admin admin =
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin();
TableName indexToolOutputTable =
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME_BYTES);
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableNameBytes());
admin.disableTable(indexToolOutputTable);
admin.deleteTable(indexToolOutputTable);
TableName indexToolResultTable =
-
TableName.valueOf(IndexVerificationResultRepository.RESULT_TABLE_NAME_BYTES);
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableNameBytes());
admin.disableTable(indexToolResultTable);
admin.deleteTable(indexToolResultTable);
}
@@ -443,7 +443,7 @@ public class IndexToolIT extends BaseTest {
byte[] indexTableFullNameBytes = Bytes.toBytes(indexTableFullName);
byte[] dataTableFullNameBytes = Bytes.toBytes(dataTableFullName);
Table hIndexTable = conn.unwrap(PhoenixConnection.class).getQueryServices()
- .getTable(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME_BYTES);
+ .getTable(IndexVerificationOutputRepository.getOutputTableNameBytes());
Scan scan = new Scan();
ResultScanner scanner = hIndexTable.getScanner(scan);
boolean dataTableNameCheck = false;
@@ -488,7 +488,7 @@ public class IndexToolIT extends BaseTest {
assertTrue("Error message cell was null", errorMessageCell != null);
verifyIndexTableRowKey(CellUtil.cloneRow(errorMessageCell),
indexTableFullName);
hIndexTable = conn.unwrap(PhoenixConnection.class).getQueryServices()
- .getTable(IndexVerificationResultRepository.RESULT_TABLE_NAME_BYTES);
+ .getTable(IndexVerificationResultRepository.getResultTableNameBytes());
scan = new Scan();
scanner = hIndexTable.getScanner(scan);
Result result = scanner.next();
@@ -1081,7 +1081,7 @@ public class IndexToolIT extends BaseTest {
IndexTool indexTool = IndexToolIT.runIndexTool(false, schemaName,
tableName, indexName, null,
0, IndexTool.IndexVerifyType.ONLY);
TestUtil.dumpTable(conn,
-
TableName.valueOf(IndexVerificationOutputRepository.OUTPUT_TABLE_NAME));
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableName()));
Counters counters = indexTool.getJob().getCounters();
LOGGER.info(counters.toString());
assertEquals(0,
counters.findCounter(REBUILT_INDEX_ROW_COUNT).getValue());
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
index 0e3ab135c8..88f71dbf04 100644
---
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
+++
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationOutputRepositoryIT.java
@@ -21,7 +21,6 @@ import static
org.apache.phoenix.coprocessorclient.MetaDataProtocol.DEFAULT_LOG_
import static
org.apache.phoenix.mapreduce.index.IndexVerificationOutputRepository.IndexVerificationErrorType.BEYOND_MAX_LOOKBACK_INVALID;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationOutputRepository.IndexVerificationErrorType.BEYOND_MAX_LOOKBACK_MISSING;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationOutputRepository.IndexVerificationErrorType.INVALID_ROW;
-import static
org.apache.phoenix.mapreduce.index.IndexVerificationOutputRepository.OUTPUT_TABLE_NAME_BYTES;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationOutputRepository.PHASE_AFTER_VALUE;
import static
org.apache.phoenix.mapreduce.index.IndexVerificationOutputRepository.PHASE_BEFORE_VALUE;
import static org.junit.Assert.assertEquals;
@@ -120,15 +119,16 @@ public class IndexVerificationOutputRepositoryIT extends
ParallelStatsDisabledIT
byte[] mockStringBytes = Bytes.toBytes(mockString);
try (Connection conn = DriverManager.getConnection(getUrl())) {
- Table hTable =
-
conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(OUTPUT_TABLE_NAME_BYTES);
+ Table hTable = conn.unwrap(PhoenixConnection.class).getQueryServices()
+ .getTable(IndexVerificationOutputRepository.getOutputTableNameBytes());
IndexVerificationOutputRepository outputRepository =
new IndexVerificationOutputRepository(mockStringBytes, conn);
outputRepository.createOutputTable(conn);
- TestUtil.assertTTLValue(conn,
TableName.valueOf(OUTPUT_TABLE_NAME_BYTES), DEFAULT_LOG_TTL,
- false);
+ TestUtil.assertTTLValue(conn,
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableNameBytes()),
+ DEFAULT_LOG_TTL, false);
ManualEnvironmentEdge customClock = new ManualEnvironmentEdge();
customClock.setValue(EnvironmentEdgeManager.currentTimeMillis());
EnvironmentEdgeManager.injectEdge(customClock);
@@ -312,7 +312,8 @@ public class IndexVerificationOutputRepositoryIT extends
ParallelStatsDisabledIT
ConnectionQueryServices queryServices =
conn.unwrap(PhoenixConnection.class).getQueryServices();
Admin admin = queryServices.getAdmin();
- TableName outputTableName = TableName.valueOf(OUTPUT_TABLE_NAME_BYTES);
+ TableName outputTableName =
+
TableName.valueOf(IndexVerificationOutputRepository.getOutputTableNameBytes());
if (admin.tableExists(outputTableName)) {
admin.disableTable(outputTableName);
admin.deleteTable(outputTableName);
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
index 2122fbd30e..8337d47a10 100644
---
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
+++
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexVerificationResultRepositoryIT.java
@@ -18,7 +18,6 @@
package org.apache.phoenix.end2end.index;
import static
org.apache.phoenix.coprocessorclient.MetaDataProtocol.DEFAULT_LOG_TTL;
-import static
org.apache.phoenix.mapreduce.index.IndexVerificationResultRepository.RESULT_TABLE_NAME_BYTES;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
@@ -83,7 +82,7 @@ public class IndexVerificationResultRepositoryIT extends
ParallelStatsDisabledIT
try (Connection conn = DriverManager.getConnection(getUrl());
PhoenixConnection pconn =
DriverManager.getConnection(getUrl()).unwrap(PhoenixConnection.class)) {
ConnectionQueryServices services = pconn.getQueryServices();
- Table hTable = services.getTable(RESULT_TABLE_NAME_BYTES);
+ Table hTable =
services.getTable(IndexVerificationResultRepository.getResultTableNameBytes());
long scanMaxTs = EnvironmentEdgeManager.currentTimeMillis();
IndexToolVerificationResult expectedResult =
getExpectedResult(scanMaxTs);
setupResultRepository(conn, mockStringBytes, expectedResult);
@@ -108,8 +107,9 @@ public class IndexVerificationResultRepositoryIT extends
ParallelStatsDisabledIT
IndexVerificationResultRepository resultRepository =
new IndexVerificationResultRepository(conn, indexNameBytes);
resultRepository.createResultTable(conn);
- TestUtil.assertTTLValue(conn, TableName.valueOf(RESULT_TABLE_NAME_BYTES),
DEFAULT_LOG_TTL,
- false);
+ TestUtil.assertTTLValue(conn,
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableNameBytes()),
+ DEFAULT_LOG_TTL, false);
byte[] regionOne = Bytes.toBytes("a.1.00000000000000000000");
byte[] regionTwo = Bytes.toBytes("a.2.00000000000000000000");
resultRepository.logToIndexToolResultTable(expectedResult,
IndexTool.IndexVerifyType.BOTH,
@@ -198,10 +198,13 @@ public class IndexVerificationResultRepositoryIT extends
ParallelStatsDisabledIT
ConnectionQueryServices queryServices =
conn.unwrap(PhoenixConnection.class).getQueryServices();
Admin admin = queryServices.getAdmin();
- TableName outputTableName = TableName.valueOf(RESULT_TABLE_NAME_BYTES);
+ TableName outputTableName =
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableNameBytes());
if (admin.tableExists(outputTableName)) {
- admin.disableTable(TableName.valueOf(RESULT_TABLE_NAME_BYTES));
- admin.deleteTable(TableName.valueOf(RESULT_TABLE_NAME_BYTES));
+ admin.disableTable(
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableNameBytes()));
+ admin.deleteTable(
+
TableName.valueOf(IndexVerificationResultRepository.getResultTableNameBytes()));
}
}
EnvironmentEdgeManager.reset();