Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 ac81478ad -> fce9a6712
PHOENIX-4704 Presplit index tables when building asynchronously (addendum) Remove IndexTool#testSaltedVariableLengthPK() Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/fce9a671 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/fce9a671 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/fce9a671 Branch: refs/heads/4.x-HBase-0.98 Commit: fce9a6712faf8df3117372a6cdf244d420e829d1 Parents: ac81478 Author: Vincent Poon <vincentp...@apache.org> Authored: Mon May 21 18:02:06 2018 -0700 Committer: Vincent Poon <vincentp...@apache.org> Committed: Mon May 21 18:02:06 2018 -0700 ---------------------------------------------------------------------- .../org/apache/phoenix/end2end/IndexToolIT.java | 40 -------------------- 1 file changed, 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/fce9a671/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexToolIT.java ---------------------------------------------------------------------- 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 a120aaa..5720b67 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 @@ -220,46 +220,6 @@ public class IndexToolIT extends ParallelStatsEnabledIT { } } - @Test - public void testSaltedVariableLengthPK() throws Exception { - String schemaName = generateUniqueName(); - String dataTableName = generateUniqueName(); - String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName); - String indexTableName = generateUniqueName(); - try (Connection conn = - DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES))) { - String dataDDL = - "CREATE TABLE " + dataTableFullName + "(\n" - + "ID VARCHAR NOT NULL PRIMARY KEY,\n" - + "\"info\".CAR_NUM VARCHAR(18) NULL,\n" - + "\"info\".CAP_DATE VARCHAR NULL,\n" + "\"info\".ORG_ID BIGINT NULL,\n" - + "\"info\".ORG_NAME VARCHAR(255) NULL\n" + ") SALT_BUCKETS=3"; - conn.createStatement().execute(dataDDL); - - String upsert = - "UPSERT INTO " + dataTableFullName - + "(ID,CAR_NUM,CAP_DATE,ORG_ID,ORG_NAME) VALUES('1','car1','2016-01-01 00:00:00',11,'orgname1')"; - conn.createStatement().execute(upsert); - conn.commit(); - - String indexDDL = - String.format( - "CREATE %s INDEX %s on %s (\"info\".CAR_NUM,\"info\".CAP_DATE) ASYNC", - (localIndex ? "LOCAL" : ""), indexTableName, dataTableFullName); - conn.createStatement().execute(indexDDL); - - runIndexTool(directApi, useSnapshot, schemaName, dataTableName, indexTableName); - - ResultSet rs = - conn.createStatement().executeQuery( - "SELECT ORG_ID,CAP_DATE,CAR_NUM,ORG_NAME FROM " + dataTableFullName - + " WHERE CAR_NUM='car1' AND CAP_DATE>='2016-01-01' AND CAP_DATE<='2016-05-02' LIMIT 10"); - assertTrue(rs.next()); - int orgId = rs.getInt(1); - assertEquals(11, orgId); - } - } - /** * Test presplitting an index table */