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


Java Directories.SECONDARY_INDEX_NAME_SEPARATOR属性代码示例

本文整理汇总了Java中org.apache.cassandra.db.Directories.SECONDARY_INDEX_NAME_SEPARATOR属性的典型用法代码示例。如果您正苦于以下问题:Java Directories.SECONDARY_INDEX_NAME_SEPARATOR属性的具体用法?Java Directories.SECONDARY_INDEX_NAME_SEPARATOR怎么用?Java Directories.SECONDARY_INDEX_NAME_SEPARATOR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.cassandra.db.Directories的用法示例。


在下文中一共展示了Directories.SECONDARY_INDEX_NAME_SEPARATOR属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFromFilenameFor

private void testFromFilenameFor(File dir)
{
    // normal
    checkFromFilename(new Descriptor(dir, ksname, cfname, 1), false);
    // skip component (for streaming lock file)
    checkFromFilename(new Descriptor(dir, ksname, cfname, 2), true);

    // secondary index
    String idxName = "myidx";
    File idxDir = new File(dir.getAbsolutePath() + File.separator + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName);
    checkFromFilename(new Descriptor(idxDir, ksname, cfname + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName, 4), false);

    // legacy version
    checkFromFilename(new Descriptor("ja", dir, ksname, cfname, 1, SSTableFormat.Type.LEGACY), false);
    // legacy secondary index
    checkFromFilename(new Descriptor("ja", dir, ksname, cfname + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName, 3, SSTableFormat.Type.LEGACY), false);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:17,代码来源:DescriptorTest.java

示例2: testFromFilenameFor

private void testFromFilenameFor(File dir)
{
    // normal
    checkFromFilename(new Descriptor(dir, ksname, cfname, 1, Descriptor.Type.FINAL), false);
    // skip component (for streaming lock file)
    checkFromFilename(new Descriptor(dir, ksname, cfname, 2, Descriptor.Type.FINAL), true);
    // tmp
    checkFromFilename(new Descriptor(dir, ksname, cfname, 3, Descriptor.Type.TEMP), false);
    // secondary index
    String idxName = "myidx";
    File idxDir = new File(dir.getAbsolutePath() + File.separator + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName);
    checkFromFilename(new Descriptor(idxDir, ksname, cfname + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName, 4, Descriptor.Type.FINAL), false);
    // secondary index tmp
    checkFromFilename(new Descriptor(idxDir, ksname, cfname + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName, 5, Descriptor.Type.TEMP), false);

    // legacy version
    checkFromFilename(new Descriptor("ja", dir, ksname, cfname, 1, Descriptor.Type.FINAL), false);
    // legacy tmp
    checkFromFilename(new Descriptor("ja", dir, ksname, cfname, 2, Descriptor.Type.TEMP), false);
    // legacy secondary index
    checkFromFilename(new Descriptor("ja", dir, ksname, cfname + Directories.SECONDARY_INDEX_NAME_SEPARATOR + idxName, 3, Descriptor.Type.FINAL), false);
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:22,代码来源:DescriptorTest.java

示例3: indexColumnFamilyName

/**
 * generate a column family name for an index corresponding to the given column.
 * This is NOT the same as the index's name! This is only used in sstable filenames and is not exposed to users.
 *
 * @param info A definition of the column with index
 *
 * @return name of the index ColumnFamily
 */
public String indexColumnFamilyName(ColumnDefinition info)
{
    // TODO simplify this when info.index_name is guaranteed to be set
    return cfName + Directories.SECONDARY_INDEX_NAME_SEPARATOR + (info.getIndexName() == null ? ByteBufferUtil.bytesToHex(info.name.bytes) : info.getIndexName());
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:13,代码来源:CFMetaData.java


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