buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
@Test public void testToString() { assertThat("10b", is(new SizeValue(10, SizeUnit.BYTES).toString())); assertThat("1.5k", is(new SizeValue((long) (1024 * 1.5), SizeUnit.BYTES).toString())); assertThat("1.5m", is(new SizeValue((long) (1024 * 1.5), SizeUnit.KB).toString())); assertTha...
@Test public void testToString() { assertThat("10", is(new SizeValue(10, SizeUnit.BYTES).toString())); assertThat("1.5k", is(new SizeValue((long) (1024 * 1.5), SizeUnit.BYTES).toString())); assertThat("1.5m", is(new SizeValue((long) (1024 * 1.5), SizeUnit.KB).toString())); assertThat...
public void create () { super.create(); world.maxSubSteps = 20; world.add("ground", 0f, 0f, 0f) .color.set(0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 1f); // Note: not every model is suitable for a one on one translation with a soft...
public void create () { super.create(); world.maxSubSteps = 20; world.add("ground", 0f, 0f, 0f) .getColor().set(0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 0.25f + 0.5f * (float)Math.random(), 1f); // Note: not every model is suitable for a one on one translation with a...
protected GroupShardsIterator shards(ClusterState clusterState, FlushRequest request, String[] concreteIndices) { return clusterState.routingTable().allActiveShardsGrouped(concreteIndices, true); }
protected GroupShardsIterator shards(ClusterState clusterState, FlushRequest request, String[] concreteIndices) { return clusterState.routingTable().allActiveShardsGrouped(concreteIndices, true, true); }
protected GroupShardsIterator shards(ClusterState clusterState, RefreshRequest request, String[] concreteIndices) { logger.trace("resolving shards to refresh based on cluster state version [{}]", clusterState.version()); return clusterState.routingTable().allAssignedShardsGrouped(concreteIndices, tr...
protected GroupShardsIterator shards(ClusterState clusterState, RefreshRequest request, String[] concreteIndices) { logger.trace("resolving shards to refresh based on cluster state version [{}]", clusterState.version()); return clusterState.routingTable().allAssignedShardsGrouped(concreteIndices, tr...
public void testDeleteWarmerAcknowledgement() { createIndex("test"); ensureGreen(); assertAcked(client().admin().indices().preparePutWarmer("custom_warmer") .setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery()))); ...
public void testDeleteWarmerAcknowledgement() { createIndex("test"); ensureGreen(); assertAcked(client().admin().indices().preparePutWarmer("custom_warmer") .setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery()))); ...
public void testPartialFields() throws Exception { createIndex("test"); client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForYellowStatus().execute().actionGet(); client().prepareIndex("test", "type1", "1").setSource(XContentFactory.jsonBuilder().startObj...
public void testPartialFields() throws Exception { createIndex("test"); client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForYellowStatus().execute().actionGet(); client().prepareIndex("test", "type1", "1").setSource(XContentFactory.jsonBuilder().startObj...
public static int getIdWidth(final int maxDigits, final TextView gistId) { Paint paint = new Paint(); paint.setTypeface(gistId.getTypeface()); paint.setTextSize(gistId.getTextSize()); char[] text = new char[maxDigits]; Arrays.fill(text, '0'); return Math.round(paint.m...
public static int getIdWidth(final int maxDigits, final TextView gistId) { Paint paint = new Paint(); paint.setTypeface(gistId.getTypeface()); paint.setTextSize(gistId.getTextSize()); char[] text = new char[maxDigits]; Arrays.fill(text, '0'); return Math.round(paint.m...
protected void createIndex() { wipeIndices(getConcreteIndexName()); createIndex(getConcreteIndexName()); }
protected void createIndex() { cluster().wipeIndices(getConcreteIndexName()); createIndex(getConcreteIndexName()); }
public void percolateOnRecreatedIndex() throws Exception { createIndex("test"); ensureGreen(); client().prepareIndex("test", "test", "1").setSource("field1", "value1").execute().actionGet(); logger.info("--> register a query"); client().prepareIndex("my-queries-index", Perco...
public void percolateOnRecreatedIndex() throws Exception { createIndex("test"); ensureGreen(); client().prepareIndex("test", "test", "1").setSource("field1", "value1").execute().actionGet(); logger.info("--> register a query"); client().prepareIndex("my-queries-index", Perco...
public void testDuelTerms() throws Exception { // These high numbers of docs and terms are important to trigger page recycling final int numDocs = scaledRandomIntBetween(10000, 20000); final int maxNumTerms = randomIntBetween(10, 100000); final IntOpenHashSet valuesSet = new IntOpen...
public void testDuelTerms() throws Exception { // These high numbers of docs and terms are important to trigger page recycling final int numDocs = scaledRandomIntBetween(10000, 20000); final int maxNumTerms = randomIntBetween(10, 100000); final IntOpenHashSet valuesSet = new IntOpen...
private void searchWhileCreatingIndex(boolean createIndex, int numberOfReplicas) throws Exception { // make sure we have enough nodes to guaranty default QUORUM consistency. // TODO: add a smarter choice based on actual consistency (when that is randomized) int shardsNo = numberOfReplicas +...
private void searchWhileCreatingIndex(boolean createIndex, int numberOfReplicas) throws Exception { // make sure we have enough nodes to guaranty default QUORUM consistency. // TODO: add a smarter choice based on actual consistency (when that is randomized) int shardsNo = numberOfReplicas +...
public void restoreIndexWithMissingShards() throws Exception { logger.info("--> start 2 nodes"); cluster().startNode(settingsBuilder().put("gateway.type", "local")); cluster().startNode(settingsBuilder().put("gateway.type", "local")); wipeIndices("_all"); assertAcked(prepare...
public void restoreIndexWithMissingShards() throws Exception { logger.info("--> start 2 nodes"); cluster().startNode(settingsBuilder().put("gateway.type", "local")); cluster().startNode(settingsBuilder().put("gateway.type", "local")); cluster().wipeIndices("_all"); assertAck...
@Override protected void draw (SpriteBatch batch, float parentAlpha) { TextureRegion region = pressed ? pressedRegion : unpressedRegion; batch.setColor(color.r, color.g, color.b, color.a * parentAlpha); if (region.getTexture() != null) { if (scaleX == 0 && scaleY == 0 && rotation == 0) batch.draw(region, ...
@Override protected void draw (SpriteBatch batch, float parentAlpha) { TextureRegion region = pressed ? pressedRegion : unpressedRegion; batch.setColor(color.r, color.g, color.b, color.a * parentAlpha); if (region.getTexture() != null) { if (scaleX == 1 && scaleY == 1 && rotation == 0) batch.draw(region, ...
private void process (File[] files, File outputRoot, File outputDir, HashMap<File, ArrayList<InputFile>> dirToEntries, int depth) { for (File file : files) { if (file.isFile()) { if (inputRegex != null) { boolean found = false; for (Pattern pattern : inputRegex) { if (pattern.matcher(file.ge...
private void process (File[] files, File outputRoot, File outputDir, HashMap<File, ArrayList<InputFile>> dirToEntries, int depth) { for (File file : files) { if (file.isFile()) { if (inputRegex.size > 0) { boolean found = false; for (Pattern pattern : inputRegex) { if (pattern.matcher(file.g...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); boolean disableCoord = false; float boost = 1.0f; int minimumNumberShouldMatch = -1; List<BooleanClause> clauses = newArrayList();...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); boolean disableCoord = false; float boost = 1.0f; int minimumNumberShouldMatch = -1; List<BooleanClause> clauses = newArrayList();...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); String queryString...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); String queryString...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); // move to the field value String queryString = null; String defaultField = null; MapperQueryParser.Operator defaultOperator = Que...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); // move to the field value String queryString = null; String defaultField = null; MapperQueryParser.Operator defaultOperator = Que...
public final void after() throws IOException { try { logger.info("[{}#{}]: cleaning up after test", getTestClass().getSimpleName(), getTestName()); Scope currentClusterScope = getCurrentClusterScope(); if (currentClusterScope == Scope.TEST) { clearClusters...
public final void after() throws IOException { try { logger.info("[{}#{}]: cleaning up after test", getTestClass().getSimpleName(), getTestName()); Scope currentClusterScope = getCurrentClusterScope(); if (currentClusterScope == Scope.TEST) { clearClusters...
private void loadTileSet(TiledMap map, Element element, FileHandle tmxFile, ImageResolver imageResolver) { if (element.getName().equals("tileset")) { String name = element.get("name", null); int firstgid = element.getIntAttribute("firstgid", 1); int tilewidth = element.getIntAttribute("tilewidth", 0); in...
private void loadTileSet(TiledMap map, Element element, FileHandle tmxFile, ImageResolver imageResolver) { if (element.getName().equals("tileset")) { String name = element.get("name", null); int firstgid = element.getIntAttribute("firstgid", 1); int tilewidth = element.getIntAttribute("tilewidth", 0); in...
@Override public ClusterState execute(ClusterState currentState) { RoutingTable.Builder routingTableBuilder = new RoutingTable.Builder(); for (IndexRoutingTable indexRoutingTable : currentState.routingTable().indicesRouting().values()) { routingTableBuilde...
@Override public ClusterState execute(ClusterState currentState) { RoutingTable.Builder routingTableBuilder = new RoutingTable.Builder(); for (IndexRoutingTable indexRoutingTable : currentState.routingTable().indicesRouting().values()) { routingTableBuilde...
public void dispatchDelayedMessages () { if (queue.size() == 0) return; // Get current time long currentTime = getCurrentTime(); // Now peek at the queue to see if any telegrams need dispatching. // remove all telegrams from the front of the queue that have gone // past their time stamp. do { // Rea...
public void dispatchDelayedMessages () { if (queue.size() == 0) return; // Get current time long currentTime = getCurrentTime(); // Now peek at the queue to see if any telegrams need dispatching. // remove all telegrams from the front of the queue that have gone // past their time stamp. do { // Rea...
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.field("cluster_name", getClusterName().value(), XContentBuilder.FieldCaseConversion.NONE); builder.startObject("nodes"); for (NodeInfo nodeInfo : this) { builder.startObject(no...
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.field("cluster_name", getClusterName().value(), XContentBuilder.FieldCaseConversion.NONE); builder.startObject("nodes"); for (NodeInfo nodeInfo : this) { builder.startObject(no...
public void testNodeInfoPlugin() throws URISyntaxException { // We start four nodes // The first has no plugin String server1NodeId = startNodeWithPlugins(1); // The second has one site plugin with a es-plugin.properties file (description and version) String server2NodeId = s...
public void testNodeInfoPlugin() throws URISyntaxException { // We start four nodes // The first has no plugin String server1NodeId = startNodeWithPlugins(1); // The second has one site plugin with a es-plugin.properties file (description and version) String server2NodeId = s...
@Override public FieldData cache(FieldData.Type type, IndexReader reader, String fieldName) throws IOException { return cache(type.fieldDataClass, reader, fieldName); }
@Override public FieldData cache(FieldData.Type type, IndexReader reader, String fieldName) throws IOException { return cache(type.fieldDataClass(), reader, fieldName); }
@Inject public RecoveryAction(ShardId shardId, @IndexSettings Settings indexSettings, ThreadPool threadPool, TransportService transportService, IndexShard indexShard, Store store) { super(shardId, indexSettings); this.threadPool = threadPool; this.transportService = transportService; ...
@Inject public RecoveryAction(ShardId shardId, @IndexSettings Settings indexSettings, ThreadPool threadPool, TransportService transportService, IndexShard indexShard, Store store) { super(shardId, indexSettings); this.threadPool = threadPool; this.transportService = transportService; ...
@Override public void flush(Engine.Flush flush) throws ElasticSearchException { writeAllowed(); if (logger.isTraceEnabled()) { logger.trace("Flush"); } engine.flush(flush); }
@Override public void flush(Engine.Flush flush) throws ElasticSearchException { writeAllowed(); if (logger.isTraceEnabled()) { logger.trace("Flush with {}", flush); } engine.flush(flush); }
import org.elasticsearch.junit.listeners.ReproduceInfoPrinter; /* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch licenses this * file to you u...
import org.elasticsearch.junit.listeners.ReproduceInfoPrinter; /* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch licenses this * file to you u...
public TextureRegion getTextureRegion () { long currentFrame = (lastTiledMapRenderTime / (long)animationInterval) % frameCount; return frameTiles.get((int)currentFrame).getTextureRegion(); }
public TextureRegion getTextureRegion () { long currentFrame = (lastTiledMapRenderTime / (long)(animationInterval * 1000f)) % frameCount; return frameTiles.get((int)currentFrame).getTextureRegion(); }
private boolean isFieldMappingMissingField(ImmutableMap<String, ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>>> mappingsByIndex) throws IOException { if (mappingsByIndex.size() != 1) { return false; } for (ImmutableMap<String, ImmutableMap<String, FieldMappingM...
private boolean isFieldMappingMissingField(ImmutableMap<String, ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>>> mappingsByIndex) throws IOException { if (mappingsByIndex.size() != 1) { return false; } for (ImmutableMap<String, ImmutableMap<String, FieldMappingM...
public UIWindow getUIWindow() { return uiWindow; } /** Returns our real display dimension based on screen orientation. * * @param viewController The view controller. * @return Or real display dimension. */ CGSize getBounds (UIViewController viewController) { // or screen size (always portrait) // CGSiz...
public UIWindow getUIWindow() { return uiWindow; } /** Returns our real display dimension based on screen orientation. * * @param viewController The view controller. * @return Or real display dimension. */ CGSize getBounds (UIViewController viewController) { // or screen size (always portrait) // CGSiz...
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.Gdx2DTest(), "Debug Test", 280, 100, false); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.Gdx2DTest(), "Debug Test", 480, 320, false); }
public void setSprite (Sprite sprite) { this.sprite = sprite; if (sprite == null) return; float originX = sprite.getOriginX(); float originY = sprite.getOriginY(); Texture texture = sprite.getTexture(); for (int i = 0, n = particles.length; i < n; i++) { Particle particle = particles[i]; if (particle...
public void setSprite (Sprite sprite) { this.sprite = sprite; if (sprite == null) return; float originX = sprite.getOriginX(); float originY = sprite.getOriginY(); Texture texture = sprite.getTexture(); for (int i = 0, n = particles.length; i < n; i++) { Particle particle = particles[i]; if (particle...
public void testInvalidAggregationName() throws Exception { Matcher matcher = Pattern.compile("[a-zA-Z0-9\\-_]+").matcher(""); String name; SecureRandom rand = new SecureRandom(); int len = randomIntBetween(1, 5); char[] word = new char[len]; while(true) { ...
public void testInvalidAggregationName() throws Exception { Matcher matcher = Pattern.compile("[^\\[\\]>]+").matcher(""); String name; SecureRandom rand = new SecureRandom(); int len = randomIntBetween(1, 5); char[] word = new char[len]; while(true) { for...
private JsonIndexQueryParser newQueryParser() throws IOException { return new JsonIndexQueryParser(new Index("test"), EMPTY_SETTINGS, newMapperService(), new NoneFilterCache(index, EMPTY_SETTINGS), new AnalysisService(index), null, null, "test", null); }
private JsonIndexQueryParser newQueryParser() throws IOException { return new JsonIndexQueryParser(new Index("test"), EMPTY_SETTINGS, newMapperService(), new NoneFilterCache(index, EMPTY_SETTINGS), new AnalysisService(index), null, null, null, "test", null); }
@Override public EntriesStats entriesStats() { long sizeInBytes = 0; long totalCount = 0; int segmentsCount = 0; for (ReaderValue readerValue : cache.values()) { segmentsCount++; for (DocSet docSet : readerValue.filters().values()) { sizeInByte...
@Override public EntriesStats entriesStats() { long sizeInBytes = 0; long totalCount = 0; int segmentsCount = 0; for (ReaderValue readerValue : cache.values()) { segmentsCount++; for (DocSet docSet : readerValue.filters().values()) { sizeInByte...
public boolean indexMetaDataChanged(IndexMetaData current) { MetaData previousMetaData = previousState.metaData(); if (previousMetaData == null) { return true; } IndexMetaData previousIndexMetaData = previousMetaData.index(current.index()); // no need to check on ...
public boolean indexMetaDataChanged(IndexMetaData current) { MetaData previousMetaData = previousState.metaData(); if (previousMetaData == null) { return true; } IndexMetaData previousIndexMetaData = previousMetaData.index(current.index()); // no need to check on ...
public void failEngine(String reason, Throwable failure) { assert failure != null; if (failEngineLock.tryLock()) { try { // we first mark the store as corrupted before we notify any listeners // this must happen first otherwise we might try to reallocate s...
public void failEngine(String reason, Throwable failure) { assert failure != null; if (failEngineLock.tryLock()) { try { // we first mark the store as corrupted before we notify any listeners // this must happen first otherwise we might try to reallocate s...
public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeByte(replicationType.id()); out.writeByte(consistencyLevel.id()); out.writeSharedString(type); out.writeString(id); out.writeOptionalString(routing); out.writeOptionalStrin...
public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeByte(replicationType.id()); out.writeByte(consistencyLevel.id()); out.writeSharedString(type); out.writeString(id); out.writeOptionalString(routing); out.writeOptionalStrin...
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/...
public static PercolateResponse reduce(PercolateRequest request, AtomicReferenceArray shardsResponses, PercolatorService percolatorService) { int successfulShards = 0; int failedShards = 0; List<PercolateShardResponse> shardResults = null; List<ShardOperationFailedException> shardFa...
public static PercolateResponse reduce(PercolateRequest request, AtomicReferenceArray shardsResponses, PercolatorService percolatorService) { int successfulShards = 0; int failedShards = 0; List<PercolateShardResponse> shardResults = null; List<ShardOperationFailedException> shardFa...
public static void main(String[] args) throws Exception { // generate C/C++ code new NativeCodeGenerator().generate("src", "bin", "jni"); // generate build scripts, for win32 only // custom target for testing purposes BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false); win32ho...
public static void main(String[] args) throws Exception { // generate C/C++ code new NativeCodeGenerator().generate("src", "bin", "jni"); // generate build scripts, for win32 only // custom target for testing purposes BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false); win32ho...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.gists: startActivity(new Intent(HomeActivity.this, GistsActivity.class)); return true; case R.id.search: onSearchRequested(); re...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.gists: startActivity(new Intent(this, GistsActivity.class)); return true; case R.id.search: onSearchRequested(); return true; ...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
package org.elasticsearch.common; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apache License, Ve...
package org.elasticsearch.common; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apache License, Ve...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
import org.elasticsearch.common.unit.TimeValue; /* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apac...
public void onClick(View v) { if (issue != null) labelsDialog.show(issue.getLabels()); } }); header = new IssueHeaderViewHolder(headerView, avatarHelper, getResources()); list.setFastScrollEnabled(true); list.addHeaderView(heade...
public void onClick(View v) { if (issue != null) labelsDialog.show(issue.getLabels()); } }); header = new IssueHeaderViewHolder(headerView, avatarHelper); list.setFastScrollEnabled(true); list.addHeaderView(headerView); ...
private final static ImmutableMap<Tuple<String, String>, IndexFieldData.Builder> buildersByTypeAndFormat; static { buildersByType = MapBuilder.<String, IndexFieldData.Builder>newMapBuilder() .put("string", new PagedBytesIndexFieldData.Builder()) .put("float", new FloatAr...
private final static ImmutableMap<Tuple<String, String>, IndexFieldData.Builder> buildersByTypeAndFormat; static { buildersByType = MapBuilder.<String, IndexFieldData.Builder>newMapBuilder() .put("string", new PagedBytesIndexFieldData.Builder()) .put("float", new FloatAr...
public static final CharSequence format(final String html) { if (html == null) return ""; if (html.length() == 0) return ""; StringBuilder formatted = new StringBuilder(html); // Remove e-mail toggle link strip(formatted, TOGGLE_START, TOGGLE_END); ...
public static final CharSequence format(final String html) { if (html == null) return ""; if (html.length() == 0) return ""; StringBuilder formatted = new StringBuilder(html); // Remove e-mail toggle link strip(formatted, TOGGLE_START, TOGGLE_END); ...
protected void update(final int position, final RecentRepositoryItemView view, final Repository repository) { view.recentLabel.setVisibility(recent.get().contains(repository.getId()) ? VISIBLE : GONE); StyledText name = new StyledText(); if (!account.get().getLogin().equals(repository.getOw...
protected void update(final int position, final RecentRepositoryItemView view, final Repository repository) { view.recentLabel.setVisibility(recent.get().contains(repository.getId()) ? VISIBLE : GONE); StyledText name = new StyledText(); if (!account.get().getLogin().equals(repository.getOw...
protected void update(final int position, final RepositoryItemView view, final Repository repository) { StyledText name = new StyledText(); if (!login.equals(repository.getOwner().getLogin())) { int prefixColor = view.repoName.getResources().getColor(color.repo_description); ...
protected void update(final int position, final RepositoryItemView view, final Repository repository) { StyledText name = new StyledText(); if (!login.equals(repository.getOwner().getLogin())) { int prefixColor = view.repoName.getResources().getColor(color.repo_description); ...
protected void onException(final Exception e) throws RuntimeException { super.onException(e); Log.d(TAG, "Exception checking user following status", e); }
protected void onException(final Exception e) throws RuntimeException { super.onException(e); Log.d(TAG, "Exception checking if following user", e); }
public static void main( String[] argv ) { new JoglApplication( new com.badlogic.gdx.tests.MeshTest(), "Debug Test", 480, 320, false ); }
public static void main( String[] argv ) { new JoglApplication( new com.badlogic.gdx.tests.TileTest(), "Debug Test", 480, 320, false ); }
public void filledCircle (float x, float y, float radius) { filledCircle(x, y, radius, (int)(4 * (float)Math.sqrt(radius))); }
public void filledCircle (float x, float y, float radius) { filledCircle(x, y, radius, (int)(6 * (float)Math.cbrt(radius))); }
public static void main(String[] args) throws Exception { Node node = NodeBuilder.nodeBuilder().node(); Client client = node.client(); ClusterHealthResponse clusterHealthResponse = client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet(); if (clusterHe...
public static void main(String[] args) throws Exception { Node node = NodeBuilder.nodeBuilder().node(); Client client = node.client(); ClusterHealthResponse clusterHealthResponse = client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet(); if (clusterHe...
public void testWriteConsistencyLevelReplication2() throws Exception { startNode("node1"); client("node1").admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("number_of_shards", 1).put("number_of_replicas", 2)).execute().actionGet(); ClusterHealthRes...
public void testWriteConsistencyLevelReplication2() throws Exception { startNode("node1"); client("node1").admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1).put("index.number_of_replicas", 2)).execute().actionGet(); Clus...
private void testFacets(int numberOfShards) throws Exception { client.admin().indices().prepareDelete().execute().actionGet(); client.admin().indices().prepareCreate("test") .setSettings(settingsBuilder().put("number_of_shards", numberOfShards)) .addMapping("type1", ...
private void testFacets(int numberOfShards) throws Exception { client.admin().indices().prepareDelete().execute().actionGet(); client.admin().indices().prepareCreate("test") .setSettings(settingsBuilder().put("index.number_of_shards", numberOfShards)) .addMapping("ty...
public void searchWhileCreatingIndex() { Node node = startNode("node1"); try { node.client().admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } for (int i = 0; i < 20; i++) { node.client().a...
public void searchWhileCreatingIndex() { Node node = startNode("node1"); try { node.client().admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } for (int i = 0; i < 20; i++) { node.client().a...
public void testFailedSearchWithWrongQuery() throws Exception { logger.info("Start Testing failed search with wrong query"); startNode("server1"); client("server1").admin().indices().create(createIndexRequest("test") .settings(settingsBuilder().put("number_of_shards", 3).put(...
public void testFailedSearchWithWrongQuery() throws Exception { logger.info("Start Testing failed search with wrong query"); startNode("server1"); client("server1").admin().indices().create(createIndexRequest("test") .settings(settingsBuilder().put("index.number_of_shards", 3...
public void createNodes() throws Exception { startNode("server1"); startNode("server2"); client = getClient(); client.admin().indices().create(createIndexRequest("test") .settings(settingsBuilder().put("number_of_shards", 3).put("number_of_replicas", 0).put("routing....
public void createNodes() throws Exception { startNode("server1"); startNode("server2"); client = getClient(); client.admin().indices().create(createIndexRequest("test") .settings(settingsBuilder().put("index.number_of_shards", 3).put("index.number_of_replicas", 0).p...
public void createNodes() throws Exception { Settings settings = settingsBuilder().put("number_of_shards", 3).put("number_of_replicas", 0).build(); startNode("node1", settings); startNode("node2", settings); client = getClient(); }
public void createNodes() throws Exception { Settings settings = settingsBuilder().put("index.number_of_shards", 3).put("index.number_of_replicas", 0).build(); startNode("node1", settings); startNode("node2", settings); client = getClient(); }
public void createNodes() throws Exception { Settings settings = settingsBuilder().put("number_of_shards", 3).put("number_of_replicas", 0).build(); startNode("server1", settings); startNode("server2", settings); client = getClient(); }
public void createNodes() throws Exception { Settings settings = settingsBuilder().put("index.number_of_shards", 3).put("index.number_of_replicas", 0).build(); startNode("server1", settings); startNode("server2", settings); client = getClient(); }
@Test public void testBackupElectionToPrimaryWhenPrimaryCanBeAllocatedToAnotherNode() { ShardsRoutingStrategy strategy = new ShardsRoutingStrategy(); logger.info("Building initial routing table"); MetaData metaData = newMetaDataBuilder() .put(newIndexMetaDataBuilder("test")...
@Test public void testBackupElectionToPrimaryWhenPrimaryCanBeAllocatedToAnotherNode() { ShardsRoutingStrategy strategy = new ShardsRoutingStrategy(); logger.info("Building initial routing table"); MetaData metaData = newMetaDataBuilder() .put(newIndexMetaDataBuilder("test")...
public boolean setItem(final int item, final OnPageChangeListener listener) { final boolean changed = setItem(item); if (changed) listener.onPageSelected(item); return changed; }
public boolean setItem(final int item, final OnPageChangeListener listener) { final boolean changed = setItem(item); if (changed && listener != null) listener.onPageSelected(item); return changed; }
public void cylinder(float width, float height, float depth, int divisions) { // FIXME create better cylinder method (- fill the sides, - axis on which to create the cylinder (matrix?), - partial cylinder) final float hw = width * 0.5f; final float hh = height * 0.5f; final float hd = depth * 0.5f; final flo...
public void cylinder(float width, float height, float depth, int divisions) { // FIXME create better cylinder method (- fill the sides, - axis on which to create the cylinder (matrix?), - partial cylinder) final float hw = width * 0.5f; final float hh = height * 0.5f; final float hd = depth * 0.5f; final flo...
public void render () { Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); cam.update(); shapeRenderer.setProjectionMatrix(cam.combined); shapeRenderer.begin(ShapeType.Line); shapeRenderer.setColor(Color.RED); ...
public void render () { Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); cam.update(); shapeRenderer.setProjectionMatrix(cam.combined); shapeRenderer.begin(ShapeType.Line); shapeRenderer.setColor(Color.RED); ...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(layout.pager_with_title); setTitle(getString(string.gists_title)); getSupportActionBar().setDisplayHomeAsUpEnabled(true); pager.setAdapter(new GistsPagerAdapter(getResourc...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(layout.pager_with_title); setTitle(getString(string.gists_title)); getSupportActionBar().setDisplayHomeAsUpEnabled(true); pager.setAdapter(new GistQueriesPagerAdapter(getR...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: Intent intent = ViewGistActivity.createIntent(gist); intent.addFlags(FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_SINGLE_TOP); startActivity(intent); r...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: Intent intent = ViewGistsActivity.createIntent(gist); intent.addFlags(FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_SINGLE_TOP); startActivity(intent); ...
public boolean isButtonDown( int button ) { return buttons.contains( button ); }
public boolean isButtonDown( int button ) { return buttons.size() > 0; }
public ThreadPool(Settings settings, @Nullable NodeSettingsService nodeSettingsService) { super(settings); assert settings.get("name") != null : "ThreadPool's settings should contain a name"; Map<String, Settings> groupSettings = settings.getGroups(THREADPOOL_GROUP); int available...
public ThreadPool(Settings settings, @Nullable NodeSettingsService nodeSettingsService) { super(settings); assert settings.get("name") != null : "ThreadPool's settings should contain a name"; Map<String, Settings> groupSettings = settings.getGroups(THREADPOOL_GROUP); int available...
public boolean apply(Object input) { return !w.isOpen(); } }); } catch (InterruptedException e) { Thread.interrupted(); } if (!w.successfullyClosed()) { ...
public boolean apply(Object input) { return !w.isOpen(); } }); } catch (InterruptedException e) { Thread.interrupted(); } if (!w.successfullyClosed()) { ...
@Test public void testSimpleApis() throws Exception { RestRequest request = new RestRequest(Method.POST, "/test/type1"); request.setBody(ByteBuffer.wrap(XContentFactory.jsonBuilder().startObject() .field("field", "value") .endObject().copiedBytes())); RestResp...
@Test public void testSimpleApis() throws Exception { RestRequest request = new RestRequest(Method.POST, "/test/type1"); request.setBody(ByteBuffer.wrap(XContentFactory.jsonBuilder().startObject() .field("field", "value") .endObject().copiedBytes())); RestResp...
public boolean isValid () { return !(min.x == max.x && min.y == max.y && min.z == max.z); }
public boolean isValid () { return (min.x < max.x && min.y < max.y && min.z < max.z); }
private void writeImages (File packFile, Array<Page> pages) { File packDir = packFile.getParentFile(); String imageName = packFile.getName(); int dotIndex = imageName.lastIndexOf('.'); if (dotIndex != -1) imageName = imageName.substring(0, dotIndex); int fileIndex = 0; for (Page page : pages) { int wid...
private void writeImages (File packFile, Array<Page> pages) { File packDir = packFile.getParentFile(); String imageName = packFile.getName(); int dotIndex = imageName.indexOf('.'); if (dotIndex != -1) imageName = imageName.substring(0, dotIndex); int fileIndex = 0; for (Page page : pages) { int width =...
public void draw (Batch batch, float parentAlpha) { validate(); Color color = tempColor.set(getColor()); color.a *= parentAlpha; if (style.background != null) { batch.setColor(color.r, color.g, color.b, color.a); style.background.draw(batch, getX(), getY(), getWidth(), getHeight()); } if (style.fontC...
public void draw (Batch batch, float parentAlpha) { validate(); Color color = tempColor.set(getColor()); color.a *= parentAlpha; if (style.background != null) { batch.setColor(color.r, color.g, color.b, color.a); style.background.draw(batch, getX(), getY(), getWidth(), getHeight()); } if (style.fontC...
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) { float width = getWidth(), height = getHeight(); float padTop = getPadTop(); super.drawBackground(batch, parentAlpha, x, y); // Draw button table. buttonTable.getColor().a = getColor().a; buttonTable.pack(); buttonTable.s...
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) { float width = getWidth(), height = getHeight(); float padTop = getPadTop(); super.drawBackground(batch, parentAlpha, x, y); // Draw button table. buttonTable.getColor().a = getColor().a; buttonTable.pack(); buttonTable.s...
protected ShardIterator shards(ClusterState clusterState, UpdateRequest request) throws ElasticsearchException { if (request.shardId() != -1) { return clusterState.routingTable().index(request.index()).shard(request.shardId()).primaryShardIt(); } ShardIterator shardIterator = clu...
protected ShardIterator shards(ClusterState clusterState, UpdateRequest request) throws ElasticsearchException { if (request.shardId() != -1) { return clusterState.routingTable().index(request.index()).shard(request.shardId()).primaryShardIt(); } ShardIterator shardIterator = clu...
public void invalidate () { needsLayout = true; getTable().prefSizeInvalid = true; }
public void invalidate () { needsLayout = true; getTable().sizeInvalid = true; }
public void create () { skin = new Skin(Gdx.files.internal("data/uiskin.json"), Gdx.files.internal("data/uiskin.png")); TextureRegion image2 = new TextureRegion(new Texture(Gdx.files.internal("data/badlogic.jpg"))); ui = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false); Gdx.input.setInputPro...
public void create () { skin = new Skin(Gdx.files.internal("data/uiskin.json"), Gdx.files.internal("data/uiskin.png")); TextureRegion image2 = new TextureRegion(new Texture(Gdx.files.internal("data/badlogic.jpg"))); ui = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false); Gdx.input.setInputPro...
public void onItemClick(AdapterView<?> view, View arg1, int position, long id) { User user = (User) view.getItemAtPosition(position); startActivity(RepoBrowseActivity.createIntent(HomeActivity.this, user)); } }); }
public void onItemClick(AdapterView<?> view, View arg1, int position, long id) { User user = (User) view.getItemAtPosition(position); startActivity(RepoBrowseActivity.createIntent(user)); } }); }
private IssueBodyViewHolder body; @InjectExtra(GitHubIntents.EXTRA_REPOSITORY) String repository; @InjectExtra(GitHubIntents.EXTRA_REPOSITORY_OWNER) String repositoryOwner;
private IssueBodyViewHolder body; @InjectExtra(GitHubIntents.EXTRA_REPOSITORY_NAME) String repository; @InjectExtra(GitHubIntents.EXTRA_REPOSITORY_OWNER) String repositoryOwner;
public String getAuthTokenLabel(String authTokenType) { if (authTokenType.equals(ACCOUNT_TYPE)) return authTokenType; return null; }
public String getAuthTokenLabel(String authTokenType) { if (ACCOUNT_TYPE.equals(authTokenType)) return authTokenType; return null; }
protected void finishLogin() { final Intent intent = new Intent(); authToken = password; intent.putExtra(KEY_ACCOUNT_NAME, username); intent.putExtra(KEY_ACCOUNT_TYPE, ACCOUNT_TYPE); if (authTokenType != null && authTokenType.equals(ACCOUNT_TYPE)) intent.putExtra(...
protected void finishLogin() { final Intent intent = new Intent(); authToken = password; intent.putExtra(KEY_ACCOUNT_NAME, username); intent.putExtra(KEY_ACCOUNT_TYPE, ACCOUNT_TYPE); if (ACCOUNT_TYPE.equals(authTokenType)) intent.putExtra(KEY_AUTHTOKEN, authToken)...
public static void configure(Settings settings) { if (loaded) { return; } loaded = true; Environment environment = new Environment(settings); ImmutableSettings.Builder settingsBuilder = settingsBuilder().putAll(settings); try { settingsBuilder....
public static void configure(Settings settings) { if (loaded) { return; } loaded = true; Environment environment = new Environment(settings); ImmutableSettings.Builder settingsBuilder = settingsBuilder().put(settings); try { settingsBuilder.loa...
public Server buildServer(String id, Settings settings) { String settingsSource = getClass().getName().replace('.', '/') + ".yml"; Settings finalSettings = settingsBuilder() .loadFromClasspath(settingsSource) .putAll(settings) .put("name", id) ...
public Server buildServer(String id, Settings settings) { String settingsSource = getClass().getName().replace('.', '/') + ".yml"; Settings finalSettings = settingsBuilder() .loadFromClasspath(settingsSource) .put(settings) .put("name", id) ...
public void testWithDiscovery() throws Exception { startServer("server1"); client = new TransportClient(ImmutableSettings.settingsBuilder().putBoolean("discovery.enabled", true).build()); // wait a bit so nodes will be discovered Thread.sleep(1000); client.admin().indices().c...
public void testWithDiscovery() throws Exception { startServer("server1"); client = new TransportClient(ImmutableSettings.settingsBuilder().put("discovery.enabled", true).build()); // wait a bit so nodes will be discovered Thread.sleep(1000); client.admin().indices().create(c...
public boolean allocateUnassigned(RoutingAllocation allocation) { boolean changed = false; DiscoveryNodes nodes = allocation.nodes(); RoutingNodes routingNodes = allocation.routingNodes(); // First, handle primaries, they must find a place to be allocated on here Iterator<Mu...
public boolean allocateUnassigned(RoutingAllocation allocation) { boolean changed = false; DiscoveryNodes nodes = allocation.nodes(); RoutingNodes routingNodes = allocation.routingNodes(); // First, handle primaries, they must find a place to be allocated on here Iterator<Mu...
@Override public void onFailure(Throwable e) { try { Throwable t = unwrapCause(e); if (t instanceof IndexAlreadyExistsException || t instanceof InvalidIndexNameException) { channel.sendResponse(new JsonHttpResponse(request, BAD_...
@Override public void onFailure(Throwable e) { try { Throwable t = unwrapCause(e); if (t instanceof IndexAlreadyExistsException || t instanceof InvalidIndexNameException) { channel.sendResponse(new JsonHttpResponse(request, BAD_...
@Override public void onFailure(Throwable e) { try { Throwable t = unwrapCause(e); if (t instanceof IndexMissingException || t instanceof InvalidTypeNameException) { channel.sendResponse(new JsonHttpResponse(request, BAD_REQUEST...
@Override public void onFailure(Throwable e) { try { Throwable t = unwrapCause(e); if (t instanceof IndexMissingException || t instanceof InvalidTypeNameException) { channel.sendResponse(new JsonHttpResponse(request, BAD_REQUEST...
public static JsonBuilder cached(HttpRequest request) throws IOException { JsonBuilder builder = JsonBuilder.cached(); String prettyPrint = request.param("pretty"); if (prettyPrint != null && "true".equals(prettyPrint)) { builder.prettyPrint(); } return builder; ...
public static JsonBuilder cached(HttpRequest request) throws IOException { JsonBuilder builder = JsonBuilder.jsonBuilder(); String prettyPrint = request.param("pretty"); if (prettyPrint != null && "true".equals(prettyPrint)) { builder.prettyPrint(); } return build...
@Override public String build() throws QueryBuilderException { try { JsonBuilder builder = JsonBuilder.cached(); toJson(builder); return builder.string(); } catch (Exception e) { throw new QueryBuilderException("Failed to build query", e); } ...
@Override public String build() throws QueryBuilderException { try { JsonBuilder builder = JsonBuilder.jsonBuilder(); toJson(builder); return builder.string(); } catch (Exception e) { throw new QueryBuilderException("Failed to build query", e); ...
public String build() { try { JsonBuilder builder = JsonBuilder.cached(); builder.startObject(); if (from != -1) { builder.field("from", from); } if (size != -1) { builder.field("size", size); } ...
public String build() { try { JsonBuilder builder = JsonBuilder.jsonBuilder(); builder.startObject(); if (from != -1) { builder.field("from", from); } if (size != -1) { builder.field("size", size); } ...
public QueryFacetCollector(String facetName, Query query, FilterCache filterCache) { super(facetName); Filter possibleFilter = extractFilterIfApplicable(query); if (possibleFilter != null) { this.filter = possibleFilter; } else { this.filter = filterCache.weak...
public QueryFacetCollector(String facetName, Query query, FilterCache filterCache) { super(facetName); Filter possibleFilter = extractFilterIfApplicable(query); if (possibleFilter != null) { this.filter = possibleFilter; } else { this.filter = new QueryWrapper...
public Pixmap getGlyphBitmap(char character) { Rect rect = new Rect(); paint.getTextBounds( "" + character, 0, 1, rect ); Bitmap bitmap = Bitmap.createBitmap( rect.width()==0?1:rect.width() + 5, getLineHeight(), Bitmap.Config.ARGB_8888 ); Canvas g = new Canvas( bitmap ); paint.setAntiAlias(true); paint.s...
public Pixmap getGlyphBitmap(char character) { Rect rect = new Rect(); paint.getTextBounds( "" + character, 0, 1, rect ); Bitmap bitmap = Bitmap.createBitmap( rect.width()==0?1:rect.width() + 5, getLineHeight(), AndroidPixmap.getInternalFormat(Font.pixelFormat) ); Canvas g = new Canvas( bitmap ); paint.set...
public void sendFreeContext(DiscoveryNode node, long contextId, ClearScrollRequest request, final ActionListener<Boolean> actionListener) { if (clusterService.state().nodes().localNodeId().equals(node.id())) { boolean freed = searchService.freeContext(contextId); actionListener.onRes...
public void sendFreeContext(DiscoveryNode node, long contextId, ClearScrollRequest request, final ActionListener<Boolean> actionListener) { if (clusterService.state().nodes().localNodeId().equals(node.id())) { final boolean freed = searchService.freeContext(contextId); actionListener...
public static String VERSION = "0.52"; }
public static String VERSION = "0.6"; }
public void render(Application app) { frameBuffer.begin(); app.getGraphics().getGL20().glClearColor( 0f, 0f, 0f, 1 ); app.getGraphics().getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT ); meshShader.begin(); mesh.render(meshShader, GL20.GL_TRIANGLES); meshShader.end(); frameBuffer.end(); app.get...
public void render(Application app) { frameBuffer.begin(); app.getGraphics().getGL20().glClearColor( 0f, 0f, 0f, 1 ); app.getGraphics().getGL20().glClear( GL20.GL_COLOR_BUFFER_BIT ); meshShader.begin(); mesh.render(meshShader, GL20.GL_TRIANGLES); meshShader.end(); frameBuffer.end(); app.get...
@Override public void run() { File file = new File(path, blobName); RandomAccessFile raf; try { raf = new RandomAccessFile(file, "rw"); } catch (FileNotFoundException e) { listener.onFailure(e); ...
@Override public void run() { File file = new File(path, blobName); RandomAccessFile raf; try { raf = new RandomAccessFile(file, "rw"); } catch (FileNotFoundException e) { listener.onFailure(e); ...
@Override public void run() { byte[] buffer = new byte[1024 * 16]; FSDataInputStream fileStream; try { fileStream = blobStore.fileSystem().open(new Path(path, blobName)); } catch (IOException e) { liste...
@Override public void run() { byte[] buffer = new byte[blobStore.bufferSizeInBytes()]; FSDataInputStream fileStream; try { fileStream = blobStore.fileSystem().open(new Path(path, blobName)); } catch (IOException e) { ...