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
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://
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