-
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
Use createTestingFileHiveMetastore method in tests #15468
Use createTestingFileHiveMetastore method in tests #15468
Conversation
b693a21
to
528fa9e
Compare
CI hit #14248 |
HiveMetastore metastore = new FileHiveMetastore( | ||
new NodeVersion("testversion"), | ||
HDFS_ENVIRONMENT, | ||
HIDE_DELTA_LAKE_TABLES_IN_ICEBERG, |
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.
potential follow-up: HIDE_DELTA_LAKE_TABLES_IN_ICEBERG
is used now only in:
IcebergHiveMetastoreCatalogModule
IcebergFileMetastoreCatalogModule
We can probably drop this constant and replace it with false
in the bindings.
new FileHiveMetastoreConfig() | ||
.setCatalogDirectory(baseDir.toURI().toString()) | ||
.setMetastoreUser("test")); | ||
HiveMetastore hiveMetastore = createTestingFileHiveMetastore(baseDir); |
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.
can be inlined in the subsequent line where metastore
is being initialized.
new FileHiveMetastoreConfig() | ||
.setCatalogDirectory(dataDirectory.toFile().toURI().toString()) | ||
.setMetastoreUser("test")); | ||
HiveMetastore metastore = createTestingFileHiveMetastore(dataDirectory.toFile()); |
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.
Inline in the next statement
@@ -36,6 +26,7 @@ | |||
|
|||
import java.nio.file.Path; | |||
|
|||
import static io.trino.plugin.hive.metastore.file.FileHiveMetastore.createTestingFileHiveMetastore; |
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.
pre-existing/ follow-up: This class tests the situation where the file metastore is being shared and not the hive metastore. I'd advocate for renaming the class to TestSharedFileMetastore
.
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.
Please feel free to send the follow-up PR.
b1d8ba5
to
3fd90af
Compare
3fd90af
to
cc40061
Compare
Description
Use
createTestingFileHiveMetastore
method in testsRelease notes
(x) This is not user-visible or docs only and no release notes are required.