[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.1 2352f819e -> e46d3d3dc http://git-wip-us.apache.org/repos/asf/phoenix/blob/e46d3d3d/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java index 6151271..74dfd1a 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java @@ -1250,27 +1250,31 @@ public abstract class BaseTest { } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); +protected static String initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, tenantId, splits, date, ts, getUrl()); } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); -} - -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, null, null, url); +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, null, url); +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); +} + +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, String url) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, null, null, url); } -private static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +private static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); } Properties props = new Properties(); @@ -1282,7 +1286,7 @@ public abstract class BaseTest { // Insert all rows at ts PreparedStatement stmt = conn.prepareStatement( "upsert into " + -ENTITY_HISTORY_TABLE_NAME+ +tableName + "(" + "ORGANIZATION_ID, " + "PARENT_ID, " + @@ -1368,13 +1372,19 @@ public abstract class BaseTest { } finally { conn.close(); } + +return tableName; } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); } Properties props
[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.2 28941bc6f -> 06fbb9a15 http://git-wip-us.apache.org/repos/asf/phoenix/blob/06fbb9a1/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java index ac9624b..33193ff 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java @@ -1249,27 +1249,31 @@ public abstract class BaseTest { } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); +protected static String initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, tenantId, splits, date, ts, getUrl()); } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); -} - -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, null, null, url); +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, null, url); +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); +} + +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, String url) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, null, null, url); } -private static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +private static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); } Properties props = new Properties(); @@ -1281,7 +1285,7 @@ public abstract class BaseTest { // Insert all rows at ts PreparedStatement stmt = conn.prepareStatement( "upsert into " + -ENTITY_HISTORY_TABLE_NAME+ +tableName + "(" + "ORGANIZATION_ID, " + "PARENT_ID, " + @@ -1367,13 +1371,19 @@ public abstract class BaseTest { } finally { conn.close(); } + +return tableName; } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); } Properties props
[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN
Repository: phoenix Updated Branches: refs/heads/master 586cdab9f -> 1407a5ec8 http://git-wip-us.apache.org/repos/asf/phoenix/blob/1407a5ec/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java index ac9624b..33193ff 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java @@ -1249,27 +1249,31 @@ public abstract class BaseTest { } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); +protected static String initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, tenantId, splits, date, ts, getUrl()); } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); -} - -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, null, null, url); +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, null, url); +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); +} + +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, String url) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, null, null, url); } -private static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +private static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); } Properties props = new Properties(); @@ -1281,7 +1285,7 @@ public abstract class BaseTest { // Insert all rows at ts PreparedStatement stmt = conn.prepareStatement( "upsert into " + -ENTITY_HISTORY_TABLE_NAME+ +tableName + "(" + "ORGANIZATION_ID, " + "PARENT_ID, " + @@ -1367,13 +1371,19 @@ public abstract class BaseTest { } finally { conn.close(); } + +return tableName; } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); } Properties props = new
[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN
Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 458973fd3 -> 67aa5da88 http://git-wip-us.apache.org/repos/asf/phoenix/blob/67aa5da8/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java -- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java index afcaeef..4341fd5 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java @@ -1237,27 +1237,31 @@ public abstract class BaseTest { } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); +protected static String initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, tenantId, splits, date, ts, getUrl()); } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts) throws Exception { -initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, getUrl()); -} - -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, null, null, url); +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); } -protected static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, String url) throws Exception { -initEntityHistoryTableValues(tenantId, splits, date, null, url); +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts) throws Exception { +return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, date, ts, getUrl()); +} + +protected static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, String url) throws Exception { +return initEntityHistoryTableValues(tableName, tenantId, splits, null, null, url); } -private static void initEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +private static String initEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null); } Properties props = new Properties(); @@ -1269,7 +1273,7 @@ public abstract class BaseTest { // Insert all rows at ts PreparedStatement stmt = conn.prepareStatement( "upsert into " + -ENTITY_HISTORY_TABLE_NAME+ +tableName + "(" + "ORGANIZATION_ID, " + "PARENT_ID, " + @@ -1355,13 +1359,19 @@ public abstract class BaseTest { } finally { conn.close(); } + +return tableName; } -protected static void initSaltedEntityHistoryTableValues(String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { +protected static String initSaltedEntityHistoryTableValues(String tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) throws Exception { + if (tableName == null) { + tableName = generateUniqueName(); + } + if (ts == null) { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null); } else { -ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); +ensureTableCreated(url, tableName, ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null); } Properties