http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/IsNullIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IsNullIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IsNullIT.java index fb12fc4..10a5baa 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IsNullIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IsNullIT.java @@ -33,7 +33,7 @@ import org.junit.Test; public class IsNullIT extends ParallelStatsDisabledIT { @Test public void testIsNullInPk() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); ensureTableCreated(getUrl(), tableName, "IntIntKeyTest"); Connection conn = DriverManager.getConnection(getUrl()); String upsert = "UPSERT INTO " + tableName + " VALUES(4,2)"; @@ -62,7 +62,7 @@ public class IsNullIT extends ParallelStatsDisabledIT { @Test public void testIsNullWithLastPKColDesc() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl()); conn.createStatement().execute("CREATE TABLE " + tableName + "(k1 VARCHAR NOT NULL, k2 VARCHAR, k3 VARCHAR, CONSTRAINT pk PRIMARY KEY (k1, k2, k3 DESC))"); conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES ('a')"); @@ -89,7 +89,7 @@ public class IsNullIT extends ParallelStatsDisabledIT { @Test public void testIsNullInCompositeKey() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); conn.createStatement().execute("CREATE TABLE " + tableName + "(k1 VARCHAR, k2 VARCHAR, CONSTRAINT pk PRIMARY KEY (k1,k2))"); conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES (null,'a')"); conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES ('a','a')");
http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/KeyOnlyIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/KeyOnlyIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/KeyOnlyIT.java index 7ec37ce..b682c1a 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/KeyOnlyIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/KeyOnlyIT.java @@ -45,7 +45,7 @@ public class KeyOnlyIT extends ParallelStatsEnabledIT { @Before public void createTable() throws SQLException { - tableName = generateRandomString(); + tableName = generateUniqueName(); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); try (Connection conn = DriverManager.getConnection(getUrl(), props)) { conn.createStatement().execute("create table " + tableName + http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValueFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValueFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValueFunctionIT.java index e28f510..2a3ebf7 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValueFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LastValueFunctionIT.java @@ -33,7 +33,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void unsignedLong() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " date DATE, \"value\" UNSIGNED_LONG)"; @@ -65,7 +65,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void signedInteger() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG, date INTEGER, \"value\" INTEGER)"; @@ -90,7 +90,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void unsignedInteger() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -115,7 +115,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void simpleTestDescOrder() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -141,7 +141,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void simpleTestAscOrder() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -167,7 +167,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void charDatatype() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG, " @@ -192,7 +192,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void varcharVariableLenghtDatatype() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -217,7 +217,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void groupMultipleValues() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -254,7 +254,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void nullValuesInAggregatingColumns() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -279,7 +279,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void nullValuesInAggregatingColumnsSecond() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -305,7 +305,7 @@ public class LastValueFunctionIT extends ParallelStatsDisabledIT { @Test public void inOrderByClausule() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_INT," http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java index 2d6b2cb..f522817 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java @@ -35,7 +35,7 @@ import org.junit.Test; public class LikeExpressionIT extends ParallelStatsDisabledIT { - private static final String TEST_TABLE = generateRandomString(); + private static final String TEST_TABLE = generateUniqueName(); @BeforeClass public static void doBeforeTestSetup() throws Exception { @@ -94,7 +94,7 @@ public class LikeExpressionIT extends ParallelStatsDisabledIT { @Test public void testLikeEverythingExpression() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String table = generateRandomString(); + String table = generateUniqueName(); String ddl = "CREATE TABLE " + table + " (k1 VARCHAR, k2 VARCHAR, CONSTRAINT pk PRIMARY KEY (k1,k2))"; conn.createStatement().execute(ddl); @@ -153,7 +153,7 @@ public class LikeExpressionIT extends ParallelStatsDisabledIT { @Test public void testLikeWithEscapenLParen() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String t = generateRandomString(); + String t = generateUniqueName(); String ddl = "CREATE TABLE " + t + " (k VARCHAR, v VARCHAR, CONSTRAINT pk PRIMARY KEY (k))"; conn.createStatement().execute(ddl); conn.createStatement().execute("UPSERT INTO " + t + " VALUES('aa','bb')"); @@ -175,7 +175,7 @@ public class LikeExpressionIT extends ParallelStatsDisabledIT { @Test public void testNewLine() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String t = generateRandomString(); + String t = generateUniqueName(); String ddl = "CREATE TABLE " + t + " (k VARCHAR NOT NULL PRIMARY KEY)"; conn.createStatement().execute(ddl); conn.createStatement().execute("UPSERT INTO " + t + " VALUES('AA\nA')"); @@ -204,7 +204,7 @@ public class LikeExpressionIT extends ParallelStatsDisabledIT { @Test public void testOneChar() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String t = generateRandomString(); + String t = generateUniqueName(); String ddl = "CREATE TABLE " + t + " (k VARCHAR NOT NULL PRIMARY KEY)"; conn.createStatement().execute(ddl); conn.createStatement().execute("UPSERT INTO " + t + " VALUES('A')"); @@ -227,7 +227,7 @@ public class LikeExpressionIT extends ParallelStatsDisabledIT { @Test public void testNull() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String table = generateRandomString(); + String table = generateUniqueName(); String ddl = "CREATE TABLE " + table + " (pk INTEGER PRIMARY KEY, str VARCHAR)"; conn.createStatement().execute(ddl); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/LnLogFunctionEnd2EndIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LnLogFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LnLogFunctionEnd2EndIT.java index ad4efbc..ddbe2ad 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LnLogFunctionEnd2EndIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LnLogFunctionEnd2EndIT.java @@ -59,8 +59,8 @@ public class LnLogFunctionEnd2EndIT extends ParallelStatsDisabledIT { public void initTable() throws Exception { Connection conn = null; PreparedStatement stmt = null; - signedTableName = generateRandomString(); - unsignedTableName = generateRandomString(); + signedTableName = generateUniqueName(); + unsignedTableName = generateUniqueName(); try { conn = DriverManager.getConnection(getUrl()); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/MD5FunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MD5FunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MD5FunctionIT.java index b5fc2e9..1768b10 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MD5FunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MD5FunctionIT.java @@ -37,7 +37,7 @@ public class MD5FunctionIT extends ParallelStatsDisabledIT { String testString = "mwalsh"; Connection conn = DriverManager.getConnection(getUrl()); - String md5_retrieve_test = generateRandomString(); + String md5_retrieve_test = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + md5_retrieve_test + " (pk VARCHAR NOT NULL PRIMARY KEY)"; conn.createStatement().execute(ddl); @@ -58,7 +58,7 @@ public class MD5FunctionIT extends ParallelStatsDisabledIT { String testString = "FOOBAR"; Connection conn = DriverManager.getConnection(getUrl()); - String md5_retrieve_test = generateRandomString(); + String md5_retrieve_test = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + md5_retrieve_test + " (k1 CHAR(3) NOT NULL, k2 CHAR(3) NOT NULL, CONSTRAINT PK PRIMARY KEY (K1,K2))"; conn.createStatement().execute(ddl); @@ -81,7 +81,7 @@ public class MD5FunctionIT extends ParallelStatsDisabledIT { String testString2 = "mwalsh2"; Connection conn = DriverManager.getConnection(getUrl()); - String md5_upsert_test = generateRandomString(); + String md5_upsert_test = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + md5_upsert_test + " (k1 binary(16) NOT NULL,k2 binary(16) NOT NULL CONSTRAINT pk PRIMARY KEY (k1, k2))"; conn.createStatement().execute(ddl); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/MapReduceIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MapReduceIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MapReduceIT.java index 0b42a1f..68d9c9c 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MapReduceIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MapReduceIT.java @@ -64,8 +64,8 @@ public class MapReduceIT extends ParallelStatsDisabledIT { @Test public void testNoConditionsOnSelect() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String stockTableName = generateRandomString(); - String stockStatsTableName = generateRandomString(); + String stockTableName = generateUniqueName(); + String stockStatsTableName = generateUniqueName(); conn.createStatement().execute(String.format(CREATE_STOCK_TABLE, stockTableName)); conn.createStatement().execute(String.format(CREATE_STOCK_STATS_TABLE, stockStatsTableName)); conn.commit(); @@ -79,8 +79,8 @@ public class MapReduceIT extends ParallelStatsDisabledIT { @Test public void testConditionsOnSelect() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String stockTableName = generateRandomString(); - String stockStatsTableName = generateRandomString(); + String stockTableName = generateUniqueName(); + String stockStatsTableName = generateUniqueName(); conn.createStatement().execute(String.format(CREATE_STOCK_TABLE, stockTableName)); conn.createStatement().execute(String.format(CREATE_STOCK_STATS_TABLE, stockStatsTableName)); conn.commit(); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java index 4bbbd03..768b005 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java @@ -52,7 +52,7 @@ import org.junit.Test; public class MappingTableDataTypeIT extends ParallelStatsDisabledIT { @Test public void testMappingHbaseTableToPhoenixTable() throws Exception { - String mtest = generateRandomString(); + String mtest = generateUniqueName(); final TableName tableName = TableName.valueOf(mtest); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); PhoenixConnection conn = DriverManager.getConnection(getUrl(), props).unwrap(PhoenixConnection.class); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/MinMaxAggregateFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MinMaxAggregateFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MinMaxAggregateFunctionIT.java index c2228ff..c2429ab 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MinMaxAggregateFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MinMaxAggregateFunctionIT.java @@ -25,7 +25,7 @@ import org.junit.Test; public class MinMaxAggregateFunctionIT extends ParallelStatsDisabledIT { - private static final String TABLE_NAME = generateRandomString(); + private static final String TABLE_NAME = generateUniqueName(); @Test public void testMinMaxAggregateFunctions() throws SQLException { http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ModulusExpressionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ModulusExpressionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ModulusExpressionIT.java index 06ffb16..54cdba6 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ModulusExpressionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ModulusExpressionIT.java @@ -53,7 +53,7 @@ public class ModulusExpressionIT extends ParallelStatsDisabledIT { private void testDividend(long dividend) throws SQLException { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); initTable(conn, dividend, tableName); for(long divisor : DIVISORS) { @@ -105,7 +105,7 @@ public class ModulusExpressionIT extends ParallelStatsDisabledIT { @Test public void testZeroDivisor() throws SQLException { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); initTable(conn, 0, tableName); for(long dividend : DIVIDENDS) { @@ -132,7 +132,7 @@ public class ModulusExpressionIT extends ParallelStatsDisabledIT { @Test public void testNullDividend() throws SQLException { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); initTable(conn, SMALL_VALUE, tableName); for(long divisor : DIVISORS) { @@ -148,7 +148,7 @@ public class ModulusExpressionIT extends ParallelStatsDisabledIT { @Test public void testNullDivisor() throws SQLException { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); initTable(conn, SMALL_VALUE, tableName); for(long dividend : DIVIDENDS) { @@ -170,7 +170,7 @@ public class ModulusExpressionIT extends ParallelStatsDisabledIT { @Test public void testNullEverything() throws SQLException { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); initTable(conn, SMALL_VALUE, tableName); String sql = "SELECT null % kv FROM " + tableName; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/MultiCfQueryExecIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MultiCfQueryExecIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MultiCfQueryExecIT.java index 4a0bb01..ed87cb6 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MultiCfQueryExecIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MultiCfQueryExecIT.java @@ -47,7 +47,7 @@ public class MultiCfQueryExecIT extends ParallelStatsEnabledIT { @Before public void generateTableNames() throws SQLException { String schemaName = TestUtil.DEFAULT_SCHEMA_NAME; - String tableName = "T_" + generateRandomString(); + String tableName = "T_" + generateUniqueName(); fullTableName = SchemaUtil.getTableName(schemaName, tableName); } http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java index d092b08..0dfd550 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java @@ -57,7 +57,7 @@ public class NamespaceSchemaMappingIT extends ParallelStatsDisabledIT { String namespace = "TEST_SCHEMA"; String schemaName = namespace; - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String phoenixFullTableName = schemaName + "." + tableName; String hbaseFullTableName = schemaName + ":" + tableName; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/NthValueFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NthValueFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NthValueFunctionIT.java index 4538cd0..c5cdf89 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NthValueFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NthValueFunctionIT.java @@ -35,7 +35,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void simpleTest() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nthValue = generateRandomString(); + String nthValue = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nthValue + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " dates INTEGER, val INTEGER)"; @@ -64,7 +64,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void offsetValueAscOrder() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nth_test_table = generateRandomString(); + String nth_test_table = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nth_test_table + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," @@ -98,7 +98,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void offsetValueDescOrder() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nth_test_table = generateRandomString(); + String nth_test_table = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nth_test_table + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " date INTEGER, \"value\" UNSIGNED_LONG)"; @@ -131,7 +131,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void offsetValueLastMismatchByColumn() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nth_test_table = generateRandomString(); + String nth_test_table = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nth_test_table + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " date INTEGER, \"value\" UNSIGNED_LONG)"; @@ -164,7 +164,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void testSortOrderInDataColWithOffset() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nth_test_table = generateRandomString(); + String nth_test_table = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nth_test_table + " " + "(id INTEGER NOT NULL, page_id UNSIGNED_LONG," + " dates BIGINT NOT NULL, \"value\" BIGINT NOT NULL CONSTRAINT pk PRIMARY KEY (id, dates, \"value\" DESC))"; @@ -195,7 +195,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void nonUniqueValuesInOrderByAsc() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nthValue = generateRandomString(); + String nthValue = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nthValue + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " dates INTEGER, val INTEGER)"; @@ -226,7 +226,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void nonUniqueValuesInOrderByAscSkipDuplicit() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nthValue = generateRandomString(); + String nthValue = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nthValue + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " dates INTEGER, val INTEGER)"; @@ -257,7 +257,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void nonUniqueValuesInOrderByDesc() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nthValue = generateRandomString(); + String nthValue = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nthValue + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " dates INTEGER, val INTEGER)"; @@ -288,7 +288,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void nonUniqueValuesInOrderNextValueDesc() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nthValue = generateRandomString(); + String nthValue = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nthValue + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " dates INTEGER, val INTEGER)"; @@ -321,7 +321,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void nonUniqueValuesInOrderNextValueAsc() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nthValue = generateRandomString(); + String nthValue = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nthValue + " " + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG," + " dates INTEGER, val INTEGER)"; @@ -354,7 +354,7 @@ public class NthValueFunctionIT extends ParallelStatsDisabledIT { public void ignoreNullValues() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String nth_test_table = generateRandomString(); + String nth_test_table = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + nth_test_table + " " + "(id INTEGER NOT NULL, page_id UNSIGNED_LONG," + " dates BIGINT NOT NULL, \"value\" BIGINT NULL CONSTRAINT pk PRIMARY KEY (id, dates))"; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/OctetLengthFunctionEnd2EndIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OctetLengthFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OctetLengthFunctionEnd2EndIT.java index 0554814..78ebfaa 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OctetLengthFunctionEnd2EndIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OctetLengthFunctionEnd2EndIT.java @@ -36,7 +36,7 @@ import org.junit.Test; public class OctetLengthFunctionEnd2EndIT extends ParallelStatsDisabledIT { private static final String KEY = "key"; - private static final String TABLE_NAME = generateRandomString(); + private static final String TABLE_NAME = generateUniqueName(); @Before public void initTable() throws Exception { http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java index 0f6641c..457b38e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java @@ -123,7 +123,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { conn.setAutoCommit(false); try { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE " + tableName + " (a_string varchar not null, col1 integer" + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -190,7 +190,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { conn.setAutoCommit(false); try { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE " + tableName + " (a_string varchar not null, cf1.a integer, cf1.b varchar, col1 integer, cf2.c varchar, cf2.d integer, col2 integer" + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -290,7 +290,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { conn.setAutoCommit(false); try { - String tableName1 = generateRandomString(); + String tableName1 = generateUniqueName(); String ddl = "CREATE TABLE " + tableName1 + " (a_string varchar not null, cf1.a integer, cf1.b varchar, col1 integer, cf2.c varchar, cf2.d integer " + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -320,7 +320,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { stmt.execute(); conn.commit(); - String tableName2 = generateRandomString(); + String tableName2 = generateUniqueName(); ddl = "CREATE TABLE " + tableName2 + " (a_string varchar not null, col1 integer" + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -389,7 +389,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { conn.setAutoCommit(false); try { - String tableName1 = generateRandomString(); + String tableName1 = generateUniqueName(); String ddl = "CREATE TABLE " + tableName1 + " (a_string varchar not null, cf1.a integer, cf1.b varchar, col1 integer, cf2.c varchar, cf2.d integer " + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -419,7 +419,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { stmt.execute(); conn.commit(); - String tableName2 = generateRandomString(); + String tableName2 = generateUniqueName(); ddl = "CREATE TABLE " + tableName2 + " (a_string varchar not null, col1 integer" + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -471,7 +471,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { conn.setAutoCommit(false); try { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE " + tableName + " (a_string varchar not null, col1 integer, col2 integer, col3 timestamp, col4 varchar" + " CONSTRAINT pk PRIMARY KEY (a_string))\n"; @@ -519,7 +519,7 @@ public class OrderByIT extends ParallelStatsDisabledIT { public void testOrderByRVC() throws Exception { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "create table " + tableName + " (testpk varchar not null primary key, l_quantity decimal(15,2), l_discount decimal(15,2))"; conn.createStatement().execute(ddl); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelIteratorsIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelIteratorsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelIteratorsIT.java index dfcf68c..5fc7d9e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelIteratorsIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelIteratorsIT.java @@ -70,8 +70,8 @@ public class ParallelIteratorsIT extends ParallelStatsEnabledIT { @Before public void generateTableNames() { - tableName = "T_" + generateRandomString(); - indexName = "I_" + generateRandomString(); + tableName = "T_" + generateUniqueName(); + indexName = "I_" + generateUniqueName(); } private List<KeyRange> getSplits(Connection conn, byte[] lowerRange, byte[] upperRange) throws SQLException { http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/PercentileIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PercentileIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PercentileIT.java index 31423db..af5a905 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PercentileIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PercentileIT.java @@ -52,6 +52,7 @@ import org.apache.phoenix.query.QueryConstants; import org.apache.phoenix.util.DateUtil; import org.apache.phoenix.util.PhoenixRuntime; import org.apache.phoenix.util.PropertiesUtil; +import org.apache.phoenix.util.TestUtil; import org.junit.Test; @@ -406,13 +407,13 @@ public class PercentileIT extends ParallelStatsDisabledIT { @Test public void testPercentileContOnDescPKColumn() throws Exception { - String indexDataTableName = generateRandomString(); + String indexDataTableName = generateUniqueName(); String fullTableName = INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + indexDataTableName; String query = "SELECT PERCENTILE_CONT(1) WITHIN GROUP (ORDER BY long_pk ASC) FROM " + fullTableName; Connection conn = DriverManager.getConnection(getUrl()); try { - conn.createStatement().execute("create table " + fullTableName + TEST_TABLE_SCHEMA + "IMMUTABLE_ROWS=true"); + conn.createStatement().execute("create table " + fullTableName + TestUtil.TEST_TABLE_SCHEMA + "IMMUTABLE_ROWS=true"); populateINDEX_DATA_TABLETable(indexDataTableName); PreparedStatement statement = conn.prepareStatement(query); ResultSet rs = statement.executeQuery(); @@ -428,12 +429,12 @@ public class PercentileIT extends ParallelStatsDisabledIT { @Test public void testPercentRankOnDescPKColumn() throws Exception { - String indexDataTableName = generateRandomString(); + String indexDataTableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl()); try { String fullTableName = INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + indexDataTableName; String query = "SELECT PERCENT_RANK(2) WITHIN GROUP (ORDER BY long_pk ASC) FROM " + fullTableName; - conn.createStatement().execute("create table " + fullTableName + TEST_TABLE_SCHEMA + "IMMUTABLE_ROWS=true"); + conn.createStatement().execute("create table " + fullTableName + TestUtil.TEST_TABLE_SCHEMA + "IMMUTABLE_ROWS=true"); populateINDEX_DATA_TABLETable(indexDataTableName); PreparedStatement statement = conn.prepareStatement(query); ResultSet rs = statement.executeQuery(); @@ -449,13 +450,13 @@ public class PercentileIT extends ParallelStatsDisabledIT { @Test public void testPercentileDiscOnDescPKColumn() throws Exception { - String indexDataTableName = generateRandomString(); + String indexDataTableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl()); try { String fullTableName = INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + indexDataTableName; String query = "SELECT PERCENTILE_DISC(0.4) WITHIN GROUP (ORDER BY long_pk DESC) FROM " + fullTableName; - conn.createStatement().execute("create table " + fullTableName + TEST_TABLE_SCHEMA + "IMMUTABLE_ROWS=true"); + conn.createStatement().execute("create table " + fullTableName + TestUtil.TEST_TABLE_SCHEMA + "IMMUTABLE_ROWS=true"); populateINDEX_DATA_TABLETable(indexDataTableName); PreparedStatement statement = conn.prepareStatement(query); ResultSet rs = statement.executeQuery(); @@ -508,7 +509,7 @@ public class PercentileIT extends ParallelStatsDisabledIT { private static String initATableValues(String tenantId1, String tenantId2, byte[][] splits, Date date, Long ts) throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); if (ts == null) { ensureTableCreated(getUrl(), tableName, ATABLE_NAME, splits); } else { http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRuntimeIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRuntimeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRuntimeIT.java index 1d48944..cddca04 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRuntimeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRuntimeIT.java @@ -95,10 +95,10 @@ public class PhoenixRuntimeIT extends ParallelStatsDisabledIT { private void testGetTenantIdExpression(boolean isSalted) throws Exception { Connection conn = DriverManager.getConnection(getUrl()); conn.setAutoCommit(true); - String tableName = generateRandomString() ; - String sequenceName = generateRandomString(); - String t1 = generateRandomString(); - String t2 = t1 + generateRandomString(); // ensure bigger + String tableName = generateUniqueName() ; + String sequenceName = generateUniqueName(); + String t1 = generateUniqueName(); + String t2 = t1 + generateUniqueName(); // ensure bigger conn.createStatement().execute("CREATE TABLE " + tableName + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK PRIMARY KEY(K1,K2)) MULTI_TENANT=true" + (isSalted ? ",SALT_BUCKETS=3" : "")); conn.createStatement().execute("CREATE SEQUENCE " + sequenceName); conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES('" + t1 + "','x')"); @@ -112,7 +112,7 @@ public class PhoenixRuntimeIT extends ParallelStatsDisabledIT { HTableInterface htable1 = tsconn.unwrap(PhoenixConnection.class).getQueryServices().getTable(PhoenixDatabaseMetaData.SYSTEM_SEQUENCE_NAME_BYTES); assertTenantIds(e1, htable1, new FirstKeyOnlyFilter(), new String[] {"", t1} ); - String viewName = generateRandomString(); + String viewName = generateUniqueName(); tsconn.createStatement().execute("CREATE VIEW " + viewName + "(V1 VARCHAR) AS SELECT * FROM " + tableName); Expression e2 = PhoenixRuntime.getTenantIdExpression(tsconn, PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME); HTableInterface htable2 = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES); @@ -122,24 +122,24 @@ public class PhoenixRuntimeIT extends ParallelStatsDisabledIT { HTableInterface htable3 = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes(tableName)); assertTenantIds(e3, htable3, new FirstKeyOnlyFilter(), new String[] {t1, t2} ); - String basTableName = generateRandomString(); + String basTableName = generateUniqueName(); conn.createStatement().execute("CREATE TABLE " + basTableName + " (k1 VARCHAR PRIMARY KEY)"); Expression e4 = PhoenixRuntime.getTenantIdExpression(conn, basTableName); assertNull(e4); - String indexName1 = generateRandomString(); + String indexName1 = generateUniqueName(); tsconn.createStatement().execute("CREATE INDEX " + indexName1 + " ON " + viewName + "(V1)"); Expression e5 = PhoenixRuntime.getTenantIdExpression(tsconn, indexName1); HTableInterface htable5 = tsconn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes(MetaDataUtil.VIEW_INDEX_TABLE_PREFIX + tableName)); assertTenantIds(e5, htable5, new FirstKeyOnlyFilter(), new String[] {t1} ); - String indexName2 = generateRandomString(); + String indexName2 = generateUniqueName(); conn.createStatement().execute("CREATE INDEX " + indexName2 + " ON " + tableName + "(k2)"); Expression e6 = PhoenixRuntime.getTenantIdExpression(conn, indexName2); HTableInterface htable6 = conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(Bytes.toBytes(indexName2)); assertTenantIds(e6, htable6, new FirstKeyOnlyFilter(), new String[] {t1, t2} ); - tableName = generateRandomString() + "BAR_" + (isSalted ? "SALTED" : "UNSALTED"); + tableName = generateUniqueName() + "BAR_" + (isSalted ? "SALTED" : "UNSALTED"); conn.createStatement().execute("CREATE TABLE " + tableName + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK PRIMARY KEY(K1,K2)) " + (isSalted ? "SALT_BUCKETS=3" : "")); conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES('" + t1 + "','x')"); conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES('" + t2 + "','y')"); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/PowerFunctionEnd2EndIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PowerFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PowerFunctionEnd2EndIT.java index 3535ec0..1fb45c7 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PowerFunctionEnd2EndIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PowerFunctionEnd2EndIT.java @@ -37,8 +37,8 @@ public class PowerFunctionEnd2EndIT extends ParallelStatsDisabledIT { private static final String KEY = "key"; private static final double ZERO = 1e-9; - private static final String TEST_SIGNED = generateRandomString(); - private static final String TEST_UNSIGNED = generateRandomString(); + private static final String TEST_SIGNED = generateUniqueName(); + private static final String TEST_UNSIGNED = generateUniqueName(); private static boolean twoDoubleEquals(double a, double b) { if (Double.isNaN(a) ^ Double.isNaN(b)) return false; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/PrimitiveTypeIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PrimitiveTypeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PrimitiveTypeIT.java index 2b66118..6fbedcf 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PrimitiveTypeIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PrimitiveTypeIT.java @@ -48,7 +48,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongGTDecimal() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l > 1.5"; @@ -65,7 +65,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongGTEDecimal() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l >= 1.5"; @@ -89,7 +89,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongLTDecimal() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l < 1.5"; @@ -111,7 +111,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongLTEDecimal() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l <= 1.5"; @@ -132,7 +132,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { } @Test public void testCompareLongGTDecimal2() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l > 2.5"; @@ -154,7 +154,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongGTEDecimal2() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l >= 2.5"; @@ -176,7 +176,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongLTDecimal2() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l < 2.5"; @@ -200,7 +200,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testCompareLongLTEDecimal2() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "SELECT l FROM " + tableName + " where l <= 2.5"; @@ -224,7 +224,7 @@ public class PrimitiveTypeIT extends ParallelStatsDisabledIT { @Test public void testBooleanAsObject() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl(), PROPS); initTableValues(conn, tableName); String query = "upsert into " + tableName + " values (2, ?)"; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java index d87b954..9399900 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java @@ -72,10 +72,10 @@ public class QueryMoreIT extends ParallelStatsDisabledIT { } private void testQueryMore(boolean queryAgainstTenantSpecificView, boolean dataTableSalted) throws Exception { - String[] tenantIds = new String[] {"T1_" + generateRandomString(), "T2_" + generateRandomString(), "T3_" + generateRandomString()}; + String[] tenantIds = new String[] {"T1_" + generateUniqueName(), "T2_" + generateUniqueName(), "T3_" + generateUniqueName()}; int numRowsPerTenant = 10; - String cursorTableName = generateRandomString(); - String base_history_table = generateRandomString(); + String cursorTableName = generateUniqueName(); + String base_history_table = generateUniqueName(); this.dataTableName = base_history_table + (dataTableSalted ? "_SALTED" : ""); String cursorTableDDL = "CREATE TABLE IF NOT EXISTS " + cursorTableName + " (\n" + @@ -342,7 +342,7 @@ public class QueryMoreIT extends ParallelStatsDisabledIT { @SuppressWarnings("deprecation") @Test public void testNullBigDecimalWithScale() throws Exception { - final String table = generateRandomString(); + final String table = generateUniqueName(); final Connection conn = DriverManager.getConnection(getUrl()); conn.setAutoCommit(true); try (Statement stmt = conn.createStatement()) { http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithOffsetIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithOffsetIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithOffsetIT.java index 6f190b6..c60b403 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithOffsetIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithOffsetIT.java @@ -73,7 +73,7 @@ public class QueryWithOffsetIT extends ParallelStatsDisabledIT { @Before public void initTest() { - tableName = "T_" + generateRandomString(); + tableName = "T_" + generateUniqueName(); ddl = "CREATE TABLE " + tableName + " (t_id VARCHAR NOT NULL,\n" + "k1 INTEGER NOT NULL,\n" + "k2 INTEGER NOT NULL,\n" + "C3.k3 INTEGER,\n" + "C2.v1 VARCHAR,\n" + "CONSTRAINT pk PRIMARY KEY (t_id, k1, k2)) " + preSplit; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/RTrimFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RTrimFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RTrimFunctionIT.java index b425476..4a1610a 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RTrimFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RTrimFunctionIT.java @@ -48,7 +48,7 @@ public class RTrimFunctionIT extends ParallelStatsDisabledIT { private void testWithFixedLengthPK(SortOrder sortOrder, List<Object> expectedResults) throws Exception { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); conn.createStatement().execute( "CREATE TABLE " + tableName + " ( k VARCHAR PRIMARY KEY " + (sortOrder == SortOrder.DESC ? "DESC" : "") + ")"); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReadOnlyIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReadOnlyIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReadOnlyIT.java index ed3c4f9..2b38b07 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReadOnlyIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReadOnlyIT.java @@ -39,7 +39,7 @@ public class ReadOnlyIT extends ParallelStatsDisabledIT { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); - String testTable = generateRandomString(); + String testTable = generateUniqueName(); String ddl = "CREATE TABLE " + testTable + " " + " (r varchar not null, col1 integer" + " CONSTRAINT pk PRIMARY KEY (r))\n"; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpReplaceFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpReplaceFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpReplaceFunctionIT.java index 037d48d..c7f52ff 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpReplaceFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpReplaceFunctionIT.java @@ -40,7 +40,7 @@ public class RegexpReplaceFunctionIT extends ParallelStatsDisabledIT { @Before public void doBeforeTestSetup() throws Exception { - this.tableName = generateRandomString(); + this.tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl()); createGroupByTestTable(conn, tableName); insertRow(conn, "Report11", 10); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSplitFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSplitFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSplitFunctionIT.java index f9a0873..289c545 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSplitFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSplitFunctionIT.java @@ -43,7 +43,7 @@ public class RegexpSplitFunctionIT extends ParallelStatsDisabledIT { } private void initTable(Connection conn, String val, String separator) throws SQLException { - tableName = generateRandomString(); + tableName = generateUniqueName(); String ddl = "CREATE TABLE " + tableName + " (" + "ID INTEGER NOT NULL PRIMARY KEY," + "VAL VARCHAR," + http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSubstrFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSubstrFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSubstrFunctionIT.java index 889451e..f2808bd 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSubstrFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RegexpSubstrFunctionIT.java @@ -40,7 +40,7 @@ public class RegexpSubstrFunctionIT extends ParallelStatsDisabledIT { @Before public void doBeforeTestSetup() throws Exception { - tableName = generateRandomString(); + tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl()); createGroupByTestTable(conn, tableName); insertRow(conn, "Report1?1", 10); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseFunctionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseFunctionIT.java index d2c89dc..2fedb78 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseFunctionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseFunctionIT.java @@ -33,7 +33,7 @@ import org.junit.Test; public class ReverseFunctionIT extends ParallelStatsDisabledIT { private String initTable(Connection conn, String sortOrder, String s) throws Exception { - String reverseTest = generateRandomString(); + String reverseTest = generateUniqueName(); String ddl = "CREATE TABLE " + reverseTest + " (pk VARCHAR NOT NULL PRIMARY KEY " + sortOrder + ", kv VARCHAR)"; conn.createStatement().execute(ddl); String dml = "UPSERT INTO " + reverseTest + " VALUES(?)"; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java index 16ccc53..f172d00 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java @@ -153,7 +153,7 @@ public class ReverseScanIT extends ParallelStatsDisabledIT { ResultSet rs; Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); conn = DriverManager.getConnection(getUrl(), props); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); conn.createStatement() .execute("CREATE TABLE " + tableName + " ( k VARCHAR, c1.a bigint,c2.b bigint CONSTRAINT pk PRIMARY KEY (k)) "); conn.createStatement().execute("upsert into " + tableName + " values ('a',1,3)"); @@ -171,7 +171,7 @@ public class ReverseScanIT extends ParallelStatsDisabledIT { @Test public void testReverseScanIndex() throws Exception { - String indexName = generateRandomString(); + String indexName = generateUniqueName(); String tenantId = getOrganizationId(); String tableName = initATableValues(tenantId, getSplitsAtRowKeys(tenantId), getUrl()); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java index c94cf50..c247bc9 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java @@ -64,7 +64,7 @@ public class RoundFloorCeilFuncIT extends ParallelStatsDisabledIT { @Before public void initTable() throws Exception { - tableName = generateRandomString(); + tableName = generateUniqueName(); String testString = "abc"; Connection conn = null; PreparedStatement stmt = null; http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/SerialIteratorsIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SerialIteratorsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SerialIteratorsIT.java index 0494342..37da39e 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SerialIteratorsIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SerialIteratorsIT.java @@ -38,7 +38,7 @@ import org.junit.Test; import com.google.common.collect.Maps; public class SerialIteratorsIT extends ParallelStatsDisabledIT { - private String tableName = generateRandomString(); + private String tableName = generateUniqueName(); private final String[] strings = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }; private final String ddl = "CREATE TABLE " + tableName + " (t_id VARCHAR NOT NULL,\n" + "k1 INTEGER NOT NULL,\n" http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ServerExceptionIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ServerExceptionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ServerExceptionIT.java index bf2e933..0bf5f18 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ServerExceptionIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ServerExceptionIT.java @@ -40,7 +40,7 @@ public class ServerExceptionIT extends ParallelStatsDisabledIT { Connection conn = DriverManager.getConnection(getUrl(), props); conn.setAutoCommit(false); try { - String t1 = generateRandomString(); + String t1 = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + t1 + "(pk VARCHAR NOT NULL PRIMARY KEY, " + "col1 INTEGER, col2 INTEGER)"; createTestTable(getUrl(), ddl); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/SignFunctionEnd2EndIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SignFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SignFunctionEnd2EndIT.java index 3cc8041..34ccdde 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SignFunctionEnd2EndIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SignFunctionEnd2EndIT.java @@ -39,8 +39,8 @@ import org.junit.Test; public class SignFunctionEnd2EndIT extends ParallelStatsDisabledIT { private static final String KEY = "key"; - private static final String TEST_SIGNED = generateRandomString(); - private static final String TEST_UNSIGNED = generateRandomString(); + private static final String TEST_SIGNED = generateUniqueName(); + private static final String TEST_UNSIGNED = generateUniqueName(); @BeforeClass public static void initTable() throws Exception { http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java index d4dd088..efb662b 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java @@ -106,7 +106,7 @@ public class SkipScanAfterManualSplitIT extends ParallelStatsDisabledIT { @Test public void testManualSplit() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); byte[] tableNameBytes = Bytes.toBytes(tableName); initTable(tableName); Connection conn = DriverManager.getConnection(getUrl()); @@ -281,7 +281,7 @@ public class SkipScanAfterManualSplitIT extends ParallelStatsDisabledIT { @Test public void testSkipScanInListOfRVCAfterManualSplit() throws SQLException { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE " + tableName + " ( " + "organization_id CHAR(15) NOT NULL, " + "parent_id CHAR(15) NOT NULL, " @@ -350,7 +350,7 @@ public class SkipScanAfterManualSplitIT extends ParallelStatsDisabledIT { @Test public void testMinMaxRangeIntersection() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); PreparedStatement stmt = conn.prepareStatement("create table " + tableName + "(pk1 UNSIGNED_TINYINT NOT NULL, pk2 UNSIGNED_TINYINT NOT NULL, kv VARCHAR " + "CONSTRAINT pk PRIMARY KEY (pk1, pk2)) SALT_BUCKETS=4 SPLIT ON (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java index 17df5ba..0c5e3aa 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java @@ -44,7 +44,7 @@ import org.junit.Test; public class SkipScanQueryIT extends ParallelStatsDisabledIT { private String initIntInTable(Connection conn, List<Integer> data) throws SQLException { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + " (" + " i INTEGER NOT NULL PRIMARY KEY)"; conn.createStatement().executeUpdate(ddl); @@ -61,7 +61,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { } private String initVarCharCrossProductInTable(Connection conn, List<String> c1, List<String> c2) throws SQLException { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + " (" + " s1 VARCHAR, s2 VARCHAR CONSTRAINT pk PRIMARY KEY (s1,s2))"; conn.createStatement().executeUpdate(ddl); @@ -81,7 +81,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { } private String initVarCharParallelListInTable(Connection conn, List<String> c1, List<String> c2) throws SQLException { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + " (" + " s1 VARCHAR, s2 VARCHAR CONSTRAINT pk PRIMARY KEY (s1,s2))"; conn.createStatement().executeUpdate(ddl); @@ -102,7 +102,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { "upsert into %s(c1, c2, c3, c4, v1, v2) values('1001', '91', 's1', '2013-09-26', 28397, 23541);\n" + "upsert into %s(c1, c2, c3, c4, v1, v2) values('1001', '91', 's2', '2013-09-23', 3369, null);\n"; private String initSelectAfterUpsertTable(Connection conn) throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String ddl = "create table if not exists " + tableName + " (" + "c1 VARCHAR NOT NULL," + "c2 VARCHAR NOT NULL," + "c3 VARCHAR NOT NULL," + "c4 VARCHAR NOT NULL," @@ -120,7 +120,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { @Test public void testSkipScanFilterQuery() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String createTableDDL = "CREATE TABLE " + tableName + "(col1 VARCHAR," + "col2 VARCHAR," + "col3 VARCHAR," + "col4 VARCHAR," + "CONSTRAINT pk " + "PRIMARY KEY (col1,col2,col3,col4))"; String upsertQuery = "upsert into " + tableName + " values(?,?,?,?)"; @@ -254,7 +254,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { @Test public void testPreSplitCompositeFixedKey() throws Exception { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); Connection conn = DriverManager.getConnection(getUrl()); try { conn.createStatement().execute("create table " + tableName + "(key_1 char(3) not null, key_2 char(4) not null, v varchar(8) CONSTRAINT pk PRIMARY KEY (key_1,key_2)) split on('000','100','200')"); @@ -284,7 +284,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { @Test public void testInWithDescKey() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); try { conn.createStatement().execute("create table " + tableName + "(key_1 char(3) not null, key_2 char(4) not null, v varchar(8) CONSTRAINT pk PRIMARY KEY (key_1,key_2 desc))"); conn.setAutoCommit(true); @@ -324,7 +324,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { @Test public void testSkipScanIntersectionAtEnd() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); PreparedStatement stmt = conn.prepareStatement("create table " + tableName + "(pk1 UNSIGNED_TINYINT NOT NULL, pk2 UNSIGNED_TINYINT NOT NULL, pk3 UNSIGNED_TINYINT NOT NULL, kv VARCHAR " + "CONSTRAINT pk PRIMARY KEY (pk1, pk2, pk3)) SPLIT ON (?, ?, ?)"); @@ -350,7 +350,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); conn.setAutoCommit(false); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); String fullTableName = SchemaUtil.getTableName(TestUtil.DEFAULT_SCHEMA_NAME, tableName); try { TestUtil.createMultiCFTestTable(conn , fullTableName, null); @@ -432,7 +432,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { @Test public void testOrPKWithAndNonPK() throws Exception { Connection conn = DriverManager.getConnection(getUrl()); - String tableName = generateRandomString(); + String tableName = generateUniqueName(); try { conn.createStatement().execute("create table " + tableName + "(ID varchar primary key,company varchar)"); conn.setAutoCommit(true); @@ -453,7 +453,7 @@ public class SkipScanQueryIT extends ParallelStatsDisabledIT { @Test public void testNullInfiniteLoop() throws Exception { try (Connection conn = DriverManager.getConnection(getUrl())) { - String tableName = generateRandomString(); + String tableName = generateUniqueName(); conn.setAutoCommit(true); conn.createStatement().execute( "create table " + tableName + http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinMoreIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinMoreIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinMoreIT.java index 9570021..df18093 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinMoreIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortMergeJoinMoreIT.java @@ -53,8 +53,8 @@ public class SortMergeJoinMoreIT extends ParallelStatsDisabledIT { @Test public void testJoinOverSaltedTables() throws Exception { - String tempTableNoSalting = "TEMP_TABLE_NO_SALTING" + generateRandomString(); - String tempTableWithSalting = "TEMP_TABLE_WITH_SALTING" + generateRandomString(); + String tempTableNoSalting = "TEMP_TABLE_NO_SALTING" + generateUniqueName(); + String tempTableWithSalting = "TEMP_TABLE_WITH_SALTING" + generateUniqueName(); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); try { @@ -191,8 +191,8 @@ public class SortMergeJoinMoreIT extends ParallelStatsDisabledIT { @Test public void testJoinOnDynamicColumns() throws Exception { - String tableA = generateRandomString(); - String tableB = generateRandomString(); + String tableA = generateUniqueName(); + String tableB = generateUniqueName(); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = null; PreparedStatement stmt = null; @@ -221,7 +221,7 @@ public class SortMergeJoinMoreIT extends ParallelStatsDisabledIT { } conn.commit(); stmt.close(); - String seqBName = generateRandomString(); + String seqBName = generateUniqueName(); // upsert select dynamic columns in tableB conn.createStatement().execute("CREATE SEQUENCE " + seqBName); @@ -264,9 +264,9 @@ public class SortMergeJoinMoreIT extends ParallelStatsDisabledIT { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); conn.setAutoCommit(false); - String gTableName = generateRandomString(); - String lTableName = generateRandomString(); - String slTableName = generateRandomString(); + String gTableName = generateUniqueName(); + String lTableName = generateUniqueName(); + String slTableName = generateUniqueName(); try { @@ -323,7 +323,7 @@ public class SortMergeJoinMoreIT extends ParallelStatsDisabledIT { Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); conn.setAutoCommit(true); - String eventCountTableName = generateRandomString(); + String eventCountTableName = generateUniqueName(); try { conn.createStatement().execute( "CREATE TABLE IF NOT EXISTS " + eventCountTableName + " (\n" + @@ -384,7 +384,7 @@ public class SortMergeJoinMoreIT extends ParallelStatsDisabledIT { // We'll test the original version of the user table as well as a slightly modified // version, in order to verify that sort-merge join works for columns both having // DESC sort order as well as one having ASC order and the other having DESC order. - String[] t = new String[] {"EVENT_LATENCY" + generateRandomString(), "EVENT_LATENCY_2" + generateRandomString()}; + String[] t = new String[] {"EVENT_LATENCY" + generateUniqueName(), "EVENT_LATENCY_2" + generateUniqueName()}; for (int i = 0; i < 2; i++) { conn.createStatement().execute( "CREATE TABLE IF NOT EXISTS " + t[i] + " (\n" +
