Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] Gradle compile & assemble distribution command may build the wrong package #534

Closed
jerryshao opened this issue Oct 18, 2023 · 0 comments · Fixed by #540
Closed
Assignees

Comments

@jerryshao
Copy link
Contributor

Describe what's wrong

When running gradle compileDistribution or gradle assembleDistribution, it will build a distribution. But this package will fail to start because of the missing catalog-hive and catalog-lakehouse-iceberg package.

Error message and/or stacktrace

2023-10-18 11:19:56.168 INFO [main] [com.datastrato.gravitino.server.GravitinoServer.main(GravitinoServer.java:93)] - Starting Gravitino Server
2023-10-18 11:19:56.191 INFO [main] [org.eclipse.jetty.util.log.Log.initialized(Log.java:170)] - Logging initialized @327ms to org.eclipse.jetty.util.log.Slf4jLog
2023-10-18 11:19:56.226 INFO [main] [com.datastrato.gravitino.GravitinoEnv.initialize(GravitinoEnv.java:61)] - Initializing Gravitino Environment...
2023-10-18 11:19:56.517 INFO [main] [com.datastrato.gravitino.aux.AuxiliaryServiceManager.registerAuxService(AuxiliaryServiceManager.java:122)] - AuxService name:iceberg-rest, config:{classpath=catalogs/lakehouse-iceberg/libs, catalogs/lakehouse-iceberg/conf, httpPort=9001, host=127.0.0.1}, valid classpath:[/Users/jerryshao/Projects/graviton/distribution/package/catalogs/lakehouse-iceberg/libs, /Users/jerryshao/Projects/graviton/distribution/package/catalogs/lakehouse-iceberg/conf]
2023-10-18 11:19:56.600 ERROR [main] [com.datastrato.gravitino.aux.AuxiliaryServiceManager.registerAuxService(AuxiliaryServiceManager.java:132)] - Failed to register auxService: iceberg-rest
java.lang.RuntimeException: java.lang.IllegalArgumentException: No GravitinoAuxiliaryService found for: iceberg-rest
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.lambda$loadAuxService$1(AuxiliaryServiceManager.java:76) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.utils.IsolatedClassLoader.withClassLoader(IsolatedClassLoader.java:69) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.loadAuxService(AuxiliaryServiceManager.java:69) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.registerAuxService(AuxiliaryServiceManager.java:128) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.lambda$registerAuxServices$3(AuxiliaryServiceManager.java:146) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at java.util.Iterator.forEachRemaining(Iterator.java:116) [?:1.8.0_372]
 at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) [?:1.8.0_372]
 at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) [?:1.8.0_372]
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.registerAuxServices(AuxiliaryServiceManager.java:144) [gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.serviceInit(AuxiliaryServiceManager.java:170) [gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.GravitinoEnv.initialize(GravitinoEnv.java:85) [gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.server.GravitinoServer.initialize(GravitinoServer.java:52) [gravitino-server-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.server.GravitinoServer.main(GravitinoServer.java:97) [gravitino-server-0.2.0-SNAPSHOT.jar:?]
Caused by: java.lang.IllegalArgumentException: No GravitinoAuxiliaryService found for: iceberg-rest
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.lookupAuxService(AuxiliaryServiceManager.java:57) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 at com.datastrato.gravitino.aux.AuxiliaryServiceManager.lambda$loadAuxService$1(AuxiliaryServiceManager.java:73) ~[gravitino-core-0.2.0-SNAPSHOT.jar:?]
 ... 12 more

How to reproduce

./gradlew clean
./gradlew compileDistribution

could reproduce this issue.

Additional context

No response

@jerryshao jerryshao added this to the Graviton v0.2.0 milestone Oct 18, 2023
@jerryshao jerryshao assigned jerryshao and unassigned xunliu Oct 18, 2023
jerryshao added a commit that referenced this issue Oct 18, 2023
### What changes were proposed in this pull request?

This PR adds "build" dependency to "copyCatalogLibs" task, so build will
be triggered before copy the lib jars.

### Why are the changes needed?

Without this fix, directly run "gradle compileDistribution" and "gradle
compileDistribution" will get an incomplete package, which will lead to
sever start error.

Fix: #534 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manual test.
jerryshao added a commit that referenced this issue Oct 26, 2023
### What changes were proposed in this pull request?

This PR adds "build" dependency to "copyCatalogLibs" task, so build will
be triggered before copy the lib jars.

### Why are the changes needed?

Without this fix, directly run "gradle compileDistribution" and "gradle
compileDistribution" will get an incomplete package, which will lead to
sever start error.

Fix: #534 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manual test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants