SW Engineering/Hadoop

HiveServer2 와 Beeline

SungWookKang 2019. 12. 13. 00:59
반응형

HiveServer2 Beeline

 

·       Version : Hadoop 3.0.0-cdh6.3.2, Hive

 

HiveServer2(HS2) HiveServer1 후속으로 클라이언트가 하이브에 대해 쿼리를 실행할 있게 해주는 서비스이며 아래와 같은 특징이 있다.

·       HS2 다중 클라이언트 동시성 인증을 지원

·       JDBC ODBC 같은 공개 API 클라이언트를 지원

·       Thrift 기반 하이브 서비스 (TCP 또는HTTP) UI Jetty 서버를 포함하는 복합 서비스로 실행되는 단일 프로세스

 

Beeline HiveServer2 접속하여 Command shell 수행할 있도록 도와주는 Client이며 SQLLine CLI 기반으로하는 JDBC 클라이언트이기도 하다. Beeline shell 가지 방식으로 수행된다.

·       Embeded mode : Hive CLI 유사하게 embeded hive 수행

·       Remote mode : Thrift 통신을 통해 원격지에 있는 HiveServer2 접속하여 수행 (, Thrift 통신만 허용)

 

Beeline에서 하이브서버2 접속하는 방법은 Beeline CLI 실행후에 입력하는 방법과 비라인 CLI 실행하면서 옵션을 사용하는 방식이 있다. Beeline 커맨드는 Hive 실행 디렉터리에 있다. Beeline에서는 ! 이용하여 SQLLine 명령을 입력할 있다.

[Beeline CLI 실행 Connect 명령을 이용한 접속]

--beeline shell 실행

beeline

--beeline CLI HiveServer2 커넥트

!connect jdbc:hive2://{hive ip & port} {user} {password}

!connect jdbc:hive2://localhost:10000 user password

 

--beeline CLI MySQL 접속

!connect jdbc:mysql://localhost:port/db_name db_id db_password

 

[커맨드라인 옵션을 사용한 접속]

beeline -u jdbc:hive2://localhost:10000 -n user -p password

 

 

Beeline 명령어 Beeline Hive 명령은 아래 참고자료의 공식 문서를 참고한다.

 

 

[참고자료]

HiveServer2 Clients : https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients

 

 

 

2019-12-12 / Sungwook Kang / http://sungwookkang.com

 

Hadoop, hive, 하이브 명령어, hive command, 하이브쉘, 하이브 커맨드, 비라인, Beeline, Beeline, HiveServer2, 하이버서버2, Hive CLI

반응형

'SW Engineering > Hadoop' 카테고리의 다른 글

Hive Meta Store 설정  (0) 2019.12.18
MapReduce 메모리 부족으로 인한 쿼리 실패  (0) 2019.12.14
Hive CLI  (0) 2019.12.12
HDFS Safe 모드  (0) 2019.12.11
HDFS 커럽션 파일 확인  (0) 2019.12.10