phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject [5/6] phoenix git commit: PHOENIX-3253 Make changes to tests to support method level parallelization
Date Fri, 23 Sep 2016 01:19:14 GMT
http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificViewIndexIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificViewIndexIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificViewIndexIT.java
index 6b53cd5..c61d970 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseTenantSpecificViewIndexIT.java
@@ -48,7 +48,7 @@ public class BaseTenantSpecificViewIndexIT extends ParallelStatsDisabledIT {
     }
     
     protected void testUpdatableView(Integer saltBuckets, boolean localIndex) throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         createBaseTable(tableName, saltBuckets, true);
         Connection conn = createTenantConnection(TENANT1_ID);
         try {
@@ -61,7 +61,7 @@ public class BaseTenantSpecificViewIndexIT extends ParallelStatsDisabledIT {
     }
 
     protected void testUpdatableViewNonString(Integer saltBuckets, boolean localIndex) throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         createBaseTable(tableName, saltBuckets, false);
         Connection conn = createTenantConnection(NON_STRING_TENANT_ID);
         try {
@@ -78,7 +78,7 @@ public class BaseTenantSpecificViewIndexIT extends ParallelStatsDisabledIT {
     }
 
     protected void testUpdatableViewsWithSameNameDifferentTenants(Integer saltBuckets, boolean localIndex) throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         createBaseTable(tableName, saltBuckets, true);
         Connection conn1 = createTenantConnection(TENANT1_ID);
         Connection conn2 = createTenantConnection(TENANT2_ID);
@@ -115,7 +115,7 @@ public class BaseTenantSpecificViewIndexIT extends ParallelStatsDisabledIT {
     }
     
     private String createAndPopulateTenantView(Connection conn, String tenantId, String baseTable, String valuePrefix) throws SQLException {
-        String viewName = generateRandomString();
+        String viewName = generateUniqueName();
         String ddl = "CREATE VIEW " + viewName + "(v2 VARCHAR) AS SELECT * FROM " + baseTable + " WHERE k1 = 1";
         conn.createStatement().execute(ddl);
         tenantViewsToDelete.add(new Pair<String, String>(tenantId, viewName ));
@@ -127,7 +127,7 @@ public class BaseTenantSpecificViewIndexIT extends ParallelStatsDisabledIT {
     }
     
     private void createAndVerifyIndex(Connection conn, String viewName, String tableName, Integer saltBuckets, String tenantId, String valuePrefix, boolean localIndex) throws SQLException {
-        String indexName = generateRandomString();
+        String indexName = generateUniqueName();
         if(localIndex){
             conn.createStatement().execute("CREATE LOCAL INDEX " + indexName + " ON " + viewName + "(v2)");
         } else {
@@ -157,7 +157,7 @@ public class BaseTenantSpecificViewIndexIT extends ParallelStatsDisabledIT {
     }
 
     private void createAndVerifyIndexNonStringTenantId(Connection conn, String viewName, String tableName, String tenantId, String valuePrefix) throws SQLException {
-        String indexName = generateRandomString();
+        String indexName = generateUniqueName();
         conn.createStatement().execute("CREATE LOCAL INDEX " + indexName + " ON " + viewName + "(v2)");
         conn.createStatement().execute("UPSERT INTO " + viewName + "(k2,v1,v2) VALUES (-1, 'blah', 'superblah')"); // sanity check that we can upsert after index is there
         conn.commit();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseViewIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseViewIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseViewIT.java
index 559c000..686b39f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseViewIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseViewIT.java
@@ -83,7 +83,7 @@ public abstract class BaseViewIT extends ParallelStatsEnabledIT {
 		}
 		this.schemaName = TestUtil.DEFAULT_SCHEMA_NAME;
 		this.tableDDLOptions = optionBuilder.toString();
-		this.tableName = "T_" + generateRandomString();
+		this.tableName = "T_" + generateUniqueName();
         this.fullTableName = SchemaUtil.getTableName(schemaName, tableName);
 	}
     
@@ -126,7 +126,7 @@ public abstract class BaseViewIT extends ParallelStatsEnabledIT {
 				tableDDLOptions+=",";
 			tableDDLOptions+=(" SALT_BUCKETS="+saltBuckets);
 		}
-		String viewName = "V_" + generateRandomString();
+		String viewName = "V_" + generateUniqueName();
         String ddl = "CREATE TABLE " + fullTableName + " (k1 INTEGER NOT NULL, k2 INTEGER NOT NULL, k3 DECIMAL, s VARCHAR CONSTRAINT pk PRIMARY KEY (k1, k2, k3))" + tableDDLOptions;
         conn.createStatement().execute(ddl);
         ddl = "CREATE VIEW " + viewName + " AS SELECT * FROM " + fullTableName + " WHERE k1 = 1";
@@ -180,7 +180,7 @@ public abstract class BaseViewIT extends ParallelStatsEnabledIT {
     protected Pair<String,Scan> testUpdatableViewIndex(Integer saltBuckets, boolean localIndex, String viewName) throws Exception {
         ResultSet rs;
         Connection conn = DriverManager.getConnection(getUrl());
-        String viewIndexName1 = "I_" + generateRandomString();
+        String viewIndexName1 = "I_" + generateUniqueName();
         String viewIndexPhysicalName = MetaDataUtil.getViewIndexName(schemaName, tableName);
         if (localIndex) {
             conn.createStatement().execute("CREATE LOCAL INDEX " + viewIndexName1 + " on " + viewName + "(k3)");
@@ -217,7 +217,7 @@ public abstract class BaseViewIT extends ParallelStatsEnabledIT {
                             queryPlan);
         }
 
-        String viewIndexName2 = "I_" + generateRandomString();
+        String viewIndexName2 = "I_" + generateUniqueName();
         if (localIndex) {
             conn.createStatement().execute("CREATE LOCAL INDEX " + viewIndexName2 + " on " + viewName + "(s)");
         } else {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/BinaryRowKeyIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BinaryRowKeyIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BinaryRowKeyIT.java
index 02c27cd..cc43df5 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BinaryRowKeyIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BinaryRowKeyIT.java
@@ -77,7 +77,7 @@ public class BinaryRowKeyIT extends ParallelStatsDisabledIT {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
         try {
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             initTableValues(tableName);
             conn.setAutoCommit(true);
             conn.createStatement().execute("DELETE FROM " + tableName );
@@ -105,7 +105,7 @@ public class BinaryRowKeyIT extends ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         
         try {
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             initTableValues(tableName);
             String query = "SELECT * FROM " + tableName;
             PreparedStatement stmt = conn.prepareStatement(query);
@@ -131,7 +131,7 @@ public class BinaryRowKeyIT extends ParallelStatsDisabledIT {
         Connection conn = DriverManager.getConnection(getUrl(), props);
         
         try {
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             initTableValues(tableName);
             
             String query = "UPSERT INTO " + tableName + " (a_binary, a_string, b_binary) "

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/CSVCommonsLoaderIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CSVCommonsLoaderIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CSVCommonsLoaderIT.java
index 8de2eda..9b5581d 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CSVCommonsLoaderIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CSVCommonsLoaderIT.java
@@ -103,7 +103,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
                     + "(SYMBOL VARCHAR NOT NULL PRIMARY KEY, COMPANY VARCHAR);";
@@ -147,7 +147,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         PhoenixConnection globalConn = null;
         PhoenixConnection tenantConn = null;
         try {
-            String stockTableMultiName = generateRandomString();
+            String stockTableMultiName = generateUniqueName();
 
             // Create table using the global connection
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableMultiName
@@ -196,7 +196,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -240,7 +240,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -285,7 +285,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -331,7 +331,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -376,7 +376,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -420,7 +420,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -454,7 +454,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName
@@ -491,7 +491,7 @@ public class CSVCommonsLoaderIT extends ParallelStatsDisabledIT {
         CSVParser parser = null;
         PhoenixConnection conn = null;
         try {
-            String stockTableName = generateRandomString();
+            String stockTableName = generateUniqueName();
 
             // Create table
             String statements = "CREATE TABLE IF NOT EXISTS " + stockTableName

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
index 6c5d209..98aa819 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CbrtFunctionEnd2EndIT.java
@@ -38,8 +38,8 @@ public class CbrtFunctionEnd2EndIT extends ParallelStatsDisabledIT {
 
     private static final String KEY = "key";
     private static final double ZERO = 1e-8;
-    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/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
index 89a5fc9..0666f77 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CoalesceFunctionIT.java
@@ -66,7 +66,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void coalesceWithSumExplicitLong() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID BIGINT NOT NULL, "
                 + "    COUNT BIGINT "
@@ -90,7 +90,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void coalesceWithSumImplicitLong() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID BIGINT NOT NULL, "
                 + "    COUNT BIGINT "
@@ -114,7 +114,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void coalesceWithSecondParamAsExpression() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID BIGINT NOT NULL, "
                 + "    COUNT BIGINT "
@@ -138,7 +138,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void nonTypedSecondParameterLong() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID BIGINT NOT NULL, "
@@ -163,7 +163,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void nonTypedSecondParameterUnsignedDataTypes() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID BIGINT NOT NULL, "
                 + "    COUNT UNSIGNED_INT " //first parameter to coalesce
@@ -188,7 +188,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testWithNthValueAggregationFunction() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID BIGINT NOT NULL, "
@@ -220,7 +220,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void wrongDataTypeOfSecondParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID UNSIGNED_INT NOT NULL, "
@@ -247,7 +247,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testImplicitSecondArgCastingException() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID INTEGER NOT NULL, "
@@ -276,7 +276,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testImplicitSecondArgCasting() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE " + tableName + "("
                 + "    ID DOUBLE NOT NULL, "
@@ -302,7 +302,7 @@ public class CoalesceFunctionIT extends ParallelStatsDisabledIT {
     public void testCoalesceInRowKeyColumn() 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 + "(k1 decimal, k2 decimal, constraint pk primary key (k1,k2))");
         conn.createStatement().execute("UPSERT INTO " + tableName + "(k2) VALUES (1)");
         conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES (2,2)");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
index be5470e..229e705 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ConvertTimezoneFunctionIT.java
@@ -41,7 +41,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testConvertTimezoneEurope() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String timezone_offset_test = generateRandomString();
+        String timezone_offset_test = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
             + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -61,7 +61,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testConvertTimezoneAmerica() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String timezone_offset_test = generateRandomString();
+        String timezone_offset_test = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
             + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -81,7 +81,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void nullInDateParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String timezone_offset_test = generateRandomString();
+        String timezone_offset_test = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
             + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -101,7 +101,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void nullInFirstTimezoneParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String timezone_offset_test = generateRandomString();
+        String timezone_offset_test = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
             + " (k1 INTEGER NOT NULL, dates DATE, tz VARCHAR, CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -121,7 +121,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void nullInSecondTimezoneParameter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String timezone_offset_test = generateRandomString();
+        String timezone_offset_test = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
             + " (k1 INTEGER NOT NULL, dates DATE, tz VARCHAR, CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -141,7 +141,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void unknownTimezone() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String timezone_offset_test = generateRandomString();
+        String timezone_offset_test = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
             + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -166,7 +166,7 @@ public class ConvertTimezoneFunctionIT extends ParallelStatsDisabledIT {
 	@Test
 	public void testConvertMultipleRecords() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-      String timezone_offset_test = generateRandomString();
+      String timezone_offset_test = generateUniqueName();
       String ddl = "CREATE TABLE IF NOT EXISTS " + timezone_offset_test
           + " (k1 INTEGER NOT NULL, dates DATE CONSTRAINT pk PRIMARY KEY (k1))";
 		Statement stmt = conn.createStatement();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DateTimeIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DateTimeIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DateTimeIT.java
index 97fbaf4..ffcb472 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DateTimeIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DateTimeIT.java
@@ -75,7 +75,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
     }
     
     private String initAtable() throws SQLException {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         ensureTableCreated(getUrl(), tableName, ATABLE_NAME, (byte[][])null);
         PreparedStatement stmt = conn.prepareStatement(
             "upsert into " + tableName +
@@ -295,7 +295,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
         java.util.Date dateToday = cal.getTime();
         cal.add(Calendar.DAY_OF_YEAR, 1);
         java.util.Date dateTomorrow = cal.getTime();
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String today = formatter.format(dateToday);
         String tomorrow = formatter.format(dateTomorrow);
         String query = "SELECT entity_id FROM " + this.tableName + " WHERE a_integer < 4 AND a_date BETWEEN date '" + today + "' AND date '" + tomorrow + "' ";
@@ -454,7 +454,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testYearFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME, " +
                         "unsignedDates UNSIGNED_DATE, unsignedTimestamps UNSIGNED_TIMESTAMP, unsignedTimes UNSIGNED_TIME CONSTRAINT pk PRIMARY KEY (k1))";
@@ -484,7 +484,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testMonthFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME, " +
                         "unsignedDates UNSIGNED_DATE, unsignedTimestamps UNSIGNED_TIMESTAMP, unsignedTimes UNSIGNED_TIME CONSTRAINT pk PRIMARY KEY (k1))";
@@ -514,7 +514,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testUnsignedTimeDateWithLiteral() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + "  (k1 INTEGER NOT NULL," +
                         "unsignedDates UNSIGNED_DATE, unsignedTimestamps UNSIGNED_TIMESTAMP, unsignedTimes UNSIGNED_TIME CONSTRAINT pk PRIMARY KEY (k1))";
@@ -535,7 +535,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testSecondFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME, " +
                         "unsignedDates UNSIGNED_DATE, unsignedTimestamps UNSIGNED_TIMESTAMP, unsignedTimes UNSIGNED_TIME CONSTRAINT pk PRIMARY KEY (k1))";
@@ -565,7 +565,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testWeekFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + "  (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -587,7 +587,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testHourFuncAgainstColumns() throws Exception {
-        String tableName  = generateRandomString();
+        String tableName  = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -612,7 +612,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testNowFunction() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         Date date = new Date(System.currentTimeMillis());
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, timestamps TIMESTAMP CONSTRAINT pk PRIMARY KEY (k1))";
@@ -636,7 +636,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testMinuteFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME, " +
                         "unsignedDates UNSIGNED_DATE, unsignedTimestamps UNSIGNED_TIMESTAMP, unsignedTimes UNSIGNED_TIME CONSTRAINT pk PRIMARY KEY (k1))";
@@ -663,7 +663,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
     
     @Test
     public void testDayOfMonthFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
@@ -689,7 +689,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
      */
     @Test
     public void testDayOfWeekFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
         String dml = "UPSERT INTO " + tableName + " VALUES (1, TO_DATE('2012-03-08 11:01:10'), TO_TIMESTAMP('2013-06-16 12:02:20'), TO_TIME('2014-09-23 13:03:30'))";
@@ -708,7 +708,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testDayOfYearFuncAgainstColumns() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL, dates DATE, timestamps TIMESTAMP, times TIME CONSTRAINT pk PRIMARY KEY (k1))";
         conn.createStatement().execute(ddl);
         String dml = "UPSERT INTO " + tableName + " VALUES (1, TO_DATE('2012-03-01 11:01:10'), TO_TIMESTAMP('2013-02-01 12:02:20'), TO_TIME('2014-01-15 13:03:30'))";
@@ -748,7 +748,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
     }
     @Test
     public void testSelectBetweenNanos() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER NOT NULL PRIMARY KEY, ts " +
                         "TIMESTAMP(3))";
@@ -772,8 +772,8 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testCurrentTimeWithProjectedTable () throws Exception {
-        String tableName1 = generateRandomString();
-        String tableName2 = generateRandomString();
+        String tableName1 = generateUniqueName();
+        String tableName2 = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName1 + " ( ID integer primary key)";
         conn.createStatement().execute(ddl);
         ddl = "CREATE TABLE " + tableName2 + " ( ID integer primary key)";
@@ -846,7 +846,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedDateTimestampUnequal() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates DATE, timestamps TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -889,7 +889,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedTimeTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, times TIME, timestamps TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -932,7 +932,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedDateTimeCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates DATE, times TIME)";
         conn.createStatement().execute(ddl);
@@ -965,7 +965,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedDateUnsignedTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates DATE, timestamps UNSIGNED_TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1008,7 +1008,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedTimeUnsignedTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, times TIME, timestamps UNSIGNED_TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1051,7 +1051,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedDateUnsignedTimeCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates DATE, times UNSIGNED_TIME)";
         conn.createStatement().execute(ddl);
@@ -1084,7 +1084,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedDateTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates UNSIGNED_DATE, timestamps TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1127,7 +1127,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedTimeTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, times UNSIGNED_TIME, timestamps TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1170,7 +1170,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedDateTimeCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates UNSIGNED_DATE, times TIME)";
         conn.createStatement().execute(ddl);
@@ -1203,7 +1203,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedDateUnsignedTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates UNSIGNED_DATE, timestamps UNSIGNED_TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1246,7 +1246,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedTimeUnsignedTimestampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, times UNSIGNED_TIME, timestamps UNSIGNED_TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1289,7 +1289,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedDateUnsignedTimeCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, dates UNSIGNED_DATE, times UNSIGNED_TIME)";
         conn.createStatement().execute(ddl);
@@ -1322,7 +1322,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedDateDateCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, date1 DATE, date2 DATE)";
         conn.createStatement().execute(ddl);
@@ -1355,7 +1355,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedDateUnsignedDateCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, date1 UNSIGNED_DATE, date2 UNSIGNED_DATE)";
         conn.createStatement().execute(ddl);
@@ -1388,7 +1388,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedTimeTimeCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, time1 TIME, time2 TIME)";
         conn.createStatement().execute(ddl);
@@ -1421,7 +1421,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedTimeUnsignedTimeCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, time1 UNSIGNED_TIME, time2 UNSIGNED_TIME)";
         conn.createStatement().execute(ddl);
@@ -1454,7 +1454,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedTimeStampTimeStampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, timestamp1 TIMESTAMP, timestamp2 TIMESTAMP)";
         conn.createStatement().execute(ddl);
@@ -1497,7 +1497,7 @@ public class DateTimeIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testProjectedUnsignedTimeStampUnsignedTimeStampCompare() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
                 "CREATE TABLE IF NOT EXISTS " + tableName + " (k1 INTEGER PRIMARY KEY, timestamp1 UNSIGNED_TIMESTAMP, timestamp2 UNSIGNED_TIMESTAMP)";
         conn.createStatement().execute(ddl);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
index 424aa7b..a2fc59b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DecodeFunctionIT.java
@@ -41,7 +41,7 @@ public class DecodeFunctionIT extends ParallelStatsDisabledIT {
 	public void shouldPass() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
 
-		String testTable = generateRandomString();
+		String testTable = generateUniqueName();
 		String ddl = "CREATE TABLE " + testTable
 				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
@@ -64,7 +64,7 @@ public class DecodeFunctionIT extends ParallelStatsDisabledIT {
 	public void upperCaseHexEncoding() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
 
-		String testTable = generateRandomString();
+		String testTable = generateUniqueName();
 		String ddl = "CREATE TABLE " + testTable
 				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
@@ -86,7 +86,7 @@ public class DecodeFunctionIT extends ParallelStatsDisabledIT {
 	@Test
 	public void invalidCharacters() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String testTable = generateRandomString();
+		String testTable = generateUniqueName();
 		String ddl = "CREATE TABLE " + testTable
 				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
@@ -104,7 +104,7 @@ public class DecodeFunctionIT extends ParallelStatsDisabledIT {
 	@Test
 	public void invalidLength() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String testTable = generateRandomString();
+		String testTable = generateUniqueName();
 		String ddl = "CREATE TABLE " + testTable
 				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
@@ -122,7 +122,7 @@ public class DecodeFunctionIT extends ParallelStatsDisabledIT {
 	@Test
 	public void nullEncoding() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String testTable = generateRandomString();
+		String testTable = generateUniqueName();
 		String ddl = "CREATE TABLE " + testTable
 				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 
@@ -136,7 +136,7 @@ public class DecodeFunctionIT extends ParallelStatsDisabledIT {
 	@Test
 	public void invalidEncoding() throws Exception {
 		Connection conn = DriverManager.getConnection(getUrl());
-		String testTable = generateRandomString();
+		String testTable = generateUniqueName();
 		String ddl = "CREATE TABLE " + testTable
 				+ " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index a289634..9f514b3 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -42,7 +42,7 @@ public class DeleteIT extends ParallelStatsDisabledIT {
     private static final int NTH_ROW_NULL = 5;
     
     private static String initTableValues(Connection conn) throws SQLException {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         ensureTableCreated(getUrl(), tableName, "IntIntKeyTest");
         String upsertStmt = "UPSERT INTO " + tableName + " VALUES(?,?)";
         PreparedStatement stmt = conn.prepareStatement(upsertStmt);
@@ -157,8 +157,8 @@ public class DeleteIT extends ParallelStatsDisabledIT {
     private void testDeleteRange(boolean autoCommit, boolean createIndex, boolean local) throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
         String tableName = initTableValues(conn);
-        String indexName = generateRandomString();
-        String localIndexName = generateRandomString();
+        String indexName = generateUniqueName();
+        String localIndexName = generateUniqueName();
 
         String indexInUse = indexName;
         if (createIndex) {
@@ -294,7 +294,7 @@ public class DeleteIT extends ParallelStatsDisabledIT {
             con.setAutoCommit(autoCommit);
 
             Statement stm = con.createStatement();
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
             String s = "CREATE TABLE IF NOT EXISTS " + tableName + "(" +
                     "HOST CHAR(2) NOT NULL," +
                     "DOMAIN VARCHAR NOT NULL, " +
@@ -305,8 +305,8 @@ public class DeleteIT extends ParallelStatsDisabledIT {
                     "STATS.ACTIVE_VISITOR INTEGER " +
                     "CONSTRAINT PK PRIMARY KEY (HOST, DOMAIN, FEATURE, DATE))" + (isSalted ? " SALT_BUCKETS=3" : "");
             stm.execute(s);
-            String localIndexName = generateRandomString();
-            String indexName = generateRandomString();
+            String localIndexName = generateUniqueName();
+            String indexName = generateUniqueName();
             if (localIndex) {
                 stm.execute("CREATE LOCAL INDEX " + localIndexName + " ON " + tableName + " (CORE,DB,ACTIVE_VISITOR)");
             } else {
@@ -372,9 +372,9 @@ public class DeleteIT extends ParallelStatsDisabledIT {
 
             Statement stm = con.createStatement();
 
-            String tableName = generateRandomString();
-            String indexName1 = generateRandomString();
-            String indexName2 = generateRandomString();
+            String tableName = generateUniqueName();
+            String indexName1 = generateUniqueName();
+            String indexName2 = generateUniqueName();
 
             stm.execute("CREATE TABLE IF NOT EXISTS " + tableName + " (" +
                     "HOST CHAR(2) NOT NULL," +
@@ -458,7 +458,7 @@ public class DeleteIT extends ParallelStatsDisabledIT {
             con = DriverManager.getConnection(getUrl());
             con.setAutoCommit(autoCommit);
 
-            String tableName = generateRandomString();
+            String tableName = generateUniqueName();
 
             Statement stm = con.createStatement();
             stm.execute("CREATE TABLE IF NOT EXISTS " + tableName + "(" +
@@ -505,13 +505,13 @@ public class DeleteIT extends ParallelStatsDisabledIT {
     
     @Test
     public void testDeleteForTableWithRowTimestampColServer() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         testDeleteForTableWithRowTimestampCol(true, tableName);
     }
     
     @Test
     public void testDeleteForTableWithRowTimestampColClient() throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         testDeleteForTableWithRowTimestampCol(false, tableName);
     }
     
@@ -583,7 +583,7 @@ public class DeleteIT extends ParallelStatsDisabledIT {
     }
     
     private void testDeleteCount(boolean autoCommit, Integer limit) throws Exception {
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         String ddl = "CREATE TABLE IF NOT EXISTS " + tableName + " (pk1 DECIMAL NOT NULL, v1 VARCHAR CONSTRAINT PK PRIMARY KEY (pk1))";
         int numRecords = 1010;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DisableLocalIndexIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DisableLocalIndexIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DisableLocalIndexIT.java
index b34c61d..10f970f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DisableLocalIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DisableLocalIndexIT.java
@@ -57,7 +57,7 @@ public class DisableLocalIndexIT extends ParallelStatsDisabledIT {
     public void testDisabledLocalIndexes() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
         conn.setAutoCommit(true);
-        String baseName = generateRandomString();
+        String baseName = generateUniqueName();
         String tableName = baseName+ "_TABLE";
         String viewName = baseName + "_VIEW";
         String indexName1 = baseName + "_INDEX1";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index df10c84..87edc25 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -36,8 +36,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class DistinctPrefixFilterIT extends ParallelStatsDisabledIT {
-    private static final String testTableF = generateRandomString();
-    private static final String testTableV = generateRandomString();
+    private static final String testTableF = generateUniqueName();
+    private static final String testTableV = generateUniqueName();
     private static final String testSeq = testTableF + "_seq";
     private static final String PREFIX = "SERVER DISTINCT PREFIX";
     private static Connection conn;
@@ -110,7 +110,7 @@ public class DistinctPrefixFilterIT extends ParallelStatsDisabledIT {
 
     @Test
     public void testCornerCases() throws Exception {
-        String testTable = generateRandomString();
+        String testTable = generateUniqueName();
         String ddl = "CREATE TABLE " + testTable +
                 "  (prefix1 INTEGER NOT NULL, prefix2 SMALLINT NOT NULL, prefix3 INTEGER NOT NULL, " +
                 "col1 FLOAT, CONSTRAINT pk PRIMARY KEY(prefix1, prefix2, prefix3))";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicFamilyIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicFamilyIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicFamilyIT.java
index 0b6a728..866a8d2 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicFamilyIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicFamilyIT.java
@@ -63,7 +63,7 @@ import org.junit.Test;
         justification="Designed to ignore.")
 
 public class DynamicFamilyIT extends ParallelStatsDisabledIT {
-    private static final String WEB_STATS = generateRandomString();
+    private static final String WEB_STATS = generateUniqueName();
     private static final String WEB_STATS_SCHEMA_NAME = "";
     private static final byte[] A_CF = Bytes.toBytes(SchemaUtil.normalizeIdentifier("A"));
     private static final byte[] B_CF = Bytes.toBytes(SchemaUtil.normalizeIdentifier("B"));
@@ -339,7 +339,7 @@ public class DynamicFamilyIT extends ParallelStatsDisabledIT {
         ResultSet rs;
         Connection conn = DriverManager.getConnection(getUrl());
         conn.setAutoCommit(true);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         conn.createStatement().execute("CREATE TABLE " + tableName
             + " (Id VARCHAR NOT NULL PRIMARY KEY, COLFAM1.A VARCHAR, COLFAM1.B VARCHAR, COLFAM2.A VARCHAR )");
         conn.createStatement().execute("UPSERT INTO " + tableName

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicUpsertIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicUpsertIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicUpsertIT.java
index 4cd2c6b..66ff35a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicUpsertIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicUpsertIT.java
@@ -51,7 +51,7 @@ public class DynamicUpsertIT extends ParallelStatsDisabledIT {
 
     @Before
     public void doBeforeTestSetup() throws Exception {
-    	tableName = BaseTest.generateRandomString();
+    	tableName = BaseTest.generateUniqueName();
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
         String ddl = "create table " + tableName + "   (entry varchar not null primary key,"

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/EncodeFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/EncodeFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/EncodeFunctionIT.java
index b61ac73..7517dd6 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/EncodeFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/EncodeFunctionIT.java
@@ -97,7 +97,7 @@ public class EncodeFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testUpperCaseEncodingType() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " ( pk VARCHAR(10) NOT NULL CONSTRAINT PK PRIMARY KEY (pk))";
 
         conn.createStatement().execute(ddl);
@@ -114,7 +114,7 @@ public class EncodeFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testNullEncodingType() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " ( pk VARCHAR(10) NOT NULL CONSTRAINT PK PRIMARY KEY (pk))";
         conn.createStatement().execute(ddl);
 
@@ -125,7 +125,7 @@ public class EncodeFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testUnsupportedEncodingType() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl = "CREATE TABLE " + tableName + " ( pk VARCHAR(10) NOT NULL CONSTRAINT PK PRIMARY KEY (pk))";
         conn.createStatement().execute(ddl);
 
@@ -140,7 +140,7 @@ public class EncodeFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testInvalidEncodingType() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String ddl =
             "CREATE TABLE " + tableName + " ( some_column BINARY(12) NOT NULL CONSTRAINT PK PRIMARY KEY (some_column))";
         conn.createStatement().execute(ddl);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
index c227dd5..2e1cc99 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/EvaluationOfORIT.java
@@ -49,7 +49,7 @@ public class EvaluationOfORIT extends ParallelStatsDisabledIT {
 	public void testPKOrNotPKInOREvaluation() throws SQLException {
 	    Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 	    Connection conn = DriverManager.getConnection(getUrl(), props);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 	    conn.setAutoCommit(false);
 	    
             String create = "CREATE TABLE " + tableName + " ( ID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(50))";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
index f82fffe..bc21af0 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
@@ -54,7 +54,7 @@ public class ExecuteStatementsIT extends ParallelStatsDisabledIT {
     public void testExecuteStatements() throws Exception {
         String tenantId = getOrganizationId();
         String tableName = initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
-        String ptsdbTableName = generateRandomString();
+        String ptsdbTableName = generateUniqueName();
         String statements = 
             "create table if not exists " + tableName + // Shouldn't error out b/c of if not exists clause
             "   (organization_id char(15) not null, \n" + 
@@ -120,7 +120,7 @@ public class ExecuteStatementsIT extends ParallelStatsDisabledIT {
     @Test
     public void testCharPadding() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String rowKey = "hello"; 
         String testString = "world";
         String query = "create table " + tableName +
@@ -144,7 +144,7 @@ public class ExecuteStatementsIT extends ParallelStatsDisabledIT {
         statement.execute();       
         conn.commit();
 
-        String btableName = generateRandomString();
+        String btableName = generateUniqueName();
         ensureTableCreated(getUrl(),btableName, BTABLE_NAME, nextTimestamp()-2);
         statement = conn.prepareStatement(
                 "upsert into " + btableName + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExpFunctionEnd2EndIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExpFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExpFunctionEnd2EndIT.java
index 40b0637..4b61bdb 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExpFunctionEnd2EndIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExpFunctionEnd2EndIT.java
@@ -45,8 +45,8 @@ public class ExpFunctionEnd2EndIT 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/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValueFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValueFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValueFunctionIT.java
index e78c130..a2fa244 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValueFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/FirstValueFunctionIT.java
@@ -33,7 +33,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void signedLongAsBigInt() 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 BIGINT, \"value\" BIGINT)";
@@ -64,7 +64,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void testSortOrderInSortCol() 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, page_id UNSIGNED_LONG,"
                 + " dates BIGINT NOT NULL, \"value\" BIGINT CONSTRAINT pk PRIMARY KEY (id, dates DESC))";
@@ -95,7 +95,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void testSortOrderInDataCol() 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, page_id UNSIGNED_LONG,"
                 + " dates BIGINT NOT NULL, \"value\" BIGINT NOT NULL CONSTRAINT pk PRIMARY KEY (id, dates, \"value\" DESC))";
@@ -126,7 +126,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void doubleDataType() 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 DOUBLE, \"value\" DOUBLE)";
@@ -157,7 +157,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void varcharFixedLenghtDatatype() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
 
-        String table_name = generateRandomString();
+        String table_name = generateUniqueName();
         String ddl = "CREATE TABLE IF NOT EXISTS " + table_name + " "
                 + "(id INTEGER NOT NULL PRIMARY KEY, page_id UNSIGNED_LONG, "
                 + "date VARCHAR(3), \"value\" VARCHAR(3))";
@@ -188,7 +188,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void floatDataType() 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 FLOAT, \"value\" FLOAT)";
@@ -220,7 +220,7 @@ public class FirstValueFunctionIT extends ParallelStatsDisabledIT {
     public void allColumnsNull() 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 FLOAT, \"value\" FLOAT)";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/GetSetByteBitFunctionEnd2EndIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GetSetByteBitFunctionEnd2EndIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GetSetByteBitFunctionEnd2EndIT.java
index e95ca4c..98d1478 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GetSetByteBitFunctionEnd2EndIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GetSetByteBitFunctionEnd2EndIT.java
@@ -42,7 +42,7 @@ import org.junit.Test;
 public class GetSetByteBitFunctionEnd2EndIT extends ParallelStatsDisabledIT {
 
     private static final String KEY = "key";
-    private static final String TABLE_NAME = generateRandomString();
+    private static final String TABLE_NAME = generateUniqueName();
 
     @BeforeClass
     public static void initTable() throws Exception {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
index 0acfe02..48b926a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
@@ -69,7 +69,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testExpressionInGroupBy() 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 + "(tgb_id integer NOT NULL,utc_date_epoch integer NOT NULL,tgb_name varchar(40),ack_success_count integer" +
                 ",ack_success_one_ack_count integer, CONSTRAINT pk_tgb_counter PRIMARY KEY(tgb_id, utc_date_epoch))";
         String query = "SELECT tgb_id, tgb_name, (utc_date_epoch/10)*10 AS utc_epoch_hour,SUM(ack_success_count + ack_success_one_ack_count) AS ack_tx_sum" +
@@ -112,7 +112,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testBooleanInGroupBy() 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 + "(id varchar primary key,v1 boolean, v2 integer, v3 integer)";
 
         createTestTable(getUrl(), ddl);
@@ -162,7 +162,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testScanUri() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initData(conn, tableName);
         Statement stmt = conn.createStatement();
         ResultSet rs = stmt.executeQuery("select uri from " + tableName);
@@ -190,7 +190,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testCount() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initData(conn, tableName);
         Statement stmt = conn.createStatement();
         ResultSet rs = stmt.executeQuery("select count(1) from " + tableName);
@@ -204,7 +204,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testGroupByCase() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         String groupBy1 = "select " +
                 "case when uri LIKE 'Report%' then 'Reports' else 'Other' END category" +
                 ", avg(appcpu) from " + tableName +
@@ -238,7 +238,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
 
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         conn.createStatement().execute("CREATE TABLE " + tableName + "(\n" + 
                 "  a VARCHAR NOT NULL,\n" + 
                 "  b VARCHAR,\n" + 
@@ -274,7 +274,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testGroupByOrderPreserving() 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 + "(ORGANIZATION_ID char(15) not null, \n" + 
                 "JOURNEY_ID char(15) not null, \n" + 
@@ -319,7 +319,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testGroupByOrderPreservingDescSort() 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 + " (k1 char(1) not null, k2 char(1) not null, constraint pk primary key (k1,k2)) split on ('ac','jc','nc')");
         conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES('a', 'a')");
         conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES('a', 'b')");
@@ -357,7 +357,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testSumGroupByOrderPreservingDesc() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         PreparedStatement stmt = conn.prepareStatement("CREATE TABLE " + tableName + " (k1 char(1) not null, k2 integer not null, constraint pk primary key (k1,k2)) split on (?,?,?)");
         stmt.setBytes(1, ByteUtil.concat(PChar.INSTANCE.toBytes("a"), PInteger.INSTANCE.toBytes(3)));
@@ -404,7 +404,7 @@ public class GroupByCaseIT extends ParallelStatsDisabledIT {
     public void testAvgGroupByOrderPreserving() throws Exception {
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
 
         PreparedStatement stmt = conn.prepareStatement("CREATE TABLE " + tableName + " (k1 char(1) not null, k2 integer not null, constraint pk primary key (k1,k2)) split on (?,?,?)");
         stmt.setBytes(1, ByteUtil.concat(PChar.INSTANCE.toBytes("a"), PInteger.INSTANCE.toBytes(3)));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinMoreIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinMoreIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinMoreIT.java
index c9530a8..5f04ead 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/HashJoinMoreIT.java
@@ -103,8 +103,8 @@ public class HashJoinMoreIT extends ParallelStatsDisabledIT {
     
     @Test
     public void testJoinOverSaltedTables() throws Exception {
-        String tempTableNoSalting = generateRandomString();
-        String tempTableWithSalting = generateRandomString();
+        String tempTableNoSalting = generateUniqueName();
+        String tempTableWithSalting = generateUniqueName();
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
         try {
@@ -241,8 +241,8 @@ public class HashJoinMoreIT 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;
@@ -272,7 +272,7 @@ public class HashJoinMoreIT extends ParallelStatsDisabledIT {
             conn.commit();
             stmt.close();
 
-            String sequenceB = generateRandomString();
+            String sequenceB = generateUniqueName();
             // upsert select dynamic columns in tableB
             conn.createStatement().execute("CREATE SEQUENCE " + sequenceB );
             String upsertBSelectA = "UPSERT INTO " + tableB + " (pkB, pkA INTEGER)"
@@ -311,7 +311,7 @@ public class HashJoinMoreIT extends ParallelStatsDisabledIT {
     
     @Test
     public void testJoinWithKeyRangeOptimization() throws Exception {
-        String tempTableWithCompositePK = generateRandomString();
+        String tempTableWithCompositePK = generateUniqueName();
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
         try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index b0c661e..fe88dc8 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -51,7 +51,7 @@ public class InListIT extends ParallelStatsDisabledIT {
     public void testLeadingPKWithTrailingRVC() 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
                 + "( col1 VARCHAR NOT NULL,"
                 + "  col2 VARCHAR NOT NULL, "
@@ -74,7 +74,7 @@ public class InListIT extends ParallelStatsDisabledIT {
     public void testLeadingPKWithTrailingRVC2() 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 + " ( user VARCHAR, tenant_id VARCHAR(5) NOT NULL,tenant_type_id VARCHAR(3) NOT NULL,  id INTEGER NOT NULL CONSTRAINT pk PRIMARY KEY (tenant_id, tenant_type_id, id))");
 
         conn.createStatement().execute("upsert into " + tableName + " (tenant_id, tenant_type_id, id, user) values ('a', 'a', 1, 'BonA')");
@@ -144,7 +144,7 @@ public class InListIT extends ParallelStatsDisabledIT {
      * @return  the table or view name that should be used to access the created table
      */
     private static String initializeAndGetTable(Connection baseConn, Connection conn, boolean isMultiTenant, PDataType pkType, int saltBuckets) throws SQLException {
-            String tableName = generateRandomString() + "in_test" + pkType.getSqlTypeName() + saltBuckets + (isMultiTenant ? "_multi" : "_single");
+            String tableName = generateUniqueName() + "in_test" + pkType.getSqlTypeName() + saltBuckets + (isMultiTenant ? "_multi" : "_single");
             String tableDDL = createTableDDL(tableName, pkType, saltBuckets, isMultiTenant);
             baseConn.createStatement().execute(tableDDL);
             
@@ -445,7 +445,7 @@ public class InListIT extends ParallelStatsDisabledIT {
     public void testWithFixedLengthKV() 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 + " ( id INTEGER PRIMARY KEY, k CHAR(3))");
 
         conn.createStatement().execute("upsert into " + tableName + " values (1, 'aa')");
@@ -465,7 +465,7 @@ public class InListIT extends ParallelStatsDisabledIT {
     private void testWithFixedLengthPK(SortOrder sortOrder) 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 CHAR(3) PRIMARY KEY " + (sortOrder == SortOrder.DESC ? "DESC" : "") + ")");
 
         conn.createStatement().execute("upsert into " + tableName + " (k) values ('aa')");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexExtendedIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexExtendedIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexExtendedIT.java
index 8314850..e3a541d 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexExtendedIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/IndexExtendedIT.java
@@ -120,10 +120,10 @@ public class IndexExtendedIT extends BaseOwnClusterIT {
         if (!mutable || transactional) {
             return;
         }
-        String schemaName = generateRandomString();
-        String dataTableName = generateRandomString();
+        String schemaName = generateUniqueName();
+        String dataTableName = generateUniqueName();
         String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName);
-        String indexTableName = generateRandomString();
+        String indexTableName = generateUniqueName();
         String indexTableFullName = SchemaUtil.getTableName(schemaName, indexTableName);
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
@@ -192,10 +192,10 @@ public class IndexExtendedIT extends BaseOwnClusterIT {
 
     @Test
     public void testSecondaryIndex() throws Exception {
-        String schemaName = generateRandomString();
-        String dataTableName = generateRandomString();
+        String schemaName = generateUniqueName();
+        String dataTableName = generateUniqueName();
         String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName);
-        String indexTableName = generateRandomString();
+        String indexTableName = generateUniqueName();
         String indexTableFullName = SchemaUtil.getTableName(schemaName, indexTableName);
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         Connection conn = DriverManager.getConnection(getUrl(), props);
@@ -318,10 +318,10 @@ public class IndexExtendedIT extends BaseOwnClusterIT {
         if (localIndex) { // TODO: remove this return once PHOENIX-3292 is fixed
             return;
         }
-        String schemaName = generateRandomString();
-        String dataTableName = generateRandomString();
+        String schemaName = generateUniqueName();
+        String dataTableName = generateUniqueName();
         String dataTableFullName = SchemaUtil.getTableName(schemaName, dataTableName);
-        String indexTableName = generateRandomString();
+        String indexTableName = generateUniqueName();
         String indexTableFullName = SchemaUtil.getTableName(schemaName, indexTableName);
         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
         try (Connection conn = DriverManager.getConnection(getUrl(), props)) {
@@ -400,9 +400,9 @@ public class IndexExtendedIT extends BaseOwnClusterIT {
         if (!localIndex || transactional || mutable || directApi) {
             return;
         }
-        String schemaName = generateRandomString();
-        String tableName = schemaName + "." + generateRandomString();
-        String indexName = "IDX_" + generateRandomString();
+        String schemaName = generateUniqueName();
+        String tableName = schemaName + "." + generateUniqueName();
+        String indexName = "IDX_" + generateUniqueName();
         TableName physicalTableName = SchemaUtil.getPhysicalTableName(tableName.getBytes(), false);
         String indexPhysicalTableName = physicalTableName.getNameAsString();
 
@@ -502,9 +502,9 @@ public class IndexExtendedIT extends BaseOwnClusterIT {
         if (!localIndex || transactional || mutable || directApi) {
             return;
         }
-        String schemaName = generateRandomString();
-        String tableName = schemaName + "." + generateRandomString();
-        String indexName = "IDX_" + generateRandomString();
+        String schemaName = generateUniqueName();
+        String tableName = schemaName + "." + generateUniqueName();
+        String indexName = "IDX_" + generateUniqueName();
         TableName physicalTableName = SchemaUtil.getPhysicalTableName(tableName.getBytes(), false);
         String indexPhysicalTableName = physicalTableName.getNameAsString();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/44e43d7c/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
index e77499a..270b1ec 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InstrFunctionIT.java
@@ -61,7 +61,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testSingleByteInstrAscending() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "ASC", "abcdefghijkl","fgh");
         String queryToExecute = "SELECT INSTR(name, 'fgh') FROM " + tableName;
         testInstr(conn, queryToExecute, 6);
@@ -70,7 +70,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testSingleByteInstrDescending() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "DESC", "abcdefghijkl","fgh");
         String queryToExecute = "SELECT INSTR(name, 'fgh') FROM " + tableName;
         testInstr(conn, queryToExecute, 6);
@@ -79,7 +79,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testSingleByteInstrAscendingNoString() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "ASC", "abcde fghijkl","lmn");
         String queryToExecute = "SELECT INSTR(name, 'lmn') FROM " + tableName;
         testInstr(conn, queryToExecute, 0);
@@ -88,7 +88,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testSingleByteInstrDescendingNoString() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "DESC", "abcde fghijkl","lmn");
         String queryToExecute = "SELECT INSTR(name, 'lmn') FROM " + tableName;
         testInstr(conn, queryToExecute, 0);
@@ -97,7 +97,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testMultiByteInstrAscending() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "ASC", "AɚɦFGH","ɚɦ");
         String queryToExecute = "SELECT INSTR(name, 'ɚɦ') FROM " + tableName;
         testInstr(conn, queryToExecute, 2);
@@ -106,7 +106,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testMultiByteInstrDecending() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "DESC", "AɚɦFGH","ɚɦ");
         String queryToExecute = "SELECT INSTR(name, 'ɚɦ') FROM " + tableName;
         testInstr(conn, queryToExecute, 2);
@@ -115,7 +115,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testByteInstrAscendingFilter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "ASC", "abcdefghijkl","fgh");
         String queryToExecute = "select NAME from " + tableName + " where instr(name, 'fgh') > 0";
         testInstrFilter(conn, queryToExecute,"abcdefghijkl");
@@ -125,7 +125,7 @@ public class InstrFunctionIT extends ParallelStatsDisabledIT {
     @Test
     public void testByteInstrDecendingFilter() throws Exception {
         Connection conn = DriverManager.getConnection(getUrl());
-        String tableName = generateRandomString();
+        String tableName = generateUniqueName();
         initTable(conn, tableName, "DESC", "abcdefghijkl","fgh");
         String queryToExecute = "select NAME from " + tableName + " where instr(name, 'fgh') > 0";
         testInstrFilter(conn, queryToExecute,"abcdefghijkl");


Mime
View raw message