Skip to content

Commit

Permalink
[CI] Auto commit changes from spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticsearchmachine committed Dec 27, 2024
1 parent a0a4a54 commit 2188223
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 36 deletions.
36 changes: 4 additions & 32 deletions server/src/main/java/org/elasticsearch/index/IndexingSlowLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,47 +179,19 @@ public void postIndex(ShardId shardId, Engine.Index indexOperation, Engine.Index
final long tookInNanos = result.getTook();
if (indexWarnThreshold >= 0 && tookInNanos > indexWarnThreshold) {
indexLogger.warn(
IndexingSlowLogMessage.of(
this.slowLogFields.indexFields(),
index,
doc,
tookInNanos,
reformat,
maxSourceCharsToLog
)
IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog)
);
} else if (indexInfoThreshold >= 0 && tookInNanos > indexInfoThreshold) {
indexLogger.info(
IndexingSlowLogMessage.of(
this.slowLogFields.indexFields(),
index,
doc,
tookInNanos,
reformat,
maxSourceCharsToLog
)
IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog)
);
} else if (indexDebugThreshold >= 0 && tookInNanos > indexDebugThreshold) {
indexLogger.debug(
IndexingSlowLogMessage.of(
this.slowLogFields.indexFields(),
index,
doc,
tookInNanos,
reformat,
maxSourceCharsToLog
)
IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog)
);
} else if (indexTraceThreshold >= 0 && tookInNanos > indexTraceThreshold) {
indexLogger.trace(
IndexingSlowLogMessage.of(
this.slowLogFields.indexFields(),
index,
doc,
tookInNanos,
reformat,
maxSourceCharsToLog
)
IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog)
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,15 @@ private void construct(
return new SlowLogFields() {
@Override
public Map<String, String> indexFields() {
return fields.stream().flatMap(f -> f.indexFields().entrySet().stream())
return fields.stream()
.flatMap(f -> f.indexFields().entrySet().stream())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
}

@Override
public Map<String, String> searchFields() {
return fields.stream().flatMap(f -> f.searchFields().entrySet().stream())
return fields.stream()
.flatMap(f -> f.searchFields().entrySet().stream())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
public class SecuritySlowLogFieldProvider implements SlowLogFieldProvider {
private final Security plugin;


private class SecuritySlowLogFields implements SlowLogFields{
private class SecuritySlowLogFields implements SlowLogFields {
private boolean includeUserInIndexing = false;
private boolean includeUserInSearch = false;

Expand Down

0 comments on commit 2188223

Please sign in to comment.