Home Forums HDP on Windows – Installation How to Configure Hive Server 2 for ODBC Connection on HDP 1.3 on Windows

Tagged: ,

This topic contains 3 replies, has 3 voices, and was last updated by  Trevor Philipps 1 month, 2 weeks ago.

  • Creator
    Topic
  • #33385

    Seth Lyubich
    Keymaster

    By default, the Hive Server 2 service on Windows starts in ‘HTTP’ mode. In order to enable the Hortonworks ODBC driver, the Hive Server 2 service needs to run in ‘Thrift’ mode. Please see steps below on how to configure Hive Server 2 to run in ‘Thrift’ mode.

    1. Stop any Hive running Hive services:

    – hiveserver2
    – hiveserver1
    – hwi
    – metastore

    2. Configure the HiveServer2 service to run in ‘Thrift’ mode

    – locate hive-site.xml located in %HIVE_CONF_DIR%.

    3. Locate hive.server2.servermode property and set it to Thrift. See example below:

    hive.server2.servermode
    thrift
    HiveServer server type: thrift or http

    4. Restart Hive Services from step 1:

    – hiveserver2
    – hiveserver1
    – hwi
    – metastore

    Thanks,
    Seth

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #60404

    Trevor Philipps
    Participant

    I encountered another problem. If i start my hive server 2 in thrift mode, i get following errors in my log-files:


    2014-09-15 09:30:52,856 ERROR [pool-5-thread-1]: server.TThreadPoolServer (TThreadPoolServer.java:run(215)) - Error occurred during processing of message.
    java.lang.RuntimeException: org.apache.thrift.transport.TTransportException
    at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:189)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: org.apache.thrift.transport.TTransportException
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:178)
    at org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)
    at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:253)
    at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
    at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
    ... 4 more

    Anyone know how to solve this problem?

    Collapse
    #44375

    Field Wachi
    Participant

    Problem has been resolved.
    UserName : Hadoop and open the firewall…..

    Collapse
    #44374

    Field Wachi
    Participant

    I encountered a problem.

    My hive-site.xml
    hive.server2.servermode : thrift
    hive.server2.thrift.port : 10001
    javax.jdo.option.ConnectionUserName : hive
    javax.jdo.option.ConnectionPassword : hive

    My Hortonworks Hive ODBC Driver Configuration
    host : HDPSERVER
    post : 10001
    database : default
    hive server type : hive server 2
    mechainism : username
    username :hive

    Test Results shows
    Driver Version : v1.2.0.1005
    Running connectivity tests…
    Attempting connection
    Failed to establish connection
    SQLSTATE: HY000[Hortonworks][Hardy] (34) Error from Hive: connect() failed: errno = 10060.
    TESTS COMPLETED WITH ERROR.

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)