Fix wrong placeholder usage in logging statements
This commit is contained in:
parent
b17f4b40ba
commit
718876a941
|
@ -81,13 +81,13 @@ public class NodeIndexDeletedAction extends AbstractComponent {
|
|||
transportService.sendRequest(clusterState.nodes().masterNode(),
|
||||
INDEX_DELETED_ACTION_NAME, new NodeIndexDeletedMessage(index, nodeId), EmptyTransportResponseHandler.INSTANCE_SAME);
|
||||
if (nodes.localNode().isDataNode() == false) {
|
||||
logger.trace("[{}] not acking store deletion (not a data node)");
|
||||
logger.trace("[{}] not acking store deletion (not a data node)", index);
|
||||
return;
|
||||
}
|
||||
threadPool.generic().execute(new AbstractRunnable() {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
logger.warn("[{}]failed to ack index store deleted for index", t, index);
|
||||
logger.warn("[{}] failed to ack index store deleted for index", t, index);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -151,7 +151,7 @@ public class ShardStateAction extends AbstractComponent {
|
|||
@Override
|
||||
public void onNewClusterState(ClusterState state) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("new cluster state [{}] after waiting for master election to fail shard [{}]", shardRoutingEntry.getShardRouting().shardId(), state.prettyPrint(), shardRoutingEntry);
|
||||
logger.trace("new cluster state [{}] after waiting for master election to fail shard [{}]", state.prettyPrint(), shardRoutingEntry);
|
||||
}
|
||||
sendShardAction(actionName, observer, shardRoutingEntry, listener);
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ public class PolygonBuilder extends ShapeBuilder {
|
|||
|
||||
double shiftOffset = any.coordinate.x > DATELINE ? DATELINE : (any.coordinate.x < -DATELINE ? -DATELINE : 0);
|
||||
if (debugEnabled()) {
|
||||
LOGGER.debug("shift: {[]}", shiftOffset);
|
||||
LOGGER.debug("shift: [{}]", shiftOffset);
|
||||
}
|
||||
|
||||
// run along the border of the component, collect the
|
||||
|
@ -392,7 +392,7 @@ public class PolygonBuilder extends ShapeBuilder {
|
|||
|
||||
if(debugEnabled()) {
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
LOGGER.debug("Component {[]}:", i);
|
||||
LOGGER.debug("Component [{}]:", i);
|
||||
for (int j = 0; j < result[i].length; j++) {
|
||||
LOGGER.debug("\t" + Arrays.toString(result[i][j]));
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class Lucene {
|
|||
try {
|
||||
return Version.parse(version);
|
||||
} catch (ParseException e) {
|
||||
logger.warn("no version match {}, default to {}", version, defaultVersion, e);
|
||||
logger.warn("no version match {}, default to {}", e, version, defaultVersion);
|
||||
return defaultVersion;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -671,7 +671,7 @@ public abstract class Engine implements Closeable {
|
|||
closeNoLock("engine failed on: [" + reason + "]");
|
||||
} finally {
|
||||
if (failedEngine != null) {
|
||||
logger.debug("tried to fail engine but engine is already failed. ignoring. [{}]", reason, failure);
|
||||
logger.debug("tried to fail engine but engine is already failed. ignoring. [{}]", failure, reason);
|
||||
return;
|
||||
}
|
||||
logger.warn("failed engine [{}]", failure, reason);
|
||||
|
@ -697,7 +697,7 @@ public abstract class Engine implements Closeable {
|
|||
store.decRef();
|
||||
}
|
||||
} else {
|
||||
logger.debug("tried to fail engine but could not acquire lock - engine should be failed by now [{}]", reason, failure);
|
||||
logger.debug("tried to fail engine but could not acquire lock - engine should be failed by now [{}]", failure, reason);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -712,7 +712,7 @@ public class IndexShard extends AbstractIndexShardComponent {
|
|||
false, true, upgrade.upgradeOnlyAncientSegments());
|
||||
org.apache.lucene.util.Version version = minimumCompatibleVersion();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("upgraded segment {} from version {} to version {}", previousVersion, version);
|
||||
logger.trace("upgraded segments for {} from version {} to version {}", shardId, previousVersion, version);
|
||||
}
|
||||
|
||||
return version;
|
||||
|
|
|
@ -309,7 +309,7 @@ public class SyncedFlushService extends AbstractComponent implements IndexEventL
|
|||
}
|
||||
final Engine.CommitId expectedCommitId = expectedCommitIds.get(shard.currentNodeId());
|
||||
if (expectedCommitId == null) {
|
||||
logger.trace("{} can't resolve expected commit id for {}, skipping for sync id [{}]. shard routing {}", shardId, syncId, shard);
|
||||
logger.trace("{} can't resolve expected commit id for current node, skipping for sync id [{}]. shard routing {}", shardId, syncId, shard);
|
||||
results.put(shard, new ShardSyncedFlushResponse("no commit id from pre-sync flush"));
|
||||
contDownAndSendResponseIfDone(syncId, shards, shardId, totalShards, listener, countDown, results);
|
||||
continue;
|
||||
|
|
|
@ -238,7 +238,7 @@ public class RecoveriesCollection {
|
|||
return;
|
||||
}
|
||||
lastSeenAccessTime = accessTime;
|
||||
logger.trace("[monitor] rescheduling check for [{}]. last access time is [{}]", lastSeenAccessTime);
|
||||
logger.trace("[monitor] rescheduling check for [{}]. last access time is [{}]", recoveryId, lastSeenAccessTime);
|
||||
threadPool.schedule(checkInterval, ThreadPool.Names.GENERIC, this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ public class RecoverySourceHandler {
|
|||
RemoteTransportException exception = new RemoteTransportException("File corruption occurred on recovery but " +
|
||||
"checksums are ok", null);
|
||||
exception.addSuppressed(targetException);
|
||||
logger.warn("{} Remote file corruption during finalization on node {}, recovering {}. local checksum OK",
|
||||
logger.warn("{} Remote file corruption during finalization of recovery on node {}. local checksum OK",
|
||||
corruptIndexException, shard.shardId(), request.targetNode());
|
||||
throw exception;
|
||||
} else {
|
||||
|
|
|
@ -478,7 +478,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent<Rep
|
|||
metaDataBuilder.put(indexMetaDataFormat(snapshotVersion).read(indexMetaDataBlobContainer, snapshotId.getSnapshot()), false);
|
||||
} catch (ElasticsearchParseException | IOException ex) {
|
||||
if (ignoreIndexErrors) {
|
||||
logger.warn("[{}] [{}] failed to read metadata for index", snapshotId, index, ex);
|
||||
logger.warn("[{}] [{}] failed to read metadata for index", ex, snapshotId, index);
|
||||
} else {
|
||||
throw ex;
|
||||
}
|
||||
|
|
|
@ -841,7 +841,7 @@ public class SnapshotsService extends AbstractLifecycleComponent<SnapshotsServic
|
|||
|
||||
@Override
|
||||
public void onFailure(String source, Throwable t) {
|
||||
logger.warn("[{}][{}] failed to remove snapshot metadata", t, snapshotId);
|
||||
logger.warn("[{}] failed to remove snapshot metadata", t, snapshotId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1379,9 +1379,9 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
|||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
if (lifecycle.stoppedOrClosed()) {
|
||||
logger.trace("[{}] failed to send ping transport message", t);
|
||||
logger.trace("failed to send ping transport message", t);
|
||||
} else {
|
||||
logger.warn("[{}] failed to send ping transport message", t);
|
||||
logger.warn("failed to send ping transport message", t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ public class TribeService extends AbstractLifecycleComponent<TribeService> {
|
|||
try {
|
||||
otherNode.close();
|
||||
} catch (Throwable t) {
|
||||
logger.warn("failed to close node {} on failed start", otherNode, t);
|
||||
logger.warn("failed to close node {} on failed start", t, otherNode);
|
||||
}
|
||||
}
|
||||
if (e instanceof RuntimeException) {
|
||||
|
|
|
@ -191,7 +191,7 @@ public class BasicBackwardsCompatibilityIT extends ESBackcompatTestCase {
|
|||
numDocs *= 2;
|
||||
}
|
||||
|
||||
logger.info(" --> waiting for relocation to complete", numDocs);
|
||||
logger.info(" --> waiting for relocation of [{}] docs to complete", numDocs);
|
||||
ensureYellow("test");// move all shards to the new node (it waits on relocation)
|
||||
final int numIters = randomIntBetween(10, 20);
|
||||
for (int i = 0; i < numIters; i++) {
|
||||
|
|
|
@ -380,7 +380,7 @@ public class RecoveryFromGatewayIT extends ESIntegTestCase {
|
|||
assertSyncIdsNotNull();
|
||||
}
|
||||
|
||||
logger.info("--> disabling allocation while the cluster is shut down", useSyncIds ? "" : " a second time");
|
||||
logger.info("--> disabling allocation while the cluster is shut down{}", useSyncIds ? "" : " a second time");
|
||||
// Disable allocations while we are closing nodes
|
||||
client().admin().cluster().prepareUpdateSettings()
|
||||
.setTransientSettings(settingsBuilder()
|
||||
|
|
|
@ -100,7 +100,7 @@ public class ReusePeerRecoverySharedTest {
|
|||
assertSyncIdsNotNull();
|
||||
}
|
||||
|
||||
logger.info("--> disabling allocation while the cluster is shut down", useSyncIds ? "" : " a second time");
|
||||
logger.info("--> disabling allocation while the cluster is shut down{}", useSyncIds ? "" : " a second time");
|
||||
// Disable allocations while we are closing nodes
|
||||
client().admin().cluster().prepareUpdateSettings().setTransientSettings(
|
||||
settingsBuilder().put(EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING.getKey(), EnableAllocationDecider.Allocation.NONE))
|
||||
|
|
|
@ -292,7 +292,7 @@ public class ConcurrentPercolatorIT extends ESIntegTestCase {
|
|||
}
|
||||
|
||||
for (Throwable t : exceptionsHolder) {
|
||||
logger.error("Unexpected exception {}", t.getMessage(), t);
|
||||
logger.error("Unexpected exception while indexing", t);
|
||||
}
|
||||
assertThat(exceptionsHolder.isEmpty(), equalTo(true));
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ public class TTLPercolatorIT extends ESIntegTestCase {
|
|||
.endObject()
|
||||
).setTTL(randomIntBetween(1, 500)).setRefresh(true).execute().actionGet();
|
||||
} catch (MapperParsingException e) {
|
||||
logger.info("failed indexing {}", i, e);
|
||||
logger.info("failed indexing {}", e, i);
|
||||
// if we are unlucky the TTL is so small that we see the expiry date is already in the past when
|
||||
// we parse the doc ignore those...
|
||||
assertThat(e.getCause(), Matchers.instanceOf(AlreadyExpiredException.class));
|
||||
|
|
|
@ -383,7 +383,7 @@ public class MoreLikeThisIT extends ESIntegTestCase {
|
|||
int maxIters = randomIntBetween(10, 20);
|
||||
for (int i = 0; i < maxIters; i++) {
|
||||
int max_query_terms = randomIntBetween(1, values.length);
|
||||
logger.info("Running More Like This with max_query_terms = %s", max_query_terms);
|
||||
logger.info("Running More Like This with max_query_terms = {}", max_query_terms);
|
||||
MoreLikeThisQueryBuilder mltQuery = moreLikeThisQuery(new String[] {"text"}, null, new Item[] {new Item(null, null, "0")})
|
||||
.minTermFreq(1).minDocFreq(1)
|
||||
.maxQueryTerms(max_query_terms).minimumShouldMatch("0%");
|
||||
|
|
|
@ -325,7 +325,7 @@ public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTest
|
|||
logger.info("--> execution was blocked on node [{}], shutting it down", blockedNode);
|
||||
unblockNode(blockedNode);
|
||||
|
||||
logger.info("--> stopping node", blockedNode);
|
||||
logger.info("--> stopping node [{}]", blockedNode);
|
||||
stopNode(blockedNode);
|
||||
logger.info("--> waiting for completion");
|
||||
SnapshotInfo snapshotInfo = waitForCompletion("test-repo", "test-snap", TimeValue.timeValueSeconds(60));
|
||||
|
@ -379,7 +379,7 @@ public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTest
|
|||
// Make sure that abort makes some progress
|
||||
Thread.sleep(100);
|
||||
unblockNode(blockedNode);
|
||||
logger.info("--> stopping node", blockedNode);
|
||||
logger.info("--> stopping node [{}]", blockedNode);
|
||||
stopNode(blockedNode);
|
||||
try {
|
||||
DeleteSnapshotResponse deleteSnapshotResponse = deleteSnapshotResponseFuture.actionGet();
|
||||
|
|
|
@ -1448,7 +1448,7 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
|
|||
}
|
||||
}
|
||||
|
||||
logger.info("--> checking snapshot status for all currently running and snapshot with empty repository", blockedNode);
|
||||
logger.info("--> checking snapshot status for all currently running and snapshot with empty repository");
|
||||
response = client.admin().cluster().prepareSnapshotStatus().execute().actionGet();
|
||||
assertThat(response.getSnapshots().size(), equalTo(1));
|
||||
snapshotStatus = response.getSnapshots().get(0);
|
||||
|
@ -1461,7 +1461,7 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
|
|||
}
|
||||
}
|
||||
|
||||
logger.info("--> checking that _current returns the currently running snapshot", blockedNode);
|
||||
logger.info("--> checking that _current returns the currently running snapshot");
|
||||
GetSnapshotsResponse getResponse = client.admin().cluster().prepareGetSnapshots("test-repo").setCurrentSnapshot().execute().actionGet();
|
||||
assertThat(getResponse.getSnapshots().size(), equalTo(1));
|
||||
SnapshotInfo snapshotInfo = getResponse.getSnapshots().get(0);
|
||||
|
@ -1475,7 +1475,7 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
|
|||
logger.info("--> done");
|
||||
|
||||
|
||||
logger.info("--> checking snapshot status again after snapshot is done", blockedNode);
|
||||
logger.info("--> checking snapshot status again after snapshot is done");
|
||||
response = client.admin().cluster().prepareSnapshotStatus("test-repo").addSnapshots("test-snap").execute().actionGet();
|
||||
snapshotStatus = response.getSnapshots().get(0);
|
||||
assertThat(snapshotStatus.getIndices().size(), equalTo(1));
|
||||
|
@ -1486,11 +1486,11 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
|
|||
assertThat(indexStatus.getShardsStats().getDoneShards(), equalTo(snapshotInfo.successfulShards()));
|
||||
assertThat(indexStatus.getShards().size(), equalTo(snapshotInfo.totalShards()));
|
||||
|
||||
logger.info("--> checking snapshot status after it is done with empty repository", blockedNode);
|
||||
logger.info("--> checking snapshot status after it is done with empty repository");
|
||||
response = client.admin().cluster().prepareSnapshotStatus().execute().actionGet();
|
||||
assertThat(response.getSnapshots().size(), equalTo(0));
|
||||
|
||||
logger.info("--> checking that _current no longer returns the snapshot", blockedNode);
|
||||
logger.info("--> checking that _current no longer returns the snapshot");
|
||||
assertThat(client.admin().cluster().prepareGetSnapshots("test-repo").addSnapshots("_current").execute().actionGet().getSnapshots().isEmpty(), equalTo(true));
|
||||
|
||||
try {
|
||||
|
|
|
@ -543,7 +543,7 @@ public class ExtendedStatsTests extends AbstractNumericTestCase {
|
|||
ShardSearchFailure[] failures = response.getShardFailures();
|
||||
if (failures.length != expectedFailures) {
|
||||
for (ShardSearchFailure failure : failures) {
|
||||
logger.error("Shard Failure: {}", failure.reason(), failure.toString());
|
||||
logger.error("Shard Failure: {}", failure);
|
||||
}
|
||||
fail("Unexpected shard failures!");
|
||||
}
|
||||
|
|
|
@ -404,10 +404,10 @@ public class StatsTests extends AbstractNumericTestCase {
|
|||
ShardSearchFailure[] failures = response.getShardFailures();
|
||||
if (failures.length != expectedFailures) {
|
||||
for (ShardSearchFailure failure : failures) {
|
||||
logger.error("Shard Failure: {}", failure.reason(), failure.toString());
|
||||
logger.error("Shard Failure: {}", failure);
|
||||
}
|
||||
fail("Unexpected shard failures!");
|
||||
}
|
||||
assertThat("Not all shards are initialized", response.getSuccessfulShards(), equalTo(response.getTotalShards()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ public class Ec2DiscoveryTests extends ESTestCase {
|
|||
tagsList.add(tags);
|
||||
}
|
||||
|
||||
logger.info("started [{}] instances with [{}] stage=prod tag");
|
||||
logger.info("started [{}] instances with [{}] stage=prod tag", nodes, prodInstances);
|
||||
List<DiscoveryNode> discoveryNodes = buildDynamicNodes(nodeSettings, nodes, tagsList);
|
||||
assertThat(discoveryNodes, hasSize(prodInstances));
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ public class Ec2DiscoveryTests extends ESTestCase {
|
|||
tagsList.add(tags);
|
||||
}
|
||||
|
||||
logger.info("started [{}] instances with [{}] stage=prod tag");
|
||||
logger.info("started [{}] instances with [{}] stage=prod tag", nodes, prodInstances);
|
||||
List<DiscoveryNode> discoveryNodes = buildDynamicNodes(nodeSettings, nodes, tagsList);
|
||||
assertThat(discoveryNodes, hasSize(prodInstances));
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ public class AzureStorageServiceImpl extends AbstractLifecycleComponent<AzureSto
|
|||
logger.trace("creating container [{}]", container);
|
||||
blob_container.createIfNotExists();
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.trace("fails creating container [{}]", container, e.getMessage());
|
||||
logger.trace("fails creating container [{}]", e, container);
|
||||
throw new RepositoryException(container, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue