String cfName = meta.getRealColumnFamily().toLowerCase();
String colFamily = meta.getRealColumnFamily();
if (log.isInfoEnabled())
log.info("CREATING colfamily="+cfName+" in keyspace="+keysp);
ColumnFamilyDefinition def = cluster.makeColumnFamilyDefinition();
if(callback != null)
def = (ColumnFamilyDefinition) callback.modifyColumnFamily(colFamily, def);
def = def.setName(colFamily)
.setKeyspace(keysp);
if (log.isInfoEnabled())
log.info("keyspace="+def.getKeyspace()+" col family="+def.getName());
StorageTypeEnum rowKeyType = meta.getIdColumnMeta().getStorageType();
ColumnType colType = ColumnType.ANY_EXCEPT_COMPOSITE;
if(meta.isVirtualCf()) {
rowKeyType = StorageTypeEnum.BYTES;
} else {
StorageTypeEnum type = meta.getColNamePrefixType();
def = addRowKeyValidation(meta, def);
def = setColumnNameCompareType(meta, type, def);
if(type == StorageTypeEnum.STRING)
colType = ColumnType.COMPOSITE_STRINGPREFIX;
else if(type == StorageTypeEnum.INTEGER)
colType = ColumnType.COMPOSITE_INTEGERPREFIX;
else if(type == StorageTypeEnum.DECIMAL)
colType = ColumnType.COMPOSITE_DECIMALPREFIX;
}
if(meta.isTimeSeries()) {
//override for special case of time series data
def = def.setComparatorType("IntegerType");
}
addColumnFamily(def);
String virtual = meta.getColumnFamily();
String realCf = meta.getRealColumnFamily();