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


Java Component.PRIMARY_INDEX属性代码示例

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


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

示例1: testBackupAfterFlush

@Test
public void testBackupAfterFlush() throws Throwable
{
    ColumnFamilyStore cfs = Keyspace.open(KEYSPACE2).getColumnFamilyStore(CF_STANDARD1);
    new RowUpdateBuilder(cfs.metadata, 0, ByteBufferUtil.bytes("key1")).clustering("Column1").add("val", "asdf").build().applyUnsafe();
    cfs.forceBlockingFlush();
    new RowUpdateBuilder(cfs.metadata, 0, ByteBufferUtil.bytes("key2")).clustering("Column1").add("val", "asdf").build().applyUnsafe();
    cfs.forceBlockingFlush();

    for (int version = 1; version <= 2; ++version)
    {
        Descriptor existing = new Descriptor(cfs.getDirectories().getDirectoryForNewSSTables(), KEYSPACE2, CF_STANDARD1, version);
        Descriptor desc = new Descriptor(Directories.getBackupsDirectory(existing), KEYSPACE2, CF_STANDARD1, version);
        for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER, Component.STATS })
            assertTrue("Cannot find backed-up file:" + desc.filenameFor(c), new File(desc.filenameFor(c)).exists());
    }
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:17,代码来源:ColumnFamilyStoreTest.java

示例2: testBackupAfterFlush

@Test
public void testBackupAfterFlush() throws Throwable
{
    ColumnFamilyStore cfs = insertKey1Key2();

    for (int version = 1; version <= 2; ++version)
    {
        Descriptor existing = new Descriptor(cfs.directories.getDirectoryForNewSSTables(), "Keyspace2", "Standard1", version, Descriptor.Type.FINAL);
        Descriptor desc = new Descriptor(Directories.getBackupsDirectory(existing), "Keyspace2", "Standard1", version, Descriptor.Type.FINAL);
        for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER, Component.STATS })
            assertTrue("can not find backedup file:" + desc.filenameFor(c), new File(desc.filenameFor(c)).exists());
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:13,代码来源:ColumnFamilyStoreTest.java

示例3: createFakeSSTable

private static void createFakeSSTable(File dir, String cf, int gen, boolean temp, List<File> addTo) throws IOException
{
    Descriptor desc = new Descriptor(dir, KS, cf, gen, temp ? Descriptor.Type.TEMP : Descriptor.Type.FINAL);
    for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER })
    {
        File f = new File(desc.filenameFor(c));
        f.createNewFile();
        addTo.add(f);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:10,代码来源:DirectoriesTest.java

示例4: createFakeSSTable

private static void createFakeSSTable(File dir, String cf, int gen, boolean temp, List<File> addTo) throws IOException
{
    Descriptor desc = new Descriptor(dir, KS, cf, gen, temp);
    for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER })
    {
        File f = new File(desc.filenameFor(c));
        f.createNewFile();
        addTo.add(f);
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:10,代码来源:DirectoriesTest.java

示例5: createFakeSSTable

private static void createFakeSSTable(File dir, String cf, int gen, List<File> addTo) throws IOException
{
    Descriptor desc = new Descriptor(dir, KS, cf, gen);
    for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER })
    {
        File f = new File(desc.filenameFor(c));
        f.createNewFile();
        addTo.add(f);
    }
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:10,代码来源:DirectoriesTest.java

示例6: testBackupAfterFlush

@Test
public void testBackupAfterFlush() throws Throwable
{
    ColumnFamilyStore cfs = insertKey1Key2();

    for (int version = 1; version <= 2; ++version)
    {
        Descriptor existing = new Descriptor(cfs.directories.getDirectoryForNewSSTables(), KEYSPACE2, CF_STANDARD1, version, Descriptor.Type.FINAL);
        Descriptor desc = new Descriptor(Directories.getBackupsDirectory(existing), KEYSPACE2, CF_STANDARD1, version, Descriptor.Type.FINAL);
        for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER, Component.STATS })
            assertTrue("can not find backedup file:" + desc.filenameFor(c), new File(desc.filenameFor(c)).exists());
    }
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:13,代码来源:ColumnFamilyStoreTest.java

示例7: testBackupAfterFlush

@Test
public void testBackupAfterFlush() throws Throwable
{
    insertKey1Key2();

    File backupDir = new File(DatabaseDescriptor.getDataFileLocationForTable("Keyspace2", 0), "backups");

    for (int version = 1; version <= 2; ++version)
    {
        Descriptor desc = new Descriptor(backupDir, "Keyspace2", "Standard1", version, false);
        for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER, Component.STATS })
            assertTrue("can not find backedup file:" + desc.filenameFor(c), new File(desc.filenameFor(c)).exists());
    }
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:14,代码来源:ColumnFamilyStoreTest.java


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