當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfigurationException.getMessage方法代碼示例

本文整理匯總了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);
}
 
開發者ID:pgaref,項目名稱:ACaZoo,代碼行數:18,代碼來源:StorageService.java

示例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());
    }
}
 
開發者ID:scylladb,項目名稱:scylla-tools-java,代碼行數:18,代碼來源:ColumnFamilyStore.java

示例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());
    }
}
 
開發者ID:Netflix,項目名稱:sstable-adaptor,代碼行數:13,代碼來源:ColumnFamilyStore.java

示例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));
}
 
開發者ID:vcostet,項目名稱:cassandra-kmean,代碼行數:13,代碼來源:StorageService.java

示例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());
    }
}
 
開發者ID:vcostet,項目名稱:cassandra-kmean,代碼行數:13,代碼來源:ColumnFamilyStore.java

示例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());
    }
}
 
開發者ID:vcostet,項目名稱:cassandra-kmean,代碼行數:12,代碼來源:ColumnFamilyStore.java

示例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());
    }
}
 
開發者ID:vcostet,項目名稱:cassandra-kmean,代碼行數:14,代碼來源:ColumnFamilyStore.java

示例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();
}
 
開發者ID:pgaref,項目名稱:ACaZoo,代碼行數:33,代碼來源:StorageService.java

示例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());
    }
}
 
開發者ID:pgaref,項目名稱:ACaZoo,代碼行數:13,代碼來源:ColumnFamilyStore.java


注:本文中的org.apache.cassandra.exceptions.ConfigurationException.getMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。