PHOENIX-3253 Make changes to tests to support method level parallelization

Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/bebb5ced
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/bebb5ced
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/bebb5ced

Branch: refs/heads/master
Commit: bebb5cedf761b132b78db675a19ede5849f6ea94
Parents: 16f0da3
Author: James Taylor <jamestay...@apache.org>
Authored: Thu Sep 22 17:16:43 2016 -0700
Committer: James Taylor <jamestay...@apache.org>
Committed: Thu Sep 22 17:16:43 2016 -0700

----------------------------------------------------------------------
 .../StatisticsCollectionRunTrackerIT.java       |   2 +-
 .../phoenix/end2end/AbsFunctionEnd2EndIT.java   |   2 +-
 .../AlterMultiTenantTableWithViewsIT.java       |  16 +-
 .../apache/phoenix/end2end/AlterSessionIT.java  |   2 +-
 .../apache/phoenix/end2end/AlterTableIT.java    |  10 +-
 .../phoenix/end2end/AlterTableWithViewsIT.java  |  16 +-
 .../phoenix/end2end/AppendOnlySchemaIT.java     |  22 +--
 .../phoenix/end2end/ArithmeticQueryIT.java      |  36 ++--
 .../phoenix/end2end/ArrayAppendFunctionIT.java  |  18 +-
 .../phoenix/end2end/ArrayConcatFunctionIT.java  |  16 +-
 .../phoenix/end2end/ArrayFillFunctionIT.java    |  12 +-
 .../phoenix/end2end/ArrayPrependFunctionIT.java |  68 +++----
 .../end2end/ArrayToStringFunctionIT.java        |  22 +--
 .../phoenix/end2end/ArraysWithNullsIT.java      |  32 ++--
 .../apache/phoenix/end2end/AutoCommitIT.java    |   2 +-
 .../phoenix/end2end/AutoPartitionViewsIT.java   |  18 +-
 .../end2end/BaseTenantSpecificTablesIT.java     |  12 +-
 .../end2end/BaseTenantSpecificViewIndexIT.java  |  12 +-
 .../org/apache/phoenix/end2end/BaseViewIT.java  |   8 +-
 .../apache/phoenix/end2end/BinaryRowKeyIT.java  |   6 +-
 .../phoenix/end2end/CSVCommonsLoaderIT.java     |  20 +-
 .../phoenix/end2end/CbrtFunctionEnd2EndIT.java  |   4 +-
 .../phoenix/end2end/CoalesceFunctionIT.java     |  20 +-
 .../end2end/ConvertTimezoneFunctionIT.java      |  14 +-
 .../org/apache/phoenix/end2end/DateTimeIT.java  |  68 +++----
 .../phoenix/end2end/DecodeFunctionIT.java       |  12 +-
 .../org/apache/phoenix/end2end/DeleteIT.java    |  26 +--
 .../phoenix/end2end/DisableLocalIndexIT.java    |   2 +-
 .../phoenix/end2end/DistinctPrefixFilterIT.java |   6 +-
 .../apache/phoenix/end2end/DynamicFamilyIT.java |   4 +-
 .../apache/phoenix/end2end/DynamicUpsertIT.java |   2 +-
 .../phoenix/end2end/EncodeFunctionIT.java       |   8 +-
 .../phoenix/end2end/EvaluationOfORIT.java       |   2 +-
 .../phoenix/end2end/ExecuteStatementsIT.java    |   6 +-
 .../phoenix/end2end/ExpFunctionEnd2EndIT.java   |   4 +-
 .../phoenix/end2end/FirstValueFunctionIT.java   |  14 +-
 .../end2end/GetSetByteBitFunctionEnd2EndIT.java |   2 +-
 .../apache/phoenix/end2end/GroupByCaseIT.java   |  20 +-
 .../apache/phoenix/end2end/HashJoinMoreIT.java  |  12 +-
 .../org/apache/phoenix/end2end/InListIT.java    |  10 +-
 .../apache/phoenix/end2end/IndexExtendedIT.java |  30 +--
 .../apache/phoenix/end2end/InstrFunctionIT.java |  16 +-
 .../org/apache/phoenix/end2end/IsNullIT.java    |   6 +-
 .../org/apache/phoenix/end2end/KeyOnlyIT.java   |   2 +-
 .../phoenix/end2end/LastValueFunctionIT.java    |  22 +--
 .../phoenix/end2end/LikeExpressionIT.java       |  12 +-
 .../phoenix/end2end/LnLogFunctionEnd2EndIT.java |   4 +-
 .../apache/phoenix/end2end/MD5FunctionIT.java   |   6 +-
 .../org/apache/phoenix/end2end/MapReduceIT.java |   8 +-
 .../phoenix/end2end/MappingTableDataTypeIT.java |   2 +-
 .../end2end/MinMaxAggregateFunctionIT.java      |   2 +-
 .../phoenix/end2end/ModulusExpressionIT.java    |  10 +-
 .../phoenix/end2end/MultiCfQueryExecIT.java     |   2 +-
 .../end2end/NamespaceSchemaMappingIT.java       |   2 +-
 .../phoenix/end2end/NthValueFunctionIT.java     |  22 +--
 .../end2end/OctetLengthFunctionEnd2EndIT.java   |   2 +-
 .../org/apache/phoenix/end2end/OrderByIT.java   |  16 +-
 .../phoenix/end2end/ParallelIteratorsIT.java    |   4 +-
 .../apache/phoenix/end2end/PercentileIT.java    |  15 +-
 .../phoenix/end2end/PhoenixRuntimeIT.java       |  18 +-
 .../phoenix/end2end/PowerFunctionEnd2EndIT.java |   4 +-
 .../apache/phoenix/end2end/PrimitiveTypeIT.java |  18 +-
 .../org/apache/phoenix/end2end/QueryMoreIT.java |   8 +-
 .../phoenix/end2end/QueryWithOffsetIT.java      |   2 +-
 .../apache/phoenix/end2end/RTrimFunctionIT.java |   2 +-
 .../org/apache/phoenix/end2end/ReadOnlyIT.java  |   2 +-
 .../end2end/RegexpReplaceFunctionIT.java        |   2 +-
 .../phoenix/end2end/RegexpSplitFunctionIT.java  |   2 +-
 .../phoenix/end2end/RegexpSubstrFunctionIT.java |   2 +-
 .../phoenix/end2end/ReverseFunctionIT.java      |   2 +-
 .../apache/phoenix/end2end/ReverseScanIT.java   |   4 +-
 .../phoenix/end2end/RoundFloorCeilFuncIT.java   |   2 +-
 .../phoenix/end2end/SerialIteratorsIT.java      |   2 +-
 .../phoenix/end2end/ServerExceptionIT.java      |   2 +-
 .../phoenix/end2end/SignFunctionEnd2EndIT.java  |   4 +-
 .../end2end/SkipScanAfterManualSplitIT.java     |   6 +-
 .../apache/phoenix/end2end/SkipScanQueryIT.java |  22 +--
 .../phoenix/end2end/SortMergeJoinMoreIT.java    |  20 +-
 .../org/apache/phoenix/end2end/SortOrderIT.java |  88 ++++-----
 .../phoenix/end2end/SpooledTmpFileDeleteIT.java |   2 +-
 .../phoenix/end2end/SqrtFunctionEnd2EndIT.java  |   4 +-
 .../phoenix/end2end/StatementHintsIT.java       |   2 +-
 .../phoenix/end2end/StatsCollectorIT.java       |   4 +-
 .../apache/phoenix/end2end/StoreNullsIT.java    |   8 +-
 .../org/apache/phoenix/end2end/StringIT.java    |  10 +-
 .../end2end/StringToArrayFunctionIT.java        |  14 +-
 .../apache/phoenix/end2end/TenantIdTypeIT.java  |   2 +-
 .../end2end/TenantSpecificTablesDDLIT.java      |  30 +--
 .../end2end/TenantSpecificTablesDMLIT.java      |   2 +-
 .../end2end/TenantSpecificViewIndexIT.java      |   8 +-
 .../end2end/TimezoneOffsetFunctionIT.java       |  14 +-
 .../phoenix/end2end/ToCharFunctionIT.java       |   6 +-
 .../phoenix/end2end/ToDateFunctionIT.java       |   2 +-
 .../phoenix/end2end/TransactionalViewIT.java    |   4 +-
 .../org/apache/phoenix/end2end/UnionAllIT.java  |  80 ++++----
 .../org/apache/phoenix/end2end/UpgradeIT.java   |  89 ++++-----
 .../phoenix/end2end/UpsertBigValuesIT.java      |   8 +-
 .../end2end/UpsertSelectAutoCommitIT.java       |  10 +-
 .../apache/phoenix/end2end/UpsertValuesIT.java  |   2 +-
 .../org/apache/phoenix/end2end/UseSchemaIT.java |  16 +-
 .../java/org/apache/phoenix/end2end/ViewIT.java |  76 ++++----
 .../end2end/index/AsyncIndexDisabledIT.java     |   4 +-
 .../index/ChildViewsUseParentViewIndexIT.java   |  20 +-
 .../phoenix/end2end/index/DropMetadataIT.java   |  14 +-
 .../index/GlobalIndexOptimizationIT.java        |  28 +--
 .../phoenix/end2end/index/ImmutableIndexIT.java |  18 +-
 .../index/ImmutableIndexWithStatsIT.java        |   4 +-
 .../end2end/index/IndexExpressionIT.java        |  87 ++++-----
 .../apache/phoenix/end2end/index/IndexIT.java   |  84 ++++-----
 .../phoenix/end2end/index/IndexMetadataIT.java  |  35 ++--
 .../phoenix/end2end/index/LocalIndexIT.java     |  70 +++----
 .../phoenix/end2end/index/MutableIndexIT.java   |  38 ++--
 .../phoenix/end2end/index/SaltedIndexIT.java    |  12 +-
 .../phoenix/end2end/index/ViewIndexIT.java      |  22 +--
 .../end2end/index/txn/MutableRollbackIT.java    |  28 +--
 .../phoenix/end2end/index/txn/RollbackIT.java   |   8 +-
 .../salted/SaltedTableUpsertSelectIT.java       |  22 +--
 .../salted/SaltedTableVarLengthRowKeyIT.java    |   2 +-
 .../phoenix/iterate/PhoenixQueryTimeoutIT.java  |   2 +-
 .../iterate/RoundRobinResultIteratorIT.java     |  10 +-
 .../org/apache/phoenix/rpc/UpdateCacheIT.java   |  26 +--
 .../phoenix/rpc/UpdateCacheWithScnIT.java       |   3 +-
 .../trace/PhoenixTableMetricsWriterIT.java      |   4 +-
 .../phoenix/trace/PhoenixTraceReaderIT.java     |   4 +-
 .../phoenix/trace/PhoenixTracingEndToEndIT.java |   6 +-
 .../phoenix/tx/NotThreadSafeTransactionIT.java  | 163 ++++++++++++++++
 .../org/apache/phoenix/tx/TransactionIT.java    | 189 ++++---------------
 .../org/apache/phoenix/tx/TxCheckpointIT.java   |  22 +--
 .../java/org/apache/phoenix/query/BaseTest.java |  36 ++--
 .../java/org/apache/phoenix/util/TestUtil.java  |  29 ++-
 .../org/apache/phoenix/flume/PhoenixSinkIT.java |   4 +-
 .../phoenix/flume/RegexEventSerializerIT.java   |  12 +-
 132 files changed, 1228 insertions(+), 1154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
