Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/elasticsearch/elasticsearch
Browse files Browse the repository at this point in the history
Conflicts:
	src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java
	src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java
  • Loading branch information
msimons committed Feb 28, 2013
2 parents d5a11be + 1d45edd commit 9623a0a
Show file tree
Hide file tree
Showing 393 changed files with 4,761 additions and 3,763 deletions.
68 changes: 37 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>0.21.0.Beta1-SNAPSHOT</version>
<version>0.90.0.Beta2-SNAPSHOT</version>
<packaging>jar</packaging>
<description>ElasticSearch - Open Source, Distributed, RESTful Search Engine</description>
<inceptionYear>2009</inceptionYear>
Expand Down Expand Up @@ -90,6 +90,12 @@
<artifactId>lucene-queryparser</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
Expand All @@ -103,19 +109,41 @@
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- Lucene spatial, make sure when upgrading to work with latest version of jts/spatial4j dependencies -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-spatial</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
<version>0.3</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.12</version>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Lucene spatial -->


<!-- START: dependencies that are shaded -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>13.0.1</version>
<version>14.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -150,28 +178,28 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.1.1</version>
<version>2.1.4</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<version>2.1.1</version>
<version>2.1.4</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.1.1</version>
<version>2.1.4</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>3.6.2.Final</version>
<version>3.6.3.Final</version>
<scope>compile</scope>
</dependency>

Expand All @@ -183,28 +211,6 @@
</dependency>
<!-- END: dependencies that are shaded -->

