当前位置: 首页>>代码示例>>Java>>正文


Java AsciiType.instance方法代码示例

本文整理汇总了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));
    }
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:17,代码来源:UDHelperTest.java

示例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);
  }
}
 
开发者ID:javachen,项目名称:learning-hadoop,代码行数:22,代码来源:SSTableWriter.java

示例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);
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:15,代码来源:RowTest.java

示例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);
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:10,代码来源:GeoShapeMapper.java

示例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);
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:14,代码来源:RowTest.java

示例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[]{});
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:8,代码来源:ColumnMapperBlob.java

示例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[]{});
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:9,代码来源:ColumnMapperInet.java

示例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[]{});
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:8,代码来源:ColumnMapperBoolean.java


注:本文中的org.apache.cassandra.db.marshal.AsciiType.instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。