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


Java MigrationManager.announceKeyspaceDrop方法代码示例

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


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

示例1: system_drop_keyspace

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public String system_drop_keyspace(String keyspace)
throws InvalidRequestException, SchemaDisagreementException, TException
{
    logger.debug("drop_keyspace");

    try
    {
        ThriftValidation.validateKeyspaceNotSystem(keyspace);
        state().hasKeyspaceAccess(keyspace, Permission.DROP);

        MigrationManager.announceKeyspaceDrop(keyspace);
        return Schema.instance.getVersion().toString();
    }
    catch (RequestValidationException e)
    {
        throw ThriftConversion.toThrift(e);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:19,代码来源:CassandraServer.java

示例2: dropKSUnflushed

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
@Test
public void dropKSUnflushed() throws ConfigurationException
{
    // sanity
    final KeyspaceMetadata ks = Schema.instance.getKSMetaData(KEYSPACE3);
    assertNotNull(ks);
    final CFMetaData cfm = ks.tables.getNullable(TABLE1);
    assertNotNull(cfm);

    // write some data
    for (int i = 0; i < 100; i++)
        QueryProcessor.executeInternal(String.format("INSERT INTO %s.%s (key, name, val) VALUES (?, ?, ?)",
                                                     KEYSPACE3, TABLE1),
                                       "dropKs", "col" + i, "anyvalue");

    MigrationManager.announceKeyspaceDrop(ks.name);

    assertNull(Schema.instance.getKSMetaData(ks.name));
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:20,代码来源:DefsTest.java

示例3: dropKSUnflushed

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
@Test
public void dropKSUnflushed() throws ConfigurationException
{
    DecoratedKey dk = Util.dk("dropKs");
    // sanity
    final KSMetaData ks = Schema.instance.getKSMetaData(KEYSPACE3);
    Assert.assertNotNull(ks);
    final CFMetaData cfm = ks.cfMetaData().get("Standard1");
    Assert.assertNotNull(cfm);

    // write some data
    Mutation rm = new Mutation(ks.name, dk.getKey());
    for (int i = 0; i < 100; i++)
        rm.add(cfm.cfName, cellname("col" + i), ByteBufferUtil.bytes("anyvalue"), 1L);
    rm.applyUnsafe();

    MigrationManager.announceKeyspaceDrop(ks.name);

    Assert.assertNull(Schema.instance.getKSMetaData(ks.name));
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:21,代码来源:DefsTest.java

示例4: system_drop_keyspace

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public String system_drop_keyspace(String keyspace)
 throws InvalidRequestException, SchemaDisagreementException, TException
 {
     logger.debug("drop_keyspace");

     try
     {
keyspace = state().resolveKeyspace(keyspace);
         ThriftValidation.validateKeyspaceNotSystem(keyspace);
         state().hasKeyspaceAccess(keyspace, Permission.DROP);

         MigrationManager.announceKeyspaceDrop(keyspace);
         return Schema.instance.getVersion().toString();
     }
     catch (RequestValidationException e)
     {
         throw ThriftConversion.toThrift(e);
     }
 }
 
开发者ID:wso2,项目名称:wso2-cassandra,代码行数:20,代码来源:CassandraServer.java

示例5: dropKSUnflushed

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
@Test
public void dropKSUnflushed() throws ConfigurationException
{
    DecoratedKey dk = Util.dk("dropKs");
    // sanity
    final KSMetaData ks = Schema.instance.getKSMetaData("Keyspace3");
    Assert.assertNotNull(ks);
    final CFMetaData cfm = ks.cfMetaData().get("Standard1");
    Assert.assertNotNull(cfm);

    // write some data
    Mutation rm = new Mutation(ks.name, dk.key);
    for (int i = 0; i < 100; i++)
        rm.add(cfm.cfName, cellname("col" + i), ByteBufferUtil.bytes("anyvalue"), 1L);
    rm.apply();

    MigrationManager.announceKeyspaceDrop(ks.name);

    Assert.assertNull(Schema.instance.getKSMetaData(ks.name));
}
 
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:21,代码来源:DefsTest.java

示例6: announceMigration

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public boolean announceMigration(boolean isLocalOnly) throws ConfigurationException
{
    try
    {
        MigrationManager.announceKeyspaceDrop(keyspace, isLocalOnly);
        return true;
    }
    catch(ConfigurationException e)
    {
        if (ifExists)
            return false;
        throw e;
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:15,代码来源:DropKeyspaceStatement.java

示例7: announceMigration

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public void announceMigration() throws ConfigurationException
{
    try
    {
        MigrationManager.announceKeyspaceDrop(keyspace);
    }
    catch(ConfigurationException e)
    {
        if (!ifExists)
            throw e;
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:13,代码来源:DropKeyspaceStatement.java

示例8: announceMigration

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public Event.SchemaChange announceMigration(boolean isLocalOnly) throws ConfigurationException
{
    try
    {
        MigrationManager.announceKeyspaceDrop(keyspace, isLocalOnly);
        return new Event.SchemaChange(Event.SchemaChange.Change.DROPPED, keyspace());
    }
    catch(ConfigurationException e)
    {
        if (ifExists)
            return null;
        throw e;
    }
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:15,代码来源:DropKeyspaceStatement.java

示例9: announceMigration

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public void announceMigration() throws ConfigurationException
{
    MigrationManager.announceKeyspaceDrop(keyspace, clientState);
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:5,代码来源:DropKeyspaceStatement.java

示例10: announceMigration

import org.apache.cassandra.service.MigrationManager; //导入方法依赖的package包/类
public void announceMigration() throws ConfigurationException
{
    MigrationManager.announceKeyspaceDrop(keyspace);
}
 
开发者ID:wso2,项目名称:wso2-cassandra,代码行数:5,代码来源:DropKeyspaceStatement.java


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