use of com.navercorp.pinpoint.hbase.schema.reader.core.ColumnFamilyChange in project pinpoint by naver.
the class TableCommand method applyColumnFamilyChanges.
void applyColumnFamilyChanges(List<ColumnFamilyChange> columnFamilyChanges) {
if (CollectionUtils.isEmpty(columnFamilyChanges)) {
return;
}
for (ColumnFamilyChange columnFamilyChange : columnFamilyChanges) {
ChangeType changeType = columnFamilyChange.getType();
if (changeType == ChangeType.CREATE) {
HColumnDescriptor family = newColumnDescriptor(columnFamilyChange);
if (htd.hasFamily(family.getName())) {
throw new IllegalArgumentException("Cannot add an existing column family : " + htd.getNameAsString());
}
htd.addFamily(family);
} else {
throw new UnsupportedOperationException("Unknown change type : " + changeType);
}
}
}
Aggregations