python cannot connect hiveserver2

后端 未结 4 1316
悲哀的现实
悲哀的现实 2020-12-11 03:42

I have tried use the example on https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2 but gets the following errors:

/usr/lib/python2.7/dis         


        
4条回答
  •  温柔的废话
    2020-12-11 04:34

    1 In hive-site.xml, set configuration as below:

    
       hive.server2.authentication
       NOSASL
    
    

    2 pyhs2 program codes changes as below:

    with pyhs2.connect(host='localhost',
                       port=10000,
                       authMechanism="NOSASL",
                       user='user',
                       password='password',
                       database='default') as conn:
    

    Please note that username and password cannot be empty, add any username and password when connects to pyhs2

提交回复
热议问题