columnfamilyName,
CompressionParameters.SSTABLE_COMPRESSION, compressionClass,
CompressionParameters.CHUNK_LENGTH_KB, compressionChunkSizeKB,
cp});
} catch (ConfigurationException ce) {
throw new PermanentStorageException(ce);
}
} else {
cp = new CompressionParameters(null);
log.debug("Creating CF {}: setting {} to null to disable compression",
columnfamilyName, CompressionParameters.SSTABLE_COMPRESSION);
}
cfm.compressionParameters(cp);
try {
cfm.addDefaultIndexNames();
} catch (ConfigurationException e) {
throw new PermanentStorageException("Failed to create column family metadata for " + keyspaceName + ":" + columnfamilyName, e);
}
try {
MigrationManager.announceNewColumnFamily(cfm);
} catch (ConfigurationException e) {
throw new PermanentStorageException("Failed to create column family " + keyspaceName + ":" + columnfamilyName, e);
}
}