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


Java FBUtilities.getReleaseVersionString方法代码示例

本文整理汇总了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));
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:8,代码来源:SystemKeyspaceTest.java

示例2: getReleaseVersion

import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
public String getReleaseVersion()
{
    return FBUtilities.getReleaseVersionString();
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:StorageService.java

示例3: releaseVersion

import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
public VersionedValue releaseVersion()
{
    return new VersionedValue(FBUtilities.getReleaseVersionString());
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:VersionedValue.java

示例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");
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:44,代码来源:CommitLogUpgradeTestMaker.java


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