本文整理汇总了Java中org.apache.cassandra.utils.FBUtilities.construct方法的典型用法代码示例。如果您正苦于以下问题:Java FBUtilities.construct方法的具体用法?Java FBUtilities.construct怎么用?Java FBUtilities.construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.utils.FBUtilities
的用法示例。
在下文中一共展示了FBUtilities.construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadConfig
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
@VisibleForTesting
public static Config loadConfig() throws ConfigurationException
{
String loaderClass = System.getProperty("cassandra.config.loader");
ConfigurationLoader loader = loaderClass == null
? new YamlConfigurationLoader()
: FBUtilities.<ConfigurationLoader>construct(loaderClass, "configuration loading");
Config config = loader.loadConfig();
if (!hasLoggedConfig)
{
hasLoggedConfig = true;
Config.log(config);
}
return config;
}
示例2: getInputFormat
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
@Override
public InputFormat getInputFormat() throws IOException
{
try
{
return FBUtilities.construct(inputFormatClass, "inputformat");
}
catch (ConfigurationException e)
{
throw new IOException(e);
}
}
示例3: getOutputFormat
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
/** output format */
public OutputFormat getOutputFormat() throws IOException
{
try
{
return FBUtilities.construct(outputFormatClass, "outputformat");
}
catch (ConfigurationException e)
{
throw new IOException(e);
}
}
示例4: loadConfig
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
@VisibleForTesting
public static Config loadConfig() throws ConfigurationException
{
String loaderClass = System.getProperty("cassandra.config.loader");
ConfigurationLoader loader = loaderClass == null
? new YamlConfigurationLoader()
: FBUtilities.<ConfigurationLoader>construct(loaderClass, "configuration loading");
return loader.loadConfig();
}
示例5: createEndpointSnitch
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
private static IEndpointSnitch createEndpointSnitch(String snitchClassName) throws ConfigurationException
{
if (!snitchClassName.contains("."))
snitchClassName = "org.apache.cassandra.locator." + snitchClassName;
IEndpointSnitch snitch = FBUtilities.construct(snitchClassName, "snitch");
return conf.dynamic_snitch ? new DynamicEndpointSnitch(snitch) : snitch;
}
示例6: loadConfig
import org.apache.cassandra.utils.FBUtilities; //导入方法依赖的package包/类
@VisibleForTesting
static Config loadConfig() throws ConfigurationException
{
String loaderClass = System.getProperty("cassandra.config.loader");
ConfigurationLoader loader = loaderClass == null
? new YamlConfigurationLoader()
: FBUtilities.<ConfigurationLoader>construct(loaderClass, "configuration loading");
return loader.loadConfig();
}