index bd88922..759ad4f 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/StatisticsCollectionRunTrackerIT.java
@@ -65,7 +65,7 @@ public class StatisticsCollectionRunTrackerIT extends 
ParallelStatsEnabledIT {
     @Before
     public void generateTableNames() {
         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/AbsFunctionEnd2EndIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
index c70bed2..8447286 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AbsFunctionEnd2EndIT.java
@@ -36,7 +36,7 @@ import org.junit.Test;
  */
 public class AbsFunctionEnd2EndIT extends ParallelStatsDisabledIT {
 
-    private static final String TABLE_NAME = generateRandomString();
+    private static final String TABLE_NAME = generateUniqueName();
     private static final String KEY = "key";
 
     @Before

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterMultiTenantTableWithViewsIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterMultiTenantTableWithViewsIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterMultiTenantTableWithViewsIT.java
index 7a4e391..adadca7 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterMultiTenantTableWithViewsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterMultiTenantTableWithViewsIT.java
@@ -85,7 +85,7 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testAddDropColumnToBaseTablePropagatesToEntireViewHierarchy() 
throws Exception {
         String baseTable = "testViewHierarchy";
-        String baseViewName = generateRandomString();
+        String baseViewName = generateUniqueName();
         String view1 = baseViewName + "_VIEW1";
         String view2 = baseViewName + "_VIEW2";
         String view3 = baseViewName + "_VIEW3";
@@ -171,7 +171,7 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testChangingPKOfBaseTableChangesPKForAllViews() throws 
Exception {
         String baseTable = "testChangePKOfBaseTable";
-        String baseViewName = generateRandomString();
+        String baseViewName = generateUniqueName();
         String view1 = baseViewName + "_VIEW1";
         String view2 = baseViewName + "_VIEW2";
         String view3 = baseViewName + "_VIEW3";
@@ -269,7 +269,7 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testAddPKColumnToBaseTableWhoseViewsHaveIndices() throws 
Exception {
         String baseTable = "testAddPKColumnToBaseTableWhoseViewsHaveIndices";
-        String baseViewName = generateRandomString();
+        String baseViewName = generateUniqueName();
         String view1 = baseViewName + "_VIEW1";
         String view2 = baseViewName + "_VIEW2";
         String view3 = baseViewName + "_VIEW3";
@@ -410,8 +410,8 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testAddingPkAndKeyValueColumnsToBaseTableWithDivergedView() 
throws Exception {
         String baseTable = 
"testAlteringPkOfBaseTableWithDivergedView".toUpperCase();
-        String view1 = generateRandomString();
-        String divergedView = generateRandomString();
+        String view1 = generateUniqueName();
+        String divergedView = generateUniqueName();
         String divergedViewIndex = divergedView + "_IDX";
         /*                                     baseTable
                                  /                  |                
@@ -490,7 +490,7 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testAddColumnsToSaltedBaseTableWithViews() throws Exception {
         String baseTable = 
"testAddColumnsToSaltedBaseTableWithViews".toUpperCase();
-        String view1 = generateRandomString();
+        String view1 = generateUniqueName();
         try (Connection conn = DriverManager.getConnection(getUrl())) {
             String baseTableDDL = "CREATE TABLE " + baseTable + " (TENANT_ID 
VARCHAR NOT NULL, PK1 VARCHAR NOT NULL, V1 VARCHAR, V2 VARCHAR, V3 VARCHAR 
CONSTRAINT NAME_PK PRIMARY KEY(TENANT_ID, PK1)) MULTI_TENANT = true ";
             conn.createStatement().execute(baseTableDDL);
@@ -520,7 +520,7 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testDropColumnsFromSaltedBaseTableWithViews() throws Exception 
{
         String baseTable = 
"testDropColumnsFromSaltedBaseTableWithViews".toUpperCase();
-        String view1 = generateRandomString();
+        String view1 = generateUniqueName();
         try (Connection conn = DriverManager.getConnection(getUrl())) {
             String baseTableDDL = "CREATE TABLE " + baseTable + " (TENANT_ID 
VARCHAR NOT NULL, PK1 VARCHAR NOT NULL, V1 VARCHAR, V2 VARCHAR, V3 VARCHAR 
CONSTRAINT NAME_PK PRIMARY KEY(TENANT_ID, PK1)) MULTI_TENANT = true ";
             conn.createStatement().execute(baseTableDDL);
@@ -560,7 +560,7 @@ public class AlterMultiTenantTableWithViewsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testAlteringViewConditionallyModifiesHTableMetadata() throws 
Exception {
         String baseTable = 
"testAlteringViewConditionallyModifiesBaseTable".toUpperCase();
-        String view1 = generateRandomString();
+        String view1 = generateUniqueName();
         try (Connection conn = DriverManager.getConnection(getUrl())) {
             String baseTableDDL = "CREATE TABLE " + baseTable + " (TENANT_ID 
VARCHAR NOT NULL, PK1 VARCHAR NOT NULL, V1 VARCHAR, V2 VARCHAR, V3 VARCHAR 
CONSTRAINT NAME_PK PRIMARY KEY(TENANT_ID, PK1)) MULTI_TENANT = true ";
             conn.createStatement().execute(baseTableDDL);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterSessionIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterSessionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterSessionIT.java
index 6e0cdd5..ffd9656 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterSessionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterSessionIT.java
@@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
  */
 public class AlterSessionIT extends ParallelStatsDisabledIT {
 
-    private static final String TABLE_NAME = generateRandomString();
+    private static final String TABLE_NAME = generateUniqueName();
     private static Connection testConn;
 
     @BeforeClass

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index 2634335..031fd5c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -83,9 +83,9 @@ public class AlterTableIT extends ParallelStatsDisabledIT {
     @Before
     public void setupTableNames() throws Exception {
         schemaName = "";
-        dataTableName = generateRandomString();
-        indexTableName = "I_" + generateRandomString();
-        localIndexTableName = "LI_" + generateRandomString();
+        dataTableName = generateUniqueName();
+        indexTableName = "I_" + generateUniqueName();
+        localIndexTableName = "LI_" + generateUniqueName();
         dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName);
         indexTableFullName = SchemaUtil.getTableName(schemaName, 
indexTableName);
         localIndexTableFullName = SchemaUtil.getTableName(schemaName, 
localIndexTableName);
@@ -1364,7 +1364,7 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
                 +"CONSTRAINT PK PRIMARY KEY (ID1, ID2)) SALT_BUCKETS = 8";
         Connection conn1 = DriverManager.getConnection(getUrl(), props);
         conn1.createStatement().execute(ddl);
-        String viewFullName = SchemaUtil.getTableName(schemaName, 
generateRandomString());
+        String viewFullName = SchemaUtil.getTableName(schemaName, 
generateUniqueName());
         ddl = "CREATE VIEW " + viewFullName + " AS SELECT * FROM " + 
dataTableFullName + " WHERE CREATION_TIME = 1";
         conn1.createStatement().execute(ddl);
         ddl = "ALTER VIEW " + viewFullName + " SET IMMUTABLE_ROWS = TRUE";
@@ -2170,7 +2170,7 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
             assertFalse(table.getColumn("PK2").isRowTimestamp());
             assertIsRowTimestampSet(schemaName, dataTableName, "PK1");
             
-            String dataTableName2 = BaseTest.generateRandomString();
+            String dataTableName2 = BaseTest.generateUniqueName();
             String dataTableFullName2 = SchemaUtil.getTableName(schemaName, 
dataTableName2);
             conn.createStatement().execute("CREATE TABLE " + 
dataTableFullName2 + " (PK1 VARCHAR, PK2 DATE PRIMARY KEY ROW_TIMESTAMP, KV1 
VARCHAR, KV2 INTEGER)");
             table = phxConn.getTable(new PTableKey(phxConn.getTenantId(), 
dataTableFullName2));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java
index 64627f1..c9e2f26 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableWithViewsIT.java
@@ -89,7 +89,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
     public void testAddNewColumnsToBaseTableWithViews() throws Exception {
         try (Connection conn = DriverManager.getConnection(getUrl());
                 Connection viewConn = isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn ) {       
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String viewOfTable = tableName + "_VIEW";
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + " ("
                             + " %s ID char(1) NOT NULL,"
@@ -114,7 +114,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
     public void testDropColumnsFromBaseTableWithView() throws Exception {
         try (Connection conn = DriverManager.getConnection(getUrl());
                 Connection viewConn = isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn ) {
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String viewOfTable = tableName + "_VIEW";
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + " 
(" + " %s ID char(1) NOT NULL,"
                             + " COL1 integer NOT NULL," + " COL2 bigint NOT 
NULL,"
@@ -146,7 +146,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
                 Connection viewConn = isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn ) {
             conn.setAutoCommit(false);
             viewConn.setAutoCommit(false);
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String viewOfTable = tableName + "_VIEW";
 
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + " ("
@@ -253,7 +253,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
                 Connection viewConn = isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn ) {      
             conn.setAutoCommit(false);
             viewConn.setAutoCommit(false);
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String viewOfTable = tableName + "_VIEW";
 
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + " ("
@@ -364,7 +364,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
     public void testAddExistingViewPkColumnToBaseTableWithMultipleViews() 
throws Exception {
         try (Connection conn = DriverManager.getConnection(getUrl());
                 Connection viewConn = isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn ) {
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String viewOfTable1 = tableName + "_VIEW1";
             String viewOfTable2 = tableName + "_VIEW2";
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + "("
@@ -428,7 +428,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
             conn.setAutoCommit(false);
             viewConn.setAutoCommit(false);
             viewConn2.setAutoCommit(false);
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String viewOfTable1 = tableName + "_VIEW1";
             String viewOfTable2 = tableName + "_VIEW2";
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + tableName + "("
@@ -618,7 +618,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
     
     @Test
     public void testDivergedViewsStayDiverged() throws Exception {
-        String baseTable = generateRandomString();
+        String baseTable = generateUniqueName();
         String view1 = baseTable + "_VIEW1";
         String view2 = baseTable + "_VIEW2";
         try (Connection conn = DriverManager.getConnection(getUrl());
@@ -661,7 +661,7 @@ public class AlterTableWithViewsIT extends 
ParallelStatsDisabledIT {
     public void testMakeBaseTableTransactional() throws Exception {
         try (Connection conn = DriverManager.getConnection(getUrl());
                 Connection viewConn = isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1) : conn ) {  
-            String baseTableName = "NONTXNTBL_" + generateRandomString() + 
(isMultiTenant ? "0":"1");
+            String baseTableName = "NONTXNTBL_" + generateUniqueName() + 
(isMultiTenant ? "0":"1");
             String viewOfTable = baseTableName + "_VIEW";
             String ddlFormat = "CREATE TABLE IF NOT EXISTS " + baseTableName + 
" ("
                             + " %s ID char(1) NOT NULL,"

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
index 1aedc0d..ed9fa74 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
@@ -75,9 +75,9 @@ public class AppendOnlySchemaIT extends 
ParallelStatsDisabledIT {
         try (Connection conn1 = connectionQueryServices.connect(getUrl(), 
props);
                 Connection conn2 = sameClient ? conn1 : 
connectionQueryServices.connect(getUrl(), props)) {
 
-            String metricTableName = generateRandomString();
-            String viewName = generateRandomString();
-            String metricIdSeqTableName = generateRandomString();
+            String metricTableName = generateUniqueName();
+            String viewName = generateUniqueName();
+            String metricIdSeqTableName = generateUniqueName();
             // create sequence for auto partition
             conn1.createStatement().execute("CREATE SEQUENCE " + 
metricIdSeqTableName + " CACHE 1");
             // create base table
@@ -186,9 +186,9 @@ public class AppendOnlySchemaIT extends 
ParallelStatsDisabledIT {
         try (Connection conn1 = DriverManager.getConnection(getUrl(), props);
                 Connection conn2 = sameClient ? conn1 : 
DriverManager.getConnection(getUrl(), props)) {
 
-            String metricTableName = generateRandomString();
-            String viewName = generateRandomString();
-            String metricIdSeqTableName = generateRandomString();
+            String metricTableName = generateUniqueName();
+            String viewName = generateUniqueName();
+            String metricIdSeqTableName = generateUniqueName();
 
             // create sequence for auto partition
             conn1.createStatement().execute("CREATE SEQUENCE " + 
metricIdSeqTableName + " CACHE 1");
@@ -289,8 +289,8 @@ public class AppendOnlySchemaIT extends 
ParallelStatsDisabledIT {
     public void testValidateAttributes() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
-            String tableName = generateRandomString();
-            String viewName = generateRandomString();
+            String tableName = generateUniqueName();
+            String viewName = generateUniqueName();
             try {
                 conn.createStatement().execute(
                     "create table IF NOT EXISTS " + tableName + " ( id char(1) 
NOT NULL,"
@@ -326,9 +326,9 @@ public class AppendOnlySchemaIT extends 
ParallelStatsDisabledIT {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         try (Connection conn1 = DriverManager.getConnection(getUrl(), props);
                 Connection conn2 = DriverManager.getConnection(getUrl(), 
props)) {
-            String metricTableName = generateRandomString();
-            String viewName = generateRandomString();
-            String metricIdSeqTableName = generateRandomString();
+            String metricTableName = generateUniqueName();
+            String viewName = generateUniqueName();
+            String metricIdSeqTableName = generateUniqueName();
             // create sequence for auto partition
             conn1.createStatement().execute("CREATE SEQUENCE " + 
metricIdSeqTableName + "  CACHE 1");
             // create base table

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArithmeticQueryIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArithmeticQueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArithmeticQueryIT.java
index 87fdee6..5ad356b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArithmeticQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArithmeticQueryIT.java
@@ -48,7 +48,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(false);
         try {
-            String testDecimalArithmetic = generateRandomString();
+            String testDecimalArithmetic = generateUniqueName();
             String ddl = "CREATE TABLE " + testDecimalArithmetic +
                     "  (pk VARCHAR NOT NULL PRIMARY KEY, " +
                     "col1 DECIMAL(31,0), col2 DECIMAL(5), col3 DECIMAL(5,2), 
col4 DECIMAL)";
@@ -139,11 +139,11 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(false);
         try {
-            String source = generateRandomString();
+            String source = generateUniqueName();
             String ddl = "CREATE TABLE " + source +
                     " (pk VARCHAR NOT NULL PRIMARY KEY, col1 DECIMAL(5,2), 
col2 DECIMAL(5,1), col3 DECIMAL(5,2), col4 DECIMAL(4,4))";
             createTestTable(getUrl(), ddl);
-            String target = generateRandomString();
+            String target = generateUniqueName();
             ddl = "CREATE TABLE " + target +
                     " (pk VARCHAR NOT NULL PRIMARY KEY, col1 DECIMAL(5,1), 
col2 DECIMAL(5,2), col3 DECIMAL(4,4))";
             createTestTable(getUrl(), ddl);
@@ -249,7 +249,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(false);
         try {
-            String testDecimalArithmetic = generateRandomString();
+            String testDecimalArithmetic = generateUniqueName();
             String ddl = "CREATE TABLE " + testDecimalArithmetic +
                     "  (pk VARCHAR NOT NULL PRIMARY KEY, col1 DECIMAL(31, 11), 
col2 DECIMAL(31,1), col3 DECIMAL(38,1))";
             createTestTable(getUrl(), ddl);
@@ -311,7 +311,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(false);
         try {
-            String testRandomFunction = generateRandomString();
+            String testRandomFunction = generateUniqueName();
             String ddl =
                 "CREATE TABLE " + testRandomFunction + " (pk VARCHAR NOT NULL 
PRIMARY KEY)";
             createTestTable(getUrl(), ddl);
@@ -368,7 +368,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
             assertTrue(rs.next());
             assertTrue(rand12 == rs.getDouble(3));
 
-            String testRandomFunction1 = generateRandomString();
+            String testRandomFunction1 = generateUniqueName();
             ddl = "CREATE TABLE " + testRandomFunction1
                 + " (pk VARCHAR NOT NULL PRIMARY KEY, v1 UNSIGNED_DOUBLE)";
             createTestTable(getUrl(), ddl);
@@ -427,7 +427,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(false);
         try {
-            String testDecimalArithmetic = generateRandomString();
+            String testDecimalArithmetic = generateUniqueName();
             String ddl = "CREATE TABLE " + testDecimalArithmetic +
                     "  (pk VARCHAR NOT NULL PRIMARY KEY, " +
                     "col1 DECIMAL(38,0), col2 DECIMAL(5, 2), col3 INTEGER, 
col4 BIGINT, col5 DECIMAL)";
@@ -656,7 +656,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     }
     @Test
     public void testSumDouble() throws Exception {
-        String tableName = "TBL_" + generateRandomString();
+        String tableName = "TBL_" + generateUniqueName();
         initSumDoubleValues(tableName, null, getUrl());
         String query = "SELECT SUM(d) FROM " + tableName ;
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
@@ -674,7 +674,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     
     @Test
     public void testSumUnsignedDouble() throws Exception {
-        String tableName = "TBL_" + generateRandomString();
+        String tableName = "TBL_" + generateUniqueName();
         initSumDoubleValues(tableName, null, getUrl());
         String query = "SELECT SUM(ud) FROM " + tableName ;
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
@@ -692,7 +692,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     
     @Test
     public void testSumFloat() throws Exception {
-        String tableName = "TBL_" + generateRandomString();
+        String tableName = "TBL_" + generateUniqueName();
         initSumDoubleValues(tableName, null, getUrl());
         String query = "SELECT SUM(f) FROM " + tableName ;
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
@@ -710,7 +710,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     
     @Test
     public void testSumUnsignedFloat() throws Exception {
-        String tableName = "TBL_" + generateRandomString();
+        String tableName = "TBL_" + generateUniqueName();
         initSumDoubleValues(tableName, null, getUrl());
         String query = "SELECT SUM(uf) FROM " + tableName;
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
@@ -727,7 +727,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     }
     
     private String initIntegerTable(Connection conn) throws SQLException {
-        String arithmetic_test = generateRandomString();
+        String arithmetic_test = generateUniqueName();
         String ddl = "CREATE TABLE " + arithmetic_test
             + " (six INTEGER PRIMARY KEY, four INTEGER, three INTEGER)";
         conn.createStatement().execute(ddl);
@@ -970,7 +970,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testCastingOnConstantAddInArithmeticEvaluation() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String testTable = generateRandomString();
+        String testTable = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + testTable
             + " (k1 INTEGER NOT NULL, v1 INTEGER CONSTRAINT pk PRIMARY KEY 
(k1))";
         conn.createStatement().execute(ddl);
@@ -988,7 +988,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testCastingOnConstantSubInArithmeticEvaluation() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String testTable = generateRandomString();
+        String testTable = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + testTable
             + " (k1 INTEGER NOT NULL, v1 INTEGER CONSTRAINT pk PRIMARY KEY 
(k1))";
         conn.createStatement().execute(ddl);
@@ -1005,7 +1005,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testFloatingPointUpsert() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String test = generateRandomString();
+        String test = generateUniqueName();
         String ddl =
             "CREATE TABLE " + test + " (id VARCHAR not null primary key, name 
VARCHAR, lat FLOAT)";
         conn.createStatement().execute(ddl);
@@ -1021,7 +1021,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testFloatingPointMultiplicationUpsert() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String test = generateRandomString();
+        String test = generateUniqueName();
         String ddl =
             "CREATE TABLE " + test + " (id VARCHAR not null primary key, name 
VARCHAR, lat FLOAT)";
         conn.createStatement().execute(ddl);
@@ -1038,7 +1038,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testSystemTableHasDoubleForExponentialNumber() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String test = generateRandomString();
+        String test = generateUniqueName();
         String ddl = "CREATE TABLE " + test + " (id VARCHAR not null primary 
key, num FLOAT)";
         conn.createStatement().execute(ddl);
         String dml = "UPSERT INTO " + test + "(id,num) VALUES ('testid', 
1.2E3)";
@@ -1072,7 +1072,7 @@ public class ArithmeticQueryIT extends 
ParallelStatsDisabledIT {
     
     private ResultSet createTableWithValues(String[] values, String valueType) 
throws SQLException {
        Connection conn = DriverManager.getConnection(getUrl());
-        String test = generateRandomString();
+        String test = generateUniqueName();
         StringBuilder ddl = new StringBuilder(
             "CREATE TABLE " + test + " (id VARCHAR not null primary key");
         StringBuilder dmll = new StringBuilder("UPSERT INTO " + test + "(id,");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
index de42af1..e83b395 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayAppendFunctionIT.java
@@ -28,7 +28,7 @@ import org.junit.Test;
 
 public class ArrayAppendFunctionIT extends ParallelStatsDisabledIT {
     private String initTables(Connection conn) throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints 
BIGINT[],chars CHAR(15)[],double1 DOUBLE,char1 CHAR(17),nullcheck 
INTEGER,chars2 CHAR(15)[])";
         conn.createStatement().execute(ddl);
         String dml = "UPSERT INTO " + tableName + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2)
 VALUES('SF Bay Area'," +
@@ -49,7 +49,7 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
     }
 
     private String initTablesDesc(Connection conn, String type, String val) 
throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (pk " + type + " PRIMARY 
KEY DESC,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints 
BIGINT[],chars CHAR(15)[],chars2 CHAR(15)[], bools BOOLEAN[])";
         conn.createStatement().execute(ddl);
         String dml = "UPSERT INTO " + tableName + 
"(pk,varchars,integers,doubles,bigints,chars,chars2,bools) VALUES(" + val + "," 
+
@@ -268,7 +268,7 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayAppendFunctionWithUpsert1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
 
@@ -292,7 +292,7 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayAppendFunctionWithUpsert2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,integers INTEGER[])";
         conn.createStatement().execute(ddl);
 
@@ -316,7 +316,7 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayAppendFunctionWithUpsert3() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
 
@@ -340,8 +340,8 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayAppendFunctionWithUpsertSelect1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String sourceTableName = generateRandomString();
-        String targetTableName = generateRandomString();
+        String sourceTableName = generateUniqueName();
+        String targetTableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + sourceTableName + " (region_name 
VARCHAR PRIMARY KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
@@ -381,8 +381,8 @@ public class ArrayAppendFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayAppendFunctionWithUpsertSelect2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String sourceTableName = generateRandomString();
-        String targetTableName = generateRandomString();
+        String sourceTableName = generateUniqueName();
+        String targetTableName = generateUniqueName();
         String ddl = "CREATE TABLE " + sourceTableName + " (region_name 
VARCHAR PRIMARY KEY,varchars 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/ArrayConcatFunctionIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayConcatFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayConcatFunctionIT.java
index d2c76bd..e8ca9dc 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayConcatFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayConcatFunctionIT.java
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertTrue;
 public class ArrayConcatFunctionIT extends ParallelStatsDisabledIT {
 
     private String initTables(Connection conn) throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,varchars VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints 
BIGINT[],chars CHAR(15)[],double1 DOUBLE,char1 CHAR(17),nullcheck 
INTEGER,chars2 CHAR(15)[])";
         conn.createStatement().execute(ddl);
         String dml = "UPSERT INTO " + tableName + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2)
 VALUES('SF Bay Area'," +
@@ -265,7 +265,7 @@ public class ArrayConcatFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayConcatFunctionWithUpsert1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
@@ -289,7 +289,7 @@ public class ArrayConcatFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayConcatFunctionWithUpsert2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,integers INTEGER[])";
         conn.createStatement().execute(ddl);
@@ -313,7 +313,7 @@ public class ArrayConcatFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayConcatFunctionWithUpsert3() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
@@ -338,8 +338,8 @@ public class ArrayConcatFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayConcatFunctionWithUpsertSelect1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String sourceTableName = generateRandomString();
-        String targetTableName = generateRandomString();
+        String sourceTableName = generateUniqueName();
+        String targetTableName = generateUniqueName();
         String ddl = "CREATE TABLE " + sourceTableName + " (region_name 
VARCHAR PRIMARY KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
 
@@ -377,8 +377,8 @@ public class ArrayConcatFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayConcatFunctionWithUpsertSelect2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String sourceTableName = generateRandomString();
-        String targetTableName = generateRandomString();
+        String sourceTableName = generateUniqueName();
+        String targetTableName = generateUniqueName();
         String ddl = "CREATE TABLE " + sourceTableName + " (region_name 
VARCHAR PRIMARY KEY,varchars 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/ArrayFillFunctionIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayFillFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayFillFunctionIT.java
index 9eece23..4680998 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayFillFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayFillFunctionIT.java
@@ -30,7 +30,7 @@ import org.junit.Test;
 
 public class ArrayFillFunctionIT extends ParallelStatsDisabledIT {
 
-    private static final String REGIONS = generateRandomString();
+    private static final String REGIONS = generateUniqueName();
 
     @BeforeClass
     public static void initTables() throws Exception {
@@ -314,7 +314,7 @@ public class ArrayFillFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayFillFunctionWithUpsert1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String regions = generateRandomString();
+        String regions = generateUniqueName();
         String ddl =
             "CREATE TABLE " + regions + " (region_name VARCHAR PRIMARY 
KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
@@ -341,7 +341,7 @@ public class ArrayFillFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayFillFunctionWithUpsert2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String regions = generateRandomString();
+        String regions = generateUniqueName();
         String ddl =
             "CREATE TABLE " + regions + " (region_name VARCHAR PRIMARY 
KEY,integers INTEGER[])";
         conn.createStatement().execute(ddl);
@@ -368,7 +368,7 @@ public class ArrayFillFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayFillFunctionWithUpsert3() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String regions = generateRandomString();
+        String regions = generateUniqueName();
         String ddl =
             "CREATE TABLE " + regions + " (region_name VARCHAR PRIMARY 
KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
@@ -437,12 +437,12 @@ public class ArrayFillFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayFillFunctionWithUpsertSelect2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String source = generateRandomString();
+        String source = generateUniqueName();
         String ddl =
             "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY 
KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
 
-        String target = generateRandomString();
+        String target = generateUniqueName();
         ddl = "CREATE TABLE " + target
             + " (region_name VARCHAR PRIMARY KEY,varchars VARCHAR[],varchars2 
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/ArrayPrependFunctionIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
index 1fc04e7..182e664 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayPrependFunctionIT.java
@@ -80,7 +80,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInteger() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -98,7 +98,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionVarchar() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -117,7 +117,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayPrependFunctionNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
         String[] s = new String[]{null, null, "1", "2"};
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTableWithVarArray(conn, tableName, "VARCHAR", s, null);
         String[] s2 = new String[]{null, null, null, "1", "2"};
         PhoenixArray array2 = (PhoenixArray) conn.createArrayOf("VARCHAR", s2);
@@ -132,7 +132,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayPrependFunctionNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
         String[] s = new String[]{"1", "2"};
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTableWithVarArray(conn, tableName, "VARCHAR", s, null);
         String[] s2 = new String[]{null, "1", "2"};
         PhoenixArray array2 = (PhoenixArray) conn.createArrayOf("VARCHAR", s2);
@@ -147,7 +147,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayPrependFunctionNulls3() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
         String[] s = new String[]{"176", null, "212"};
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTableWithVarArray(conn, tableName, "VARCHAR", s, null);
         String[] s2 = new String[]{null, "176", null, "212"};
         PhoenixArray array2 = (PhoenixArray) conn.createArrayOf("VARCHAR", s2);
@@ -162,7 +162,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     public void testArrayPrependFunctionNulls4() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
         String[] s = new String[]{"176", null, "212"};
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTableWithVarArray(conn, tableName, "VARCHAR", s, "'foo'");
         String[] s2 = new String[]{"foo", "176", null, "212"};
         PhoenixArray array2 = (PhoenixArray) conn.createArrayOf("VARCHAR", s2);
@@ -176,7 +176,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionDouble() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -194,7 +194,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionDouble2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -212,7 +212,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionBigint() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
         ResultSet rs;
         rs = conn.createStatement().executeQuery("SELECT 
ARRAY_PREPEND(1112,bigints) FROM " + tableName + " WHERE region_name = 'SF Bay 
Area'");
@@ -229,7 +229,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionChar() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
         ResultSet rs;
         rs = conn.createStatement().executeQuery("SELECT 
ARRAY_PREPEND('fac',chars) FROM " + tableName + " WHERE region_name = 'SF Bay 
Area'");
@@ -246,7 +246,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test(expected = TypeMismatchException.class)
     public void testArrayPrependFunctionIntToCharArray() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -256,7 +256,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test(expected = TypeMismatchException.class)
     public void testArrayPrependFunctionVarcharToIntegerArray() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -267,7 +267,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test(expected = SQLException.class)
     public void testArrayPrependFunctionChar2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
         ResultSet rs;
         rs = conn.createStatement().executeQuery("SELECT 
ARRAY_PREPEND('facfacfacfacfacfacfac',chars) FROM " + tableName + " WHERE 
region_name = 'SF Bay Area'");
@@ -278,7 +278,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionIntegerToDoubleArray() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -296,7 +296,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithNestedFunctions1() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -314,7 +314,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithNestedFunctions2() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -332,7 +332,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithNestedFunctions3() throws 
Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -350,7 +350,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithUpsert1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
 
@@ -373,7 +373,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithUpsert2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + " (region_name VARCHAR 
PRIMARY KEY,integers INTEGER[])";
         conn.createStatement().execute(ddl);
@@ -397,7 +397,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithUpsert3() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + "(region_name VARCHAR 
PRIMARY KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
 
@@ -420,7 +420,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithUpsertSelect1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String baseTable = generateRandomString();
+        String baseTable = generateUniqueName();
         String source = baseTable + "_SOURCE";
         String target = baseTable + "_TARGET";
         String ddl = "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY 
KEY,doubles DOUBLE[])";
@@ -460,7 +460,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionWithUpsertSelect2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String baseTable = generateRandomString();
+        String baseTable = generateUniqueName();
         String source = baseTable + "_SOURCE";
         String target = baseTable + "_TARGET";
         String ddl = "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY 
KEY,varchars VARCHAR[])";
@@ -500,7 +500,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -514,7 +514,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -528,7 +528,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere3() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -542,7 +542,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere4() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -556,7 +556,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere5() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -570,7 +570,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere6() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -584,7 +584,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionInWhere7() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String  tableName = generateRandomString();
+        String  tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -598,7 +598,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test(expected = SQLException.class)
     public void testArrayPrependFunctionCharLimitCheck() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTables(conn, tableName);
 
         ResultSet rs;
@@ -616,7 +616,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionIntegerDesc() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTablesDesc(conn, tableName, "INTEGER", "23");
 
         ResultSet rs;
@@ -635,7 +635,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionVarcharDesc() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTablesDesc(conn, tableName, "VARCHAR", "'e'");
 
         ResultSet rs;
@@ -653,7 +653,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionBigIntDesc() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String  tableName = generateRandomString();
+        String  tableName = generateUniqueName();
         initTablesDesc(conn, tableName, "BIGINT", "1112");
         ResultSet rs;
         rs = conn.createStatement().executeQuery("SELECT 
ARRAY_PREPEND(pk,bigints) FROM " +  tableName);
@@ -670,7 +670,7 @@ public class ArrayPrependFunctionIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayPrependFunctionBooleanDesc() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTablesDesc(conn, tableName, "BOOLEAN", "false");
         ResultSet rs;
         rs = conn.createStatement().executeQuery("SELECT 
ARRAY_PREPEND(pk,bools) FROM " + tableName);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
index 39d6c77..8a3461c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayToStringFunctionIT.java
@@ -36,7 +36,7 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
     @Before
     public void initTables() throws Exception {
         conn = DriverManager.getConnection(getUrl());
-        tableName = generateRandomString();
+        tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName
             + " (region_name VARCHAR PRIMARY KEY,varchars VARCHAR[],integers 
INTEGER[],doubles DOUBLE[],bigints BIGINT[],chars CHAR(15)[],double1 
DOUBLE,varchar1 VARCHAR,nullcheck INTEGER,chars2 CHAR(15)[])";
         conn.createStatement().execute(ddl);
@@ -256,7 +256,7 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert1() throws Exception {
-        String table = generateRandomString();
+        String table = generateUniqueName();
         String ddl =
             "CREATE TABLE " + table + " (region_name VARCHAR PRIMARY 
KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
@@ -279,7 +279,7 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert2() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
             "CREATE TABLE " + tableName + " (region_name VARCHAR PRIMARY 
KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
@@ -302,7 +302,7 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert3() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
             "CREATE TABLE " + tableName + " (region_name VARCHAR PRIMARY 
KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
@@ -325,7 +325,7 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsert4() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
             "CREATE TABLE " + tableName + " (region_name VARCHAR PRIMARY 
KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
@@ -348,12 +348,12 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsertSelect1() throws Exception {
-        String source = generateRandomString();
+        String source = generateUniqueName();
         String ddl =
             "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY 
KEY,doubles DOUBLE[])";
         conn.createStatement().execute(ddl);
 
-        String target = generateRandomString();
+        String target = generateUniqueName();
         ddl = "CREATE TABLE " + target + " (region_name VARCHAR PRIMARY 
KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
@@ -388,12 +388,12 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsertSelect2() throws Exception {
-        String source = generateRandomString();
+        String source = generateUniqueName();
         String ddl =
             "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY 
KEY,varchars VARCHAR[])";
         conn.createStatement().execute(ddl);
 
-        String target = generateRandomString();
+        String target = generateUniqueName();
         ddl = "CREATE TABLE " + target + " (region_name VARCHAR PRIMARY 
KEY,varchar VARCHAR)";
         conn.createStatement().execute(ddl);
 
@@ -428,12 +428,12 @@ public class ArrayToStringFunctionIT extends 
ParallelStatsDisabledIT {
 
     @Test
     public void testArrayToStringFunctionWithUpsertSelect3() throws Exception {
-        String source = generateRandomString();
+        String source = generateUniqueName();
         String ddl =
             "CREATE TABLE " + source + " (region_name VARCHAR PRIMARY 
KEY,booleans BOOLEAN[])";
         conn.createStatement().execute(ddl);
 
-        String target = generateRandomString();
+        String target = generateUniqueName();
         ddl = "CREATE TABLE " + target + " (region_name VARCHAR PRIMARY 
KEY,varchar 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/ArraysWithNullsIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
index 4d487c5..4f78b3e 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArraysWithNullsIT.java
@@ -31,7 +31,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t1 = generateRandomString();
+        String t1 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t1 + " ( k VARCHAR PRIMARY KEY, a INTEGER[])");
 
@@ -54,7 +54,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertVarcharWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t2 = generateRandomString();
+        String t2 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t2 + " ( k VARCHAR PRIMARY KEY, a VARCHAR[])");
 
@@ -75,7 +75,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertBigIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t3 = generateRandomString();
+        String t3 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t3 + " ( k VARCHAR PRIMARY KEY, a BIGINT[])");
 
@@ -96,7 +96,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertFloatWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t4 = generateRandomString();
+        String t4 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t4 + " ( k VARCHAR PRIMARY KEY, a FLOAT[])");
 
@@ -117,7 +117,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertSmallIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t5 = generateRandomString();
+        String t5 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t5 + " ( k VARCHAR PRIMARY KEY, a SMALLINT[])");
 
@@ -138,7 +138,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertTinyIntWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t6 = generateRandomString();
+        String t6 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t6 + " ( k VARCHAR PRIMARY KEY, a TINYINT[])");
 
@@ -159,7 +159,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertBooleanWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t7 = generateRandomString();
+        String t7 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t7 + " ( k VARCHAR PRIMARY KEY, a BOOLEAN[])");
 
@@ -180,7 +180,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertDoubleWithNulls() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t8 = generateRandomString();
+        String t8 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t8 + " ( k VARCHAR PRIMARY KEY, a DOUBLE[])");
 
@@ -201,7 +201,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertDateWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t9 = generateRandomString();
+        String t9 = generateUniqueName();
         conn.createStatement().execute("CREATE TABLE " + t9 + " ( k VARCHAR 
PRIMARY KEY, a DATE[])");
         PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t9
             + " VALUES('a',ARRAY[TO_DATE('2015-05-20 
06:12:14.184'),null,TO_DATE('2015-05-20 06:12:14.184'),null])");
@@ -219,7 +219,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertDateWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t10 = generateRandomString();
+        String t10 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t10 + " ( k VARCHAR PRIMARY KEY, a DATE[])");
         PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t10
@@ -239,7 +239,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertTimeWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t11 = generateRandomString();
+        String t11 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t11 + " ( k VARCHAR PRIMARY KEY, a TIME[])");
         PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t11
@@ -259,7 +259,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertTimeWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t12 = generateRandomString();
+        String t12 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t12 + " ( k VARCHAR PRIMARY KEY, a TIME[])");
         PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t12
@@ -279,7 +279,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertTimeStampWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t13 = generateRandomString();
+        String t13 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t13 + " ( k VARCHAR PRIMARY KEY, a 
TIMESTAMP[])");
         PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t13
@@ -298,7 +298,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertTimeStampWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t14 = generateRandomString();
+        String t14 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t14 + " ( k VARCHAR PRIMARY KEY, a 
TIMESTAMP[])");
         PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + t14
@@ -317,7 +317,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertCharWithNulls1() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t15 = generateRandomString();
+        String t15 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t15 + " ( k VARCHAR PRIMARY KEY, a CHAR(15)[])");
         PreparedStatement stmt = conn.prepareStatement(
@@ -336,7 +336,7 @@ public class ArraysWithNullsIT extends 
ParallelStatsDisabledIT {
     @Test
     public void testArrayUpsertCharWithNulls2() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String t16 = generateRandomString();
+        String t16 = generateUniqueName();
         conn.createStatement().execute(
             "CREATE TABLE " + t16 + " ( k VARCHAR PRIMARY KEY, a CHAR(15)[])");
         PreparedStatement stmt = conn.prepareStatement(

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
index 8928248..5cc6691 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoCommitIT.java
@@ -41,7 +41,7 @@ public class AutoCommitIT extends ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         conn.setAutoCommit(true);
 
-            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/AutoPartitionViewsIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoPartitionViewsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoPartitionViewsIT.java
index eb7bbdf..5de41bf 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoPartitionViewsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AutoPartitionViewsIT.java
@@ -79,8 +79,8 @@ public class AutoPartitionViewsIT extends 
ParallelStatsDisabledIT {
                 Connection viewConn2 =
                         isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1)
                                 : DriverManager.getConnection(getUrl())) {
-            String tableName = generateRandomString();
-            String autoSeqName = generateRandomString();
+            String tableName = generateUniqueName();
+            String autoSeqName = generateUniqueName();
 
             try {
 
@@ -107,7 +107,7 @@ public class AutoPartitionViewsIT extends 
ParallelStatsDisabledIT {
             conn.createStatement().execute(ddl);
 
 
-            String baseViewName = generateRandomString();
+            String baseViewName = generateUniqueName();
             String metricView1 = baseViewName + "_VIEW1";
             String metricView2 = baseViewName + "_VIEW2";
             String metricView3 = baseViewName + "_VIEW3";
@@ -234,8 +234,8 @@ public class AutoPartitionViewsIT extends 
ParallelStatsDisabledIT {
                 Connection viewConn2 =
                         isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL2)
                                 : DriverManager.getConnection(getUrl())) {
-            String tableName = generateRandomString();
-            String autoSeqName = generateRandomString();
+            String tableName = generateUniqueName();
+            String autoSeqName = generateUniqueName();
 
             String ddl =
                     String.format(
@@ -246,7 +246,7 @@ public class AutoPartitionViewsIT extends 
ParallelStatsDisabledIT {
             conn.createStatement().execute(ddl);
             conn.createStatement().execute("CREATE SEQUENCE " + autoSeqName + 
" CACHE 1");
 
-            String baseViewName = generateRandomString();
+            String baseViewName = generateUniqueName();
             String metricView1 = baseViewName + "_VIEW1";
             String metricView2 = baseViewName + "_VIEW2";
             // create a view
@@ -315,8 +315,8 @@ public class AutoPartitionViewsIT extends 
ParallelStatsDisabledIT {
                 Connection viewConn1 =
                         isMultiTenant ? 
DriverManager.getConnection(TENANT_SPECIFIC_URL1)
                                 : DriverManager.getConnection(getUrl())) {
-            String tableName = generateRandomString();
-            String autoSeqName = generateRandomString();
+            String tableName = generateUniqueName();
+            String autoSeqName = generateUniqueName();
 
             String ddl =
                     String.format(
@@ -327,7 +327,7 @@ public class AutoPartitionViewsIT extends 
ParallelStatsDisabledIT {
             conn.createStatement().execute(ddl);
             conn.createStatement().execute("CREATE SEQUENCE " + autoSeqName + 
" CACHE 1");
 
-            String metricView = generateRandomString() + "_VIEW";
+            String metricView = generateUniqueName() + "_VIEW";
             // create a view
             viewConn1.createStatement().execute(
                 "CREATE VIEW " + metricView + " AS SELECT * FROM " + 
tableName);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bebb5ced/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificTablesIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificTablesIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificTablesIT.java
index 17918d6..0749a20 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificTablesIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificTablesIT.java
@@ -47,14 +47,14 @@ public abstract class BaseTenantSpecificTablesIT extends 
ParallelStatsEnabledIT
     
     @Before
     public void createTables() throws SQLException {
-        TENANT_ID = "T_" + BaseTest.generateRandomString();
-        TENANT_ID2 = "T_" + BaseTest.generateRandomString();
+        TENANT_ID = "T_" + BaseTest.generateUniqueName();
+        TENANT_ID2 = "T_" + BaseTest.generateUniqueName();
         PHOENIX_JDBC_TENANT_SPECIFIC_URL = getUrl() + ';' + TENANT_ID_ATTRIB + 
'=' + TENANT_ID;
         PHOENIX_JDBC_TENANT_SPECIFIC_URL2 = getUrl() + ';' + TENANT_ID_ATTRIB 
+ '=' + TENANT_ID2;
-        PARENT_TABLE_NAME = "P_" + BaseTest.generateRandomString();
-        TENANT_TABLE_NAME = "V_" + BaseTest.generateRandomString();
-        PARENT_TABLE_NAME_NO_TENANT_TYPE_ID = "P_" + 
BaseTest.generateRandomString();
-        TENANT_TABLE_NAME_NO_TENANT_TYPE_ID = "V_" + 
BaseTest.generateRandomString();
+        PARENT_TABLE_NAME = "P_" + BaseTest.generateUniqueName();
+        TENANT_TABLE_NAME = "V_" + BaseTest.generateUniqueName();
+        PARENT_TABLE_NAME_NO_TENANT_TYPE_ID = "P_" + 
BaseTest.generateUniqueName();
+        TENANT_TABLE_NAME_NO_TENANT_TYPE_ID = "V_" + 
BaseTest.generateUniqueName();
         PARENT_TABLE_DDL = "CREATE TABLE " + PARENT_TABLE_NAME + " ( \n" + 
                 "                user VARCHAR ,\n" + 
                 "                tenant_id VARCHAR NOT NULL,\n" + 

Reply via email to