Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant code #342

Merged
merged 1 commit into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ cardinality:
elasticsearchTuningConfig:
precisionThreshold: 500
aggregationSize: 10000
scrollSize: 100
scrollTimeInSeconds: 120
documentsLimitAllowed: 10000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteResponse;
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand;
import org.elasticsearch.index.shard.ShardId;
import org.joda.time.DateTime;
Expand Down Expand Up @@ -48,7 +49,9 @@ public ClusterRerouteManager(
this.mapper = mapper;
}

public void reallocate() {
//TODO This needs fixing to correspond to changed response from java high level client

/*public void reallocate() {
Map<String, NodeInfo> nodeIdVsNodeInfoMap = new HashMap<>();
BiMap<String, String> nodeNameVsNodeId = HashBiMap.create();
this.createNodeInfoMap(nodeIdVsNodeInfoMap);
Expand Down Expand Up @@ -106,9 +109,10 @@ private boolean reallocateShard(ShardId shardId, String fromNode, String toNode)
private void createNodeInfoMap(Map<String, NodeInfo> nodeIdVsNodeInfoMap) {
nodeIdVsNodeInfoMap.clear();
val request = new Request("GET", "/_stats");
val response = connection.getClient()
Response response = connection.getClient()
.getLowLevelClient()
.performRequest(request);

val indicesStatsResponse = mapper.readValue(EntityUtils.toString(response.getEntity()),
IndicesStatsResponse.class);
Arrays.stream(indicesStatsResponse.getShards())
Expand Down Expand Up @@ -179,6 +183,6 @@ private Deque<String> getVacantNodeId(
}
}
return vacantNodeIds;
}
}*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

import com.flipkart.foxtrot.core.reroute.ClusterRerouteManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import ru.vyarus.dropwizard.guice.module.installer.order.Order;

import javax.inject.Inject;
import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import ru.vyarus.dropwizard.guice.module.installer.order.Order;

/***
Created by mudit.g on Sep, 2019
Expand Down

This file was deleted.