-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HIVE-28437: Add documentation for initializing the system schemas for HiveServer2 for Docker Image #5629
Conversation
39117e5
to
5fe467f
Compare
5fe467f
to
0da7ad9
Compare
0da7ad9
to
0664053
Compare
Hi @linghengqian, Thank you for the contribution! could we add the details to the quickstart as well? the link: https://github.com/apache/hive-site/blob/main/content/Development/quickStart.md |
0664053
to
a0501c1
Compare
747c11e
to
6c77f0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I found a potential drawback of the current PR is that due to the use of remote HMS, the startup of HS2 is particularly long and requires at least 2 minutes of waiting. According to my test results at Add unit tests for
information_schema
database with custom tables linghengqian/hive-server2-jdbc-driver#23, should I adjustcompose.yaml
to the following?
services:
some-postgres:
image: postgres:17.2-bookworm
environment:
POSTGRES_PASSWORD: "example"
hiveserver2-standalone:
image: apache/hive:4.0.1
depends_on:
- some-postgres
environment:
SERVICE_NAME: hiveserver2
DB_DRIVER: postgres
SERVICE_OPTS: >-
-Djavax.jdo.option.ConnectionDriverName=org.postgresql.Driver
-Djavax.jdo.option.ConnectionURL=jdbc:postgresql://some-postgres:5432/postgres
-Djavax.jdo.option.ConnectionUserName=postgres
-Djavax.jdo.option.ConnectionPassword=example
volumes:
- ~/.m2/repository/org/postgresql/postgresql/42.7.5/postgresql-42.7.5.jar:/opt/hive/lib/postgres.jar
mvn dependency:get -Dartifact=org.postgresql:postgresql:42.7.5
docker compose up -d
docker compose exec hiveserver2-standalone /bin/bash
/opt/hive/bin/schematool -initSchema -dbType hive -metaDbType postgres -url jdbc:hive2://localhost:10000/default
exit
It also works |
|
6c77f0c
to
6cf037c
Compare
… HiveServer2 for Docker Image
6cf037c
to
266879f
Compare
|
This PR doesn't change any code, so I merge this without a green build to free the resources. |
What changes were proposed in this pull request?
Why are the changes needed?
INFORMATION_SCHEMA
database, but it is not enabled by default, which causes a lot of trouble for unit testing scenarios of third-party libraries such as testcontainers-java .information_schema
database linghengqian/hive-server2-jdbc-driver#22 , Improve GraalVM Reachability Metadata and corresponding nativeTest related unit tests shardingsphere#29052 . It seems that the Hive documentation https://hive.apache.org/docs/latest/hive-schema-tool_34835119/ does not support viewing images. I will still refer to the documentation at https://cwiki.apache.org/confluence/display/hive/hive+schema+tool .information_schema
database in unit tests. Because/opt/hive/bin/schematool
is not part of the SQL command,/opt/hive/bin/schematool
is part of the shell command, and using/opt/hive/bin/schematool
requires entering the Hive Docker Image.Does this PR introduce any user-facing change?
Is the change a dependency upgrade?
How was this patch tested?
information_schema
database linghengqian/hive-server2-jdbc-driver#22 tests the Docker Image for Hive 4.0.1 .