buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public Explanation explain(AtomicReaderContext context, int doc) throws IOException {
Explanation subQueryExpl = subQueryWeight.explain(context, doc);
if (!subQueryExpl.isMatch()) {
return subQueryExpl;
}
// First: Gather explanations for all filt... | public Explanation explain(AtomicReaderContext context, int doc) throws IOException {
Explanation subQueryExpl = subQueryWeight.explain(context, doc);
if (!subQueryExpl.isMatch()) {
return subQueryExpl;
}
// First: Gather explanations for all filt... |
public V<T> obtain(int sizing) {
return new NV<T>(c.newInstance(sizing));
}
| public V<T> obtain(int sizing) {
return new NV<>(c.newInstance(sizing));
}
|
private final Sync<V> sync = new Sync<V>();
| private final Sync<V> sync = new Sync<>();
|
public static <T> PrioritizedCallable<T> wrap(Callable<T> callable, Priority priority) {
return new Wrapped<T>(callable, priority);
}
| public static <T> PrioritizedCallable<T> wrap(Callable<T> callable, Priority priority) {
return new Wrapped<>(callable, priority);
}
|
public void performStateRecovery(final GatewayStateRecoveredListener listener) throws GatewayException {
ObjectOpenHashSet<String> nodesIds = ObjectOpenHashSet.from(clusterService.state().nodes().masterNodes().keys());
logger.trace("performing state recovery from {}", nodesIds);
TransportNod... | public void performStateRecovery(final GatewayStateRecoveredListener listener) throws GatewayException {
ObjectOpenHashSet<String> nodesIds = ObjectOpenHashSet.from(clusterService.state().nodes().masterNodes().keys());
logger.trace("performing state recovery from {}", nodesIds);
TransportNod... |
private String guessMimeType(String path) {
int lastDot = path.lastIndexOf('.');
if (lastDot == -1) {
return "";
}
String extension = path.substring(lastDot + 1).toLowerCase(Locale.ROOT);
String mimeType = DEFAULT_MIME_TYPES.get(extension);
if (mimeType ==... | private String guessMimeType(String path) {
int lastDot = path.lastIndexOf('.');
if (lastDot == -1) {
return "";
}
String extension = path.substring(lastDot + 1).toLowerCase(Locale.ROOT);
String mimeType = DEFAULT_MIME_TYPES.get(extension);
if (mimeType ==... |
public NettyHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request, Channel channel) {
this.request = request;
this.channel = channel;
this.params = new HashMap<String, String>();
if (request.getContent().readable()) {
this.content = new ChannelBufferBytesRefe... | public NettyHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request, Channel channel) {
this.request = request;
this.channel = channel;
this.params = new HashMap<>();
if (request.getContent().readable()) {
this.content = new ChannelBufferBytesReference(request.... |
public static List<String> loadWordList(Reader reader, String comment) throws IOException {
final List<String> result = new ArrayList<String>();
BufferedReader br = null;
try {
if (reader instanceof BufferedReader) {
br = (BufferedReader) reader;
} els... | public static List<String> loadWordList(Reader reader, String comment) throws IOException {
final List<String> result = new ArrayList<>();
BufferedReader br = null;
try {
if (reader instanceof BufferedReader) {
br = (BufferedReader) reader;
} else {
... |
public CJKBigramFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
outputUnigrams = settings.getAsBoolean("output_unigrams", false);
final String[] asArray = settings.getAsArray(... | public CJKBigramFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
outputUnigrams = settings.getAsBoolean("output_unigrams", false);
final String[] asArray = settings.getAsArray(... |
private final Set<CharMatcher> matchers;
Builder() {
matchers = new HashSet<CharMatcher>();
}
| private final Set<CharMatcher> matchers;
Builder() {
matchers = new HashSet<>();
}
|
private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<NamedAnalyzer>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_double/max", AnalyzerScope.GLOBAL, new NumericDoubleAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; ... | private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_double/max", AnalyzerScope.GLOBAL, new NumericDoubleAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i += 4) {
... |
private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<NamedAnalyzer>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_float/max", AnalyzerScope.GLOBAL, new NumericFloatAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i ... | private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_float/max", AnalyzerScope.GLOBAL, new NumericFloatAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i += 4) {
... |
private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<NamedAnalyzer>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_int/max", AnalyzerScope.GLOBAL, new NumericIntegerAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i ... | private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_int/max", AnalyzerScope.GLOBAL, new NumericIntegerAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i += 4) {
... |
private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<NamedAnalyzer>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_long/max", AnalyzerScope.GLOBAL, new NumericLongAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i +=... | private final static IntObjectOpenHashMap<NamedAnalyzer> builtIn;
static {
builtIn = new IntObjectOpenHashMap<>();
builtIn.put(Integer.MAX_VALUE, new NamedAnalyzer("_long/max", AnalyzerScope.GLOBAL, new NumericLongAnalyzer(Integer.MAX_VALUE)));
for (int i = 0; i <= 64; i += 4) {
... |
private byte[] parseTypes(Collection<String> rules) {
SortedMap<Character, Byte> typeMap = new TreeMap<Character, Byte>();
for (String rule : rules) {
Matcher m = typePattern.matcher(rule);
if (!m.find())
throw new RuntimeException("Invalid Mapping Rule : [" +... | private byte[] parseTypes(Collection<String> rules) {
SortedMap<Character, Byte> typeMap = new TreeMap<>();
for (String rule : rules) {
Matcher m = typePattern.matcher(rule);
if (!m.find())
throw new RuntimeException("Invalid Mapping Rule : [" + rule + "]");
... |
private final String[] files;
SnapshotIndexCommit(SnapshotDeletionPolicy deletionPolicy, IndexCommit cp) throws IOException {
super(cp);
this.deletionPolicy = deletionPolicy;
ArrayList<String> tmpFiles = new ArrayList<String>();
for (String o : cp.getFileNames()) {
t... | private final String[] files;
SnapshotIndexCommit(SnapshotDeletionPolicy deletionPolicy, IndexCommit cp) throws IOException {
super(cp);
this.deletionPolicy = deletionPolicy;
ArrayList<String> tmpFiles = new ArrayList<>();
for (String o : cp.getFileNames()) {
tmpFile... |
public FieldDataStats stats(String... fields) {
ObjectLongOpenHashMap<String> fieldTotals = null;
if (fields != null && fields.length > 0) {
fieldTotals = new ObjectLongOpenHashMap<String>();
for (Map.Entry<String, CounterMetric> entry : perFieldTotals.entrySet()) {
... | public FieldDataStats stats(String... fields) {
ObjectLongOpenHashMap<String> fieldTotals = null;
if (fields != null && fields.length > 0) {
fieldTotals = new ObjectLongOpenHashMap<>();
for (Map.Entry<String, CounterMetric> entry : perFieldTotals.entrySet()) {
... |
public FSTBytesAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
FSTBytesAtomicFieldData data = null;
// TODO: Use an actual estimator to estimate before loading... | public FSTBytesAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
FSTBytesAtomicFieldData data = null;
// TODO: Use an actual estimator to estimate before loading... |
public ParentChildIndexFieldData(Index index, @IndexSettings Settings indexSettings, FieldMapper.Names fieldNames,
FieldDataType fieldDataType, IndexFieldDataCache cache, MapperService mapperService,
CircuitBreakerService breakerService) {
... | public ParentChildIndexFieldData(Index index, @IndexSettings Settings indexSettings, FieldMapper.Names fieldNames,
FieldDataType fieldDataType, IndexFieldDataCache cache, MapperService mapperService,
CircuitBreakerService breakerService) {
... |
private void addValue(String name, Object value) {
if (fieldsValues == null) {
fieldsValues = newHashMap();
}
List<Object> values = fieldsValues.get(name);
if (values == null) {
values = new ArrayList<Object>(2);
fieldsValues.put(name, values);
... | private void addValue(String name, Object value) {
if (fieldsValues == null) {
fieldsValues = newHashMap();
}
List<Object> values = fieldsValues.get(name);
if (values == null) {
values = new ArrayList<>(2);
fieldsValues.put(name, values);
... |
public void readFrom(StreamInput in) throws IOException {
name = in.readString();
int size = in.readVInt();
values = new ArrayList<Object>(size);
for (int i = 0; i < size; i++) {
values.add(in.readGenericValue());
}
}
| public void readFrom(StreamInput in) throws IOException {
name = in.readString();
int size = in.readVInt();
values = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
values.add(in.readGenericValue());
}
}
|
private GetResult innerGetLoadFromStoredFields(String type, String id, String[] gFields, FetchSourceContext fetchSourceContext, Engine.GetResult get, DocumentMapper docMapper) {
Map<String, GetField> fields = null;
BytesReference source = null;
Versions.DocIdAndVersion docIdAndVersion = get.... | private GetResult innerGetLoadFromStoredFields(String type, String id, String[] gFields, FetchSourceContext fetchSourceContext, Engine.GetResult get, DocumentMapper docMapper) {
Map<String, GetField> fields = null;
BytesReference source = null;
Versions.DocIdAndVersion docIdAndVersion = get.... |
public FieldMappers remove(FieldMapper mapper) {
ArrayList<FieldMapper> list = new ArrayList<FieldMapper>(fieldMappers.length);
for (FieldMapper fieldMapper : fieldMappers) {
if (!fieldMapper.equals(mapper)) { // identify equality
list.add(fieldMapper);
}
... | public FieldMappers remove(FieldMapper mapper) {
ArrayList<FieldMapper> list = new ArrayList<>(fieldMappers.length);
for (FieldMapper fieldMapper : fieldMappers) {
if (!fieldMapper.equals(mapper)) { // identify equality
list.add(fieldMapper);
}
}
... |
public void removeMappers(Iterable<FieldMapper> mappersToRemove) {
List<FieldMapper> tempMappers = new ArrayList<FieldMapper>(this.mappers);
ImmutableOpenMap.Builder<String, FieldMappers> tempName = ImmutableOpenMap.builder(this.name);
ImmutableOpenMap.Builder<String, FieldMappers> tempIndex... | public void removeMappers(Iterable<FieldMapper> mappersToRemove) {
List<FieldMapper> tempMappers = new ArrayList<>(this.mappers);
ImmutableOpenMap.Builder<String, FieldMappers> tempName = ImmutableOpenMap.builder(this.name);
ImmutableOpenMap.Builder<String, FieldMappers> tempIndexName = Immu... |
public Mapper.Builder<?, ?> parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException {
ContentPath.Type pathType = null;
AbstractFieldMapper.Builder mainFieldBuilder = null;
List<AbstractFieldMapper.Builder> fields = null;
... | public Mapper.Builder<?, ?> parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException {
ContentPath.Type pathType = null;
AbstractFieldMapper.Builder mainFieldBuilder = null;
List<AbstractFieldMapper.Builder> fields = null;
... |
public DynamicTemplate(String name, Map<String, Object> conf, String pathMatch, String pathUnmatch, String match, String unmatch, String matchMappingType, MatchType matchType, Map<String, Object> mapping) {
this.name = name;
this.conf = new TreeMap<String, Object>(conf);
this.pathMatch = pat... | public DynamicTemplate(String name, Map<String, Object> conf, String pathMatch, String pathUnmatch, String match, String unmatch, String matchMappingType, MatchType matchType, Map<String, Object> mapping) {
this.name = name;
this.conf = new TreeMap<>(conf);
this.pathMatch = pathMatch;
... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
String parentType = null;
boolean cache = false;
CacheKeyFilter.Key cacheKe... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
String parentType = null;
boolean cache = false;
CacheKeyFilter.Key cacheKe... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query innerQuery = null;
boolean queryFound = false;
float boost = 1.0f;
String parentType = null;
boolean score = false;
... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query innerQuery = null;
boolean queryFound = false;
float boost = 1.0f;
String parentType = null;
boolean score = false;
... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Filter filter = null;
Filter noMatchFilter = Queries.MATCH_ALL_FILTER;
boolean filterFound = false;
boolean indicesFound = false;
... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Filter filter = null;
Filter noMatchFilter = Queries.MATCH_ALL_FILTER;
boolean filterFound = false;
boolean indicesFound = false;
... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
Query noMatchQuery = Queries.newMatchAllQuery();
boolean queryFound = false;
boolean indicesFound = false;
... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
Query noMatchQuery = Queries.newMatchAllQuery();
boolean queryFound = false;
boolean indicesFound = false;
... |
public MultiMatchQueryBuilder field(String field, float boost) {
fields.add(field);
if (fieldsBoosts == null) {
fieldsBoosts = new ObjectFloatOpenHashMap<String>();
}
fieldsBoosts.put(field, boost);
return this;
}
| public MultiMatchQueryBuilder field(String field, float boost) {
fields.add(field);
if (fieldsBoosts == null) {
fieldsBoosts = new ObjectFloatOpenHashMap<>();
}
fieldsBoosts.put(field, boost);
return this;
}
|
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
Filter filter = null;
boolean filterFound = false;
float boost = 1.0f;
... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
Filter filter = null;
boolean filterFound = false;
float boost = 1.0f;
... |
public QueryStringQueryBuilder field(String field, float boost) {
if (fields == null) {
fields = newArrayList();
}
fields.add(field);
if (fieldsBoosts == null) {
fieldsBoosts = new ObjectFloatOpenHashMap<String>();
}
fieldsBoosts.put(field, boo... | public QueryStringQueryBuilder field(String field, float boost) {
if (fields == null) {
fields = newArrayList();
}
fields.add(field);
if (fieldsBoosts == null) {
fieldsBoosts = new ObjectFloatOpenHashMap<>();
}
fieldsBoosts.put(field, boost);
... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
String currentFieldName = null;
String queryBody = null;
String field = null;
Map<String, Float> fieldsAndWeights = null;
Boo... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
String currentFieldName = null;
String queryBody = null;
String field = null;
Map<String, Float> fieldsAndWeights = null;
Boo... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Token token = parser.nextToken();
if (!MATCH_NAME.equals(parser.currentName()) || token != XContentParser.Token.FIELD_NAME) {
throw n... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Token token = parser.nextToken();
if (!MATCH_NAME.equals(parser.currentName()) || token != XContentParser.Token.FIELD_NAME) {
throw n... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
float boost = 1.0f;
FiltersFunctionScoreQuery.ScoreMode scoreMode = FiltersFunctionScoreQuery.ScoreMode.Multiply;
... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
float boost = 1.0f;
FiltersFunctionScoreQuery.ScoreMode scoreMode = FiltersFunctionScoreQuery.ScoreMode.Multiply;
... |
public void parse(XContentParser parser, SearchContext context) throws Exception {
XContentParser.Token token = parser.currentToken();
if (token.isValue()) {
context.groupStats(ImmutableList.of(parser.text()));
} else if (token == XContentParser.Token.START_ARRAY) {
L... | public void parse(XContentParser parser, SearchContext context) throws Exception {
XContentParser.Token token = parser.currentToken();
if (token.isValue()) {
context.groupStats(ImmutableList.of(parser.text()));
} else if (token == XContentParser.Token.START_ARRAY) {
L... |
private HunspellDictionary loadDictionary(String locale, Settings nodeSettings, Environment env, Version version) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("Loading huspell dictionary [{}]...", locale);
}
File dicDir = new File(hunspellDir, locale);
i... | private HunspellDictionary loadDictionary(String locale, Settings nodeSettings, Environment env, Version version) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("Loading huspell dictionary [{}]...", locale);
}
File dicDir = new File(hunspellDir, locale);
i... |
public Result generateDump(String cause, @Nullable Map<String, Object> context, String... contributors) throws DumpGenerationFailedException {
long timestamp = System.currentTimeMillis();
String fileName = "";
if (context.containsKey("localNode")) {
DiscoveryNode localNode = (Dis... | public Result generateDump(String cause, @Nullable Map<String, Object> context, String... contributors) throws DumpGenerationFailedException {
long timestamp = System.currentTimeMillis();
String fileName = "";
if (context.containsKey("localNode")) {
DiscoveryNode localNode = (Dis... |
public Info total() {
if (total != null) {
return total;
}
Info res = new Info();
Set<String> seenDevices = new HashSet<String>(infos.length);
for (Info subInfo : infos) {
if (subInfo.dev != null) {
if (!seenDevices.add(subInfo.dev)) {
... | public Info total() {
if (total != null) {
return total;
}
Info res = new Info();
Set<String> seenDevices = new HashSet<>(infos.length);
for (Info subInfo : infos) {
if (subInfo.dev != null) {
if (!seenDevices.add(subInfo.dev)) {
... |
public void readFrom(StreamInput in) throws IOException {
pid = in.readLong();
version = in.readString();
vmName = in.readString();
vmVersion = in.readString();
vmVendor = in.readString();
startTime = in.readLong();
inputArguments = new String[in.readInt()];
... | public void readFrom(StreamInput in) throws IOException {
pid = in.readLong();
version = in.readString();
vmName = in.readString();
vmVersion = in.readString();
vmVendor = in.readString();
startTime = in.readLong();
inputArguments = new String[in.readInt()];
... |
public InternalNode(Settings pSettings, boolean loadConfigSettings) throws ElasticsearchException {
Tuple<Settings, Environment> tuple = InternalSettingsPreparer.prepareSettings(pSettings, loadConfigSettings);
tuple = new Tuple<Settings, Environment>(TribeService.processSettings(tuple.v1()), tuple.v... | public InternalNode(Settings pSettings, boolean loadConfigSettings) throws ElasticsearchException {
Tuple<Settings, Environment> tuple = InternalSettingsPreparer.prepareSettings(pSettings, loadConfigSettings);
tuple = new Tuple<>(TribeService.processSettings(tuple.v1()), tuple.v2());
// The... |
public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, boolean loadConfigSettings) {
// ignore this prefixes when getting properties from es. and elasticsearch.
String[] ignorePrefixes = new String[]{"es.default.", "elasticsearch.default."};
boolean useSystemPropertie... | public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, boolean loadConfigSettings) {
// ignore this prefixes when getting properties from es. and elasticsearch.
String[] ignorePrefixes = new String[]{"es.default.", "elasticsearch.default."};
boolean useSystemPropertie... |
public void initialize(Engine.Searcher docSearcher, ParsedDocument parsedDocument) {
this.docSearcher = docSearcher;
IndexReader indexReader = docSearcher.reader();
AtomicReaderContext atomicReaderContext = indexReader.leaves().get(0);
lookup().setNextReader(atomicReaderContext);
... | public void initialize(Engine.Searcher docSearcher, ParsedDocument parsedDocument) {
this.docSearcher = docSearcher;
IndexReader indexReader = docSearcher.reader();
AtomicReaderContext atomicReaderContext = indexReader.leaves().get(0);
lookup().setNextReader(atomicReaderContext);
... |
protected ImmutableList<SnapshotId> readSnapshotList() throws IOException {
byte[] data = snapshotsBlobContainer.readBlobFully(SNAPSHOTS_FILE);
ArrayList<SnapshotId> snapshots = new ArrayList<SnapshotId>();
XContentParser parser = null;
try {
parser = XContentHelper.creat... | protected ImmutableList<SnapshotId> readSnapshotList() throws IOException {
byte[] data = snapshotsBlobContainer.readBlobFully(SNAPSHOTS_FILE);
ArrayList<SnapshotId> snapshots = new ArrayList<>();
XContentParser parser = null;
try {
parser = XContentHelper.createParser(da... |
private Table buildTable(RestRequest request, final ClusterStateResponse state, final NodesStatsResponse stats) {
final ObjectIntOpenHashMap<String> allocs = new ObjectIntOpenHashMap<String>();
for (ShardRouting shard : state.getState().routingTable().allShards()) {
String nodeId = "UNA... | private Table buildTable(RestRequest request, final ClusterStateResponse state, final NodesStatsResponse stats) {
final ObjectIntOpenHashMap<String> allocs = new ObjectIntOpenHashMap<>();
for (ShardRouting shard : state.getState().routingTable().allShards()) {
String nodeId = "UNASSIGNE... |
private static List<DisplayHeader> buildDisplayHeaders(Table table, RestRequest request) {
String pHeaders = request.param("h");
List<DisplayHeader> display = new ArrayList<DisplayHeader>();
if (pHeaders != null) {
for (String possibility : Strings.splitStringByCommaToArray(pHead... | private static List<DisplayHeader> buildDisplayHeaders(Table table, RestRequest request) {
String pHeaders = request.param("h");
List<DisplayHeader> display = new ArrayList<>();
if (pHeaders != null) {
for (String possibility : Strings.splitStringByCommaToArray(pHeaders)) {
... |
static public void addFieldStringsFromParameter(TermVectorRequest termVectorRequest, String fields) {
Set<String> selectedFields = termVectorRequest.selectedFields();
if (fields != null) {
String[] paramFieldStrings = Strings.commaDelimitedListToStringArray(fields);
for (Stri... | static public void addFieldStringsFromParameter(TermVectorRequest termVectorRequest, String fields) {
Set<String> selectedFields = termVectorRequest.selectedFields();
if (fields != null) {
String[] paramFieldStrings = Strings.commaDelimitedListToStringArray(fields);
for (Stri... |
public BucketsAggregator(String name, BucketAggregationMode bucketAggregationMode, AggregatorFactories factories,
long estimatedBucketsCount, AggregationContext context, Aggregator parent) {
super(name, bucketAggregationMode, factories, estimatedBucketsCount, context, parent);
... | public BucketsAggregator(String name, BucketAggregationMode bucketAggregationMode, AggregatorFactories factories,
long estimatedBucketsCount, AggregationContext context, Aggregator parent) {
super(name, bucketAggregationMode, factories, estimatedBucketsCount, context, parent);
... |
public InternalAggregation reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalSingleBucketAggregation reduced = ((InternalSingleBucketAggregation) aggregations.get(0));
reduced.a... | public InternalAggregation reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalSingleBucketAggregation reduced = ((InternalSingleBucketAggregation) aggregations.get(0));
reduced.a... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
int precision = DEFAULT_PRECISION;
int requiredSize = DEFAULT_MAX_NUM_CELLS;
int shardSize = -1;
XContentParser.Token token;
... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
int precision = DEFAULT_PRECISION;
int requiredSize = DEFAULT_MAX_NUM_CELLS;
int shardSize = -1;
XContentParser.Token token;
... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
String script = null;
... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<>(NumericValuesSource.class);
String field = null;
String script = null;
String scriptLa... |
public InternalAggregation buildAggregation(long owningBucketOrdinal) {
assert owningBucketOrdinal == 0;
List<InternalHistogram.Bucket> buckets = new ArrayList<InternalHistogram.Bucket>((int) bucketOrds.size());
for (long i = 0; i < bucketOrds.capacity(); ++i) {
final long ord = ... | public InternalAggregation buildAggregation(long owningBucketOrdinal) {
assert owningBucketOrdinal == 0;
List<InternalHistogram.Bucket> buckets = new ArrayList<>((int) bucketOrds.size());
for (long i = 0; i < bucketOrds.capacity(); ++i) {
final long ord = bucketOrds.id(i);
... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
String script = null;
... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<>(NumericValuesSource.class);
String field = null;
String script = null;
String scriptLa... |
public Bucket getBucketByKey(String key) {
try {
long time = Long.parseLong(key);
return super.getBucketByKey(time);
} catch (NumberFormatException nfe) {
// it's not a number, so lets try to parse it as a date using the formatter.
}
if (bucketsMap... | public Bucket getBucketByKey(String key) {
try {
long time = Long.parseLong(key);
return super.getBucketByKey(time);
} catch (NumberFormatException nfe) {
// it's not a number, so lets try to parse it as a date using the formatter.
}
if (bucketsMap... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<ValuesSource> config = new ValuesSourceConfig<ValuesSource>(ValuesSource.class);
String field = null;
XContentParser.Token token;
String cur... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<ValuesSource> config = new ValuesSourceConfig<>(ValuesSource.class);
String field = null;
XContentParser.Token token;
String currentFieldNam... |
public InternalRange buildEmptyAggregation() {
InternalAggregations subAggs = buildEmptySubAggregations();
List<org.elasticsearch.search.aggregations.bucket.range.Range.Bucket> buckets =
new ArrayList<org.elasticsearch.search.aggregations.bucket.range.Range.Bucket>(ra... | public InternalRange buildEmptyAggregation() {
InternalAggregations subAggs = buildEmptySubAggregations();
List<org.elasticsearch.search.aggregations.bucket.range.Range.Bucket> buckets =
new ArrayList<>(ranges.size());
for (RangeAggregator.Range range : ra... |
public void readFrom(StreamInput in) throws IOException {
this.name = in.readString();
this.valueFormatter = ValueFormatterStreams.readOptional(in);
this.requiredSize = readSize(in);
this.minDocCount = in.readVLong();
this.subsetSize = in.readVLong();
this.supersetSiz... | public void readFrom(StreamInput in) throws IOException {
this.name = in.readString();
this.valueFormatter = ValueFormatterStreams.readOptional(in);
this.requiredSize = readSize(in);
this.minDocCount = in.readVLong();
this.subsetSize = in.readVLong();
this.supersetSiz... |
public void readFrom(StreamInput in) throws IOException {
this.name = in.readString();
this.requiredSize = readSize(in);
this.minDocCount = in.readVLong();
this.subsetSize = in.readVLong();
this.supersetSize = in.readVLong();
int size = in.readVInt();
List<Int... | public void readFrom(StreamInput in) throws IOException {
this.name = in.readString();
this.requiredSize = readSize(in);
this.minDocCount = in.readVLong();
this.subsetSize = in.readVLong();
this.supersetSize = in.readVLong();
int size = in.readVInt();
List<Int... |
public void readFrom(StreamInput in) throws IOException {
this.name = in.readString();
this.order = InternalOrder.Streams.readOrder(in);
this.requiredSize = readSize(in);
this.minDocCount = in.readVLong();
int size = in.readVInt();
List<InternalTerms.Bucket> buckets =... | public void readFrom(StreamInput in) throws IOException {
this.name = in.readString();
this.order = InternalOrder.Streams.readOrder(in);
this.requiredSize = readSize(in);
this.minDocCount = in.readVLong();
int size = in.readVInt();
List<InternalTerms.Bucket> buckets =... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
String script = null;
... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<>(NumericValuesSource.class);
String field = null;
String script = null;
String scriptLa... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<BytesValuesSource> config = new ValuesSourceConfig<BytesValuesSource>(BytesValuesSource.class);
String field = null;
String script = null;
St... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<BytesValuesSource> config = new ValuesSourceConfig<>(BytesValuesSource.class);
String field = null;
String script = null;
String scriptLang =... |
protected ObjectOpenHashSet<Term> initialValue() {
return new ObjectOpenHashSet<Term>();
}
};
| protected ObjectOpenHashSet<Term> initialValue() {
return new ObjectOpenHashSet<>();
}
};
|
public void executePost(List<ContextDocIdSet> docSets) throws IOException {
List<ContextDocIdSet> filteredEntries = new ArrayList<ContextDocIdSet>(docSets.size());
for (int i = 0; i < docSets.size(); i++) {
ContextDocIdSet entry = docSets.get(i);
... | public void executePost(List<ContextDocIdSet> docSets) throws IOException {
List<ContextDocIdSet> filteredEntries = new ArrayList<>(docSets.size());
for (int i = 0; i < docSets.size(); i++) {
ContextDocIdSet entry = docSets.get(i);
DocI... |
public void parse(XContentParser parser, SearchContext context) throws Exception {
XContentParser.Token token;
List<SearchContextFacets.Entry> entries = new ArrayList<SearchContextFacets.Entry>();
String facetName = null;
while ((token = parser.nextToken()) != XContentParser.Token.... | public void parse(XContentParser parser, SearchContext context) throws Exception {
XContentParser.Token token;
List<SearchContextFacets.Entry> entries = new ArrayList<>();
String facetName = null;
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
... |
public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<InternalFullDateHistogramFacet.FullEntry>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
... | public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) ... |
public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<InternalFullDateHistogramFacet.FullEntry>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
... | public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) ... |
public InternalFacet buildFacet(String facetName) {
List<InternalFullHistogramFacet.FullEntry> fullEntries = new ArrayList<InternalFullHistogramFacet.FullEntry>(entries.v().size());
boolean[] states = entries.v().allocated;
Object[] values = entries.v().values;
for (int i = 0; i < st... | public InternalFacet buildFacet(String facetName) {
List<InternalFullHistogramFacet.FullEntry> fullEntries = new ArrayList<>(entries.v().size());
boolean[] states = entries.v().allocated;
Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) {
if (... |
public InternalFacet buildFacet(String facetName) {
List<InternalFullHistogramFacet.FullEntry> entries1 = new ArrayList<InternalFullHistogramFacet.FullEntry>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = ... | public InternalFacet buildFacet(String facetName) {
List<InternalFullHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) {
... |
public InternalFacet buildFacet(String facetName) {
List<InternalFullHistogramFacet.FullEntry> entries1 = new ArrayList<InternalFullHistogramFacet.FullEntry>(entries.v().size());
final boolean [] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i ... | public InternalFacet buildFacet(String facetName) {
List<InternalFullHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean [] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) {
... |
public void executePost(List<ContextDocIdSet> docSets) throws IOException {
List<ContextDocIdSet> nestedEntries = new ArrayList<ContextDocIdSet>(docSets.size());
for (int i = 0; i < docSets.size(); i++) {
ContextDocIdSet entry = docSets.get(i);
AtomicReade... | public void executePost(List<ContextDocIdSet> docSets) throws IOException {
List<ContextDocIdSet> nestedEntries = new ArrayList<>(docSets.size());
for (int i = 0; i < docSets.size(); i++) {
ContextDocIdSet entry = docSets.get(i);
AtomicReaderContext contex... |
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
int size = 10;
int shardSize = -1;
String[] fieldsNames = null;
ImmutableSet<BytesRef> excluded = ImmutableSet.of();
String regex = nu... | public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
int size = 10;
int shardSize = -1;
String[] fieldsNames = null;
ImmutableSet<BytesRef> excluded = ImmutableSet.of();
String regex = nu... |
public InternalFacet buildFacet(String facetName) {
if (facets.v().isEmpty()) {
facets.release();
return new InternalDoubleTermsFacet(facetName, comparatorType, size, ImmutableList.<InternalDoubleTermsFacet.DoubleEntry>of(), missing, total);
} else {
final boolean... | public InternalFacet buildFacet(String facetName) {
if (facets.v().isEmpty()) {
facets.release();
return new InternalDoubleTermsFacet(facetName, comparatorType, size, ImmutableList.<InternalDoubleTermsFacet.DoubleEntry>of(), missing, total);
} else {
final boolean... |
public InternalFacet buildFacet(String facetName) {
if (facets.v().isEmpty()) {
facets.release();
return new InternalLongTermsFacet(facetName, comparatorType, size, ImmutableList.<InternalLongTermsFacet.LongEntry>of(), missing, total);
} else {
LongIntOpenHashMap ... | public InternalFacet buildFacet(String facetName) {
if (facets.v().isEmpty()) {
facets.release();
return new InternalLongTermsFacet(facetName, comparatorType, size, ImmutableList.<InternalLongTermsFacet.LongEntry>of(), missing, total);
} else {
LongIntOpenHashMap ... |
public InternalFacet buildFacet(String facetName) {
if (facets.v().isEmpty()) {
facets.release();
return new InternalStringTermsFacet(facetName, comparatorType, size, ImmutableList.<InternalStringTermsFacet.TermEntry>of(), missing, total);
} else {
final boolean[]... | public InternalFacet buildFacet(String facetName) {
if (facets.v().isEmpty()) {
facets.release();
return new InternalStringTermsFacet(facetName, comparatorType, size, ImmutableList.<InternalStringTermsFacet.TermEntry>of(), missing, total);
} else {
final boolean[]... |
public InternalFacet buildFacet(String facetName) {
if (entries.v().isEmpty()) {
entries.release();
return new InternalTermsStatsDoubleFacet(facetName, comparatorType, size, ImmutableList.<InternalTermsStatsDoubleFacet.DoubleEntry>of(), missing);
}
if (size == 0) { //... | public InternalFacet buildFacet(String facetName) {
if (entries.v().isEmpty()) {
entries.release();
return new InternalTermsStatsDoubleFacet(facetName, comparatorType, size, ImmutableList.<InternalTermsStatsDoubleFacet.DoubleEntry>of(), missing);
}
if (size == 0) { //... |
public InternalFacet buildFacet(String facetName) {
if (entries.v().isEmpty()) {
entries.release();
return new InternalTermsStatsLongFacet(facetName, comparatorType, size, ImmutableList.<InternalTermsStatsLongFacet.LongEntry>of(), missing);
}
if (size == 0) { // all t... | public InternalFacet buildFacet(String facetName) {
if (entries.v().isEmpty()) {
entries.release();
return new InternalTermsStatsLongFacet(facetName, comparatorType, size, ImmutableList.<InternalTermsStatsLongFacet.LongEntry>of(), missing);
}
if (size == 0) { // all t... |
public InternalFacet buildFacet(String facetName) {
if (entries.v().isEmpty()) {
entries.release();
return new InternalTermsStatsStringFacet(facetName, comparatorType, size, ImmutableList.<InternalTermsStatsStringFacet.StringEntry>of(), missing);
}
if (size == 0) { //... | public InternalFacet buildFacet(String facetName) {
if (entries.v().isEmpty()) {
entries.release();
return new InternalTermsStatsStringFacet(facetName, comparatorType, size, ImmutableList.<InternalTermsStatsStringFacet.StringEntry>of(), missing);
}
if (size == 0) { //... |
public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticsearchException {
for (FieldDataFieldsContext.FieldDataField field : context.fieldDataFields().fields()) {
if (hitContext.hit().fieldsOrNull() == null) {
hitContext.hit().fields(new HashMap<String,... | public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticsearchException {
for (FieldDataFieldsContext.FieldDataField field : context.fieldDataFields().fields()) {
if (hitContext.hit().fieldsOrNull() == null) {
hitContext.hit().fields(new HashMap<String,... |
public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticsearchException {
for (PartialFieldsContext.PartialField field : context.partialFields().fields()) {
Object value = context.lookup().source().filter(field.includes(), field.excludes());
if (hitContext... | public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticsearchException {
for (PartialFieldsContext.PartialField field : context.partialFields().fields()) {
Object value = context.lookup().source().filter(field.includes(), field.excludes());
if (hitContext... |
public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticsearchException {
for (ScriptFieldsContext.ScriptField scriptField : context.scriptFields().fields()) {
scriptField.script().setNextReader(hitContext.readerContext());
scriptField.script().setNextDocId... | public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticsearchException {
for (ScriptFieldsContext.ScriptField scriptField : context.scriptFields().fields()) {
scriptField.script().setNextReader(hitContext.readerContext());
scriptField.script().setNextDocId... |
public void addMainQueryCollector(Collector collector) {
if (queryCollectors == null) {
queryCollectors = new ArrayList<Collector>();
}
queryCollectors.add(collector);
}
| public void addMainQueryCollector(Collector collector) {
if (queryCollectors == null) {
queryCollectors = new ArrayList<>();
}
queryCollectors.add(collector);
}
|
public DocIdSetCollector(DocSetCache docSetCache, Collector collector) {
this.docSetCache = docSetCache;
this.collector = collector;
this.docSets = new ArrayList<ContextDocIdSet>();
}
| public DocIdSetCollector(DocSetCache docSetCache, Collector collector) {
this.docSetCache = docSetCache;
this.collector = collector;
this.docSets = new ArrayList<>();
}
|
public void readFrom(StreamInput in) throws IOException {
name = in.readSharedString();
int size = in.readVInt();
values = new ArrayList<Object>(size);
for (int i = 0; i < size; i++) {
values.add(in.readGenericValue());
}
}
| public void readFrom(StreamInput in) throws IOException {
name = in.readSharedString();
int size = in.readVInt();
values = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
values.add(in.readGenericValue());
}
}
|
public Suggest execute(SuggestionSearchContext suggest, IndexReader reader) {
try {
CharsRef spare = new CharsRef(); // Maybe add CharsRef to CacheRecycler?
final List<Suggestion<? extends Entry<? extends Option>>> suggestions = new ArrayList<Suggestion<? extends Entry<? extends Opti... | public Suggest execute(SuggestionSearchContext suggest, IndexReader reader) {
try {
CharsRef spare = new CharsRef(); // Maybe add CharsRef to CacheRecycler?
final List<Suggestion<? extends Entry<? extends Option>>> suggestions = new ArrayList<>(suggest.suggestions().size());
... |
protected Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> innerExecute(String name,
CompletionSuggestionContext suggestionContext, IndexReader indexReader, CharsRef spare) throws IOException {
if (suggestionContext.mapper() == null || !(suggestio... | protected Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> innerExecute(String name,
CompletionSuggestionContext suggestionContext, IndexReader indexReader, CharsRef spare) throws IOException {
if (suggestionContext.mapper() == null || !(suggestio... |
public Suggestion<? extends Entry<? extends Option>> innerExecute(String name, PhraseSuggestionContext suggestion,
IndexReader indexReader, CharsRef spare) throws IOException {
double realWordErrorLikelihood = suggestion.realworldErrorLikelyhood();
final PhraseSuggestion response = new P... | public Suggestion<? extends Entry<? extends Option>> innerExecute(String name, PhraseSuggestionContext suggestion,
IndexReader indexReader, CharsRef spare) throws IOException {
double realWordErrorLikelihood = suggestion.realworldErrorLikelyhood();
final PhraseSuggestion response = new P... |
public void readFrom(StreamInput in) throws IOException {
int size = in.readVInt();
infos = new ArrayList<ThreadPool.Info>(size);
for (int i = 0; i < size; i++) {
ThreadPool.Info info = new ThreadPool.Info();
info.readFrom(in);
infos.add(info);
}
... | public void readFrom(StreamInput in) throws IOException {
int size = in.readVInt();
infos = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
ThreadPool.Info info = new ThreadPool.Info();
info.readFrom(in);
infos.add(info);
}
}
|
public void readFrom(StreamInput in) throws IOException {
int size = in.readVInt();
stats = new ArrayList<Stats>(size);
for (int i = 0; i < size; i++) {
Stats stats1 = new Stats();
stats1.readFrom(in);
stats.add(stats1);
}
| public void readFrom(StreamInput in) throws IOException {
int size = in.readVInt();
stats = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
Stats stats1 = new Stats();
stats1.readFrom(in);
stats.add(stats1);
}
|
protected TransportRequest(TransportRequest request) {
// create a new copy of the headers, since we are creating a new request which might have
// its headers changed in the context of that specific request
if (request.getHeaders() != null) {
this.headers = new HashMap<String, O... | protected TransportRequest(TransportRequest request) {
// create a new copy of the headers, since we are creating a new request which might have
// its headers changed in the context of that specific request
if (request.getHeaders() != null) {
this.headers = new HashMap<>(request... |
protected TransportResponse(TransportResponse request) {
// create a new copy of the headers, since we are creating a new request which might have
// its headers changed in the context of that specific request
if (request.getHeaders() != null) {
this.headers = new HashMap<String,... | protected TransportResponse(TransportResponse request) {
// create a new copy of the headers, since we are creating a new request which might have
// its headers changed in the context of that specific request
if (request.getHeaders() != null) {
this.headers = new HashMap<>(reque... |
public static void main(String[] args) throws Exception {
int minTerms = 49;
int maxTerms = 50;
int maxIter = 1000;
int warmerIter = 1000;
init(maxTerms);
List<Results> allResults = new ArrayList<BasicScriptBenchmark.Results>();
Settings settings = settingsB... | public static void main(String[] args) throws Exception {
int minTerms = 49;
int maxTerms = 50;
int maxIter = 1000;
int warmerIter = 1000;
init(maxTerms);
List<Results> allResults = new ArrayList<>();
Settings settings = settingsBuilder().put("plugin.types",... |
public static void main(String[] args) throws Exception {
int minTerms = 1;
int maxTerms = 50;
int maxIter = 100;
int warmerIter = 10;
boolean runMVEL = false;
init(maxTerms);
List<Results> allResults = new ArrayList<BasicScriptBenchmark.Results>();
... | public static void main(String[] args) throws Exception {
int minTerms = 1;
int maxTerms = 50;
int maxIter = 100;
int warmerIter = 10;
boolean runMVEL = false;
init(maxTerms);
List<Results> allResults = new ArrayList<>();
Settings settings = settings... |
public static void main(String[] args) throws Exception {
int minTerms = 1;
int maxTerms = 50;
int maxIter = 100;
int warmerIter = 10;
init(maxTerms);
List<Results> allResults = new ArrayList<BasicScriptBenchmark.Results>();
Settings settings = settingsBuild... | public static void main(String[] args) throws Exception {
int minTerms = 1;
int maxTerms = 50;
int maxIter = 100;
int warmerIter = 10;
init(maxTerms);
List<Results> allResults = new ArrayList<>();
Settings settings = settingsBuilder().put("plugin.types", Nat... |
private void setIndexReadOnly(String index, Object value) {
HashMap<String, Object> newSettings = new HashMap<String, Object>();
newSettings.put(IndexMetaData.SETTING_READ_ONLY, value);
UpdateSettingsRequestBuilder settingsRequest = client().admin().indices().prepareUpdateSettings(index);
... | private void setIndexReadOnly(String index, Object value) {
HashMap<String, Object> newSettings = new HashMap<>();
newSettings.put(IndexMetaData.SETTING_READ_ONLY, value);
UpdateSettingsRequestBuilder settingsRequest = client().admin().indices().prepareUpdateSettings(index);
setting... |
public void testRandom() {
AllocationService service = createAllocationService(settingsBuilder()
.put("cluster.routing.allocation.concurrent_recoveries", 10)
.put("cluster.routing.allocation.allow_rebalance", "always")
.put("cluster.routing.allocation.cluster_... | public void testRandom() {
AllocationService service = createAllocationService(settingsBuilder()
.put("cluster.routing.allocation.concurrent_recoveries", 10)
.put("cluster.routing.allocation.allow_rebalance", "always")
.put("cluster.routing.allocation.cluster_... |
public void testRandomDecisions() {
RandomAllocationDecider randomAllocationDecider = new RandomAllocationDecider(getRandom());
AllocationService strategy = new AllocationService(settingsBuilder().build(), new AllocationDeciders(ImmutableSettings.EMPTY,
new HashSet<AllocationDecider>... | public void testRandomDecisions() {
RandomAllocationDecider randomAllocationDecider = new RandomAllocationDecider(getRandom());
AllocationService strategy = new AllocationService(settingsBuilder().build(), new AllocationDeciders(ImmutableSettings.EMPTY,
new HashSet<>(Arrays.asList(ne... |
private List<String> toList(Iterable<String> iterable) {
List<String> list = new ArrayList<String>();
for (String s : iterable) {
list.add(s);
}
return list;
}
} | private List<String> toList(Iterable<String> iterable) {
List<String> list = new ArrayList<>();
for (String s : iterable) {
list.add(s);
}
return list;
}
} |
public void testNestedDocuments() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
List<Document> docs = new ArrayList<Document>();
for (int i = 0; i < 4; ++i) {
... | public void testNestedDocuments() throws IOException {
Directory dir = newDirectory();
IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
List<Document> docs = new ArrayList<>();
for (int i = 0; i < 4; ++i) {
// Ne... |
public void testDestroyWhenOverCapacity() {
Recycler<byte[]> r = newRecycler(limit);
// get & keep reference to new/recycled data
Recycler.V<byte[]> o = r.obtain();
byte[] data = o.v();
assertFresh(data);
// now exhaust the recycler
List<V<byte[]>> vals = ne... | public void testDestroyWhenOverCapacity() {
Recycler<byte[]> r = newRecycler(limit);
// get & keep reference to new/recycled data
Recycler.V<byte[]> o = r.obtain();
byte[] data = o.v();
assertFresh(data);
// now exhaust the recycler
List<V<byte[]>> vals = ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.