Comments (9)
Hello, you'd have to use ConnectZookeeper
, so something like gohive.ConnectZookeeper("devnode2:2181,devnode1:2181,devnode3:2181", "KERBEROS", configuration)
from gohive.
I noticed this function not in last release version . this is a master version function , Can I use this feature in prod env?
from gohive.
don't use zk
if beeline command is
beeline -u "jdbc:hive2://devnode1:10000,devnode2:10000/;principal=hive/[email protected]"
How can I rewrite this code in this case,can I write all hosts direct ?
gohive.Connect("hs2.example.com", 10000, "KERBEROS", configuration)
thanks !
from gohive.
Hello, I've created a new release with this change. I don't think beeline -u "jdbc:hive2://devnode1:10000,devnode2:10000/;principal=hive/[email protected]"
would work but I may be wrong. I thought only one host can specified there, so it would be beeline -u "jdbc:hive2://devnode1:10000;principal=hive/[email protected]"
, in which case you should be able to connect as you say: gohive.Connect("devnode1", 10000, "KERBEROS", configuration)
, provided you have done kinit
before. There's some more information here.
from gohive.
First of all thank you for your patient answers, I already know how to code with gohive.
but beeline -u "jdbc:hive2://devnode1:10000,devnode2:10000/;principal=hive/[email protected]"
it does work.
when devnode1 hiveserver2 status is ok ,all connection foreword to devnode1, on the other hand,all connection foreword to devnode2.
this is bad ha method then zk. but I test in CDH ,it dose work. And I think it can work in other big data platform.
Thanks again for the answer.
from gohive.
Hello. I wasn't aware of that, looks like it's not the case with hive open source at least at the moment. When I try it I get Error: Bad URL format. Hostname not found in authority part of the url: hs2.example.com:10000,hs2.example.com:10000. Are you missing a '/' after the hostname ? (state=,code=0)
. I guess the feature will be available at some point, I'll add it to the driver when this happens.
from gohive.
Hello. I wasn't aware of that, looks like it's not the case with hive open source at least at the moment. When I try it I get
Error: Bad URL format. Hostname not found in authority part of the url: hs2.example.com:10000,hs2.example.com:10000. Are you missing a '/' after the hostname ? (state=,code=0)
. I guess the feature will be available at some point, I'll add it to the driver when this happens.
jdbc:hive2://devnode1:10000,devnode2:10000/
Are you missing a '/' ?
please try add '/' ?
These is not reason for doesn't work
from gohive.
Yeah it has '/' at the end (this is from todays master):
[hdfs@hs2 /]$ beeline -u "jdbc:hive2://hs2.example.com:10000,hs2.example.com:10000/;"
20/04/28 02:06:04,828 DEBUG VersionInfo: version: 3.1.3
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/hive/lib/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://hs2.example.com:10000,hs2.example.com:10000/;
Error: Bad URL format. Hostname not found in authority part of the url: hs2.example.com:10000,hs2.example.com:10000. Are you missing a '/' after the hostname ? (state=,code=0)
[hdfs@hs2 /]$
[hdfs@hs2 /]$ beeline -u "jdbc:hive2://hs2.example.com:10000/;"
20/04/28 02:07:18,705 DEBUG VersionInfo: version: 3.1.3
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/hive/lib/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://hs2.example.com:10000/;
Connected to: Apache Hive (version 4.0.0-SNAPSHOT)
Driver: Hive JDBC (version 4.0.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 4.0.0-SNAPSHOT by Apache Hive
0: jdbc:hive2://hs2.example.com:10000/>
I don't think the hive in the cloudera distribution is exactly like the open source one, the open source one may be missing a few patches.
from gohive.
I don't think the hive in the cloudera distribution is exactly like the open source one, the open source one may be missing a few patches.
Alright ,it's my fault . thanks.
from gohive.
Related Issues (20)
- v1.5.3 compile error HOT 2
- please answer,thank you HOT 3
- How to Timeout SQL queries? HOT 2
- LDAP authentication with HTTPS Does Not Work HOT 8
- Exec PENDING_STATE HOT 2
- go build error HOT 1
- some problems to access to hiveserver2 without kinit HOT 2
- Cursor.totalRows is 0
- panic: runtime error: invalid memory address or nil pointer dereference HOT 1
- How to solve "Incorrect FrameSize"? HOT 6
- could we generate cpp bindings
- What to do if the hive service is actively disconnected due to timeout? HOT 5
- Incorrect frame size HOT 6
- ConnectZookeeper panic HOT 1
- use in hive 1.1.0 fetch data uncompleted HOT 1
- hive-site.xml location HOT 1
- panic: runtime error: invalid memory address or nil pointer dereference HOT 1
- Assignment Mismatch | Thrift HOT 5
- pollUntilData func panic HOT 1
- how to specify mote than one host 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 gohive.