Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Oct 4, 2018
1 parent 3337458 commit 4588782
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public CompoundProcessor(boolean ignoreFailure, List<Processor> processors, List
this.processors = processors;
this.onFailureProcessors = onFailureProcessors;
this.clock = clock;
processorsWithMetrics = new ArrayList<>(processors.size());
this.processorsWithMetrics = new ArrayList<>(processors.size());
processors.forEach(p -> processorsWithMetrics.add(new Tuple<>(p, new IngestMetric())));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.elasticsearch.script.IngestConditionalScript;
import org.elasticsearch.script.Script;
Expand All @@ -47,8 +46,8 @@ public class ConditionalProcessor extends AbstractProcessor {
private final IngestMetric metric;
private final Clock clock;

ConditionalProcessor(String tag, Script script, ScriptService scriptService, Processor processor) {
this(tag, script, scriptService, processor, Clock.systemUTC());
ConditionalProcessor(String tag, Script script, ScriptService scriptService, Processor processor) {
this(tag, script, scriptService, processor, Clock.systemUTC());
}

ConditionalProcessor(String tag, Script script, ScriptService scriptService, Processor processor, Clock clock) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public void applyClusterState(final ClusterChangedEvent event) {
//Best attempt to populate new processor metrics using a parallel array of the old metrics. This is not ideal since
//the per processor metrics may get reset when the arrays don't match. However, to get to an ideal model, unique and
//consistent id's per processor and/or semantic equals for each processor will be needed.
if(newPerProcessMetrics.size() == oldPerProcessMetrics.size()) {
if (newPerProcessMetrics.size() == oldPerProcessMetrics.size()) {
Iterator<Tuple<Processor, IngestMetric>> oldMetricsIterator = oldPerProcessMetrics.iterator();
for (Tuple<Processor, IngestMetric> compositeMetric : newPerProcessMetrics) {
String type = compositeMetric.v1().getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void writeTo(StreamOutput out) throws IOException {
pipelineStats.writeTo(out);
List<Tuple<String, Stats>> processorStats = entry.getValue().v2();
out.writeVInt(processorStats.size());
for(Tuple<String, Stats> processorTuple : processorStats){
for (Tuple<String, Stats> processorTuple : processorStats) {
String processorName = processorTuple.v1();
Stats processorStat = processorTuple.v2();
out.writeString(processorName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public void testSerialization() throws IOException {
List<Tuple<String, IngestStats.Stats>> deserializedProcessorStats =
deserializedIngestStats.getProcessorStatsForPipeline(pipelineName);
Iterator<Tuple<String, IngestStats.Stats>> it = deserializedProcessorStats.iterator();
for(Tuple<String, IngestStats.Stats> processorTuple : processorStats){
for (Tuple<String, IngestStats.Stats> processorTuple : processorStats) {
Tuple<String, IngestStats.Stats> deserializedTuple = it.next();
assertEquals(processorTuple.v1(), deserializedTuple.v1());
IngestStats.Stats pStats = processorTuple.v2();
Expand Down

0 comments on commit 4588782

Please sign in to comment.