Repository navigation
HIVE-26830: Update metastore-server image - #6825
thomasrebele wants to merge 15 commits into
Conversation
ae68622 to
183e361
Compare
|
As far as I know, the changes of this PR do not affect the tests, so I cancelled continuous-integration/jenkins/pr-head. |
zabetak
left a comment
There was a problem hiding this comment.
I tried to test the new image with TestTezTPCDS30TBPerfCliDriver but bumped into various errors. In order to make this PR more self-contained it would be nice to include all the necessary changes and have TestTezTPCDS30TBPerfCliDriver run with the new image. For the time being we don't need to switch to use histograms in the test.
The description mentions that tests are going to run faster when image is present but in the current state of the CI we are gonna fetch it everytime so we have to account for an extra 1GB of download overhead.
| A dockerized Postgres database with a Hive metastore dump from a | ||
| [TPC-DS 30TB dataset](https://github.com/zabetak/hive-test-datasets/releases/download/1.0/metastore_tpcds30tb_3_1_3000.dump.gz). | ||
| [TPC-DS 30TB dataset](https://github.com/thomasrebele/hive-postgres-metastore/releases/download/tpcds-30tb-histogram-1.0/metastore_tpcds30tb_with_histograms.raw_db.zstd), including histograms. The dump has been created with a fresh Postgres database, importing a dump with `pg_restore`, stopping Postgres, and then compressing the Postgres database files. More details can be found [here](https://github.com/thomasrebele/hive-postgres-metastore/tree/tpcds-30tb-histogram-1.0). |
There was a problem hiding this comment.
Since now we have an official ASF repo for hosting datasets (https://github.com/apache/hive-test-datasets) please raise a PR there for adding the extra details and replace the link to point there.
There was a problem hiding this comment.
I guess we have to update the link since the dump that we use is now in https://nightlies.apache.org/. A pending question is where to put extra details and scripts to avoid linking to personal GitHub accounts but we could settle this later.
thomasrebele
left a comment
There was a problem hiding this comment.
Thank you for the review, @zabetak! The new dump changes lots of the q.out files, so I thought updating the image first and then the test files would be appropriate. I'm fine with merging these two steps, but I think I don't have enough rights to upload the files to Apache's Docker hub. As long as the image has not been published, the CI won't be able to run.
I was wondering, whether to include the scripts that I used to generate the dump here. Wdyt?
zabetak
left a comment
There was a problem hiding this comment.
@thomasrebele For the first CI run you could use the image from your personal Dockerhub account. If everything comes green I can push the image manually to the Apache DockerHub account and retrigger CI.
I understand the intention of committing the .q.out files and other changes separately but by doing so we are creating a new image that will land untested and will be unused for a certain time. For this reason, I am leaning more towards a slightly more complex and complete PR that starts using the image immediately.
The scripts for creating the dump should reside in the same repo where the dump lives. Let's keep them there for the time being.
|
Thank you for the suggestions. I'll work on them. I had looked into the options for reducing the image size that you had mentioned. Option 2 for removing the entry point did not work for me. Question before integrating the q.out file changes into the PR: it came to my mind that the schema migration script could be integrated into the raw DB dump, so that no initialization is necessary. Wdyt, @zabetak? |
|
The option 2 was not so much for reducing the image size but mainly for skipping the custom entry point and the decompression logic during startup. Not sure if its better but shared it so you can pick whatever you feel best. I enriched the respective discussion with the exact commands and tools I used. Indeed the schema migration script could be incorporated in the dump but then we may need different images and binary dump files for different versions (e.g., upstream vs downstream). Feel free to pick the option that suits best, I don't have a strong opinion which direction to go. |
|
Thinking more about it, schema changes will require a schema migration script anyway, so integrating it now would only help for a little while. I've updated the dump to fix the WAL issues, uploaded a new docker image, updated PostgresTPCDS, and regenerated the q.out files. I'll let the CI run. |
|
There are two test failures (though the CI run seems to be incomplete, as it is marked "aborted"):
TestHiveRelJsonSchemaReader stack trace
|
|
According to the TPC-DS specification (Table 2-14 on page 34), c_customer_id should have the type This is the same for column ca_address_id, which also uses @zabetak, would it be ok to fix it in the PostgresTPCDS#install method, or is it required to update the database dump and container image? |
|
Regarding the type discrepancy on If fixing the type accuracy can lead to less .q.out discrepancies then I guess its worth doing if its not complicated/risky (we don't want to end-up with a semi corrupted dump with internal inconsistencies). |
|
I build the image locally on commit |
|
|
The CI got confused about the git history ( @zabetak, I've removed the custom postgresql.conf. Would you update the |



What changes were proposed in this pull request?
Update hive-postgres-tpcds-metastore to use a TPC-DS 30TB dump with histogram column statistics. I've spent quite a lot of time to find a way to reduce the image size while keeping the performance of TestTezTPCDS30TBPerfCliDriver. I opted for compressing the raw database files from Postgres and setting some Postgres config options. See the scripts that I used to cleanup and generate the raw dump.
On my machine, TestTezTPCDS30TBPerfCliDriver using the proposed image runs in about 270s, while TestTezTPCDS30TBPerfCliDriver with the currently used image takes 350s, assuming the images have already been downloaded. So while the image with the histogram column statistics has a much larger database, the tests are executed faster. The download time is not taken into account, as here the image without the histogram statistics would clearly win.
Why are the changes needed?
The dump includes histogram statistics, making it possible to use them in future tests. (HIVE-26830).
Does this PR introduce any user-facing change?
No
How was this patch tested?
I build the image locally and executed TestTezTPCDS30TBPerfCliDriver. See the corresponding q.out file changes. See this comment for an explanation for the q.out file changes (the histograms are not yet used in the planning phase).