You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "abstractdog (via GitHub)" <gi...@apache.org> on 2026/02/16 08:47:28 UTC
[PR] HIVE-29462: Log start/init times for Docker resources [hive]
abstractdog opened a new pull request, #6321:
URL: https://github.com/apache/hive/pull/6321
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
3. Ensure you have added or run the appropriate tests for your PR:
4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX: Your PR title ...'.
5. Be sure to keep the PR description updated to reflect all changes.
6. Please write your PR title to summarize what this PR proposes.
7. If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
If no, write 'No'.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6321:
URL: https://github.com/apache/hive/pull/6321#issuecomment-4274883794
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6321:
URL: https://github.com/apache/hive/pull/6321#discussion_r2815922060
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java:
##########
@@ -19,11 +19,15 @@
import org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool;
import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Abstract JUnit TestRule for different RDMBS types.
*/
public abstract class DatabaseRule extends ExternalResource {
+ private static final Logger LOG = LoggerFactory.getLogger(DatabaseRule.class);
Review Comment:
oh, good to know about SneakyThrows!
you know, I'm just bothered that IDEA shows that those kinds of exceptions are now thrown, I believe if we already faked the compiler, it doesn't make sense to add these to the method signature, it just makes the code vague (once the exceptions will come at runtime, we're going to face them anyway)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6321:
URL: https://github.com/apache/hive/pull/6321#issuecomment-3914092636
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6321) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6321&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6321&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6321&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6321&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6321&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6321)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6321:
URL: https://github.com/apache/hive/pull/6321#discussion_r2815663791
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java:
##########
@@ -19,11 +19,15 @@
import org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool;
import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Abstract JUnit TestRule for different RDMBS types.
*/
public abstract class DatabaseRule extends ExternalResource {
+ private static final Logger LOG = LoggerFactory.getLogger(DatabaseRule.class);
Review Comment:
hm, makes sense, in the standalone-metastore module, where we utilize testcontainers, this can be line we're looking for:
```
Container mysql:8.4.3 started in PT7.672547648S
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6321:
URL: https://github.com/apache/hive/pull/6321#discussion_r2815668274
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java:
##########
@@ -19,11 +19,15 @@
import org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool;
import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Abstract JUnit TestRule for different RDMBS types.
*/
public abstract class DatabaseRule extends ExternalResource {
+ private static final Logger LOG = LoggerFactory.getLogger(DatabaseRule.class);
Review Comment:
can I proceed only with the method signature changes in this module? apparently, container.start() doesn't throw checked exception
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6321:
URL: https://github.com/apache/hive/pull/6321#issuecomment-3907515577
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6321) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6321&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6321&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6321&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6321&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6321&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6321)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "zabetak (via GitHub)" <gi...@apache.org>.
zabetak commented on code in PR #6321:
URL: https://github.com/apache/hive/pull/6321#discussion_r2815642226
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java:
##########
@@ -19,11 +19,15 @@
import org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool;
import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Abstract JUnit TestRule for different RDMBS types.
*/
public abstract class DatabaseRule extends ExternalResource {
+ private static final Logger LOG = LoggerFactory.getLogger(DatabaseRule.class);
Review Comment:
Not sure if we need extra logs in this hierarchy. Under the hood we are using https://testcontainers.com/ and their logging provides already lots of info that is already enabled. For instance, I run `mvn test -Dtest=TestMysql -Dtest.groups=""` and found the following in the logs:
```
$ grep "INFO" target/surefire-reports/org.apache.hadoop.hive.metastore.dbinstall.TestMysql-output.txt | grep -A 25 "PullPolicy" | grep -v "http-outgoing"
[INFO ] 2026-02-16 16:09:11.114 [main] PullPolicy - Image pull policy will be performed by: DefaultPullPolicy()
[INFO ] 2026-02-16 16:09:11.116 [main] ImageNameSubstitutor - Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
[INFO ] 2026-02-16 16:09:11.121 [main] DockerClientFactory - Testcontainers version: 1.21.3
[INFO ] 2026-02-16 16:09:11.228 [main] DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
[INFO ] 2026-02-16 16:09:11.406 [main] DockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
[INFO ] 2026-02-16 16:09:11.407 [main] DockerClientFactory - Docker host IP address is localhost
[INFO ] 2026-02-16 16:09:11.421 [main] DockerClientFactory - Connected to docker:
[INFO ] 2026-02-16 16:09:11.454 [main] 0 - Creating container for image: testcontainers/ryuk:0.12.0
[INFO ] 2026-02-16 16:09:11.544 [main] 0 - Container testcontainers/ryuk:0.12.0 is starting: 04080209616f8009919aa66b26e9c7d6a75bb19b2d453c4446973484e257bcd5
[DEBUG] 2026-02-16 16:09:11.794 [main] WaitingConsumer - STDOUT: time=2026-02-16T15:09:11.740Z level=INFO msg=starting connection_timeout=1m0s reconnection_timeout=10s request_timeout=10s shutdown_timeout=10m0s remove_retries=10 retry_offset=-1s changes_retry_interval=1s port=8080 verbose=false
[DEBUG] 2026-02-16 16:09:11.794 [main] WaitingConsumer - STDOUT: time=2026-02-16T15:09:11.740Z level=INFO msg="client processing started"
[DEBUG] 2026-02-16 16:09:11.794 [main] WaitingConsumer - STDOUT: time=2026-02-16T15:09:11.740Z level=INFO msg=Started address=[::]:8080
[INFO ] 2026-02-16 16:09:11.796 [main] 0 - Container testcontainers/ryuk:0.12.0 started in PT0.341932338S
[INFO ] 2026-02-16 16:09:11.799 [main] RyukResourceReaper - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
[INFO ] 2026-02-16 16:09:11.799 [main] DockerClientFactory - Checking the system...
[INFO ] 2026-02-16 16:09:11.799 [main] DockerClientFactory - ✔︎ Docker server version should be at least 1.6.0
[INFO ] 2026-02-16 16:09:11.802 [main] 3 - Creating container for image: mysql:8.4.3
[INFO ] 2026-02-16 16:09:12.248 [main] 3 - Container mysql:8.4.3 is starting: fb6e08dfffed15b4648b47cfa295109837279f2af20e4e0fc4ef047c057ed88e
[INFO ] 2026-02-16 16:09:12.383 [main] 3 - Waiting for database connection to become available at jdbc:mysql://localhost:32769/test using query 'SELECT 1'
[INFO ] 2026-02-16 16:09:19.474 [main] 3 - Container mysql:8.4.3 started in PT7.672547648S
[INFO ] 2026-02-16 16:09:19.474 [main] 3 - Container is started (JDBC URL: jdbc:mysql://localhost:32769/test)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog merged PR #6321:
URL: https://github.com/apache/hive/pull/6321
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29462: Log start/init times for Docker resources [hive]
Posted by "zabetak (via GitHub)" <gi...@apache.org>.
zabetak commented on code in PR #6321:
URL: https://github.com/apache/hive/pull/6321#discussion_r2815862409
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java:
##########
@@ -19,11 +19,15 @@
import org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool;
import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Abstract JUnit TestRule for different RDMBS types.
*/
public abstract class DatabaseRule extends ExternalResource {
+ private static final Logger LOG = LoggerFactory.getLogger(DatabaseRule.class);
Review Comment:
The container.start is using the https://projectlombok.org/features/SneakyThrows mechanism so it can throw checked exceptions without declaring them.
I don't have a strong feeling about changing the signature, do as you please ;)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org