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


Java SystemKeyspace.clearSSTableReadMeter方法代码示例

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


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

示例1: run

import org.apache.cassandra.db.SystemKeyspace; //导入方法依赖的package包/类
public void run()
{
    if (tracker != null)
        tracker.notifyDeleting(referent);

    if (referent.readMeter != null)
        SystemKeyspace.clearSSTableReadMeter(referent.getKeyspaceName(), referent.getColumnFamilyName(), referent.descriptor.generation);

    // If we can't successfully delete the DATA component, set the task to be retried later: see above
    File datafile = new File(desc.filenameFor(Component.DATA));
    if (!datafile.delete())
    {
        logger.error("Unable to delete " + datafile + " (it will be removed on server restart; we'll also retry after GC)");
        failedTasks.add(this);
        return;
    }
    // let the remainder be cleaned up by delete
    SSTable.delete(desc, Sets.difference(components, Collections.singleton(Component.DATA)));
    if (tracker != null)
        tracker.spaceReclaimed(size);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:22,代码来源:SSTableDeletingTask.java

示例2: run

import org.apache.cassandra.db.SystemKeyspace; //导入方法依赖的package包/类
public void run()
{
    SystemKeyspace.clearSSTableReadMeter(desc.ksname, desc.cfname, desc.generation);

    try
    {
        // If we can't successfully delete the DATA component, set the task to be retried later: see TransactionTidier
        File datafile = new File(desc.filenameFor(Component.DATA));

        delete(datafile);
        // let the remainder be cleaned up by delete
        SSTable.delete(desc, SSTable.discoverComponentsFor(desc));
    }
    catch (Throwable t)
    {
        logger.error("Failed deletion for {}, we'll retry after GC and on server restart", desc);
        failedDeletions.add(this);
        return;
    }

    if (tracker != null && tracker.cfstore != null && !wasNew)
        tracker.cfstore.metric.totalDiskSpaceUsed.dec(sizeOnDisk);

    // release the referent to the parent so that the all transaction files can be released
    parentRef.release();
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:27,代码来源:LogTransaction.java

示例3: run

import org.apache.cassandra.db.SystemKeyspace; //导入方法依赖的package包/类
public void run()
{
    if (tracker != null)
        tracker.notifyDeleting(referent);

    if (referent.readMeter != null)
        SystemKeyspace.clearSSTableReadMeter(referent.getKeyspaceName(), referent.getColumnFamilyName(), referent.descriptor.generation);

    // If we can't successfully delete the DATA component, set the task to be retried later: see above
    File datafile = new File(desc.filenameFor(Component.DATA));
    if (!datafile.delete())
    {
        logger.error("Unable to delete {} (it will be removed on server restart; we'll also retry after GC)", datafile);
        failedTasks.add(this);
        return;
    }
    // let the remainder be cleaned up by delete
    SSTable.delete(desc, Sets.difference(components, Collections.singleton(Component.DATA)));
    if (tracker != null)
        tracker.spaceReclaimed(size);
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:22,代码来源:SSTableDeletingTask.java

示例4: tidy

import org.apache.cassandra.db.SystemKeyspace; //导入方法依赖的package包/类
public void tidy()
{
    lookup.remove(desc);
    if (readMeterSyncFuture != null)
        readMeterSyncFuture.cancel(true);
    if (isCompacted.get())
        SystemKeyspace.clearSSTableReadMeter(desc.ksname, desc.cfname, desc.generation);
    // don't ideally want to dropPageCache for the file until all instances have been released
    CLibrary.trySkipCache(desc.filenameFor(Component.DATA), 0, 0);
    CLibrary.trySkipCache(desc.filenameFor(Component.PRIMARY_INDEX), 0, 0);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:12,代码来源:SSTableReader.java


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