-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Avoid ignoring files visible in Hive #16932
Conversation
// Rename the table files to Hive hidden files (prefixed by `.` or `_` characters) | ||
for (String filename : hdfsClient.listDirectory(tableLocation)) { | ||
try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) { | ||
hdfsClient.loadFile(tableLocation + "/" + filename, bos); |
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.
The renaming of the files could be done much easier with trinodb/tempto#95
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.
LGTM, thanks for picking this up to get it over the finish line @findinpath
580acc3
to
5b3273b
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.
Could you change to non-draft PR if it's ready for review?
testing/trino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveHiddenFiles.java
Outdated
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveHiddenFiles.java
Outdated
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveHiddenFiles.java
Outdated
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveHiddenFiles.java
Outdated
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveHiddenFiles.java
Outdated
Show resolved
Hide resolved
5b3273b
to
45a365d
Compare
Ignore in Hive only the files which have their names or the names of their ancestor beginning with `.` or `_` characters.
45a365d
to
05657f7
Compare
Description
Ignore in Hive only the files which have their names or the names of
their ancestor beginning with
.
or_
characters.As agreed on Slack with @dprophet , this PR is a mere spin-off from #16387 used just to illustrate the creation of product tests corresponding for the initial PR.
@dprophet feel free to use the product tests in the original PR. No need for co-authoring.
Fixes #16386
Additional context and related issues
The newly added product tests can be executed with
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: