-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
Add ES5 string to version number for local builds.
- Change default nodeClient setting to false; - Disabled unit tests for node client. Elastic recommend using a local coordinating client in conjunction with the TransportClient instead of NodeClient.
…asticsearch into elasticsearch-5.0
# Conflicts: # README.md # pom.xml
# Conflicts: # README.md # pom.xml
# Conflicts: # README.md # pom.xml # src/main/java/io/dropwizard/elasticsearch/util/TransportAddressHelper.java # src/test/java/io/dropwizard/elasticsearch/util/TransportAddressHelperTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gajicvedrana Thanks for your contribution! 😃
There are a few things we have to address before we can merge this PR.
@@ -43,7 +43,7 @@ Configuration | |||
|
|||
The following configuration settings are supported by `EsConfiguration`: | |||
|
|||
* `nodeClient`: When `true`, `ManagedEsClient` will create a `NodeClient`, otherwise a `TransportClient`; default: `true` | |||
* `nodeClient`: **DEPRECATED** Will throw an exception if `true`. Default: `false` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keep this setting at all when the node client isn't supported any more?
@@ -59,6 +59,17 @@ The order of precedence is: `nodeClient`/`servers`/`clusterName` > `settings` > | |||
any setting in `settingsFile` can be overwritten with `settings` which in turn get overwritten by the specific settings | |||
like `clusterName`. | |||
|
|||
### Notes for Elasticsearch 5.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elasticsearch 5.x or 6.x? 😉
@@ -8,7 +8,7 @@ | |||
|
|||
<groupId>io.dropwizard.modules</groupId> | |||
<artifactId>dropwizard-elasticsearch</artifactId> | |||
<version>1.2.0-2-SNAPSHOT</version> | |||
<version>1.2.0-2-ES6.0.0-SNAPSHOT</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore the old version.
<elasticsearch.version>2.4.6</elasticsearch.version> | ||
<elasticsearch.version>6.0.0</elasticsearch.version> | ||
<!-- github server corresponds to entry in ~/.m2/settings.xml --> | ||
<github.global.server>github</github.global.server> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's property is necessary.
<version>${elasticsearch.version}</version> | ||
</dependency> | ||
<!-- Required for ES 5.x --> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of pulling in a second logging framework, this project should use the Log4j to SLF4J adapter.
@@ -24,7 +24,7 @@ | |||
private String clusterName = "elasticsearch"; | |||
|
|||
@JsonProperty | |||
private boolean nodeClient = true; | |||
private boolean nodeClient = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the node client isn't supported anymore, this setting should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, we could add support for the Elasticsearch High Level REST Client:
.settings(settings) | ||
.build(); | ||
this.client = this.node.client(); | ||
throw new UnsupportedOperationException("Node client is not allowed for Elasticsearch 6. Use a local coordinating node, and the transport client."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove that completely.
import static org.junit.Assert.assertNotNull; | ||
import static org.junit.Assert.assertSame; | ||
import static org.junit.Assert.assertTrue; | ||
import static org.junit.Assert.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use wildcard imports.
@@ -131,13 +160,13 @@ public void transportClientShouldBeCreatedFromConfig() throws URISyntaxException | |||
transportClient.transportAddresses().get(2)); | |||
} | |||
|
|||
@Test | |||
@Test @Ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this test ignored?
@@ -148,13 +177,13 @@ public void managedClientShouldUseCustomElasticsearchConfig() throws URISyntaxEx | |||
assertEquals("19300-19400", nodeClient.settings().get("transport.tcp.port")); | |||
} | |||
|
|||
@Test | |||
@Test @Ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this test ignored?
I have a version for ES 5.6 which has most of these changes in place. Do you have a preferred version numbering scheme? I doubt the ES6 version is likely to be compatible with ES5, but both are still in common use among clients I visit, so it would be good to have both available. If you let me know, I'll create a separate PR for the ES5 version. |
@mattflax Since Elasticsearch 5.x is already legacy, I'd rather not add support for it but jump straight to Elasticsearch 6.x. |
@gajicvedrana Are you going to address the review comments or should I close this PR? |
Closed due to inactivity. |
Refs #19