本文整理汇总了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
}
示例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));
}
示例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);
}
示例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);
}
示例5: defineSchema
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void defineSchema() throws Exception
{
partitionerSwitcher = Util.switchPartitioner(partitioner);
SchemaLoader.loadSchema();
SchemaLoader.schemaDefinition("LeaveAndBootstrapTest");
}
示例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("");
}
示例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);
}
示例8: setUpClass
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws Throwable
{
SchemaLoader.loadSchema();
}
示例9: setupClass
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setupClass() throws ConfigurationException
{
oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
SchemaLoader.loadSchema();
}
示例10: setup
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws ConfigurationException
{
oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
SchemaLoader.loadSchema();
}
示例11: setupClass
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setupClass() throws IOException, ConfigurationException
{
oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
SchemaLoader.loadSchema();
}
示例12: setup
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setup() throws IOException, ConfigurationException
{
oldPartitioner = StorageService.instance.setPartitionerUnsafe(partitioner);
SchemaLoader.loadSchema();
}
示例13: setUpClass
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws Throwable
{
SchemaLoader.loadSchema();
SchemaLoader.schemaDefinition("PaxosStateTest");
}
示例14: beforeTest
import org.apache.cassandra.SchemaLoader; //导入方法依赖的package包/类
@BeforeClass
public static void beforeTest() throws ConfigurationException
{
SchemaLoader.loadSchema();
}