me.prettyprint.cassandra.model.BasicColumnFamilyDefinition Java Examples

The following examples show how to use me.prettyprint.cassandra.model.BasicColumnFamilyDefinition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Cassandra12xTripleIndexDAO.java    From cumulusrdf with Apache License 2.0 5 votes vote down vote up
/**
 * Creates SPO? column family.
 * 
 * @param cfName the column family name.
 * @return the SPO? column family definition.
 */
protected ColumnFamilyDefinition createCF_SP_Ox(final String cfName) {
	final BasicColumnFamilyDefinition cfdef = new BasicColumnFamilyDefinition();
	cfdef.setKeyspaceName(_dataAccessLayerFactory.getKeyspaceName()); 
	cfdef.setName(cfName);
	cfdef.setColumnType(ColumnType.STANDARD);
	cfdef.setComparatorType(ComparatorType.getByClassName("org.apache.cassandra.db.marshal.DoubleType"));
	cfdef.setCompactionStrategy("LeveledCompactionStrategy");

	cfdef.setKeyValidationClass(ComparatorType.BYTESTYPE.getClassName());
	cfdef.setDefaultValidationClass(ComparatorType.BYTESTYPE.getClassName());

	cfdef.setCompressionOptions(_compressionOptions);
	return new ThriftCfDef(cfdef);
}