diff --git a/pom.xml b/pom.xml index e17a63c2f..40c1f7ee4 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ - 7.9.3 + 7.0.1 1.3 2.28.2 2.8.6 diff --git a/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchClient.java b/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchClient.java index ee7f206a2..636549986 100644 --- a/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchClient.java +++ b/src/main/java/io/confluent/connect/elasticsearch/ElasticsearchClient.java @@ -57,7 +57,7 @@ import org.elasticsearch.client.indices.GetMappingsRequest; import org.elasticsearch.client.indices.GetMappingsResponse; import org.elasticsearch.client.indices.PutMappingRequest; -import org.elasticsearch.cluster.metadata.MappingMetadata; +import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.common.unit.TimeValue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -229,7 +229,7 @@ public void flush() { * @return true if a mapping exists, false if it does not */ public boolean hasMapping(String index) { - MappingMetadata mapping = mapping(index); + MappingMetaData mapping = mapping(index); return mapping != null && mapping.sourceAsMap() != null && !mapping.sourceAsMap().isEmpty(); } @@ -470,9 +470,9 @@ private boolean isFailed() { * Gets the mapping for an index. * * @param index the index to fetch the mapping for - * @return the MappingMetadata for the index + * @return the MappingMetaData for the index */ - private MappingMetadata mapping(String index) { + private MappingMetaData mapping(String index) { GetMappingsRequest request = new GetMappingsRequest().indices(index); GetMappingsResponse response = callWithRetries( "get mapping for index " + index, diff --git a/src/test/java/io/confluent/connect/elasticsearch/helper/ElasticsearchHelperClient.java b/src/test/java/io/confluent/connect/elasticsearch/helper/ElasticsearchHelperClient.java index 4a13aefe3..93939c3a3 100644 --- a/src/test/java/io/confluent/connect/elasticsearch/helper/ElasticsearchHelperClient.java +++ b/src/test/java/io/confluent/connect/elasticsearch/helper/ElasticsearchHelperClient.java @@ -37,7 +37,7 @@ import org.elasticsearch.client.security.RefreshPolicy; import org.elasticsearch.client.security.user.User; import org.elasticsearch.client.security.user.privileges.Role; -import org.elasticsearch.cluster.metadata.MappingMetadata; +import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.search.SearchHits; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -68,7 +68,7 @@ public long getDocCount(String index) throws IOException { return client.count(request, RequestOptions.DEFAULT).getCount(); } - public MappingMetadata getMapping(String index) throws IOException { + public MappingMetaData getMapping(String index) throws IOException { GetMappingsRequest request = new GetMappingsRequest().indices(index); GetMappingsResponse response = client.indices().getMapping(request, RequestOptions.DEFAULT); return response.mappings().get(index);