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


Java SSTable.delete方法代码示例

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


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

示例1: cleanup

import org.apache.cassandra.io.sstable.SSTable; //导入方法依赖的package包/类
public void cleanup()
{
    List<String> files = readLockfile(lockfile);
    for (String file : files)
    {
        try
        {
            Descriptor desc = Descriptor.fromFilename(file, true);
            SSTable.delete(desc, SSTable.componentsFor(desc));
        }
        catch (Exception e)
        {
            JVMStabilityInspector.inspectThrowable(e);
            logger.warn("failed to delete a potentially stale sstable {}", file);
        }
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:18,代码来源:StreamLockfile.java

示例2: run

import org.apache.cassandra.io.sstable.SSTable; //导入方法依赖的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: cleanup

import org.apache.cassandra.io.sstable.SSTable; //导入方法依赖的package包/类
public void cleanup()
{
    List<String> files = readLockfile(lockfile);
    for (String file : files)
    {
        try
        {
            Descriptor desc = Descriptor.fromFilename(file, true);
            SSTable.delete(desc, SSTable.componentsFor(desc));
        }
        catch (Exception e)
        {
            logger.warn("failed to delete a potentially stale sstable {}", file);
        }
    }
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:17,代码来源:StreamLockfile.java

示例4: run

import org.apache.cassandra.io.sstable.SSTable; //导入方法依赖的package包/类
public void run()
{
    logger.info("SSTableTidier is running..");
    //if (tracker != null && !tracker.isDummy())
    //    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));

        if (datafile.exists())
            delete(datafile);
        else if (!wasNew)
            logger.error("SSTableTidier ran with no existing data file for an sstable that was not new");

        // 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:Netflix,项目名称:sstable-adaptor,代码行数:33,代码来源:LogTransaction.java


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