Skip to content

Commit

Permalink
Refactor bootstrap for JPMS support (opensearch-project#17117)
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi authored Jan 25, 2025
1 parent 77e91c2 commit 46f852a
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add task completion count in search backpressure stats API ([#10028](https://github.com/opensearch-project/OpenSearch/pull/10028/))
- Deprecate CamelCase `PathHierarchy` tokenizer name in favor to lowercase `path_hierarchy` ([#10894](https://github.com/opensearch-project/OpenSearch/pull/10894))
- Breaking change: Do not request "search_pipelines" metrics by default in NodesInfoRequest ([#12497](https://github.com/opensearch-project/OpenSearch/pull/12497))
- Refactor `:libs` module `bootstrap` package to eliminate top level split packages [#17117](https://github.com/opensearch-project/OpenSearch/pull/17117))

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public JarHellTask(Project project) {
public void runJarHellCheck() {
LoggedExec.javaexec(project, spec -> {
spec.environment("CLASSPATH", getClasspath().getAsPath());
spec.getMainClass().set("org.opensearch.bootstrap.JarHell");
spec.getMainClass().set("org.opensearch.common.bootstrap.JarHell");
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class ThirdPartyAuditTask extends DefaultTask {
CliMain.EXIT_VIOLATION,
CliMain.EXIT_UNSUPPORTED_JDK
);
private static final String JDK_JAR_HELL_MAIN_CLASS = "org.opensearch.bootstrap.JdkJarHellCheck";
private static final String JDK_JAR_HELL_MAIN_CLASS = "org.opensearch.common.bootstrap.JdkJarHellCheck";

private Set<String> missingClassExcludes = new TreeSet<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class TestClasspathUtils {
public static void setupJarJdkClasspath(File projectRoot) {
try {
URL originLocation = TestClasspathUtils.class.getClassLoader()
.loadClass("org.opensearch.bootstrap.JdkJarHellCheck")
.loadClass("org.opensearch.common.bootstrap.JdkJarHellCheck")
.getProtectionDomain()
.getCodeSource()
.getLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentVerifierBuilderProvider;
import org.opensearch.Build;
import org.opensearch.Version;
import org.opensearch.bootstrap.JarHell;
import org.opensearch.cli.EnvironmentAwareCommand;
import org.opensearch.cli.ExitCodes;
import org.opensearch.cli.Terminal;
import org.opensearch.cli.UserException;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.hash.MessageDigests;
import org.opensearch.common.util.io.IOUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* GitHub history for details.
*/

package org.opensearch.bootstrap;
package org.opensearch.common.bootstrap;

import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.io.PathUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* GitHub history for details.
*/

package org.opensearch.bootstrap;
package org.opensearch.common.bootstrap;

import org.opensearch.common.SuppressForbidden;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
*/

/** Contains JarHell Classes */
package org.opensearch.bootstrap;
package org.opensearch.common.bootstrap;
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* GitHub history for details.
*/

package org.opensearch.bootstrap;
package org.opensearch.common.bootstrap;

import org.opensearch.common.io.PathUtils;
import org.opensearch.core.common.Strings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
import org.apache.tika.parser.ParserDecorator;
import org.opensearch.SpecialPermission;
import org.opensearch.bootstrap.FilePermissionUtils;
import org.opensearch.bootstrap.JarHell;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.io.PathUtils;

import java.io.ByteArrayInputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.opensearch.cli.UserException;
import org.opensearch.common.PidFile;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.inject.CreationException;
import org.opensearch.common.logging.LogConfigurator;
import org.opensearch.common.logging.Loggers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import org.opensearch.cli.Command;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.io.PathUtils;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
import com.fasterxml.jackson.core.json.JsonReadFeature;

import org.opensearch.Version;
import org.opensearch.bootstrap.JarHell;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.xcontent.json.JsonXContentParser;
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.io.stream.StreamInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import org.opensearch.OpenSearchException;
import org.opensearch.Version;
import org.opensearch.action.admin.cluster.node.info.PluginsAndModules;
import org.opensearch.bootstrap.JarHell;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.inject.Module;
import org.opensearch.common.lifecycle.LifecycleComponent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.apache.lucene.util.Constants;
import org.opensearch.LegacyESVersion;
import org.opensearch.Version;
import org.opensearch.bootstrap.JarHell;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.io.PathUtils;
import org.opensearch.common.settings.Settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.lucene.tests.util.LuceneTestCase;
import org.opensearch.common.Booleans;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.bootstrap.JarHell;
import org.opensearch.common.io.PathUtils;
import org.opensearch.common.network.IfConfig;
import org.opensearch.common.network.NetworkAddress;
Expand Down

0 comments on commit 46f852a

Please sign in to comment.