diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogRollbackEnabledIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogRollbackEnabledIT.java index 694fccbd2b6..7fff5ac21da 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogRollbackEnabledIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SystemCatalogRollbackEnabledIT.java @@ -27,6 +27,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.util.HashMap; import java.util.Map; import java.util.Properties; @@ -35,6 +36,7 @@ import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.RegionLocator; import org.apache.phoenix.exception.SQLExceptionCode; +import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData; import org.apache.phoenix.query.BaseTest; import org.apache.phoenix.query.QueryServices; import org.apache.phoenix.schema.ColumnNotFoundException; @@ -45,8 +47,6 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import com.google.common.collect.Maps; - /** * Tests various scenarios when {@link QueryServices#ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK} * is set to true and SYSTEM.CATALOG should not be allowed to split. Note that this config must @@ -57,8 +57,8 @@ public class SystemCatalogRollbackEnabledIT extends BaseTest { @BeforeClass public static synchronized void doSetup() throws Exception { - Map serverProps = Maps.newHashMapWithExpectedSize(2); - Map clientProps = Maps.newHashMapWithExpectedSize(1); + Map serverProps = new HashMap<>(2); + Map clientProps = new HashMap<>(1); serverProps.put(QueryServices.SYSTEM_CATALOG_SPLITTABLE, "false"); serverProps.put(QueryServices.ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK, "true"); clientProps.put(QueryServices.ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK, "true"); @@ -104,9 +104,9 @@ public void testSystemTableDoesNotSplit() throws Exception { for (int i=0; i<10; i++) { createTable("schema"+i+".table_"+i); } - TableName systemCatalog = TableName.valueOf("SYSTEM.CATALOG"); + TableName systemCatalog = TableName.valueOf(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME); RegionLocator rl = testUtil.getConnection().getRegionLocator(systemCatalog); - assertEquals(rl.getAllRegionLocations().size(), 1); + assertEquals(1, rl.getAllRegionLocations().size()); try { // now attempt to split SYSTEM.CATALOG testUtil.getHBaseAdmin().split(systemCatalog);