Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. As your_username, open the Beeline client from the shell node:
  2.  
  3. @shl01 conf]$ beeline
  4.  
  5. Connect to the Hive JDBC:
  6.  
  7. beeline>!connect jdbc:hive2://<hostname>:10000/;ssl=true;
  8.  
  9. When prompted, provide a user name and password to connect to the database. Specify the user credentials that you provided when you created the cluster. After you are connected to the database, you can run Hive SQL commands.
  10. Create a table through the Beeline client:
  11.  
  12. 0: jdbc:hive2://bi-hadoop-prod-xxxx.bi.services> create table tab1(c1 int);
  13.  
  14. The value of xxxx is a unique number that is assigned to your cluster to identify the host name of your cluster's management node.
  15. Insert records into the table:
  16.  
  17. 0: jdbc:hive2://bi-hadoop-prod-xxxx.bi.services> insert into tab1 values(1);
  18.  
  19. Select records from the table:
  20.  
  21. 0: jdbc:hive2://bi-hadoop-prod-xxxx.bi.services> select * from tab1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement