buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
// @off
IssueTest.class,
AccelerometerTest.class,
ActionSequenceTest.class,
ActionTest.class,
AlphaTest.class,
Animation3DTest.class,
AnimationTest.class,
AssetManagerTest.class,
AtlasI... | public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
// @off
IssueTest.class,
AccelerometerTest.class,
ActionSequenceTest.class,
ActionTest.class,
AlphaTest.class,
Animation3DTest.class,
AnimationTest.class,
AssetManagerTest.class,
AtlasI... |
public float angleRad(Vector reference) {
return (float)Math.atan2(crs(reference), dot(reference)) * MathUtils.radiansToDegrees;
}
| public float angleRad(Vector reference) {
return (float)Math.atan2(crs(reference), dot(reference));
}
|
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, BitmapFontParameter parameter) {
Array<AssetDescriptor> deps = Array.of(AssetDescriptor.class);
if (parameter != null && parameter.bitmapFontData != null) {
data = parameter.bitmapFontData;
return deps;
}
data = new BitmapFo... | public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, BitmapFontParameter parameter) {
Array<AssetDescriptor> deps = new Array<AssetDescriptor>();
if (parameter != null && parameter.bitmapFontData != null) {
data = parameter.bitmapFontData;
return deps;
}
data = new BitmapFontD... |
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, ParticleEffectParameter param) {
Array<AssetDescriptor> deps = null;
if (param != null && param.atlasFile != null) {
deps = Array.of(AssetDescriptor.class);
deps.add(new AssetDescriptor<TextureAtlas>(param.atlasFile, TextureAtla... | public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, ParticleEffectParameter param) {
Array<AssetDescriptor> deps = null;
if (param != null && param.atlasFile != null) {
deps = new Array<AssetDescriptor>();
deps.add(new AssetDescriptor<TextureAtlas>(param.atlasFile, TextureAtlas.c... |
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle atlasFile, TextureAtlasParameter parameter) {
FileHandle imgDir = atlasFile.parent();
if (parameter != null)
data = new TextureAtlasData(atlasFile, imgDir, parameter.flip);
else {
data = new TextureAtlasData(atlasFile, imgDir, fals... | public Array<AssetDescriptor> getDependencies (String fileName, FileHandle atlasFile, TextureAtlasParameter parameter) {
FileHandle imgDir = atlasFile.parent();
if (parameter != null)
data = new TextureAtlasData(atlasFile, imgDir, parameter.flip);
else {
data = new TextureAtlasData(atlasFile, imgDir, fals... |
protected Array<Decal> newObject () {
return Array.of(Decal.class);
}
};
| protected Array<Decal> newObject () {
return new Array<Decal>();
}
};
|
protected void doMasterOperation(final GetMappingsRequest request, final ClusterState state, final ActionListener<GetMappingsResponse> listener) throws ElasticSearchException {
logger.debug("Serving getMapping request based on version {}", state.version());
ImmutableMap<String, ImmutableMap<String, ... | protected void doMasterOperation(final GetMappingsRequest request, final ClusterState state, final ActionListener<GetMappingsResponse> listener) throws ElasticSearchException {
logger.trace("serving getMapping request based on version {}", state.version());
ImmutableMap<String, ImmutableMap<String, ... |
public static final String NULL_VALUE = null;
}
public static class Builder extends JsonFieldMapper.Builder<Builder, JsonStringFieldMapper> {
| public static final String NULL_VALUE = null;
}
public static class Builder extends JsonFieldMapper.OpenBuilder<Builder, JsonStringFieldMapper> {
|
@Test public void testSimpleMapper() throws Exception {
JsonDocumentMapper docMapper = doc(
object("person")
.add(object("name").add(stringField("first").store(YES).index(Field.Index.NO)))
).sourceField(source("_source").compressionThreshold(0)).build();
... | @Test public void testSimpleMapper() throws Exception {
JsonDocumentMapper docMapper = doc(
object("person")
.add(object("name").add(stringField("first").store(YES).index(Field.Index.NO)))
).sourceField(source().compressionThreshold(0)).build();
Strin... |
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException {
String dateAsString;
if (context.externalValueSet()) {
dateAsString = (String) context.externalValue();
if (dateAsString == null) {
dateAsString = nullValue;
... | @Override protected Fieldable parseCreateField(ParseContext context) throws IOException {
String dateAsString;
if (context.externalValueSet()) {
dateAsString = (String) context.externalValue();
if (dateAsString == null) {
dateAsString = nullValue;
... |
@Override protected Field parseCreateField(ParseContext context) throws IOException {
String value;
if (context.externalValueSet()) {
value = (String) context.externalValue();
if (value == null) {
value = nullValue;
}
} else {
i... | @Override protected Field parseCreateField(ParseContext context) throws IOException {
String value;
if (context.externalValueSet()) {
value = (String) context.externalValue();
if (value == null) {
value = nullValue;
}
} else {
i... |
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException {
String ipAsString;
if (context.externalValueSet()) {
ipAsString = (String) context.externalValue();
if (ipAsString == null) {
ipAsString = nullValue;
}
... | @Override protected Fieldable parseCreateField(ParseContext context) throws IOException {
String ipAsString;
if (context.externalValueSet()) {
ipAsString = (String) context.externalValue();
if (ipAsString == null) {
ipAsString = nullValue;
}
... |
public FileHandle[] list (FilenameFilter filter) {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file);
File[] relativePaths = file.listFiles(filter);
if(relativePaths == null) return new FileHandle[0];
FileHandle[] handles = new FileHandle[relativePaths.... | public FileHandle[] list (FilenameFilter filter) {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file);
File[] relativePaths = file().listFiles(filter);
if(relativePaths == null) return new FileHandle[0];
FileHandle[] handles = new FileHandle[relativePath... |
public static TimeValue parseTimeValue(String sValue, TimeValue defaultValue) {
if (sValue == null) {
return defaultValue;
}
try {
long millis;
if (sValue.endsWith("S")) {
millis = Long.parseLong(sValue.substring(0, sValue.length() - 1));
... | public static TimeValue parseTimeValue(String sValue, TimeValue defaultValue) {
if (sValue == null) {
return defaultValue;
}
try {
long millis;
if (sValue.endsWith("S")) {
millis = Long.parseLong(sValue.substring(0, sValue.length() - 1));
... |
public MvelScriptEngineService(Settings settings) {
super(settings);
parserConfiguration = new ParserConfiguration();
parserConfiguration.addPackageImport("java.util");
parserConfiguration.addPackageImport("org.joda");
parserConfiguration.addImport("time", MVEL.getStaticMeth... | public MvelScriptEngineService(Settings settings) {
super(settings);
parserConfiguration = new ParserConfiguration();
parserConfiguration.addPackageImport("java.util");
parserConfiguration.addPackageImport("org.joda.time");
parserConfiguration.addImport("time", MVEL.getStati... |
private Tuple<String, Map<String, Object>> extractMapping(String type, String source) throws MapperParsingException {
Map<String, Object> root;
XContentParser xContentParser = null;
try {
xContentParser = XContentFactory.xContent(source).createParser(source);
root = x... | private Tuple<String, Map<String, Object>> extractMapping(String type, String source) throws MapperParsingException {
Map<String, Object> root;
XContentParser xContentParser = null;
try {
xContentParser = XContentFactory.xContent(source).createParser(source);
root = x... |
protected AbstractConcurrentMapFilterCache(Index index, @IndexSettings Settings indexSettings, ThreadPool threadPool) {
super(index, indexSettings);
this.readerCleanerSchedule = componentSettings.getAsTime("reader_cleaner_schedule", TimeValue.timeValueMinutes(1));
logger.debug("Using [" + ... | protected AbstractConcurrentMapFilterCache(Index index, @IndexSettings Settings indexSettings, ThreadPool threadPool) {
super(index, indexSettings);
this.readerCleanerSchedule = componentSettings.getAsTime("reader_cleaner_schedule", TimeValue.timeValueMinutes(1));
logger.debug("Using [" + ... |
@Inject public KeepLastNDeletionPolicy(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.numToKeep = componentSettings.getAsInt("num_to_keep", 5);
logger.debug("Using [KeepLastN] deletion policy with num_to_keep [{}]", numToKeep);
}
| @Inject public KeepLastNDeletionPolicy(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.numToKeep = componentSettings.getAsInt("num_to_keep", 5);
logger.debug("Using [keep_last_n] deletion policy with num_to_keep[{}]", numToKeep);
}
|
@Inject public KeepOnlyLastDeletionPolicy(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
logger.debug("Using [KeepOnlyLast] deletion policy");
}
| @Inject public KeepOnlyLastDeletionPolicy(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
logger.debug("Using [keep_only_last] deletion policy");
}
|
@Inject public BalancedSegmentMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMerg... | @Inject public BalancedSegmentMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMerg... |
@Inject public LogByteSizeMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMergePol... | @Inject public LogByteSizeMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsSize("min_merge_size", new SizeValue((long) LogByteSizeMergePol... |
@Inject public LogDocMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeDocs = componentSettings.getAsInt("min_merge_docs", LogDocMergePolicy.DEFAULT_MIN_MERGE_DOCS);
... | @Inject public LogDocMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeDocs = componentSettings.getAsInt("min_merge_docs", LogDocMergePolicy.DEFAULT_MIN_MERGE_DOCS);
... |
@Inject public ByteBufferStore(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.bufferSize = componentSettings.getAsSize("buffer_size", new SizeValue(100, SizeUnit.KB));
this.cacheSize = componentSettings.getAsSize("cache_size", new SizeValue(20,... | @Inject public ByteBufferStore(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.bufferSize = componentSettings.getAsSize("buffer_size", new SizeValue(100, SizeUnit.KB));
this.cacheSize = componentSettings.getAsSize("cache_size", new SizeValue(20,... |
@Inject public HeapStore(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.bufferSize = componentSettings.getAsSize("buffer_size", new SizeValue(100, SizeUnit.KB));
this.cacheSize = componentSettings.getAsSize("cache_size", new SizeValue(20, SizeU... | @Inject public HeapStore(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.bufferSize = componentSettings.getAsSize("buffer_size", new SizeValue(100, SizeUnit.KB));
this.cacheSize = componentSettings.getAsSize("cache_size", new SizeValue(20, SizeU... |
@Inject public RamStore(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.directory = new RAMDirectory();
logger.debug("Using [RAM] Store");
}
| @Inject public RamStore(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.directory = new RAMDirectory();
logger.debug("Using [ram] Store");
}
|
@Override public boolean onPortNumber(int portNumber) {
try {
LocateRegistry.createRegistry(portNumber);
serviceUrl = settings.get("jmx.serviceUrl", JMXRMI_URI_PATTERN).replace("{jmx.port}", Integer.toString(portNumber));
... | @Override public boolean onPortNumber(int portNumber) {
try {
LocateRegistry.createRegistry(portNumber);
serviceUrl = settings.get("jmx.serviceUrl", JMXRMI_URI_PATTERN).replace("{jmx.port}", Integer.toString(portNumber));
... |
private Channel nodeChannel(Node node) throws ConnectTransportException {
if (node == null) {
throw new ConnectTransportException(node, "Can't connect to a null node");
}
NodeConnections nodeConnections = clientChannels.get(node.id());
if (nodeConnections != null) {
... | private Channel nodeChannel(Node node) throws ConnectTransportException {
if (node == null) {
throw new ConnectTransportException(node, "Can't connect to a null node");
}
NodeConnections nodeConnections = clientChannels.get(node.id());
if (nodeConnections != null) {
... |
@Override public String toString() {
return "boundAddress [" + boundAddress + "], publishAddress [" + publishAddress + "]";
}
| @Override public String toString() {
return "bound_address[" + boundAddress + "], publish_address[" + publishAddress + "]";
}
|
public void execute(SearchContext context) {
try {
context.rewriteQuery();
THashSet<Term> termsSet = new THashSet<Term>();
context.query().extractTerms(termsSet);
Term[] terms = termsSet.toArray(new Term[termsSet.size()]);
int[] freqs = context.se... | public void execute(SearchContext context) {
try {
context.rewriteQuery();
THashSet<Term> termsSet = new THashSet<Term>();
context.query().extractTerms(termsSet);
Term[] terms = termsSet.toArray(new Term[termsSet.size()]);
int[] freqs = context.se... |
private void testSimpleActions(Client client) throws Exception {
logger.info("Creating index test");
client.admin().indices().create(createIndexRequest("test")).actionGet();
Thread.sleep(500);
IndexResponse indexResponse = client.index(Requests.indexRequest("test").type("type1").id(... | private void testSimpleActions(Client client) throws Exception {
logger.info("Creating index test");
client.admin().indices().create(createIndexRequest("test")).actionGet();
Thread.sleep(500);
IndexResponse indexResponse = client.index(Requests.indexRequest("test").type("type1").id(... |
@Override public void create () {
mesh = new Mesh(true, 4, 4, new VertexAttribute(Usage.Position, 2, "a_position"), new VertexAttribute(
Usage.TextureCoordinates, 2, "a_texCoord"));
mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 0, 0.5f, -0.5f, 1, 0, 0.5f, 0.5f, 1, 1, -0.5f, 0.5f, 0, 1});
mesh.setIndices(new ... | @Override public void create () {
mesh = new Mesh(true, 4, 4, new VertexAttribute(Usage.Position, 2, "a_position"), new VertexAttribute(
Usage.TextureCoordinates, 2, "a_texCoord"));
mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 0, 0.5f, -0.5f, 1, 0, 0.5f, 0.5f, 1, 1, -0.5f, 0.5f, 0, 1});
mesh.setIndices(new ... |
protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexService(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr... | protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexService(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr... |
public Filter nullValueFilter() {
if (nullValue == null) {
return null;
}
return new TermFilter(names().createIndexNameTerm(nullValue ? "T" : "F"));
}
| public Filter nullValueFilter() {
if (nullValue == null) {
return null;
}
return new TermFilter(names().createIndexNameTerm(nullValue ? Values.TRUE : Values.FALSE));
}
|
public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticSearchException {
// it might make sense to cache the TermDocs on a shared fetch context and just skip here)
// it is going to mean we work on the high level multi reader and not the lower level reader as is
/... | public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticSearchException {
// it might make sense to cache the TermDocs on a shared fetch context and just skip here)
// it is going to mean we work on the high level multi reader and not the lower level reader as is
/... |
protected void viewIssue(Issue issue) {
startActivity(IssuesViewActivity.createIntent(issue, repo));
}
} | protected void viewIssue(Issue issue, Repository repository) {
startActivity(IssuesViewActivity.createIntent(issue, repo));
}
} |
private void parseGeohash(ParseContext context, String geohash) throws IOException {
GeoPoint point = GeoHashUtils.decode(geohash);
if (normalizeLat || normalizeLon) {
GeoUtils.normalizePoint(point, normalizeLat, normalizeLon);
}
if (validateLat) {
if (point... | private void parseGeohash(ParseContext context, String geohash) throws IOException {
GeoPoint point = GeoHashUtils.decode(geohash);
if (normalizeLat || normalizeLon) {
GeoUtils.normalizePoint(point, normalizeLat, normalizeLon);
}
if (validateLat) {
if (point... |
public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries();
return terms;
... | public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries(reduceContext.cacheRecycler());... |
public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries();
return terms;
... | public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries(reduceContext.cacheRecycler());... |
public PooledEffect obtain () {
PooledEffect effect = super.obtain();
effect.reset();
return effect;
}
| public PooledEffect obtain () {
PooledEffect effect = super.obtain();
effect.start();
return effect;
}
|
protected View initialize(View view) {
view = super.initialize(view);
TypefaceUtils.setOcticons(textView(view, 3),
(TextView) view.findViewById(id.tv_forks_icon),
(TextView) view.findViewById(id.tv_watchers_icon));
descriptionColor = view.getResources().getCo... | protected View initialize(View view) {
view = super.initialize(view);
TypefaceUtils.setOcticons(textView(view, 0),
(TextView) view.findViewById(id.tv_forks_icon),
(TextView) view.findViewById(id.tv_watchers_icon));
descriptionColor = view.getResources().getCo... |
private static native long getByteBufferAddress (ByteBuffer buffer); /*
return env->GetDirectBufferAddress(buffer);
*/
| private static native long getByteBufferAddress (ByteBuffer buffer); /*
return (long) env->GetDirectBufferAddress(buffer);
*/
|
public void onPageSelected(int position) {
ActionBar actionBar = getSupportActionBar();
String gistId = gists.get(position);
Gist gist = store.getGist(gistId);
if (gist == null) {
actionBar.setSubtitle(null);
actionBar.setLogo(null);
actionBar.setI... | public void onPageSelected(int position) {
ActionBar actionBar = getSupportActionBar();
String gistId = gists.get(position);
Gist gist = store.getGist(gistId);
if (gist == null) {
actionBar.setSubtitle(null);
actionBar.setLogo(null);
actionBar.setI... |
@Override public ESLogger newInstance(String prefix, String name) {
final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(name);
return new JdkESLogger(prefix, logger);
}
| @Override public ESLogger newInstance(String prefix, String name) {
final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(name);
return new JdkESLogger(prefix, name, logger);
}
|
public void setV (float v) {
super.setV(u);
vertices[V2] = v;
vertices[V3] = v;
}
| public void setV (float v) {
super.setV(v);
vertices[V2] = v;
vertices[V3] = v;
}
|
private static Map<String, Tuple<String, org.hamcrest.Matcher<Integer>>> catches = Maps.newHashMap();
static {
catches.put("missing", tuple("404", equalTo(404)));
catches.put("conflict", tuple("409", equalTo(409)));
catches.put("forbidden", tuple("403", equalTo(403)));
catches.p... | private static Map<String, Tuple<String, org.hamcrest.Matcher<Integer>>> catches = Maps.newHashMap();
static {
catches.put("missing", tuple("404", equalTo(404)));
catches.put("conflict", tuple("409", equalTo(409)));
catches.put("forbidden", tuple("403", equalTo(403)));
catches.p... |
private static void formatCreate(Event event, StyledText main, StyledText details) {
main.bold(event.getActor().getLogin());
main.append(" created ");
CreatePayload payload = (CreatePayload) event.getPayload();
String refType = payload.getRefType();
main.append(refType);
... | private static void formatCreate(Event event, StyledText main, StyledText details) {
main.bold(event.getActor().getLogin());
main.append(" created ");
CreatePayload payload = (CreatePayload) event.getPayload();
String refType = payload.getRefType();
main.append(refType);
... |
public void markAsRequired() {
this.required = required;
}
| public void markAsRequired() {
this.required = true;
}
|
public GLSurfaceView20(Context context) {
super(context);
init(false, 0, 0);
}
| public GLSurfaceView20(Context context) {
super(context);
init(false, 16, 0);
}
|
public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) {
info.filename = fileName;
if (parameter == null || parameter.textureData == null) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.texture = null;
if (parameter... | public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) {
info.filename = fileName;
if (parameter == null || (parameter != null && parameter.textureData == null)) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.texture = ... |
public CompressedIndexInput(IndexInput in, T context) throws IOException {
super("compressed(" + in.toString() + ")");
this.in = in;
this.context = context;
readHeader(in);
this.version = in.readInt();
long metaDataPosition = in.readLong();
long headerLength =... | public CompressedIndexInput(IndexInput in, T context) throws IOException {
super("compressed(" + in.toString() + ")");
this.in = in;
this.context = context;
readHeader(in);
this.version = in.readInt();
long metaDataPosition = in.readLong();
long headerLength =... |
public BytesValues.WithOrdinals getBytesValues(boolean needsHashes) {
assert fst != null;
if (needsHashes) {
if (hashes == null) {
BytesRefFSTEnum<Long> fstEnum = new BytesRefFSTEnum<Long>(fst);
IntArray hashes = BigArrays.newIntArray(ordinals.getMaxOrd())... | public BytesValues.WithOrdinals getBytesValues(boolean needsHashes) {
assert fst != null;
if (needsHashes) {
if (hashes == null) {
BytesRefFSTEnum<Long> fstEnum = new BytesRefFSTEnum<Long>(fst);
IntArray hashes = BigArrays.NON_RECYCLING_INSTANCE.newIntArra... |
private final IntArray getHashes() {
if (hashes == null) {
long numberOfValues = termOrdToBytesOffset.size();
IntArray hashes = BigArrays.newIntArray(numberOfValues);
BytesRef scratch = new BytesRef();
for (long i = 0; i < numberOfValues; i++) {
... | private final IntArray getHashes() {
if (hashes == null) {
long numberOfValues = termOrdToBytesOffset.size();
IntArray hashes = BigArrays.NON_RECYCLING_INSTANCE.newIntArray(numberOfValues);
BytesRef scratch = new BytesRef();
for (long i = 0; i < numberOfValues... |
public org.elasticsearch.index.fielddata.BytesValues.WithOrdinals getHashedBytesValues() {
final SortedSetDocValues values = getValuesNoException(reader, field);
if (hashes == null) {
synchronized (this) {
if (hashes == null) {
final long valueCount = ... | public org.elasticsearch.index.fielddata.BytesValues.WithOrdinals getHashedBytesValues() {
final SortedSetDocValues values = getValuesNoException(reader, field);
if (hashes == null) {
synchronized (this) {
if (hashes == null) {
final long valueCount = ... |
public GeoHashGridAggregator(String name, AggregatorFactories factories, NumericValuesSource valuesSource,
int requiredSize, int shardSize, AggregationContext aggregationContext, Aggregator parent) {
super(name, BucketAggregationMode.PER_BUCKET, factories, INITIAL_CAPACITY, agg... | public GeoHashGridAggregator(String name, AggregatorFactories factories, NumericValuesSource valuesSource,
int requiredSize, int shardSize, AggregationContext aggregationContext, Aggregator parent) {
super(name, BucketAggregationMode.PER_BUCKET, factories, INITIAL_CAPACITY, agg... |
public HistogramAggregator(String name,
AggregatorFactories factories,
Rounding rounding,
InternalOrder order,
boolean keyed,
long minDocCount,
... | public HistogramAggregator(String name,
AggregatorFactories factories,
Rounding rounding,
InternalOrder order,
boolean keyed,
long minDocCount,
... |
public DoubleTermsAggregator(String name, AggregatorFactories factories, NumericValuesSource valuesSource, long estimatedBucketCount,
InternalOrder order, int requiredSize, int shardSize, long minDocCount, AggregationContext aggregationContext, Aggregator parent) {
super(name,... | public DoubleTermsAggregator(String name, AggregatorFactories factories, NumericValuesSource valuesSource, long estimatedBucketCount,
InternalOrder order, int requiredSize, int shardSize, long minDocCount, AggregationContext aggregationContext, Aggregator parent) {
super(name,... |
public LongTermsAggregator(String name, AggregatorFactories factories, NumericValuesSource valuesSource, long estimatedBucketCount,
InternalOrder order, int requiredSize, int shardSize, long minDocCount, AggregationContext aggregationContext, Aggregator parent) {
super(name, B... | public LongTermsAggregator(String name, AggregatorFactories factories, NumericValuesSource valuesSource, long estimatedBucketCount,
InternalOrder order, int requiredSize, int shardSize, long minDocCount, AggregationContext aggregationContext, Aggregator parent) {
super(name, B... |
private void newHash() {
if (hash != null) {
hash.release();
}
// Test high load factors to make sure that collision resolution works fine
final float maxLoadFactor = 0.6f + randomFloat() * 0.39f;
hash = new BytesRefHash(randomIntBetween(0, 100), maxLoadFactor, Bi... | private void newHash() {
if (hash != null) {
hash.release();
}
// Test high load factors to make sure that collision resolution works fine
final float maxLoadFactor = 0.6f + randomFloat() * 0.39f;
hash = new BytesRefHash(randomIntBetween(0, 100), maxLoadFactor, Bi... |
public void testDuell() {
final Long[] values = new Long[randomIntBetween(1, 100000)];
for (int i = 0; i < values.length; ++i) {
values[i] = randomLong();
}
final LongLongMap valueToId = new LongLongOpenHashMap();
final long[] idToValue = new long[values.length];
... | public void testDuell() {
final Long[] values = new Long[randomIntBetween(1, 100000)];
for (int i = 0; i < values.length; ++i) {
values[i] = randomLong();
}
final LongLongMap valueToId = new LongLongOpenHashMap();
final long[] idToValue = new long[values.length];
... |
@Override public String readUTF() throws IOException {
byte b = in.readByte();
if (b == 0) {
// full string with handle
int handle = in.readVInt();
String s = in.readUTF();
handles.put(handle, s);
return s;
} else if (b == 1) {
... | @Override public String readUTF() throws IOException {
byte b = in.readByte();
if (b == 0) {
// full string with handle
int handle = in.readVInt();
String s = in.readUTF();
handles.put(handle, s);
return s;
} else if (b == 1) {
... |
@Override public void run() {
Blob blob;
try {
blob = future.get();
if (blob == null) {
listener.onFailure(new BlobStoreException("No blob found for [" + buildBlobPath(blobName) + "]"));
r... | @Override public void run() {
Blob blob;
try {
blob = future.get();
if (blob == null) {
listener.onFailure(new BlobStoreException("No blob found for [" + buildBlobPath(blobName) + "]"));
r... |
@Override public void run() {
try {
future.get();
listener.onCompleted();
} catch (InterruptedException e) {
listener.onFailure(e);
} catch (ExecutionException e) {
listener.onFail... | @Override public void run() {
try {
future.get();
listener.onCompleted();
} catch (InterruptedException e) {
listener.onFailure(e);
} catch (ExecutionException e) {
listener.onFail... |
public ClusterState execute(ClusterState currentState) throws Exception {
boolean indexCreated = false;
String failureReason = null;
try {
validate(request, currentState);
for (Alias alias : request.aliases()) {
... | public ClusterState execute(ClusterState currentState) throws Exception {
boolean indexCreated = false;
String failureReason = null;
try {
validate(request, currentState);
for (Alias alias : request.aliases()) {
... |
public ParentChildIndexFieldData(Index index, @IndexSettings Settings indexSettings, FieldMapper.Names fieldNames,
FieldDataType fieldDataType, IndexFieldDataCache cache, MapperService mapperService,
CircuitBreakerService breakerService, Glob... | public ParentChildIndexFieldData(Index index, @IndexSettings Settings indexSettings, FieldMapper.Names fieldNames,
FieldDataType fieldDataType, IndexFieldDataCache cache, MapperService mapperService,
CircuitBreakerService breakerService, Glob... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
ensureNotDeleteByQuery(NAME, parseContext);
XContentParser parser = parseContext.parser();
boolean queryFound = false;
boolean filterFound = false;
String parentType = null;
... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
ensureNotDeleteByQuery(NAME, parseContext);
XContentParser parser = parseContext.parser();
boolean queryFound = false;
boolean filterFound = false;
String parentType = null;
... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
ensureNotDeleteByQuery(NAME, parseContext);
XContentParser parser = parseContext.parser();
boolean queryFound = false;
float boost = 1.0f;
String parentType = null;
boolean... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
ensureNotDeleteByQuery(NAME, parseContext);
XContentParser parser = parseContext.parser();
boolean queryFound = false;
float boost = 1.0f;
String parentType = null;
boolean... |
private void applyMappings(ClusterChangedEvent event) {
// go over and update mappings
for (IndexMetaData indexMetaData : event.state().metaData()) {
if (!indicesService.hasIndex(indexMetaData.index())) {
// we only create / update here
continue;
... | private void applyMappings(ClusterChangedEvent event) {
// go over and update mappings
for (IndexMetaData indexMetaData : event.state().metaData()) {
if (!indicesService.hasIndex(indexMetaData.index())) {
// we only create / update here
continue;
... |
protected NodeStats nodeOperation(NodeStatsRequest nodeStatsRequest) throws ElasticSearchException {
NodesStatsRequest request = nodeStatsRequest.request;
return nodeService.stats(request.indices(), request.os(), request.process(), request.jvm(), request.threadPool(), request.network(), request.tran... | protected NodeStats nodeOperation(NodeStatsRequest nodeStatsRequest) throws ElasticSearchException {
NodesStatsRequest request = nodeStatsRequest.request;
return nodeService.stats(request.indices(), request.os(), request.process(), request.jvm(), request.threadPool(), request.network(), request.fs()... |
private void serializeValue(ParseContext context, String currentFieldName, XContentParser.Token token) throws IOException {
XContentMapper mapper = mappers.get(currentFieldName);
if (mapper != null) {
mapper.parse(context);
return;
}
if (!dynamic) {
... | private void serializeValue(ParseContext context, String currentFieldName, XContentParser.Token token) throws IOException {
XContentMapper mapper = mappers.get(currentFieldName);
if (mapper != null) {
mapper.parse(context);
return;
}
if (!dynamic) {
... |
public void testMatchAllDocsFilter() throws Exception {
Directory dir = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
indexWriter.addDocument(doc().add(field("_id", "1")).add(field("text", "lucene")).buil... | public void testMatchAllDocsFilter() throws Exception {
Directory dir = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
indexWriter.addDocument(doc().add(field("_id", "1")).add(field("text", "lucene")).buil... |
public void testSimple() throws Exception {
Directory dir = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
indexWriter.commit();
indexWriter.addDocument(doc().add(field("_id", "1")).add(field("tex... | public void testSimple() throws Exception {
Directory dir = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
indexWriter.commit();
indexWriter.addDocument(doc().add(field("_id", "1")).add(field("tex... |
public boolean matchesSafely(Engine.Searcher searcher) {
try {
long count = Lucene.count(searcher.searcher(), query, -1f);
return count == totalHits;
} catch (IOException e) {
return false;
}
}
| public boolean matchesSafely(Engine.Searcher searcher) {
try {
long count = Lucene.count(searcher.searcher(), query);
return count == totalHits;
} catch (IOException e) {
return false;
}
}
|
@Inject public JgroupsDiscovery(Settings settings, Environment environment, ClusterName clusterName,
TransportService transportService, ClusterService clusterService) {
super(settings);
this.clusterName = clusterName;
this.transportService = transportServi... | @Inject public JgroupsDiscovery(Settings settings, Environment environment, ClusterName clusterName,
TransportService transportService, ClusterService clusterService) {
super(settings);
this.clusterName = clusterName;
this.transportService = transportServi... |
@Override public boolean onPortNumber(int portNumber) {
try {
LocateRegistry.createRegistry(portNumber);
serviceUrl = settings.get("jmx.serviceUrl", JMXRMI_URI_PATTERN).replace("{jmx.port}", Integer.toString(portNumber));
... | @Override public boolean onPortNumber(int portNumber) {
try {
LocateRegistry.createRegistry(portNumber);
serviceUrl = settings.get("jmx.serviceUrl", JMXRMI_URI_PATTERN).replace("{jmx.port}", Integer.toString(portNumber));
... |
@Override public void onFailure(Throwable t) {
failure.set(t);
latch.countDown();
}
});
try {
latch.await();
} catch (InterruptedException e) {
failure.set(e);
}
... | @Override public void onFailure(Throwable t) {
failure.set(t);
latch.countDown();
}
});
try {
latch.await();
} catch (InterruptedException e) {
failure.set(e);
}
... |
protected BinaryFieldMapper(Names names, FieldType fieldType, Boolean compress, long compressThreshold,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider) {
super(names, 1.0f, fieldType, null, null, null, postingsProvider, docValuesProvider, n... | protected BinaryFieldMapper(Names names, FieldType fieldType, Boolean compress, long compressThreshold,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider) {
super(names, 1.0f, fieldType, null, null, null, postingsProvider, docValuesProvider, n... |
public CompletionFieldMapper(Names names, NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer, PostingsFormatProvider postingsProvider, SimilarityProvider similarity, boolean payloads,
boolean preserveSeparators, boolean preservePositionIncrements, int maxInputLength) {
... | public CompletionFieldMapper(Names names, NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer, PostingsFormatProvider postingsProvider, SimilarityProvider similarity, boolean payloads,
boolean preserveSeparators, boolean preservePositionIncrements, int maxInputLength) {
... |
public GeoPointFieldMapper(FieldMapper.Names names, FieldType fieldType, Boolean docValues,
NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer,
PostingsFormatProvider postingsFormat, DocValuesFormatProvider docValuesFormat,
SimilarityProvider similarity, @Nullable Settings... | public GeoPointFieldMapper(FieldMapper.Names names, FieldType fieldType, Boolean docValues,
NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer,
PostingsFormatProvider postingsFormat, DocValuesFormatProvider docValuesFormat,
SimilarityProvider similarity, @Nullable Settings... |
public GeoShapeFieldMapper(FieldMapper.Names names, SpatialPrefixTree tree, String defaultStrategyName, double distanceErrorPct,
FieldType fieldType, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider) {
super(names, 1, fieldType, null, null, nu... | public GeoShapeFieldMapper(FieldMapper.Names names, SpatialPrefixTree tree, String defaultStrategyName, double distanceErrorPct,
FieldType fieldType, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider) {
super(names, 1, fieldType, null, null, nu... |
protected BoostFieldMapper(String name, String indexName, int precisionStep, float boost, FieldType fieldType, Boolean docValues, Float nullValue,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSe... | protected BoostFieldMapper(String name, String indexName, int precisionStep, float boost, FieldType fieldType, Boolean docValues, Float nullValue,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSe... |
protected IdFieldMapper(String name, String indexName, float boost, FieldType fieldType, Boolean docValues, String path,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider,
@Nullable Settings fieldDataSettings, Settings indexSet... | protected IdFieldMapper(String name, String indexName, float boost, FieldType fieldType, Boolean docValues, String path,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider,
@Nullable Settings fieldDataSettings, Settings indexSet... |
public IndexFieldMapper(String name, String indexName, float boost, FieldType fieldType, Boolean docValues, EnabledAttributeMapper enabledState,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSetting... | public IndexFieldMapper(String name, String indexName, float boost, FieldType fieldType, Boolean docValues, EnabledAttributeMapper enabledState,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSetting... |
protected ParentFieldMapper(String name, String indexName, String type, PostingsFormatProvider postingsFormat, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults.FIELD_TYPE), null,
Lucene.K... | protected ParentFieldMapper(String name, String indexName, String type, PostingsFormatProvider postingsFormat, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults.FIELD_TYPE), null,
Lucene.K... |
protected RoutingFieldMapper(FieldType fieldType, boolean required, String path, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(Defaults.NAME, Defaults.NAME, ... | protected RoutingFieldMapper(FieldType fieldType, boolean required, String path, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(Defaults.NAME, Defaults.NAME, ... |
public SizeFieldMapper(EnabledAttributeMapper enabled, FieldType fieldType, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, ... | public SizeFieldMapper(EnabledAttributeMapper enabled, FieldType fieldType, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, ... |
protected SourceFieldMapper(String name, boolean enabled, String format, Boolean compress, long compressThreshold,
String[] includes, String[] excludes) {
super(new Names(name, name, name, name), Defaults.BOOST, new FieldType(Defaults.FIELD_TYPE), null,
Lucene... | protected SourceFieldMapper(String name, boolean enabled, String format, Boolean compress, long compressThreshold,
String[] includes, String[] excludes) {
super(new Names(name, name, name, name), Defaults.BOOST, new FieldType(Defaults.FIELD_TYPE), null,
Lucene... |
protected TTLFieldMapper(FieldType fieldType, EnabledAttributeMapper enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider,
@Nullable Settings fieldDataSettings, Settin... | protected TTLFieldMapper(FieldType fieldType, EnabledAttributeMapper enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider,
@Nullable Settings fieldDataSettings, Settin... |
public TypeFieldMapper(String name, String indexName, float boost, FieldType fieldType, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(name, indexName, indexName, n... | public TypeFieldMapper(String name, String indexName, float boost, FieldType fieldType, PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(name, indexName, indexName, n... |
protected UidFieldMapper(String name, String indexName, Boolean docValues, PostingsFormatProvider postingsFormat, DocValuesFormatProvider docValuesFormat, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults... | protected UidFieldMapper(String name, String indexName, Boolean docValues, PostingsFormatProvider postingsFormat, DocValuesFormatProvider docValuesFormat, @Nullable Settings fieldDataSettings, Settings indexSettings) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults... |
public VersionFieldMapper() {
this(null);
}
VersionFieldMapper(DocValuesFormatProvider docValuesFormat) {
super(new Names(NAME, NAME, NAME, NAME), Defaults.BOOST, Defaults.FIELD_TYPE, null, null, null, null, docValuesFormat, null, null, ImmutableSettings.EMPTY);
}
| public VersionFieldMapper() {
this(null);
}
VersionFieldMapper(DocValuesFormatProvider docValuesFormat) {
super(new Names(NAME, NAME, NAME, NAME), Defaults.BOOST, Defaults.FIELD_TYPE, null, null, null, null, docValuesFormat, null, null, null, ImmutableSettings.EMPTY);
}
|
public BoundingBox extendBoundingBox (final BoundingBox out, int offset, int count, final Matrix4 transform) {
int numIndices = getNumIndices();
if (offset < 0 || count < 1 || offset + count > numIndices) throw new GdxRuntimeException("Not enough indices ( offset="+offset+", count="+count+", max="+numIndices+" )")... | public BoundingBox extendBoundingBox (final BoundingBox out, int offset, int count, final Matrix4 transform) {
int numIndices = getNumIndices();
if (offset < 0 || count < 1 || offset + count > numIndices) throw new GdxRuntimeException("Not enough indices");
final FloatBuffer verts = vertices.getBuffer();
fina... |
public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/... |
@Override public Server stop() {
if (!lifecycle.moveToStopped()) {
return this;
}
Logger logger = Loggers.getLogger(Server.class, settings.get("name"));
logger.info("{ElasticSearch/{}}: Stopping ...", Version.full());
if (settings.getAsBoolean("http.enabled", tru... | @Override public Server stop() {
if (!lifecycle.moveToStopped()) {
return this;
}
Logger logger = Loggers.getLogger(Server.class, settings.get("name"));
logger.info("{{}}: Stopping ...", Version.full());
if (settings.getAsBoolean("http.enabled", true)) {
... |
protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticsearchException {
IndexService indexService = indicesService.indexService(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr... | protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticsearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
Term uidTerm = new Term(UidFieldMapper.NAME, Ui... |
public Class<?> resolveClass(java.io.ObjectStreamClass streamClass)
throws java.io.IOException, ClassNotFoundException {
Class c = Class.forName(streamClass.getName(), false, loader);
if (c == null) {
... | public Class<?> resolveClass(java.io.ObjectStreamClass streamClass)
throws java.io.IOException, ClassNotFoundException {
Class<?> c = Class.forName(streamClass.getName(), false, loader);
if (c == null) {
... |
private void testLoad(boolean fullRecovery) {
startNode("server1");
logger.info("Running Cluster Health (waiting for node to startup properly)");
ClusterHealthResponse clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus()).actionGet();
... | private void testLoad(boolean fullRecovery) {
startNode("server1");
logger.info("Running Cluster Health (waiting for node to startup properly)");
ClusterHealthResponse clusterHealth = client("server1").admin().cluster().health(clusterHealthRequest().waitForGreenStatus()).actionGet();
... |
private void log(String line) {
if (outputMode != OutputMode.SILENT) System.out.println(line);
}
/**
* Helper class to extract properly user name, repository name, version and plugin name
* from plugin name given by a user.
*/
static class PluginHandle {
final String nam... | private void log(String line) {
if (outputMode != OutputMode.SILENT) System.out.println(line);
}
/**
* Helper class to extract properly user name, repository name, version and plugin name
* from plugin name given by a user.
*/
static class PluginHandle {
final String nam... |
public void consumeCompressedData (int target) {
if (!isPrepared) throw new GdxRuntimeException("Call prepare() before calling consumeCompressedData()");
if (!Gdx.graphics.supportsExtension("GL_OES_compressed_ETC1_RGB8_texture") || Gdx.graphics.isGL20Available() == false) {
Pixmap pixmap = ETC1.decodeImage(dat... | public void consumeCompressedData (int target) {
if (!isPrepared) throw new GdxRuntimeException("Call prepare() before calling consumeCompressedData()");
if (!Gdx.graphics.supportsExtension("GL_OES_compressed_ETC1_RGB8_texture") || Gdx.graphics.isGL20Available() == false) {
Pixmap pixmap = ETC1.decodeImage(dat... |
public static void restDocumentSource(byte[] source, int offset, int length, XContentBuilder builder, ToXContent.Params params) throws IOException {
if (LZF.isCompressed(source, offset, length)) {
BytesStreamInput siBytes = new BytesStreamInput(source, offset, length);
LZFStreamInput... | public static void restDocumentSource(byte[] source, int offset, int length, XContentBuilder builder, ToXContent.Params params) throws IOException {
if (LZF.isCompressed(source, offset, length)) {
BytesStreamInput siBytes = new BytesStreamInput(source, offset, length);
LZFStreamInput... |
public int getNumOrds() {
return numDocs + 1;
}
| public int getNumOrds() {
return 1;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.