本文整理汇总了Java中org.apache.cassandra.db.marshal.AsciiType.instance方法的典型用法代码示例。如果您正苦于以下问题:Java AsciiType.instance方法的具体用法?Java AsciiType.instance怎么用?Java AsciiType.instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.db.marshal.AsciiType
的用法示例。
在下文中一共展示了AsciiType.instance方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEmptyVariableLengthTypes
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
@Test
public void testEmptyVariableLengthTypes()
{
AbstractType<?>[] types = new AbstractType<?>[]{
AsciiType.instance,
BytesType.instance,
UTF8Type.instance,
new UFTestCustomType()
};
for (AbstractType<?> type : types)
{
Assert.assertFalse("type " + type.getClass().getName(),
UDHelper.isNullOrEmpty(type, ByteBufferUtil.EMPTY_BYTE_BUFFER));
}
}
示例2: init
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
/**
* Initialization. Creates target directory if needed and establishes
* the writer
*
* @throws Exception if a problem occurs
*/
public void init() throws Exception {
File directory = new File(this.directory);
if (!directory.exists()) {
directory.mkdir();
}
try {
//TODO set parameter for null
writer = new SSTableSimpleUnsortedWriter(directory, null, keyspace,
columnFamily, AsciiType.instance, null, bufferSize);
} catch (Throwable t) {
throw new KettleException(
"Failed to create SSTableSimpleUnsortedWriter", t);
}
}
示例3: testDiffSuperColumn
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
@Test
public void testDiffSuperColumn()
{
SuperColumn sc1 = new SuperColumn(ByteBufferUtil.bytes("one"), AsciiType.instance);
sc1.addColumn(column("subcolumn", "A", 0));
SuperColumn sc2 = new SuperColumn(ByteBufferUtil.bytes("one"), AsciiType.instance);
DeletionInfo delInfo = new DeletionInfo(0, 0);
sc2.delete(delInfo);
SuperColumn scDiff = (SuperColumn)sc1.diff(sc2);
assertEquals(scDiff.getSubColumns().size(), 0);
assertEquals(scDiff.deletionInfo(), delInfo);
}
示例4: GeoShapeMapper
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
/**
* Builds a new {@link GeoShapeMapper}.
*/
@JsonCreator
public GeoShapeMapper(@JsonProperty("max_levels") Integer maxLevels) {
super(new AbstractType<?>[]{AsciiType.instance, UTF8Type.instance});
this.maxLevels = maxLevels == null ? DEFAULT_MAX_LEVELS : maxLevels;
this.grid = new GeohashPrefixTree(spatialContext, this.maxLevels);
}
示例5: testDiffSuperColumn
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
@Test
public void testDiffSuperColumn()
{
SuperColumn sc1 = new SuperColumn(ByteBufferUtil.bytes("one"), AsciiType.instance);
sc1.addColumn(column("subcolumn", "A", 0));
SuperColumn sc2 = new SuperColumn(ByteBufferUtil.bytes("one"), AsciiType.instance);
sc2.markForDeleteAt(0, 0);
SuperColumn scDiff = (SuperColumn)sc1.diff(sc2);
assertEquals(scDiff.getSubColumns().size(), 0);
assertEquals(scDiff.getMarkedForDeleteAt(), 0);
}
示例6: ColumnMapperBlob
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
/**
* Builds a new {@link ColumnMapperBlob}.
*/
@JsonCreator
public ColumnMapperBlob() {
super(new AbstractType<?>[]{AsciiType.instance, UTF8Type.instance, BytesType.instance}, new AbstractType[]{});
}
示例7: ColumnMapperInet
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
/**
* Builds a new {@link ColumnMapperInet}.
*/
@JsonCreator
public ColumnMapperInet() {
super(new AbstractType<?>[]{AsciiType.instance, UTF8Type.instance, InetAddressType.instance},
new AbstractType[]{});
}
示例8: ColumnMapperBoolean
import org.apache.cassandra.db.marshal.AsciiType; //导入方法依赖的package包/类
/**
* Builds a new {@link ColumnMapperBlob}.
*/
@JsonCreator
public ColumnMapperBoolean() {
super(new AbstractType<?>[]{AsciiType.instance, UTF8Type.instance, BooleanType.instance}, new AbstractType[]{});
}