Skip to content

Commit

Permalink
PHOENIX-4668 Remove unnecessary table descriptor modification for SPL…
Browse files Browse the repository at this point in the history
…IT_POLICY column (Chinmay Kulkarni)
  • Loading branch information
jtaylor-sfdc committed Apr 13, 2018
1 parent d30d771 commit bbf454b
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1140,10 +1140,6 @@ private TableDescriptor ensureTableCreated(byte[] physicalTableName, PTableType
PBoolean.INSTANCE.toObject(newDesc.build().getValue(MetaDataUtil.IS_LOCAL_INDEX_TABLE_PROP_BYTES)))) {
newDesc.setRegionSplitPolicyClassName(IndexRegionSplitPolicy.class.getName());
}
// Remove the splitPolicy attribute to prevent HBASE-12570
if (isMetaTable) {
newDesc.removeValue(Bytes.toBytes(TableDescriptorBuilder.SPLIT_POLICY));
}
try {
if (splits == null) {
admin.createTable(newDesc.build());
Expand All @@ -1160,13 +1156,6 @@ private TableDescriptor ensureTableCreated(byte[] physicalTableName, PTableType
}
if (isMetaTable && !isUpgradeRequired()) {
checkClientServerCompatibility(SchemaUtil.getPhysicalName(SYSTEM_CATALOG_NAME_BYTES, this.getProps()).getName());
/*
* Now we modify the table to add the split policy, since we know that the client and
* server and compatible. This works around HBASE-12570 which causes the cluster to be
* brought down.
*/
newDesc.setRegionSplitPolicyClassName(MetaDataSplitPolicy.class.getName());
modifyTable(physicalTableName, newDesc.build(), true);
}
return null;
} else {
Expand Down

0 comments on commit bbf454b

Please sign in to comment.