Fix merging conflicts

This commit is contained in:
Tanguy Leroux 2017-05-10 14:05:43 +02:00
parent bf718a686f
commit 3201e22710
36 changed files with 51 additions and 37 deletions

View File

@ -174,7 +174,7 @@ public abstract class InternalAggregation implements Aggregation, ToXContent, Na
* the aggregation name in the response, so that it can later be used by REST clients
* to determine the internal type of the aggregation.
*/
protected String getType() {
public String getType() {
return getWriteableName();
}

View File

@ -63,7 +63,7 @@ public abstract class ParsedAggregation implements Aggregation, ToXContent {
* to determine the internal type of the aggregation.
*/
//TODO it may make sense to move getType to the Aggregation interface given that we are duplicating it in both implementations
protected abstract String getType();
public abstract String getType();
@Override
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {

View File

@ -32,7 +32,7 @@ import java.util.List;
public class ParsedDateHistogram extends ParsedMultiBucketAggregation<ParsedDateHistogram.ParsedBucket> implements Histogram {
@Override
protected String getType() {
public String getType() {
return DateHistogramAggregationBuilder.NAME;
}

View File

@ -29,7 +29,7 @@ import java.util.List;
public class ParsedHistogram extends ParsedMultiBucketAggregation<ParsedHistogram.ParsedBucket> implements Histogram {
@Override
protected String getType() {
public String getType() {
return HistogramAggregationBuilder.NAME;
}

View File

@ -48,7 +48,7 @@ public class InternalSampler extends InternalSingleBucketAggregation implements
}
@Override
protected String getType() {
public String getType() {
return "sampler";
}

View File

@ -76,7 +76,7 @@ public class UnmappedSignificantTerms extends InternalSignificantTerms<UnmappedS
}
@Override
protected String getType() {
public String getType() {
return SignificantStringTerms.NAME;
}

View File

@ -28,7 +28,7 @@ import java.io.IOException;
public class ParsedDoubleTerms extends ParsedTerms {
@Override
protected String getType() {
public String getType() {
return DoubleTerms.NAME;
}

View File

@ -28,7 +28,7 @@ import java.io.IOException;
public class ParsedLongTerms extends ParsedTerms {
@Override
protected String getType() {
public String getType() {
return LongTerms.NAME;
}

View File

@ -29,7 +29,7 @@ import java.io.IOException;
public class ParsedStringTerms extends ParsedTerms {
@Override
protected String getType() {
public String getType() {
return StringTerms.NAME;
}

View File

@ -73,7 +73,7 @@ public class UnmappedTerms extends InternalTerms<UnmappedTerms, UnmappedTerms.Bu
}
@Override
protected String getType() {
public String getType() {
return StringTerms.NAME;
}

View File

@ -34,7 +34,7 @@ public class ParsedAvg extends ParsedSingleValueNumericMetricsAggregation implem
}
@Override
protected String getType() {
public String getType() {
return AvgAggregationBuilder.NAME;
}

View File

@ -50,7 +50,7 @@ public class ParsedCardinality extends ParsedAggregation implements Cardinality
}
@Override
protected String getType() {
public String getType() {
return CardinalityAggregationBuilder.NAME;
}

View File

@ -46,7 +46,7 @@ public class ParsedGeoCentroid extends ParsedAggregation implements GeoCentroid
}
@Override
protected String getType() {
public String getType() {
return GeoCentroidAggregationBuilder.NAME;
}

View File

@ -34,7 +34,7 @@ public class ParsedMax extends ParsedSingleValueNumericMetricsAggregation implem
}
@Override
protected String getType() {
public String getType() {
return MaxAggregationBuilder.NAME;
}

View File

@ -34,7 +34,7 @@ public class ParsedMin extends ParsedSingleValueNumericMetricsAggregation implem
}
@Override
protected String getType() {
public String getType() {
return MinAggregationBuilder.NAME;
}

View File

@ -31,7 +31,7 @@ import java.util.Iterator;
public class ParsedHDRPercentileRanks extends ParsedPercentileRanks {
@Override
protected String getType() {
public String getType() {
return InternalHDRPercentileRanks.NAME;
}

View File

@ -29,7 +29,7 @@ import java.io.IOException;
public class ParsedHDRPercentiles extends ParsedPercentiles implements Percentiles {
@Override
protected String getType() {
public String getType() {
return InternalHDRPercentiles.NAME;
}

View File

@ -31,7 +31,7 @@ import java.util.Iterator;
public class ParsedTDigestPercentileRanks extends ParsedPercentileRanks {
@Override
protected String getType() {
public String getType() {
return InternalTDigestPercentileRanks.NAME;
}

View File

@ -29,7 +29,7 @@ import java.io.IOException;
public class ParsedTDigestPercentiles extends ParsedPercentiles implements Percentiles {
@Override
protected String getType() {
public String getType() {
return InternalTDigestPercentiles.NAME;
}

View File

@ -87,7 +87,7 @@ public class ParsedStats extends ParsedAggregation implements Stats {
}
@Override
protected String getType() {
public String getType() {
return StatsAggregationBuilder.NAME;
}

View File

@ -44,7 +44,7 @@ public class ParsedExtendedStats extends ParsedStats implements ExtendedStats {
protected double avg;
@Override
protected String getType() {
public String getType() {
return ExtendedStatsAggregationBuilder.NAME;
}

View File

@ -34,7 +34,7 @@ public class ParsedSum extends ParsedSingleValueNumericMetricsAggregation implem
}
@Override
protected String getType() {
public String getType() {
return SumAggregationBuilder.NAME;
}

View File

@ -48,7 +48,7 @@ public class ParsedValueCount extends ParsedAggregation implements ValueCount {
}
@Override
protected String getType() {
public String getType() {
return ValueCountAggregationBuilder.NAME;
}

View File

@ -29,7 +29,7 @@ import java.io.IOException;
public class ParsedSimpleValue extends ParsedSingleValueNumericMetricsAggregation implements SimpleValue {
@Override
protected String getType() {
public String getType() {
return InternalSimpleValue.NAME;
}

View File

@ -38,7 +38,7 @@ public class ParsedBucketMetricValue extends ParsedSingleValueNumericMetricsAggr
}
@Override
protected String getType() {
public String getType() {
return InternalBucketMetricValue.NAME;
}

View File

@ -27,7 +27,7 @@ import org.elasticsearch.search.aggregations.metrics.stats.ParsedStats;
public class ParsedStatsBucket extends ParsedStats implements StatsBucket {
@Override
protected String getType() {
public String getType() {
return StatsBucketPipelineAggregationBuilder.NAME;
}

View File

@ -27,7 +27,7 @@ import org.elasticsearch.search.aggregations.metrics.stats.extended.ParsedExtend
public class ParsedExtendedStatsBucket extends ParsedExtendedStats implements ExtendedStatsBucket {
@Override
protected String getType() {
public String getType() {
return ExtendedStatsBucketPipelineAggregationBuilder.NAME;
}

View File

@ -42,7 +42,7 @@ public class ParsedDerivative extends ParsedSimpleValue implements Derivative {
}
@Override
protected String getType() {
public String getType() {
return DerivativePipelineAggregationBuilder.NAME;
}

View File

@ -53,6 +53,7 @@ import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.I
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.InternalExtendedStatsBucketTests;
import org.elasticsearch.search.aggregations.pipeline.derivative.InternalDerivativeTests;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalAggregationTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.junit.After;
import org.junit.Before;

View File

@ -21,6 +21,7 @@ package org.elasticsearch.search.aggregations;
import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.test.InternalAggregationTestCase;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -94,7 +94,7 @@ public class ParsedAggregationTests extends ESTestCase {
}
@Override
protected String getType() {
public String getType() {
return "type";
}
@ -122,7 +122,7 @@ public class ParsedAggregationTests extends ESTestCase {
}
@Override
protected String getType() {
public String getType() {
return "type";
}

View File

@ -21,7 +21,7 @@ package org.elasticsearch.search.aggregations.metrics.avg;
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.search.DocValueFormat;
import org.elasticsearch.search.aggregations.InternalAggregationTestCase;
import org.elasticsearch.search.aggregations.ParsedAggregation;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.test.InternalAggregationTestCase;

View File

@ -21,8 +21,8 @@ package org.elasticsearch.search.aggregations.metrics.percentiles;
import org.elasticsearch.search.DocValueFormat;
import org.elasticsearch.search.aggregations.InternalAggregation;
import org.elasticsearch.search.aggregations.InternalAggregationTestCase;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.test.InternalAggregationTestCase;
import java.io.IOException;
import java.util.Arrays;

View File

@ -21,9 +21,9 @@ package org.elasticsearch.search.aggregations.metrics.percentiles.tdigest;
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.search.DocValueFormat;
import org.elasticsearch.search.aggregations.metrics.percentiles.InternalPercentilesRanksTestCase;
import org.elasticsearch.search.aggregations.metrics.percentiles.ParsedPercentiles;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.test.InternalAggregationTestCase;
import java.util.Arrays;
import java.util.List;

View File

@ -20,9 +20,9 @@
package org.elasticsearch.search.aggregations.pipeline.bucketmetrics;
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.search.aggregations.InternalAggregationTestCase;
import org.elasticsearch.search.aggregations.ParsedAggregation;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.test.InternalAggregationTestCase;
import java.util.Collections;
import java.util.List;

View File

@ -35,6 +35,9 @@ import org.elasticsearch.rest.action.search.RestSearchAction;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.search.DocValueFormat;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.InternalAggregation;
import org.elasticsearch.search.aggregations.ParsedAggregation;
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.histogram.ParsedDateHistogram;
@ -76,7 +79,16 @@ import org.elasticsearch.search.aggregations.metrics.valuecount.ValueCountAggreg
import org.elasticsearch.search.aggregations.pipeline.InternalSimpleValue;
import org.elasticsearch.search.aggregations.pipeline.ParsedSimpleValue;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.InternalBucketMetricValue;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.ParsedBucketMetricValue;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.ParsedPercentilesBucket;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.percentile.PercentilesBucketPipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.ParsedStatsBucket;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.StatsBucketPipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ExtendedStatsBucketPipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.stats.extended.ParsedExtendedStatsBucket;
import org.elasticsearch.search.aggregations.pipeline.derivative.DerivativePipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.derivative.ParsedDerivative;
import java.io.IOException;
import java.util.ArrayList;
@ -99,7 +111,7 @@ public abstract class InternalAggregationTestCase<T extends InternalAggregation>
private final NamedXContentRegistry namedXContentRegistry = new NamedXContentRegistry(getNamedXContents());
static List<NamedXContentRegistry.Entry> getNamedXContents() {
public static List<NamedXContentRegistry.Entry> getNamedXContents() {
Map<String, ContextParser<Object, ? extends Aggregation>> namedXContents = new HashMap<>();
namedXContents.put(CardinalityAggregationBuilder.NAME, (p, c) -> ParsedCardinality.fromXContent(p, (String) c));
namedXContents.put(InternalHDRPercentiles.NAME, (p, c) -> ParsedHDRPercentiles.fromXContent(p, (String) c));
@ -184,7 +196,7 @@ public abstract class InternalAggregationTestCase<T extends InternalAggregation>
protected abstract void assertReduced(T reduced, List<T> inputs);
@Override
protected final T createTestInstance() {
public final T createTestInstance() {
return createTestInstance(randomAlphaOfLength(5));
}