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


Java SchemaLoader.loadSchema方法代码示例

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


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

示例1: initialize

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
static public void initialize() throws IOException
{
    try (FileInputStream fis = new FileInputStream("CHANGES.txt"))
    {
        dataSource = ByteBuffer.allocateDirect((int) fis.getChannel().size());
        while (dataSource.hasRemaining())
        {
            fis.getChannel().read(dataSource);
        }
        dataSource.flip();
    }

    SchemaLoader.loadSchema();
    SchemaLoader.schemaDefinition(""); // leave def. blank to maintain old behaviour
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:17,代码来源:CommitLogStressTest.java

示例2: defineSchema

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void defineSchema() throws ConfigurationException
{
    CompressionParams compressionParameters = CompressionParams.snappy(32768);

    SchemaLoader.loadSchema();
    SchemaLoader.createKeyspace(KEYSPACE,
                                KeyspaceParams.simple(1),
                                SchemaLoader.standardCFMD(KEYSPACE, CF).compression(compressionParameters),
                                SchemaLoader.standardCFMD(KEYSPACE, CF2).compression(compressionParameters),
                                SchemaLoader.standardCFMD(KEYSPACE, CF3),
                                SchemaLoader.standardCFMD(KEYSPACE, CF4),
                                SchemaLoader.standardCFMD(KEYSPACE, CORRUPT_CF),
                                SchemaLoader.standardCFMD(KEYSPACE, CORRUPT_CF2),
                                SchemaLoader.counterCFMD(KEYSPACE, COUNTER_CF).compression(compressionParameters),
                                SchemaLoader.counterCFMD(KEYSPACE, COUNTER_CF2).compression(compressionParameters),
                                SchemaLoader.counterCFMD(KEYSPACE, COUNTER_CF3),
                                SchemaLoader.counterCFMD(KEYSPACE, COUNTER_CF4),
                                SchemaLoader.counterCFMD(KEYSPACE, CORRUPTCOUNTER_CF),
                                SchemaLoader.counterCFMD(KEYSPACE, CORRUPTCOUNTER_CF2),
                                SchemaLoader.standardCFMD(KEYSPACE, CF_UUID, 0, UUIDType.instance));
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:23,代码来源:VerifyTest.java

示例3: setUp

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setUp() throws Exception
{
    oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
    SchemaLoader.loadSchema();
    vvFactory = new VersionedValue.VersionedValueFactory(partitioner);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:8,代码来源:RelocateTest.java

示例4: setup

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws ConfigurationException
{
    oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
    SchemaLoader.loadSchema();
    SchemaLoader.schemaDefinition("MoveTest");
    addNetworkTopologyKeyspace(Network_11_KeyspaceName, 1, 1);
    addNetworkTopologyKeyspace(Network_22_KeyspaceName, 2, 2);
    addNetworkTopologyKeyspace(Network_33_KeyspaceName, 3, 3);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:11,代码来源:MoveTest.java

示例5: defineSchema

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void defineSchema() throws Exception
{
    partitionerSwitcher = Util.switchPartitioner(partitioner);
    SchemaLoader.loadSchema();
    SchemaLoader.schemaDefinition("LeaveAndBootstrapTest");
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:8,代码来源:LeaveAndBootstrapTest.java

示例6: initialize

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
static public void initialize() throws IOException, ConfigurationException
{
    try (FileInputStream fis = new FileInputStream("CHANGES.txt"))
    {
        dataSource = ByteBuffer.allocateDirect((int) fis.getChannel().size());
        while (dataSource.hasRemaining())
        {
            fis.getChannel().read(dataSource);
        }
        dataSource.flip();
    }

    SchemaLoader.loadSchema();
    SchemaLoader.schemaDefinition("");
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:16,代码来源:CommitLogUpgradeTestMaker.java

示例7: initialize

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
static public void initialize() throws FileNotFoundException, IOException, InterruptedException
{
    CFMetaData metadata = CFMetaData.Builder.createDense(KEYSPACE, TABLE, false, false)
                                            .addPartitionKey("key", AsciiType.instance)
                                            .addClusteringColumn("col", AsciiType.instance)
                                            .addRegularColumn("val", BytesType.instance)
                                            .build()
                                            .compression(SchemaLoader.getCompressionParameters());
    SchemaLoader.loadSchema();
    SchemaLoader.createKeyspace(KEYSPACE,
                                KeyspaceParams.simple(1),
                                metadata);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:15,代码来源:CommitLogUpgradeTest.java

示例8: setUpClass

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws Throwable
{
    SchemaLoader.loadSchema();
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:6,代码来源:PaxosStateTest.java

示例9: setupClass

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setupClass() throws ConfigurationException
{
    oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
    SchemaLoader.loadSchema();
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:7,代码来源:RemoveTest.java

示例10: setup

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws ConfigurationException
{
    oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
    SchemaLoader.loadSchema();
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:7,代码来源:MoveTest.java

示例11: setupClass

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setupClass() throws IOException, ConfigurationException
{
    oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
    SchemaLoader.loadSchema();
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:7,代码来源:RemoveTest.java

示例12: setup

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws IOException, ConfigurationException
{
    oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
    SchemaLoader.loadSchema();
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:7,代码来源:MoveTest.java

示例13: setUpClass

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws Throwable
{
    SchemaLoader.loadSchema();
    SchemaLoader.schemaDefinition("PaxosStateTest");
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:7,代码来源:PaxosStateTest.java

示例14: beforeTest

import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void beforeTest() throws ConfigurationException
{
    SchemaLoader.loadSchema();
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:6,代码来源:TriggersTest.java


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