Skip to content

Commit

Permalink
CBES-123 Support Elasticsearch 6.7 docker image
Browse files Browse the repository at this point in the history
Upgrade Elasticsearch High Level REST Client to version 6.7.1 to avoid
elastic/elasticsearch#40511

Change-Id: I0a4514db4a67330589798a901508ef0e90f95b7d
Reviewed-on: http://review.couchbase.org/108402
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: David Nault <david.nault@couchbase.com>
  • Loading branch information
dnault committed Apr 29, 2019
1 parent fc77849 commit c353337
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies {

compile 'com.couchbase.client:java-client:2.7.2'
compile 'com.couchbase.client:dcp-client:0.22.0'
compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.3.2'
compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.7.1'

compile 'io.projectreactor:reactor-core:3.2.5.RELEASE'
//compile 'io.projectreactor.addons:reactor-extra:3.2.2.RELEASE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,16 @@ public static Iterable<Object[]> versionsToTest() {
"community-5.0.1");

final Set<String> elasticsearchVersions = new LinkedHashSet<>(Arrays.asList(
"7.0.0-beta1",
"6.6.0",
"7.0.0",
"6.7.1",
"6.6.2",
"6.5.4",
"6.4.3",
"6.3.2",
"6.2.4",
"6.1.4",
"6.0.1",
"5.6.11",
"5.6.15",
"5.5.3",
"5.4.3"
));
Expand Down Expand Up @@ -246,7 +247,7 @@ public void createDeleteReject() throws Throwable {
// before the request is sent to Elasticsearch. Make sure we trapped the error and converted it to a rejection.
final String bigIntKey = "veryLargeNumber";
upsertWithRetry(bucket, JsonDocument.create(bigIntKey, JsonObject.create().put("number", new BigInteger("17626319910530664276"))));
assertDocumentRejected(es, "etc", bigIntKey, "java.math.BigInteger");
assertDocumentRejected(es, "etc", bigIntKey, "BIG_INTEGER");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.http.ssl.SSLContexts;
import org.elasticsearch.action.bulk.BulkItemResponse;
import org.elasticsearch.action.main.MainResponse;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
Expand Down Expand Up @@ -157,7 +158,7 @@ public static RestHighLevelClient newElasticsearchClient(List<HttpHost> hosts, S
.setDefaultCredentialsProvider(credentialsProvider))
.setFailureListener(new RestClient.FailureListener() {
@Override
public void onFailure(HttpHost host) {
public void onFailure(Node host) {
Metrics.elasticsearchHostOffline().mark();
}
});
Expand Down

0 comments on commit c353337

Please sign in to comment.