本文整理汇总了Java中org.apache.cassandra.db.compaction.LeveledCompactionStrategy类的典型用法代码示例。如果您正苦于以下问题:Java LeveledCompactionStrategy类的具体用法?Java LeveledCompactionStrategy怎么用?Java LeveledCompactionStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LeveledCompactionStrategy类属于org.apache.cassandra.db.compaction包,在下文中一共展示了LeveledCompactionStrategy类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: snapshotWithoutFlush
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
public void snapshotWithoutFlush(String snapshotName)
{
for (ColumnFamilyStore cfs : concatWithIndexes())
{
DataTracker.View currentView = cfs.markCurrentViewReferenced();
try
{
for (SSTableReader ssTable : currentView.sstables)
{
File snapshotDirectory = Directories.getSnapshotDirectory(ssTable.descriptor, snapshotName);
ssTable.createLinks(snapshotDirectory.getPath()); // hard links
if (logger.isDebugEnabled())
logger.debug("Snapshot for " + table + " keyspace data file " + ssTable.getFilename() +
" created in " + snapshotDirectory);
}
if (cfs.compactionStrategy instanceof LeveledCompactionStrategy)
cfs.directories.snapshotLeveledManifest(snapshotName);
}
finally
{
SSTableReader.releaseReferences(currentView.sstables);
}
}
}
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:27,代码来源:ColumnFamilyStore.java
示例2: checkManifest
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
private static void checkManifest(AbstractCompactionStrategy strategy, ColumnFamilyStore cfs, Collection<SSTableReader> sstables)
{
WrappingCompactionStrategy wrappingStrategy = (WrappingCompactionStrategy)strategy;
int maxSizeInMB = (int)((cfs.getCompactionStrategy().getMaxSSTableBytes()) / (1024L * 1024L));
if (wrappingStrategy.getWrappedStrategies().size() == 2 && wrappingStrategy.getWrappedStrategies().iterator().next() instanceof LeveledCompactionStrategy)
{
System.out.println("Checking leveled manifest");
Predicate<SSTableReader> repairedPredicate = new Predicate<SSTableReader>()
{
@Override
public boolean apply(SSTableReader sstable)
{
return sstable.isRepaired();
}
};
List<SSTableReader> repaired = Lists.newArrayList(Iterables.filter(sstables, repairedPredicate));
List<SSTableReader> unRepaired = Lists.newArrayList(Iterables.filter(sstables, Predicates.not(repairedPredicate)));
LeveledManifest repairedManifest = LeveledManifest.create(cfs, maxSizeInMB, repaired);
for (int i = 1; i < repairedManifest.getLevelCount(); i++)
{
repairedManifest.repairOverlappingSSTables(i);
}
LeveledManifest unRepairedManifest = LeveledManifest.create(cfs, maxSizeInMB, unRepaired);
for (int i = 1; i < unRepairedManifest.getLevelCount(); i++)
{
unRepairedManifest.repairOverlappingSSTables(i);
}
}
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:32,代码来源:StandaloneScrubber.java
示例3: getBloomFilterFpChance
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
public double getBloomFilterFpChance()
{
// we disallow bFFPC==null starting in 1.2.1 but tolerated it before that
return (bloomFilterFpChance == null || bloomFilterFpChance == 0)
? compactionStrategyClass == LeveledCompactionStrategy.class ? 0.1 : 0.01
: bloomFilterFpChance;
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:8,代码来源:CFMetaData.java
示例4: lcs
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
public static CompactionParams lcs(Map<String, String> options)
{
return create(LeveledCompactionStrategy.class, options);
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:5,代码来源:CompactionParams.java
示例5: defaultBloomFilterFbChance
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
double defaultBloomFilterFbChance()
{
return klass.equals(LeveledCompactionStrategy.class) ? 0.1 : 0.01;
}
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:5,代码来源:CompactionParams.java
示例6: getUnleveledSSTables
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
public int getUnleveledSSTables()
{
return this.compactionStrategy instanceof LeveledCompactionStrategy
? ((LeveledCompactionStrategy) this.compactionStrategy).getLevelSize(0)
: 0;
}
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:7,代码来源:ColumnFamilyStore.java
示例7: getSSTableCountPerLevel
import org.apache.cassandra.db.compaction.LeveledCompactionStrategy; //导入依赖的package包/类
public int[] getSSTableCountPerLevel()
{
return compactionStrategy instanceof LeveledCompactionStrategy
? ((LeveledCompactionStrategy) compactionStrategy).getAllLevelSize()
: null;
}
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:7,代码来源:ColumnFamilyStore.java
注:本文中的org.apache.cassandra.db.compaction.LeveledCompactionStrategy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论