Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChinmaySKulkarni committed Oct 30, 2020
1 parent 18af3b2 commit 45f6a82
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -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
Expand All @@ -57,8 +57,8 @@ public class SystemCatalogRollbackEnabledIT extends BaseTest {

@BeforeClass
public static synchronized void doSetup() throws Exception {
Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(2);
Map<String, String> clientProps = Maps.newHashMapWithExpectedSize(1);
Map<String, String> serverProps = new HashMap<>(2);
Map<String, String> 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");
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 45f6a82

Please sign in to comment.