ayushtkn opened a new pull request, #6591:
URL: https://github.com/apache/hive/pull/6591
### What changes were proposed in this pull request?
Add health check to Hive docker startup
### Why are the changes needed?
Better user experiance
### Does this PR introduce _any_ user-facing change?
Yes, post hive cluster startup, you need not to wait randomly
### How was this patch tested?
Manually
#### Before
```
[+] Building 0.0s (0/0)
[+] Running 7/7
✔ Network hive Created
0.0s
✔ Volume "hive_hive-db" Created
0.0s
✔ Volume "hive_warehouse" Created
0.0s
✔ Volume "hive_scratch" Created
0.0s
✔ Container postgres Started
1.4s
✔ Container metastore Started
1.1s
✔ Container hiveserver2 Started
1.1s
ayushsaxena@Q3NW54Y0C5 docker % docker exec -it hiveserver2 beeline -u
'jdbc:hive2://hiveserver2:10000/'
Connecting to jdbc:hive2://hiveserver2:10000/
26/07/06 14:22:15 [main]: WARN jdbc.HiveConnection: Failed to connect to
hiveserver2:10000
Could not open connection to the HS2 server. Please check the server URI and
if the URI is correct, then ask the administrator to check the server status.
Enable verbose error messages (--verbose=true) for more information.
Error: Could not open client transport with JDBC Uri:
jdbc:hive2://hiveserver2:10000/: java.net.ConnectException: Connection refused
(state=08S01,code=0)
ayushsaxena@Q3NW54Y0C5 docker % docker exec -it hiveserver2 beeline -u
'jdbc:hive2://hiveserver2:10000/'
Connecting to jdbc:hive2://hiveserver2:10000/
26/07/06 14:22:20 [main]: WARN jdbc.HiveConnection: Failed to connect to
hiveserver2:10000
Could not open connection to the HS2 server. Please check the server URI and
if the URI is correct, then ask the administrator to check the server status.
Enable verbose error messages (--verbose=true) for more information.
Error: Could not open client transport with JDBC Uri:
jdbc:hive2://hiveserver2:10000/: java.net.ConnectException: Connection refused
(state=08S01,code=0)
ayushsaxena@Q3NW54Y0C5 docker % docker exec -it hiveserver2 beeline -u
'jdbc:hive2://hiveserver2:10000/'
Connecting to jdbc:hive2://hiveserver2:10000/
26/07/06 14:22:25 [main]: WARN jdbc.HiveConnection: Failed to connect to
hiveserver2:10000
Could not open connection to the HS2 server. Please check the server URI and
if the URI is correct, then ask the administrator to check the server status.
Enable verbose error messages (--verbose=true) for more information.
Error: Could not open client transport with JDBC Uri:
jdbc:hive2://hiveserver2:10000/: java.net.ConnectException: Connection refused
(state=08S01,code=0)
ayushsaxena@Q3NW54Y0C5 docker % docker exec -it hiveserver2 beeline -u
'jdbc:hive2://hiveserver2:10000/'
Connecting to jdbc:hive2://hiveserver2:10000/
26/07/06 14:22:37 [main]: WARN jdbc.HiveConnection: Failed to connect to
hiveserver2:10000
Could not open connection to the HS2 server. Please check the server URI and
if the URI is correct, then ask the administrator to check the server status.
Enable verbose error messages (--verbose=true) for more information.
Error: Could not open client transport with JDBC Uri:
jdbc:hive2://hiveserver2:10000/: java.net.ConnectException: Connection refused
(state=08S01,code=0)
```
#### After - Non-LLAP
```
[+] Building 0.0s (0/0)
[+] Running 7/7
✔ Network hive Created
0.0s
✔ Volume "hive_scratch" Created
0.0s
✔ Volume "hive_hive-db" Created
0.0s
✔ Volume "hive_warehouse" Created
0.0s
✔ Container postgres Healthy
17.2s
✔ Container metastore Healthy
17.2s
✔ Container hiveserver2 Healthy
27.2s
Hive cluster is ready.
ayushsaxena@Q3NW54Y0C5 docker % docker exec -it hiveserver2 beeline -u
'jdbc:hive2://hiveserver2:10000/'
Connecting to jdbc:hive2://hiveserver2:10000/
Connected to: Apache Hive (version 4.3.0-SNAPSHOT)
Driver: Hive JDBC (version 4.3.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 4.3.0-SNAPSHOT by Apache Hive
0: jdbc:hive2://hiveserver2:10000/>
```
#### After - LLAP
```
+] Building 0.0s (0/0)
[+] Running 14/14
✔ Network hive Created
0.0s
✔ Volume "zookeeper_datalog" Created
0.0s
✔ Volume "zookeeper_logs" Created
0.0s
✔ Volume "hive_hive-db" Created
0.0s
✔ Volume "hive_warehouse" Created
0.0s
✔ Volume "hive_scratch" Created
0.0s
✔ Volume "zookeeper_data" Created
0.0s
✔ Container zookeeper Healthy
17.5s
✔ Container postgres Healthy
17.5s
✔ Container hive-llapdaemon-2 Healthy
17.4s
✔ Container tezam Healthy
17.4s
✔ Container hive-llapdaemon-1 Healthy
17.4s
✔ Container metastore Healthy
17.4s
✔ Container hiveserver2 Healthy
27.4s
Hive cluster is ready.
ayushsaxena@Q3NW54Y0C5 docker % docker exec -it hiveserver2 beeline -u
'jdbc:hive2://hiveserver2:10000/'
Connecting to jdbc:hive2://hiveserver2:10000/
Connected to: Apache Hive (version 4.3.0-SNAPSHOT)
Driver: Hive JDBC (version 4.3.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 4.3.0-SNAPSHOT by Apache Hive
0: jdbc:hive2://hiveserver2:10000/>
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]