Comments (6)
from data-mesh.
@zhenik Suggestion: Let us add a "ready" endpoint to the container ( like metastore and hiveserver.) It could take env-inputs and only exit 0 if it is able to contact over thrift. This could be used as a prestart container for metastore etc.
from data-mesh.
There are two options how to run queries using beeline:
- flag
-f
stands for file - flag
-e
stands for query
Seems like flag -f
just ignore connection failure, when -e
does not.
Last experiment with flag -e
task "waitfor-hive-server-available" {
// expand restart time, due hive-metastore and hive-server needs time to spin up
restart {
interval = "30m"
attempts = 15
delay = "45s"
mode = "fail"
}
lifecycle {
hook = "prestart"
}
driver = "docker"
config {
image = "fredrikhgrelland/hive:3.1.0"
// https://stackoverflow.com/a/60552766
// flag `--force=false` (default false), explicit exit if query fail (exit code other than 0)
command = "beeline --force=false -u \"jdbc:hive2://localhost:10000/default;auth=noSasl\" -n hive -p hive -e \"SHOW DATABASES\""
}
resources {
cpu = 200
memory = 2048
}
}
When NO connection with hive-server (exit:1)
Logs
.....
20/05/28 08:03:03 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default;auth=noSasl: Could not establish connection to jdbc:hive2://localhost:10000/default;auth=noSasl: null (state=08S01,code=0)
Cannot run commands specified using -e. No current connection
When connection with hive-server (exit:2)
...
Connecting to jdbc:hive2://localhost:10000/default;auth=noSasl
Connected to: Apache Hive (version 3.1.0)
Driver: Hive JDBC (version 3.1.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Error: Error while compiling statement: FAILED: ParseException line 1:4 cannot recognize input near 'SHOW' '<EOF>' '<EOF>' in ddl statement (state=42000,code=40000)
Error: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'DATABASES' '<EOF>' '<EOF>' (state=42000,code=40000)
Closing: 0: jdbc:hive2://localhost:10000/default;auth=noSasl
tail: can't open '/tmp/root/hive.log': No such file or directory
Connecting to jdbc:hive2://localhost:10000/default;auth=noSasl
from data-mesh.
Screenshots
from data-mesh.
From hive-server flag -e works fine
from data-mesh.
yes.
from data-mesh.
Related Issues (20)
- Add linter to project.
- Add CHANGELOG.md
- Update dependency fredrikhgrelland/vagrant-hashistack to release v0.1
- Make presto multi-node ( consul connect )
- Update documentation about `behind a transparent proxy`
- Strict versioning of vagrant box
- Kan ikke koble til Hive og Presto samtidig with Nomad-exec
- Unknown configuration section "certificates" HOT 4
- Extend data upload examples
- Matrix testing with github-workflow
- Persistence of data in the stack
- Add Hive client
- PrestoSQL has been rebranded to Trino
- MinIO OOM problems after running for a while HOT 3
- Update doc: Add consul/nomad dashboard
- Add sqlpad consul healthchecks HOT 1
- Update vagrantfile to work with release 0.0.6 of fredrikhgrelland/hashistack box HOT 2
- make connect-to-xxx requires consul to be installed. HOT 2
- Add automatic update of box on make up
- Update to work with version 0.1.0 of vagrant-hashistack box HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-mesh.