本文整理匯總了Java中org.apache.cassandra.exceptions.ConfigurationException.getMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java ConfigurationException.getMessage方法的具體用法?Java ConfigurationException.getMessage怎麽用?Java ConfigurationException.getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.cassandra.exceptions.ConfigurationException
的用法示例。
在下文中一共展示了ConfigurationException.getMessage方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: relocate
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void relocate(Collection<String> srcTokens) throws IOException
{
List<Token> tokens = new ArrayList<Token>(srcTokens.size());
try
{
for (String srcT : srcTokens)
{
getPartitioner().getTokenFactory().validate(srcT);
tokens.add(getPartitioner().getTokenFactory().fromString(srcT));
}
}
catch (ConfigurationException e)
{
throw new IOException(e.getMessage());
}
relocateTokens(tokens);
}
示例2: setCrcCheckChance
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void setCrcCheckChance(double crcCheckChance)
{
try
{
TableParams.builder().crcCheckChance(crcCheckChance).build().validate();
for (ColumnFamilyStore cfs : concatWithIndexes())
{
cfs.crcCheckChance.set(crcCheckChance);
for (SSTableReader sstable : cfs.getSSTables(SSTableSet.LIVE))
sstable.setCrcCheckChance(crcCheckChance);
}
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
}
示例3: setCompressionParameters
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void setCompressionParameters(Map<String,String> opts)
{
try
{
metadata.compression(CompressionParams.fromMap(opts));
metadata.params.compression.validate();
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
}
示例4: move
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void move(String newToken) throws IOException
{
try
{
getPartitioner().getTokenFactory().validate(newToken);
}
catch (ConfigurationException e)
{
throw new IOException(e.getMessage());
}
move(getPartitioner().getTokenFactory().fromString(newToken));
}
示例5: setCompactionStrategyClass
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void setCompactionStrategyClass(String compactionStrategyClass)
{
try
{
metadata.compactionStrategyClass = CFMetaData.createCompactionStrategy(compactionStrategyClass);
compactionStrategyWrapper.maybeReloadCompactionStrategy(metadata);
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
}
示例6: setCompressionParameters
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void setCompressionParameters(Map<String,String> opts)
{
try
{
metadata.compressionParameters = CompressionParameters.create(opts);
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
}
示例7: setCrcCheckChance
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void setCrcCheckChance(double crcCheckChance)
{
try
{
for (SSTableReader sstable : keyspace.getAllSSTables())
if (sstable.compression)
sstable.getCompressionMetadata().parameters.setCrcCheckChance(crcCheckChance);
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
}
示例8: updateSnitch
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void updateSnitch(String epSnitchClassName, Boolean dynamic, Integer dynamicUpdateInterval, Integer dynamicResetInterval, Double dynamicBadnessThreshold) throws ClassNotFoundException
{
IEndpointSnitch oldSnitch = DatabaseDescriptor.getEndpointSnitch();
// new snitch registers mbean during construction
IEndpointSnitch newSnitch;
try
{
newSnitch = FBUtilities.construct(epSnitchClassName, "snitch");
}
catch (ConfigurationException e)
{
throw new ClassNotFoundException(e.getMessage());
}
if (dynamic)
{
DatabaseDescriptor.setDynamicUpdateInterval(dynamicUpdateInterval);
DatabaseDescriptor.setDynamicResetInterval(dynamicResetInterval);
DatabaseDescriptor.setDynamicBadnessThreshold(dynamicBadnessThreshold);
newSnitch = new DynamicEndpointSnitch(newSnitch);
}
// point snitch references to the new instance
DatabaseDescriptor.setEndpointSnitch(newSnitch);
for (String ks : Schema.instance.getKeyspaces())
{
Keyspace.open(ks).getReplicationStrategy().snitch = newSnitch;
}
if (oldSnitch instanceof DynamicEndpointSnitch)
((DynamicEndpointSnitch)oldSnitch).unregisterMBean();
}
示例9: setCompactionStrategyClass
import org.apache.cassandra.exceptions.ConfigurationException; //導入方法依賴的package包/類
public void setCompactionStrategyClass(String compactionStrategyClass)
{
try
{
metadata.compactionStrategyClass = CFMetaData.createCompactionStrategy(compactionStrategyClass);
maybeReloadCompactionStrategy();
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
}