Connecting to Hive using Beeline

后端 未结 7 1140
傲寒
傲寒 2020-12-29 06:28

I am trying to connect to hive installed in my machine through Beeline client. when I give the \'beeline\' command & connect to Hive, the client is asking for user name

7条回答
  •  春和景丽
    2020-12-29 06:56

    It is the user id and password that is used to login to the cluster. Some times it is the edge nodes credentials that you use to login to the server. The best way to avoid this is by using the below command

    beeline -u jdbc:hive2://localhost:10000/default
    

    If you are already logged in to some node through putty you won't be prompted with any user id or password.

    EDIT

    Trick: To avoid typing the whole beeline string repetitively it is good to create an alias in your bash_profile file.

    just add the below line in bash profile (with kerberos security suggested by @Harsimranjit Singh Kler) beeline -u jdbc:hive2://:10000/default;principal=hive/@;ssl=true; and source the bash_profile (source .bash_profile) and you are done. The next time on just type beeline and it will connect to the hive2 server

提交回复
热议问题