From 8ecf71ffb8a73a4b16f5b5c29b752fd094fa787a Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 8 Apr 2010 19:47:27 +0300 Subject: [PATCH] nicer logs --- .../support/AbstractConcurrentMapFilterCache.java | 2 +- .../index/deletionpolicy/KeepLastNDeletionPolicy.java | 2 +- .../deletionpolicy/KeepOnlyLastDeletionPolicy.java | 2 +- .../elasticsearch/index/engine/robin/RobinEngine.java | 2 +- .../org/elasticsearch/index/mapper/MapperService.java | 2 +- .../policy/BalancedSegmentMergePolicyProvider.java | 2 +- .../merge/policy/LogByteSizeMergePolicyProvider.java | 2 +- .../index/merge/policy/LogDocMergePolicyProvider.java | 2 +- .../index/service/InternalIndexService.java | 4 ++-- .../index/shard/recovery/RecoveryAction.java | 2 +- .../org/elasticsearch/index/store/StoreModule.java | 6 +++--- .../org/elasticsearch/index/store/fs/MmapFsStore.java | 4 ++-- .../org/elasticsearch/index/store/fs/NioFsStore.java | 4 ++-- .../elasticsearch/index/store/fs/SimpleFsStore.java | 4 ++-- .../index/store/memory/ByteBufferStore.java | 2 +- .../elasticsearch/index/store/memory/HeapStore.java | 2 +- .../org/elasticsearch/index/store/ram/RamStore.java | 2 +- .../indices/cluster/IndicesClusterStateService.java | 3 +++ .../main/java/org/elasticsearch/jmx/JmxService.java | 2 +- .../elasticsearch/transport/netty/NettyTransport.java | 2 +- .../elasticsearch/util/settings/ImmutableSettings.java | 10 ++++++++-- .../util/transport/BoundTransportAddress.java | 2 +- 22 files changed, 37 insertions(+), 28 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java index cba2de519a0..43c8f0842f0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java @@ -54,7 +54,7 @@ public abstract class AbstractConcurrentMapFilterCache extends AbstractIndexComp this.readerCleanerSchedule = componentSettings.getAsTime("reader_cleaner_schedule", TimeValue.timeValueMinutes(1)); - logger.debug("Using [" + type() + "] filter cache with readerCleanerSchedule [{}]", readerCleanerSchedule); + logger.debug("Using [" + type() + "] filter cache with reader_cleaner_schedule[{}]", readerCleanerSchedule); this.cache = newConcurrentMap(); this.scheduleFuture = threadPool.scheduleWithFixedDelay(new IndexReaderCleaner(), readerCleanerSchedule); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepLastNDeletionPolicy.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepLastNDeletionPolicy.java index 6363624070a..eebe36f4dce 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepLastNDeletionPolicy.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepLastNDeletionPolicy.java @@ -40,7 +40,7 @@ public class KeepLastNDeletionPolicy extends AbstractIndexShardComponent impleme @Inject public KeepLastNDeletionPolicy(ShardId shardId, @IndexSettings Settings indexSettings) { super(shardId, indexSettings); this.numToKeep = componentSettings.getAsInt("num_to_keep", 5); - logger.debug("Using [KeepLastN] deletion policy with num_to_keep [{}]", numToKeep); + logger.debug("Using [keep_last_n] deletion policy with num_to_keep[{}]", numToKeep); } public void onInit(List commits) throws IOException { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepOnlyLastDeletionPolicy.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepOnlyLastDeletionPolicy.java index d38c8ba70f9..1fdc1c3dbb8 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepOnlyLastDeletionPolicy.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/deletionpolicy/KeepOnlyLastDeletionPolicy.java @@ -39,7 +39,7 @@ public class KeepOnlyLastDeletionPolicy extends AbstractIndexShardComponent impl @Inject public KeepOnlyLastDeletionPolicy(ShardId shardId, @IndexSettings Settings indexSettings) { super(shardId, indexSettings); - logger.debug("Using [KeepOnlyLast] deletion policy"); + logger.debug("Using [keep_only_last] deletion policy"); } /** diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java index c0f34132c63..79b8582c53a 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java @@ -123,7 +123,7 @@ public class RobinEngine extends AbstractIndexShardComponent implements Engine, throw new EngineAlreadyStartedException(shardId); } if (logger.isDebugEnabled()) { - logger.debug("Starting engine with ram_buffer_size [" + ramBufferSize + "], refresh_interval [" + refreshInterval + "]"); + logger.debug("Starting engine with ram_buffer_size[" + ramBufferSize + "], refresh_interval[" + refreshInterval + "]"); } IndexWriter indexWriter = null; try { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java index 0cd50a8d3c5..1acc9920a89 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java @@ -127,7 +127,7 @@ public class MapperService extends AbstractIndexComponent implements Iterable iterator() { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/BalancedSegmentMergePolicyProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/BalancedSegmentMergePolicyProvider.java index 0d31900700e..106b0f4e105 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/BalancedSegmentMergePolicyProvider.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/BalancedSegmentMergePolicyProvider.java @@ -55,7 +55,7 @@ public class BalancedSegmentMergePolicyProvider extends AbstractIndexShardCompon this.useCompoundFile = componentSettings.getAsBoolean("use_compound_file", store == null || store.suggestUseCompoundFile()); - logger.debug("Using [Balanced] merge policy with merge_factor[{}], min_merge_size[{}], max_merge_size[{}], max_merge_docs[{}] use_compound_file[{}]", + logger.debug("Using [balanced] merge policy with merge_factor[{}], min_merge_size[{}], max_merge_size[{}], max_merge_docs[{}] use_compound_file[{}]", new Object[]{mergeFactor, minMergeSize, maxMergeSize, maxMergeDocs, useCompoundFile}); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java index b02fd55a9aa..528d04f40d5 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogByteSizeMergePolicyProvider.java @@ -50,7 +50,7 @@ public class LogByteSizeMergePolicyProvider extends AbstractIndexShardComponent this.maxMergeDocs = componentSettings.getAsInt("max_merge_docs", LogByteSizeMergePolicy.DEFAULT_MAX_MERGE_DOCS); this.calibrateSizeByDeletes = componentSettings.getAsBoolean("calibrate_size_by_deletes", false); this.useCompoundFile = componentSettings.getAsBoolean("use_compound_file", store == null || store.suggestUseCompoundFile()); - logger.debug("Using [LogByteSize] merge policy with merge_factor[{}], min_merge_size[{}], max_merge_size[{}], max_merge_docs[{}] use_compound_file[{}], calibrate_size_by_deletes[{}]", + logger.debug("Using [log_bytes_size] merge policy with merge_factor[{}], min_merge_size[{}], max_merge_size[{}], max_merge_docs[{}] use_compound_file[{}], calibrate_size_by_deletes[{}]", new Object[]{mergeFactor, minMergeSize, maxMergeSize, maxMergeDocs, useCompoundFile, calibrateSizeByDeletes}); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogDocMergePolicyProvider.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogDocMergePolicyProvider.java index 17add2b15ef..c03fa42f2ab 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogDocMergePolicyProvider.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/merge/policy/LogDocMergePolicyProvider.java @@ -46,7 +46,7 @@ public class LogDocMergePolicyProvider extends AbstractIndexShardComponent imple this.mergeFactor = componentSettings.getAsInt("merge_factor", LogDocMergePolicy.DEFAULT_MERGE_FACTOR); this.calibrateSizeByDeletes = componentSettings.getAsBoolean("calibrate_size_by_deletes", false); this.useCompoundFile = componentSettings.getAsBoolean("use_compound_file", store == null || store.suggestUseCompoundFile()); - logger.debug("Using [LogDoc] merge policy with merge_factor[{}] min_merge_docs[{}], max_merge_docs[{}], use_compound_file[{}], calibrate_size_by_deletes[{}]", + logger.debug("Using [log_doc] merge policy with merge_factor[{}] min_merge_docs[{}], max_merge_docs[{}], use_compound_file[{}], calibrate_size_by_deletes[{}]", new Object[]{mergeFactor, minMergeDocs, maxMergeDocs, useCompoundFile, calibrateSizeByDeletes}); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java index 8eb216c290c..fbb972733bd 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/service/InternalIndexService.java @@ -187,7 +187,7 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde indicesLifecycle.beforeIndexShardCreated(shardId); - logger.debug("Creating Shard Id [{}]", shardId.id()); + logger.debug("Creating shard_id[{}]", shardId.id()); Injector shardInjector = injector.createChildInjector( new ShardsPluginsModule(indexSettings, pluginsService), @@ -234,7 +234,7 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde } shardsInjectors = ImmutableMap.copyOf(tmpShardInjectors); if (delete) { - logger.debug("Deleting Shard Id [{}]", shardId); + logger.debug("Deleting shard_id[{}]", shardId); } Map tmpShardsMap = newHashMap(shards); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryAction.java index 2bf4380ce8f..04d8009a8c1 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryAction.java @@ -168,7 +168,7 @@ public class RecoveryAction extends AbstractIndexShardComponent implements Close stopWatch.stop(); if (logger.isDebugEnabled()) { StringBuilder sb = new StringBuilder(); - sb.append("Recovery completed from ").append(targetNode).append(", took [").append(stopWatch.totalTime()).append("]\n"); + sb.append("Recovery completed from ").append(targetNode).append(", took[").append(stopWatch.totalTime()).append("]\n"); sb.append(" Phase1: recovered [").append(recoveryStatus.phase1FileNames.size()).append("]") .append(" files with total size of [").append(new SizeValue(recoveryStatus.phase1TotalSize)).append("]") .append(", took [").append(new TimeValue(recoveryStatus.phase1Time, MILLISECONDS)).append("]") diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/StoreModule.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/StoreModule.java index 3cc27e6c68f..8495ed2129d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/StoreModule.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/StoreModule.java @@ -53,11 +53,11 @@ public class StoreModule extends AbstractModule { storeModule = MemoryStoreModule.class; } else if ("fs".equalsIgnoreCase(storeType)) { // nothing to set here ... (we default to fs) - } else if ("simplefs".equalsIgnoreCase(storeType)) { + } else if ("simplefs".equalsIgnoreCase(storeType) || "simple_fs".equals(storeType)) { storeModule = SimpleFsStoreModule.class; - } else if ("niofs".equalsIgnoreCase(storeType)) { + } else if ("niofs".equalsIgnoreCase(storeType) || "nio_fs".equalsIgnoreCase(storeType)) { storeModule = NioFsStoreModule.class; - } else if ("mmapfs".equalsIgnoreCase(storeType)) { + } else if ("mmapfs".equalsIgnoreCase(storeType) || "mmap_fs".equalsIgnoreCase(storeType)) { storeModule = MmapFsStoreModule.class; } else if (storeType != null) { storeModule = settings.getAsClass("index.store.type", storeModule, "org.elasticsearch.index.store.", "StoreModule"); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/MmapFsStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/MmapFsStore.java index 24ebc0192c0..cb79a108eb3 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/MmapFsStore.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/MmapFsStore.java @@ -58,12 +58,12 @@ public class MmapFsStore extends AbstractFsStore { SwitchDirectory switchDirectory = buildSwitchDirectoryIfNeeded(fsDirectory); if (switchDirectory != null) { suggestUseCompoundFile = false; - logger.debug("Using [MmapFs] Store with path [{}], cache [true] with extensions [{}]", new Object[]{fsDirectory.getFile(), switchDirectory.primaryExtensions()}); + logger.debug("Using [mmap_fs] Store with path [{}], cache [true] with extensions [{}]", new Object[]{fsDirectory.getFile(), switchDirectory.primaryExtensions()}); directory = switchDirectory; } else { suggestUseCompoundFile = true; directory = fsDirectory; - logger.debug("Using [MmapFs] Store with path [{}]", fsDirectory.getFile()); + logger.debug("Using [mmap_fs] Store with path [{}]", fsDirectory.getFile()); } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/NioFsStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/NioFsStore.java index ee2376feb9d..b1ca7001da0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/NioFsStore.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/NioFsStore.java @@ -58,12 +58,12 @@ public class NioFsStore extends AbstractFsStore { SwitchDirectory switchDirectory = buildSwitchDirectoryIfNeeded(fsDirectory); if (switchDirectory != null) { suggestUseCompoundFile = false; - logger.debug("Using [NioFs] Store with path [{}], cache [true] with extensions [{}]", new Object[]{fsDirectory.getFile(), switchDirectory.primaryExtensions()}); + logger.debug("Using [nio_fs] Store with path [{}], cache [true] with extensions [{}]", new Object[]{fsDirectory.getFile(), switchDirectory.primaryExtensions()}); directory = switchDirectory; } else { suggestUseCompoundFile = true; directory = fsDirectory; - logger.debug("Using [NioFs] Store with path [{}]", fsDirectory.getFile()); + logger.debug("Using [nio_fs] Store with path [{}]", fsDirectory.getFile()); } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/SimpleFsStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/SimpleFsStore.java index aa63b60adbc..64fbf637b42 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/SimpleFsStore.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/fs/SimpleFsStore.java @@ -58,12 +58,12 @@ public class SimpleFsStore extends AbstractFsStore { SwitchDirectory switchDirectory = buildSwitchDirectoryIfNeeded(fsDirectory); if (switchDirectory != null) { suggestUseCompoundFile = false; - logger.debug("Using [SimpleFs] Store with path [{}], cache [true] with extensions [{}]", new Object[]{fsDirectory.getFile(), switchDirectory.primaryExtensions()}); + logger.debug("Using [simple_fs] Store with path [{}], cache [true] with extensions [{}]", new Object[]{fsDirectory.getFile(), switchDirectory.primaryExtensions()}); directory = switchDirectory; } else { suggestUseCompoundFile = true; directory = fsDirectory; - logger.debug("Using [SimpleFs] Store with path [{}]", fsDirectory.getFile()); + logger.debug("Using [simple_fs] Store with path [{}]", fsDirectory.getFile()); } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/ByteBufferStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/ByteBufferStore.java index 87f203b9d0a..bed3df62a76 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/ByteBufferStore.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/ByteBufferStore.java @@ -50,7 +50,7 @@ public class ByteBufferStore extends AbstractStore { this.direct = componentSettings.getAsBoolean("direct", true); this.warmCache = componentSettings.getAsBoolean("warm_cache", true); this.directory = new ByteBufferDirectory((int) bufferSize.bytes(), (int) cacheSize.bytes(), direct, warmCache); - logger.debug("Using [ByteBuffer] Store with buffer_size[{}], cache_size[{}], direct[{}], warm_cache[{}]", + logger.debug("Using [byte_buffer] store with buffer_size[{}], cache_size[{}], direct[{}], warm_cache[{}]", new Object[]{bufferSize, cacheSize, directory.isDirect(), warmCache}); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/HeapStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/HeapStore.java index 2232eb9d504..0ce6ba4b5ca 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/HeapStore.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/memory/HeapStore.java @@ -48,7 +48,7 @@ public class HeapStore extends AbstractStore { this.warmCache = componentSettings.getAsBoolean("warm_cache", true); this.directory = new HeapDirectory(bufferSize, cacheSize, warmCache); - logger.debug("Using [Memory] Store with buffer_size[{}], cache_size[{}], warm_cache[{}]", + logger.debug("Using [heap] Store with buffer_size[{}], cache_size[{}], warm_cache[{}]", new Object[]{directory.bufferSize(), directory.cacheSize(), warmCache}); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/ram/RamStore.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/ram/RamStore.java index b5d15f72482..ed0730ade57 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/ram/RamStore.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/store/ram/RamStore.java @@ -40,7 +40,7 @@ public class RamStore extends AbstractStore { @Inject public RamStore(ShardId shardId, @IndexSettings Settings indexSettings) { super(shardId, indexSettings); this.directory = new RAMDirectory(); - logger.debug("Using [RAM] Store"); + logger.debug("Using [ram] Store"); } @Override public RAMDirectory directory() { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java index 6415135c766..537bcc814c5 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java @@ -37,6 +37,7 @@ import org.elasticsearch.cluster.routing.RoutingNode; import org.elasticsearch.cluster.routing.RoutingTable; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.index.IndexShardAlreadyExistsException; +import org.elasticsearch.index.IndexShardMissingException; import org.elasticsearch.index.gateway.IgnoreGatewayRecoveryException; import org.elasticsearch.index.gateway.IndexShardGatewayService; import org.elasticsearch.index.mapper.DocumentMapper; @@ -290,6 +291,8 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent implem throw new ConnectTransportException(node, "connectTimeout[" + connectTimeout + "], connectRetries[" + connectRetries + "], reason unknown"); } if (logger.isDebugEnabled()) { - logger.debug("Connected to node [{}], numberOfConnections [{}]", node, channels.size()); + logger.debug("Connected to node[{}], number_of_connections[{}]", node, channels.size()); } clientChannels.put(node.id(), new NodeConnections(channels.toArray(new Channel[channels.size()]))); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java index c6e425c88eb..2a7679d9ef0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/settings/ImmutableSettings.java @@ -186,6 +186,7 @@ public class ImmutableSettings implements Settings { } } + @SuppressWarnings({"unchecked"}) @Override public Class getAsClass(String setting, Class defaultClazz, String prefixPackage, String suffixClassName) throws NoClassSettingsException { String sValue = get(setting); if (sValue == null) { @@ -199,11 +200,16 @@ public class ImmutableSettings implements Settings { try { return (Class) getClassLoader().loadClass(fullClassName); } catch (ClassNotFoundException e1) { - fullClassName = prefixPackage + sValue + "." + Strings.capitalize(toCamelCase(sValue)) + suffixClassName; + fullClassName = prefixPackage + toCamelCase(sValue) + "." + Strings.capitalize(toCamelCase(sValue)) + suffixClassName; try { return (Class) getClassLoader().loadClass(fullClassName); } catch (ClassNotFoundException e2) { - throw new NoClassSettingsException("Failed to load class setting [" + setting + "] with value [" + sValue + "]", e); + fullClassName = prefixPackage + toCamelCase(sValue).toLowerCase() + "." + Strings.capitalize(toCamelCase(sValue)) + suffixClassName; + try { + return (Class) getClassLoader().loadClass(fullClassName); + } catch (ClassNotFoundException e3) { + throw new NoClassSettingsException("Failed to load class setting [" + setting + "] with value [" + sValue + "]", e); + } } } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/BoundTransportAddress.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/BoundTransportAddress.java index c315db7839e..b36e3724d10 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/BoundTransportAddress.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/BoundTransportAddress.java @@ -46,6 +46,6 @@ public class BoundTransportAddress { } @Override public String toString() { - return "boundAddress [" + boundAddress + "], publishAddress [" + publishAddress + "]"; + return "bound_address[" + boundAddress + "], publish_address[" + publishAddress + "]"; } }