<dependency>
<groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
<version>0.3</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.12</version>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
Expand Down Expand Up @@ -337,8 +343,8 @@
<systemPropertyVariables>
<es.node.local>${env.ES_TEST_LOCAL}</es.node.local>
<es.transport.tcp.compress>${env.ES_TEST_COMPRESS}</es.transport.tcp.compress>
<es.index.store.compress.stored>${env.ES_TEST_COMPRESS}</es.index.store.compress.stored>
<es.action.wait_on_mapping_change>${env.ES_WAIT_ON_MAPPING_CHANGE}</es.action.wait_on_mapping_change>
<es.action.wait_on_mapping_change>${env.ES_WAIT_ON_MAPPING_CHANGE}
</es.action.wait_on_mapping_change>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/org/elasticsearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,24 @@ public class Version implements Serializable {
public static final int V_0_20_6_ID = /*00*/200699;
public static final Version V_0_20_6 = new Version(V_0_20_6_ID, false);

public static final int V_0_21_0_Beta1_ID = /*00*/210001;
public static final Version V_0_21_0_Beta1 = new Version(V_0_21_0_Beta1_ID, true);
public static final int V_0_90_0_Beta1_ID = /*00*/900001;
public static final Version V_0_90_0_Beta1 = new Version(V_0_90_0_Beta1_ID, false);

public static final Version CURRENT = V_0_21_0_Beta1;
public static final int V_0_90_0_Beta2_ID = /*00*/900002;
public static final Version V_0_90_0_Beta2 = new Version(V_0_90_0_Beta2_ID, true);

public static final Version CURRENT = V_0_90_0_Beta2;

public static Version readVersion(StreamInput in) throws IOException {
return fromId(in.readVInt());
}

public static Version fromId(int id) {
switch (id) {
case V_0_21_0_Beta1_ID:
return V_0_21_0_Beta1;
case V_0_90_0_Beta2_ID:
return V_0_90_0_Beta2;
case V_0_90_0_Beta1_ID:
return V_0_90_0_Beta1;

case V_0_20_6_ID:
return V_0_20_6;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/elasticsearch/action/ActionRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ protected ActionRequest(ActionRequest request) {
* <p>When not executing on a thread, it will either be executed on the calling thread, or
* on an expensive, IO based, thread.
*/
public final boolean isListenerThreaded() {
public final boolean listenerThreaded() {
return this.listenerThreaded;
}

/**
* Sets if the response listener be executed on a thread or not.
*/
@SuppressWarnings("unchecked")
public final T setListenerThreaded(boolean listenerThreaded) {
public final T listenerThreaded(boolean listenerThreaded) {
this.listenerThreaded = listenerThreaded;
return (T) this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Request request() {

@SuppressWarnings("unchecked")
public final RequestBuilder setListenerThreaded(boolean listenerThreaded) {
request.setListenerThreaded(listenerThreaded);
request.listenerThreaded(listenerThreaded);
return (RequestBuilder) this;
}

Expand All @@ -53,7 +53,7 @@ public final RequestBuilder putHeader(String key, Object value) {
}

public ListenableActionFuture<Response> execute() {
PlainListenableActionFuture<Response> future = new PlainListenableActionFuture<Response>(request.isListenerThreaded(), client.threadPool());
PlainListenableActionFuture<Response> future = new PlainListenableActionFuture<Response>(request.listenerThreaded(), client.threadPool());
execute(future);
return future;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public TransportActionNodeProxy(Settings settings, GenericAction<Request, Respon

public ActionFuture<Response> execute(DiscoveryNode node, Request request) throws ElasticSearchException {
PlainActionFuture<Response> future = newFuture();
request.setListenerThreaded(false);
request.listenerThreaded(false);
execute(node, request, future);
return future;
}
Expand All @@ -68,7 +68,7 @@ public Response newInstance() {

@Override
public String executor() {
if (request.isListenerThreaded()) {
if (request.listenerThreaded()) {
return ThreadPool.Names.GENERIC;
}
return ThreadPool.Names.SAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,84 +57,84 @@ public ClusterHealthRequest(String... indices) {
this.indices = indices;
}

public String[] getIndices() {
public String[] indices() {
return indices;
}

public ClusterHealthRequest setIndices(String[] indices) {
public ClusterHealthRequest indices(String[] indices) {
this.indices = indices;
return this;
}

public TimeValue getTimeout() {
public TimeValue timeout() {
return timeout;
}

public ClusterHealthRequest setTimeout(TimeValue timeout) {
public ClusterHealthRequest timeout(TimeValue timeout) {
this.timeout = timeout;
if (masterNodeTimeout == DEFAULT_MASTER_NODE_TIMEOUT) {
masterNodeTimeout = timeout;
}
return this;
}

public ClusterHealthRequest setTimeout(String timeout) {
return setTimeout(TimeValue.parseTimeValue(timeout, null));
public ClusterHealthRequest timeout(String timeout) {
return this.timeout(TimeValue.parseTimeValue(timeout, null));
}

public ClusterHealthStatus getWaitForStatus() {
public ClusterHealthStatus waitForStatus() {
return waitForStatus;
}

public ClusterHealthRequest setWaitForStatus(ClusterHealthStatus waitForStatus) {
public ClusterHealthRequest waitForStatus(ClusterHealthStatus waitForStatus) {
this.waitForStatus = waitForStatus;
return this;
}

public ClusterHealthRequest setWaitForGreenStatus() {
return setWaitForStatus(ClusterHealthStatus.GREEN);
public ClusterHealthRequest waitForGreenStatus() {
return waitForStatus(ClusterHealthStatus.GREEN);
}

public ClusterHealthRequest setWaitForYellowStatus() {
return setWaitForStatus(ClusterHealthStatus.YELLOW);
public ClusterHealthRequest waitForYellowStatus() {
return waitForStatus(ClusterHealthStatus.YELLOW);
}

public int getWaitForRelocatingShards() {
public int waitForRelocatingShards() {
return waitForRelocatingShards;
}

public ClusterHealthRequest setWaitForRelocatingShards(int waitForRelocatingShards) {
public ClusterHealthRequest waitForRelocatingShards(int waitForRelocatingShards) {
this.waitForRelocatingShards = waitForRelocatingShards;
return this;
}

public int getWaitForActiveShards() {
public int waitForActiveShards() {
return waitForActiveShards;
}

public ClusterHealthRequest setWaitForActiveShards(int waitForActiveShards) {
public ClusterHealthRequest waitForActiveShards(int waitForActiveShards) {
this.waitForActiveShards = waitForActiveShards;
return this;
}

public String getWaitForNodes() {
public String waitForNodes() {
return waitForNodes;
}

/**
* Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
*/
public ClusterHealthRequest setWaitForNodes(String waitForNodes) {
public ClusterHealthRequest waitForNodes(String waitForNodes) {
this.waitForNodes = waitForNodes;
return this;
}

public ClusterHealthRequest setLocal(boolean local) {
public ClusterHealthRequest local(boolean local) {
this.local = local;
return this;
}

public boolean getLocal() {
public boolean local() {
return this.local;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,50 @@ public ClusterHealthRequestBuilder(ClusterAdminClient clusterClient) {
}

public ClusterHealthRequestBuilder setIndices(String... indices) {
request.setIndices(indices);
request.indices(indices);
return this;
}

public ClusterHealthRequestBuilder setTimeout(TimeValue timeout) {
request.setTimeout(timeout);
request.timeout(timeout);
return this;
}

public ClusterHealthRequestBuilder setTimeout(String timeout) {
request.setTimeout(timeout);
request.timeout(timeout);
return this;
}

public ClusterHealthRequestBuilder setWaitForStatus(ClusterHealthStatus waitForStatus) {
request.setWaitForStatus(waitForStatus);
request.waitForStatus(waitForStatus);
return this;
}

public ClusterHealthRequestBuilder setWaitForGreenStatus() {
request.setWaitForGreenStatus();
request.waitForGreenStatus();
return this;
}

public ClusterHealthRequestBuilder setWaitForYellowStatus() {
request.setWaitForYellowStatus();
request.waitForYellowStatus();
return this;
}

public ClusterHealthRequestBuilder setWaitForRelocatingShards(int waitForRelocatingShards) {
request.setWaitForRelocatingShards(waitForRelocatingShards);
request.waitForRelocatingShards(waitForRelocatingShards);
return this;
}

public ClusterHealthRequestBuilder setWaitForActiveShards(int waitForActiveShards) {
request.setWaitForActiveShards(waitForActiveShards);
request.waitForActiveShards(waitForActiveShards);
return this;
}

/**
* Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
*/
public ClusterHealthRequestBuilder setWaitForNodes(String waitForNodes) {
request.setWaitForNodes(waitForNodes);
request.waitForNodes(waitForNodes);
return this;
}

Expand Down
Loading

0 comments on commit 9623a0a

Please sign in to comment.