From 8737443c9d2ce1ae100f31051167c2cfa0da834b Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Mon, 15 Mar 2021 15:12:24 -0500 Subject: [PATCH] [Rename] o.e.bootstrap (#303) This commit refactors the o.e.bootstrap package to o.opensearch.bootstrap. All references throughout the code are also refactored. Signed-off-by: Nicholas Knize --- distribution/src/bin/elasticsearch-service.bat | 2 +- distribution/src/bin/elasticsearch.bat | 2 +- .../elasticsearch/bootstrap/BootstrapTests.java | 1 + .../java/org/opensearch/painless/Compiler.java | 2 +- .../painless/lookup/PainlessLookupBuilder.java | 2 +- .../common/settings/ClusterSettings.java | 2 +- .../bootstrap/Bootstrap.java | 6 ++++-- .../bootstrap/BootstrapCheck.java | 4 ++-- .../bootstrap/BootstrapChecks.java | 5 +++-- .../bootstrap/BootstrapContext.java | 4 ++-- .../bootstrap/BootstrapException.java | 4 ++-- .../bootstrap/BootstrapInfo.java | 4 ++-- .../bootstrap/BootstrapSettings.java | 4 ++-- .../bootstrap/ConsoleCtrlHandler.java | 4 ++-- .../bootstrap/FilePermissionUtils.java | 4 ++-- .../bootstrap/JNACLibrary.java | 4 ++-- .../bootstrap/JNAKernel32Library.java | 4 ++-- .../bootstrap/JNANatives.java | 8 ++++---- .../bootstrap/Natives.java | 4 ++-- .../bootstrap/OpenSearch.java | 4 ++-- .../bootstrap/OpenSearchPolicy.java | 4 ++-- .../OpenSearchUncaughtExceptionHandler.java | 4 ++-- .../bootstrap/Security.java | 15 ++++++++------- .../bootstrap/Spawner.java | 4 ++-- .../bootstrap/StartupException.java | 4 ++-- .../bootstrap/SystemCallFilter.java | 4 ++-- .../monitor/process/ProcessProbeTests.java | 2 +- .../java/org/elasticsearch/node/NodeTests.java | 4 ++-- .../bootstrap/BootstrapForTesting.java | 6 ++++++ .../test/AbstractBootstrapCheckTestCase.java | 2 +- 30 files changed, 67 insertions(+), 56 deletions(-) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/Bootstrap.java (99%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapCheck.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapChecks.java (99%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapContext.java (94%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapException.java (94%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapInfo.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapSettings.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/ConsoleCtrlHandler.java (92%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/FilePermissionUtils.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/JNACLibrary.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/JNAKernel32Library.java (99%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/JNANatives.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/Natives.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/OpenSearch.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/OpenSearchPolicy.java (99%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/OpenSearchUncaughtExceptionHandler.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/Security.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/Spawner.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/StartupException.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/bootstrap/SystemCallFilter.java (99%) diff --git a/distribution/src/bin/elasticsearch-service.bat b/distribution/src/bin/elasticsearch-service.bat index 7ba657b28de..2e6a8e912a3 100644 --- a/distribution/src/bin/elasticsearch-service.bat +++ b/distribution/src/bin/elasticsearch-service.bat @@ -207,7 +207,7 @@ if not "%SERVICE_USERNAME%" == "" ( set SERVICE_PARAMS=%SERVICE_PARAMS% --ServiceUser "%SERVICE_USERNAME%" --ServicePassword "%SERVICE_PASSWORD%" ) ) -"%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.elasticsearch.bootstrap.OpenSearch --StartMethod main ++StartParams --quiet --StopClass org.elasticsearch.bootstrap.OpenSearch --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmMs %JVM_MS% --JvmMx %JVM_MX% --JvmSs %JVM_SS% --JvmOptions %OTHER_JAVA_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "%SERVICE_DISPLAY_NAME%" --Description "%SERVICE_DESCRIPTION%" --Jvm "%JAVA_HOME%%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%" %SERVICE_PARAMS% ++Environment HOSTNAME="%%COMPUTERNAME%%" +"%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.opensearch.bootstrap.OpenSearch --StartMethod main ++StartParams --quiet --StopClass org.opensearch.bootstrap.OpenSearch --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmMs %JVM_MS% --JvmMx %JVM_MX% --JvmSs %JVM_SS% --JvmOptions %OTHER_JAVA_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "%SERVICE_DISPLAY_NAME%" --Description "%SERVICE_DESCRIPTION%" --Jvm "%JAVA_HOME%%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%" %SERVICE_PARAMS% ++Environment HOSTNAME="%%COMPUTERNAME%%" if not errorlevel 1 goto installed echo Failed installing '%SERVICE_ID%' service diff --git a/distribution/src/bin/elasticsearch.bat b/distribution/src/bin/elasticsearch.bat index 61be39687c9..7c74937a1f6 100644 --- a/distribution/src/bin/elasticsearch.bat +++ b/distribution/src/bin/elasticsearch.bat @@ -101,7 +101,7 @@ ECHO.!KEYSTORE_PASSWORD!| %JAVA% %ES_JAVA_OPTS% -Delasticsearch ^ -Des.path.home="%ES_HOME%" -Des.path.conf="%ES_PATH_CONF%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ -Des.bundled_jdk="%ES_BUNDLED_JDK%" ^ - -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.OpenSearch" !newparams! + -cp "%ES_CLASSPATH%" "org.opensearch.bootstrap.OpenSearch" !newparams! endlocal endlocal diff --git a/distribution/tools/keystore-cli/src/test/java/org/elasticsearch/bootstrap/BootstrapTests.java b/distribution/tools/keystore-cli/src/test/java/org/elasticsearch/bootstrap/BootstrapTests.java index e4634ad8735..54ebfb79a5c 100644 --- a/distribution/tools/keystore-cli/src/test/java/org/elasticsearch/bootstrap/BootstrapTests.java +++ b/distribution/tools/keystore-cli/src/test/java/org/elasticsearch/bootstrap/BootstrapTests.java @@ -28,6 +28,7 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.test.ESTestCase; import org.junit.After; import org.junit.Before; +import org.opensearch.bootstrap.Bootstrap; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/modules/lang-painless/src/main/java/org/opensearch/painless/Compiler.java b/modules/lang-painless/src/main/java/org/opensearch/painless/Compiler.java index 9c450b277b5..815e720d813 100644 --- a/modules/lang-painless/src/main/java/org/opensearch/painless/Compiler.java +++ b/modules/lang-painless/src/main/java/org/opensearch/painless/Compiler.java @@ -19,7 +19,7 @@ package org.opensearch.painless; -import org.elasticsearch.bootstrap.BootstrapInfo; +import org.opensearch.bootstrap.BootstrapInfo; import org.opensearch.painless.antlr.Walker; import org.opensearch.painless.ir.ClassNode; import org.opensearch.painless.lookup.PainlessLookup; diff --git a/modules/lang-painless/src/main/java/org/opensearch/painless/lookup/PainlessLookupBuilder.java b/modules/lang-painless/src/main/java/org/opensearch/painless/lookup/PainlessLookupBuilder.java index 2b6eac310b6..bff615386e9 100644 --- a/modules/lang-painless/src/main/java/org/opensearch/painless/lookup/PainlessLookupBuilder.java +++ b/modules/lang-painless/src/main/java/org/opensearch/painless/lookup/PainlessLookupBuilder.java @@ -19,7 +19,7 @@ package org.opensearch.painless.lookup; -import org.elasticsearch.bootstrap.BootstrapInfo; +import org.opensearch.bootstrap.BootstrapInfo; import org.opensearch.painless.Def; import org.opensearch.painless.MethodWriter; import org.opensearch.painless.WriterConstants; diff --git a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java index b4e79b71a3d..7ce247873cb 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java @@ -26,7 +26,7 @@ import org.elasticsearch.action.search.TransportSearchAction; import org.opensearch.action.support.AutoCreateIndex; import org.opensearch.action.support.DestructiveOperations; import org.opensearch.action.support.replication.TransportReplicationAction; -import org.elasticsearch.bootstrap.BootstrapSettings; +import org.opensearch.bootstrap.BootstrapSettings; import org.opensearch.client.Client; import org.opensearch.client.transport.TransportClient; import org.opensearch.cluster.ClusterModule; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java similarity index 99% rename from server/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java rename to server/src/main/java/org/opensearch/bootstrap/Bootstrap.java index dd689728f62..19324b6a66f 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java +++ b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -29,6 +29,8 @@ import org.apache.lucene.util.Constants; import org.apache.lucene.util.StringHelper; import org.opensearch.OpenSearchException; import org.elasticsearch.Version; +import org.elasticsearch.bootstrap.JarHell; +import org.elasticsearch.bootstrap.JavaVersion; import org.opensearch.cli.KeyStoreAwareCommand; import org.opensearch.cli.Terminal; import org.opensearch.cli.UserException; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java similarity index 96% rename from server/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java rename to server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java index 78c60d694b0..9bc165a2d4e 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapCheck.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapChecks.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java similarity index 99% rename from server/src/main/java/org/elasticsearch/bootstrap/BootstrapChecks.java rename to server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java index 08d89dd8da6..61b8076222b 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapChecks.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapChecks.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,12 +17,13 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.util.Constants; +import org.elasticsearch.bootstrap.JavaVersion; import org.opensearch.cluster.coordination.ClusterBootstrapService; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapContext.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java similarity index 94% rename from server/src/main/java/org/elasticsearch/bootstrap/BootstrapContext.java rename to server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java index 3ede89cfd66..03a06fd2bab 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapContext.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapContext.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.opensearch.cluster.metadata.Metadata; import org.elasticsearch.common.settings.Settings; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapException.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapException.java similarity index 94% rename from server/src/main/java/org/elasticsearch/bootstrap/BootstrapException.java rename to server/src/main/java/org/opensearch/bootstrap/BootstrapException.java index 635afaf9599..7439f7ec61e 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapException.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapException.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import java.nio.file.Path; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapInfo.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java similarity index 97% rename from server/src/main/java/org/elasticsearch/bootstrap/BootstrapInfo.java rename to server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java index 3ff6639de9a..67a023f95a4 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapInfo.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapInfo.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.elasticsearch.common.SuppressForbidden; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapSettings.java b/server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java similarity index 95% rename from server/src/main/java/org/elasticsearch/bootstrap/BootstrapSettings.java rename to server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java index fce50ef2e6f..51003ea62bc 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/BootstrapSettings.java +++ b/server/src/main/java/org/opensearch/bootstrap/BootstrapSettings.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/ConsoleCtrlHandler.java b/server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java similarity index 92% rename from server/src/main/java/org/elasticsearch/bootstrap/ConsoleCtrlHandler.java rename to server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java index 6433b336d9d..7bb2472a973 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/ConsoleCtrlHandler.java +++ b/server/src/main/java/org/opensearch/bootstrap/ConsoleCtrlHandler.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; public interface ConsoleCtrlHandler { diff --git a/server/src/main/java/org/elasticsearch/bootstrap/FilePermissionUtils.java b/server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java similarity index 98% rename from server/src/main/java/org/elasticsearch/bootstrap/FilePermissionUtils.java rename to server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java index e872d6dc481..b8e1c4ebd79 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/FilePermissionUtils.java +++ b/server/src/main/java/org/opensearch/bootstrap/FilePermissionUtils.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.elasticsearch.common.SuppressForbidden; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/JNACLibrary.java b/server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java similarity index 96% rename from server/src/main/java/org/elasticsearch/bootstrap/JNACLibrary.java rename to server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java index f510480cd54..2712bded96e 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/JNACLibrary.java +++ b/server/src/main/java/org/opensearch/bootstrap/JNACLibrary.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import com.sun.jna.Native; import com.sun.jna.NativeLong; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/JNAKernel32Library.java b/server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java similarity index 99% rename from server/src/main/java/org/elasticsearch/bootstrap/JNAKernel32Library.java rename to server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java index b843d39cbd1..6adf0324326 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/JNAKernel32Library.java +++ b/server/src/main/java/org/opensearch/bootstrap/JNAKernel32Library.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import com.sun.jna.IntegerType; import com.sun.jna.Native; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/JNANatives.java b/server/src/main/java/org/opensearch/bootstrap/JNANatives.java similarity index 98% rename from server/src/main/java/org/elasticsearch/bootstrap/JNANatives.java rename to server/src/main/java/org/opensearch/bootstrap/JNANatives.java index 2d9fe1e8515..9eab584c894 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/JNANatives.java +++ b/server/src/main/java/org/opensearch/bootstrap/JNANatives.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import com.sun.jna.Native; import com.sun.jna.Pointer; @@ -26,11 +26,11 @@ import com.sun.jna.WString; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.Constants; -import org.elasticsearch.monitor.jvm.JvmInfo; +import org.opensearch.monitor.jvm.JvmInfo; import java.nio.file.Path; -import static org.elasticsearch.bootstrap.JNAKernel32Library.SizeT; +import static org.opensearch.bootstrap.JNAKernel32Library.SizeT; /** * This class performs the actual work with JNA and library bindings to call native methods. It should only be used after diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Natives.java b/server/src/main/java/org/opensearch/bootstrap/Natives.java similarity index 98% rename from server/src/main/java/org/elasticsearch/bootstrap/Natives.java rename to server/src/main/java/org/opensearch/bootstrap/Natives.java index 10117698e93..b9230654947 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/Natives.java +++ b/server/src/main/java/org/opensearch/bootstrap/Natives.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/OpenSearch.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java similarity index 98% rename from server/src/main/java/org/elasticsearch/bootstrap/OpenSearch.java rename to server/src/main/java/org/opensearch/bootstrap/OpenSearch.java index bb51dcb71ca..d7369d58a90 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/OpenSearch.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import joptsimple.OptionSet; import joptsimple.OptionSpec; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/OpenSearchPolicy.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java similarity index 99% rename from server/src/main/java/org/elasticsearch/bootstrap/OpenSearchPolicy.java rename to server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java index 376be256e47..bf28c3fdf74 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/OpenSearchPolicy.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearchPolicy.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.elasticsearch.common.SuppressForbidden; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/OpenSearchUncaughtExceptionHandler.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java similarity index 97% rename from server/src/main/java/org/elasticsearch/bootstrap/OpenSearchUncaughtExceptionHandler.java rename to server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java index 5f788fccd7a..de449a60bae 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/OpenSearchUncaughtExceptionHandler.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearchUncaughtExceptionHandler.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Security.java b/server/src/main/java/org/opensearch/bootstrap/Security.java similarity index 97% rename from server/src/main/java/org/elasticsearch/bootstrap/Security.java rename to server/src/main/java/org/opensearch/bootstrap/Security.java index 129b500f986..6a052542aa0 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/Security.java +++ b/server/src/main/java/org/opensearch/bootstrap/Security.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,16 +17,17 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; +import org.elasticsearch.bootstrap.JarHell; import org.opensearch.cli.Command; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; -import org.elasticsearch.http.HttpTransportSettings; -import org.elasticsearch.plugins.PluginInfo; -import org.elasticsearch.plugins.PluginsService; +import org.opensearch.http.HttpTransportSettings; +import org.opensearch.plugins.PluginInfo; +import org.opensearch.plugins.PluginsService; import org.opensearch.secure_sm.SecureSM; import org.opensearch.transport.TcpTransport; @@ -54,8 +55,8 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath; -import static org.elasticsearch.bootstrap.FilePermissionUtils.addSingleFilePath; +import static org.opensearch.bootstrap.FilePermissionUtils.addDirectoryPath; +import static org.opensearch.bootstrap.FilePermissionUtils.addSingleFilePath; /** * Initializes SecurityManager with necessary permissions. diff --git a/server/src/main/java/org/elasticsearch/bootstrap/Spawner.java b/server/src/main/java/org/opensearch/bootstrap/Spawner.java similarity index 98% rename from server/src/main/java/org/elasticsearch/bootstrap/Spawner.java rename to server/src/main/java/org/opensearch/bootstrap/Spawner.java index 6a384a2aefc..50c7ece4d54 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/Spawner.java +++ b/server/src/main/java/org/opensearch/bootstrap/Spawner.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.apache.lucene.util.Constants; import org.elasticsearch.core.internal.io.IOUtils; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/StartupException.java b/server/src/main/java/org/opensearch/bootstrap/StartupException.java similarity index 98% rename from server/src/main/java/org/elasticsearch/bootstrap/StartupException.java rename to server/src/main/java/org/opensearch/bootstrap/StartupException.java index f9349361a44..5c5a659e6a9 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/StartupException.java +++ b/server/src/main/java/org/opensearch/bootstrap/StartupException.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import org.elasticsearch.common.inject.CreationException; import org.elasticsearch.common.inject.spi.Message; diff --git a/server/src/main/java/org/elasticsearch/bootstrap/SystemCallFilter.java b/server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java similarity index 99% rename from server/src/main/java/org/elasticsearch/bootstrap/SystemCallFilter.java rename to server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java index 59f8bd5daf7..3c1958a0505 100644 --- a/server/src/main/java/org/elasticsearch/bootstrap/SystemCallFilter.java +++ b/server/src/main/java/org/opensearch/bootstrap/SystemCallFilter.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import com.sun.jna.Library; import com.sun.jna.Memory; diff --git a/server/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java b/server/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java index aceee1474c6..0d07c222b91 100644 --- a/server/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java +++ b/server/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java @@ -20,7 +20,7 @@ package org.elasticsearch.monitor.process; import org.apache.lucene.util.Constants; -import org.elasticsearch.bootstrap.BootstrapInfo; +import org.opensearch.bootstrap.BootstrapInfo; import org.elasticsearch.test.ESTestCase; import static org.elasticsearch.monitor.jvm.JvmInfo.jvmInfo; diff --git a/server/src/test/java/org/elasticsearch/node/NodeTests.java b/server/src/test/java/org/elasticsearch/node/NodeTests.java index 849224d29ac..648c1947064 100644 --- a/server/src/test/java/org/elasticsearch/node/NodeTests.java +++ b/server/src/test/java/org/elasticsearch/node/NodeTests.java @@ -20,8 +20,8 @@ package org.elasticsearch.node; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.SetOnce; -import org.elasticsearch.bootstrap.BootstrapCheck; -import org.elasticsearch.bootstrap.BootstrapContext; +import org.opensearch.bootstrap.BootstrapCheck; +import org.opensearch.bootstrap.BootstrapContext; import org.opensearch.cluster.ClusterName; import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.network.NetworkModule; diff --git a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java b/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java index a514157ab68..09b581da635 100644 --- a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java +++ b/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java @@ -31,6 +31,12 @@ import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.network.IfConfig; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.PluginInfo; +import org.opensearch.bootstrap.Bootstrap; +import org.opensearch.bootstrap.BootstrapInfo; +import org.opensearch.bootstrap.BootstrapSettings; +import org.opensearch.bootstrap.FilePermissionUtils; +import org.opensearch.bootstrap.OpenSearchPolicy; +import org.opensearch.bootstrap.Security; import org.opensearch.secure_sm.SecureSM; import org.junit.Assert; diff --git a/test/framework/src/main/java/org/elasticsearch/test/AbstractBootstrapCheckTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/AbstractBootstrapCheckTestCase.java index d730098da45..ecf2c38a43b 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/AbstractBootstrapCheckTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/AbstractBootstrapCheckTestCase.java @@ -20,7 +20,7 @@ package org.elasticsearch.test; import org.opensearch.Version; -import org.elasticsearch.bootstrap.BootstrapContext; +import org.opensearch.bootstrap.BootstrapContext; import org.opensearch.cluster.metadata.Metadata; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment;