Permalink
Browse files

Whoops, use port 9300 for transport clients. Also bump ES version in …

…pom to 0.90.5
  • Loading branch information...
1 parent 28f1fa4 commit 5bd6b79a07359fa884045f98db8297f8f37890a6 Dhruv Bansal committed Oct 8, 2013
View
@@ -28,7 +28,7 @@ def self.configure settings, program
settings.define(:es_query, :description => "Query to use when defining input splits for ElasticSearch input", :wukong_hadoop => true)
settings.define(:es_transport, :description => "Use a transport client to an existing node instead of spinning up a new node", :default => true, type: :boolean, :wukong_hadoop => true)
settings.define(:es_transport_host, :description => "Host of existing node for transport client", default: 'localhost', :wukong_hadoop => true)
- settings.define(:es_transport_port, :description => "Port of existing node for transport client", default: 9200, type: Integer, :wukong_hadoop => true)
+ settings.define(:es_transport_port, :description => "Port of existing node for transport client", default: 9300, type: Integer, :wukong_hadoop => true)
end
# Boot Wonderdog with the given `settings` in the given `dir`.
View
@@ -18,7 +18,7 @@
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
- <version>0.19.8</version>
+ <version>0.90.5</version>
</dependency>
<dependency>
@@ -133,7 +133,7 @@ private void initiate_search() {
.setSize(requestSize)
.execute()
.actionGet();
- this.numHits = response.hits().totalHits();
+ this.numHits = response.getHits().totalHits();
if(numSplits > numHits) numSplits = numHits; // This could be bad
this.numSplitRecords = (numHits/numSplits);
}
@@ -206,7 +206,7 @@ private void start_embedded_client() {
.setQuery(QueryBuilders.queryString(queryString))
.execute()
.actionGet();
- return response.hits().iterator();
+ return response.getHits().iterator();
}
@Override
@@ -71,7 +71,7 @@
private static final String ES_TRANSPORT_HOST = "localhost";
private static final String ES_TRANSPORT_PORT_OPT = "elasticsearch.transport.port";
- private static final String ES_TRANSPORT_PORT = "9200";
+ private static final String ES_TRANSPORT_PORT = "9300";
private TransportClient client;
@@ -197,7 +197,7 @@ private void findNumHits() {
request.setQuery(queryJSON);
}
SearchResponse response = request.execute().actionGet();
- this.numHits = response.hits().totalHits();
+ this.numHits = response.getHits().totalHits();
LOG.info("Ran query: "+String.valueOf(numHits)+" hits");
}
@@ -54,7 +54,7 @@ Hadoop OutputFormat for writing arbitrary MapWritables (essentially
private static final String ES_TRANSPORT_HOST = "localhost";
private static final String ES_TRANSPORT_PORT_OPT = "elasticsearch.transport.port";
- private static final String ES_TRANSPORT_PORT = "9200";
+ private static final String ES_TRANSPORT_PORT = "9300";
// Elasticsearch internal settings required to make a client
// connection.
@@ -105,7 +105,7 @@ private void fetchNextHits() {
LOG.info("Running initial scroll with timeout "+scrollTimeout);
SearchRequestBuilder request = split.initialScrollRequest(client, scroll, requestSize);
SearchResponse response = request.execute().actionGet();
- this.scrollId = response.scrollId();
+ this.scrollId = response.getScrollId();
LOG.info("Got scroll ID "+scrollId);
// Do we need to call fetchNextHits() again here? Or does
// the initial request also itself contain the first set
@@ -116,9 +116,9 @@ private void fetchNextHits() {
// LOG.info("Running query for scroll ID "+scrollId+" with timeout "+scrollTimeout);
SearchScrollRequestBuilder request = split.scrollRequest(client, scroll, scrollId);
SearchResponse response = request.execute().actionGet();
- this.scrollId = response.scrollId();
+ this.scrollId = response.getScrollId();
// LOG.info("Got scroll ID "+scrollId);
- this.hitsItr = response.hits().iterator();
+ this.hitsItr = response.getHits().iterator();
}
}

0 comments on commit 5bd6b79

Please sign in to comment.