From 6d4fb1a38db9f8c625ab981f757d6c294c7e08e2 Mon Sep 17 00:00:00 2001 From: Mital Awachat Date: Mon, 9 Aug 2021 12:22:15 +0530 Subject: [PATCH] Rename elastic/elasticsearch to opensearch (#14) Signed-off-by: Mital Awachat --- .ci/Dockerfile | 2 +- .ci/make.sh | 2 +- NOTICE.txt | 4 ++++ config/checkstyle/checkstyle.xml | 13 +++++++++++++ config/checkstyle/checkstyle_suppressions.xml | 13 +++++++++++++ docs/design/0001-model-classes-structure.md | 4 ++-- docs/design/0002-namespace-clients-and-endpoints.md | 2 +- gradle/wrapper/gradle-wrapper.properties | 9 +++++++++ java-client/build.gradle.kts | 6 +++--- 9 files changed, 47 insertions(+), 8 deletions(-) diff --git a/.ci/Dockerfile b/.ci/Dockerfile index 13792737570b8..8508ccb3ad9f0 100644 --- a/.ci/Dockerfile +++ b/.ci/Dockerfile @@ -27,7 +27,7 @@ # # Build a Docker image that has Gradle and all project dependencies ready. -# Needs to be run with .git and java-client/src mounted under /elasticsearch-java. +# Needs to be run with .git and java-client/src mounted under /opensearch-java. FROM openjdk:15 diff --git a/.ci/make.sh b/.ci/make.sh index 84f94aef382e4..aafc8718847fe 100755 --- a/.ci/make.sh +++ b/.ci/make.sh @@ -29,7 +29,7 @@ # ------------------------------------------------------- # # -# Skeleton for common build entry script for all elastic +# Skeleton for common build entry script for all OpenSearch # clients. Needs to be adapted to individual client usage. # # Must be called: ./.ci/make.sh diff --git a/NOTICE.txt b/NOTICE.txt index 2fcbebe9018cc..94525db4ad984 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,2 +1,6 @@ +OpenSearch (https://opensearch.org/) +Copyright 2021 OpenSearch Contributors + +This product includes software developed by Elasticsearch Java Client Copyright 2021 Elasticsearch B.V. diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 96ccb95f886cd..7739883f14189 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -1,4 +1,12 @@ + + + + diff --git a/config/checkstyle/checkstyle_suppressions.xml b/config/checkstyle/checkstyle_suppressions.xml index f1998275a8ce1..07d06cc12091a 100644 --- a/config/checkstyle/checkstyle_suppressions.xml +++ b/config/checkstyle/checkstyle_suppressions.xml @@ -1,4 +1,12 @@ + + + + diff --git a/docs/design/0001-model-classes-structure.md b/docs/design/0001-model-classes-structure.md index 13778c05ee32e..387925de03a3c 100644 --- a/docs/design/0001-model-classes-structure.md +++ b/docs/design/0001-model-classes-structure.md @@ -6,7 +6,7 @@ ## Context and Problem Statement -Elasticsearch request and response objects are data classes: they have no attached behavior. +OpenSearch request and response objects are data classes: they have no attached behavior. Java has two ways to represent such classes: * as JavaBeans: mutable classes with getters and setters, @@ -191,7 +191,7 @@ This provides property-like access in Scala. Kotlin will require method calls bu **Building nested objects** -There are many nested objects in the Elasticsearch API, which will also use the fluent builder pattern. Let's extend `FooRequest` with an innder `Bar` object: +There are many nested objects in the OpenSearch API, which will also use the fluent builder pattern. Let's extend `FooRequest` with an innder `Bar` object: ```java FooResponse r = client.foo( diff --git a/docs/design/0002-namespace-clients-and-endpoints.md b/docs/design/0002-namespace-clients-and-endpoints.md index 56777c4d3e2a6..3f66193c731f4 100644 --- a/docs/design/0002-namespace-clients-and-endpoints.md +++ b/docs/design/0002-namespace-clients-and-endpoints.md @@ -18,7 +18,7 @@ This allows writing code in a fluent and strongly typed way, leveraging the IDE The client should also be open for extension, in at least two areas: - allow custom endpoints to be defined, to support plugins that extend the ES API, -- allow overriding response types, to use the [`filter_path` query parameter](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#common-options-response-filtering) that allows removing fields from the response. As the filter may remove fields that are expected to exist in the standard response, a new - stripped down - response type must be provided by the user for the same request type and URL. This is real-world use case, as shown by [elasticsearch#53846](https://github.com/elastic/elasticsearch/issues/53846). +- allow overriding response types, to use the `filter_path` query parameter that allows removing fields from the response. As the filter may remove fields that are expected to exist in the standard response, a new - stripped down - response type must be provided by the user for the same request type and URL. ## Decision Drivers diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1ed23ca6bf1ad..0c252aa6b541a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,10 @@ # +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. +# # Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright @@ -16,6 +22,9 @@ # specific language governing permissions and limitations # under the License. # +# Modifications Copyright OpenSearch Contributors. See +# GitHub history for details. +# distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 1ca2f7de2fedf..da3c6111f1c73 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -69,9 +69,9 @@ tasks.withType { } manifest { - attributes["Implementation-Title"] = "Elasticsearch Java client" - attributes["Implementation-Vendor"] = "Elastic" - attributes["Implementation-URL"] = "https://github.com/elastic/elasticsearch-java/" + attributes["Implementation-Title"] = "OpenSearch Java client" + attributes["Implementation-Vendor"] = "OpenSearch" + attributes["Implementation-URL"] = "https://github.com/opensearch-project/opensearch-java/" attributes["Build-Date"] = rootProject.extra["buildTime"] }