本文整理汇总了Java中org.apache.cassandra.utils.FBUtilities.getReleaseVersionString方法的典型用法代码示例。如果您正苦于以下问题:Java FBUtilities.getReleaseVersionString方法的具体用法?Java FBUtilities.getReleaseVersionString怎么用?Java FBUtilities.getReleaseVersionString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.utils.FBUtilities
的用法示例。
在下文中一共展示了FBUtilities.getReleaseVersionString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOlderVersionString
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
private String getOlderVersionString()
{
String version = FBUtilities.getReleaseVersionString();
CassandraVersion semver = new CassandraVersion(version.contains("-") ? version.substring(0, version.indexOf('-'))
: version);
return (String.format("%s.%s.%s", semver.major - 1, semver.minor, semver.patch));
}
示例2: getReleaseVersion
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
public String getReleaseVersion()
{
return FBUtilities.getReleaseVersionString();
}
示例3: releaseVersion
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
public VersionedValue releaseVersion()
{
return new VersionedValue(FBUtilities.getReleaseVersionString());
}
示例4: makeLog
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
public void makeLog() throws IOException, InterruptedException
{
CommitLog commitLog = CommitLog.instance;
System.out.format("\nUsing commit log size %dmb, compressor %s, sync %s%s\n",
mb(DatabaseDescriptor.getCommitLogSegmentSize()),
commitLog.configuration.getCompressorName(),
commitLog.executor.getClass().getSimpleName(),
randomSize ? " random size" : "");
final List<CommitlogExecutor> threads = new ArrayList<>();
ScheduledExecutorService scheduled = startThreads(commitLog, threads);
Thread.sleep(runTimeMs);
stop = true;
scheduled.shutdown();
scheduled.awaitTermination(2, TimeUnit.SECONDS);
int hash = 0;
int cells = 0;
for (CommitlogExecutor t : threads)
{
t.join();
hash += t.hash;
cells += t.cells;
}
commitLog.shutdownBlocking();
File dataDir = new File(CommitLogUpgradeTest.DATA_DIR + FBUtilities.getReleaseVersionString());
System.out.format("Data will be stored in %s\n", dataDir);
if (dataDir.exists())
FileUtils.deleteRecursive(dataDir);
dataDir.mkdirs();
for (File f : new File(DatabaseDescriptor.getCommitLogLocation()).listFiles())
FileUtils.createHardLink(f, new File(dataDir, f.getName()));
Properties prop = new Properties();
prop.setProperty(CFID_PROPERTY, Schema.instance.getId(KEYSPACE, TABLE).toString());
prop.setProperty(CELLS_PROPERTY, Integer.toString(cells));
prop.setProperty(HASH_PROPERTY, Integer.toString(hash));
prop.store(new FileOutputStream(new File(dataDir, PROPERTIES_FILE)),
"CommitLog upgrade test, version " + FBUtilities.getReleaseVersionString());
System.out.println("Done");
}