· 7 years ago · Dec 18, 2018, 10:42 AM
1# autenticazione con service principal
2kinit -kt /etc/security/keytabs/hive.service.keytab hive/masternode01.domain.priv@DOMAIN.PRIV
3beeline -u "jdbc:hive2://masternode01.domain.priv:2181,masternode02.domain.priv:2181,masternode03.domain.priv:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2;principal=hive/masternode01.domain.priv@DOMAIN.PRIV"
40: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l> CREATE DATABASE sbi;
5INFO : Compiling command(queryId=hive_20181218105103_1c9e8a83-c8b1-4cee-a85f-35b5f8f17c93): CREATE DATABASE sbi
6INFO : We are setting the hadoop caller context from HIVE_SSN_ID:5ffab31d-d355-4c16-a7c4-e968613bf499 to hive_20181218105103_1c9e8a83-c8b1-4cee-a85f-35b5f8f17c93
7INFO : Semantic Analysis Completed
8INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
9INFO : Completed compiling command(queryId=hive_20181218105103_1c9e8a83-c8b1-4cee-a85f-35b5f8f17c93); Time taken: 0.003 seconds
10INFO : We are resetting the hadoop caller context to HIVE_SSN_ID:5ffab31d-d355-4c16-a7c4-e968613bf499
11INFO : Concurrency mode is disabled, not creating a lock manager
12INFO : Setting caller context to query id hive_20181218105103_1c9e8a83-c8b1-4cee-a85f-35b5f8f17c93
13INFO : Executing command(queryId=hive_20181218105103_1c9e8a83-c8b1-4cee-a85f-35b5f8f17c93): CREATE DATABASE sbi
14INFO : Starting task [Stage-0:DDL] in serial mode
15INFO : Resetting the caller context to HIVE_SSN_ID:5ffab31d-d355-4c16-a7c4-e968613bf499
16INFO : Completed executing command(queryId=hive_20181218105103_1c9e8a83-c8b1-4cee-a85f-35b5f8f17c93); Time taken: 0.462 seconds
17INFO : OK
18No rows affected (0.472 seconds)
19
20# autenticazione via utente di dominio con privilegi sul DB scelto
21[supplier@lcsgepalsv072 ~]$ klist
22Ticket cache: FILE:/tmp/krb5cc_124601946
23Default principal: supplier@MIS.PRIV
24
25Valid starting Expires Service principal
2612/18/2018 10:59:30 12/18/2018 20:59:30 krbtgt/MIS.PRIV@MIS.PRIV
27 renew until 12/25/2018 10:59:30
28[supplier@lcsgepalsv072 ~]$ beeline -u "jdbc:hive2://lcsgepalsv074.mis.priv:2181,lcsgepalsv075.mis.priv:2181,lcsgepalsv076.mis.priv:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2"
29Connecting to jdbc:hive2://lcsgepalsv074.mis.priv:2181,lcsgepalsv075.mis.priv:2181,lcsgepalsv076.mis.priv:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2
30Connected to: Apache Hive (version 2.1.0.2.6.5.0-292)
31Driver: Hive JDBC (version 1.2.1000.2.6.5.0-292)
32Transaction isolation: TRANSACTION_REPEATABLE_READ
33Beeline version 1.2.1000.2.6.5.0-292 by Apache Hive
340: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l> USE sbi;
35INFO : Compiling command(queryId=hive_20181218110040_11502af1-0d20-454a-b24f-fb4a8907f1c1): USE sbi
36INFO : We are setting the hadoop caller context from HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351 to hive_20181218110040_11502af1-0d20-454a-b24f-fb4a8907f1c1
37INFO : Semantic Analysis Completed
38INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
39INFO : Completed compiling command(queryId=hive_20181218110040_11502af1-0d20-454a-b24f-fb4a8907f1c1); Time taken: 0.008 seconds
40INFO : We are resetting the hadoop caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
41INFO : Concurrency mode is disabled, not creating a lock manager
42INFO : Setting caller context to query id hive_20181218110040_11502af1-0d20-454a-b24f-fb4a8907f1c1
43INFO : Executing command(queryId=hive_20181218110040_11502af1-0d20-454a-b24f-fb4a8907f1c1): USE sbi
44INFO : Starting task [Stage-0:DDL] in serial mode
45INFO : Resetting the caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
46INFO : Completed executing command(queryId=hive_20181218110040_11502af1-0d20-454a-b24f-fb4a8907f1c1); Time taken: 0.518 seconds
47INFO : OK
48No rows affected (0.59 seconds)
490: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l> CREATE TABLE IF NOT EXISTS dacancellare ( eid int, name String) STORED AS TEXTFILE;
50INFO : Compiling command(queryId=hive_20181218110339_879c2dd4-c43c-4c6d-b7ae-c0d6814f7f42): CREATE TABLE IF NOT EXISTS dacancellare ( eid int, name String) STORED AS TEXTFILE
51INFO : We are setting the hadoop caller context from HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351 to hive_20181218110339_879c2dd4-c43c-4c6d-b7ae-c0d6814f7f42
52INFO : Semantic Analysis Completed
53INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
54INFO : Completed compiling command(queryId=hive_20181218110339_879c2dd4-c43c-4c6d-b7ae-c0d6814f7f42); Time taken: 0.012 seconds
55INFO : We are resetting the hadoop caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
56INFO : Concurrency mode is disabled, not creating a lock manager
57INFO : Setting caller context to query id hive_20181218110339_879c2dd4-c43c-4c6d-b7ae-c0d6814f7f42
58INFO : Executing command(queryId=hive_20181218110339_879c2dd4-c43c-4c6d-b7ae-c0d6814f7f42): CREATE TABLE IF NOT EXISTS dacancellare ( eid int, name String) STORED AS TEXTFILE
59INFO : Starting task [Stage-0:DDL] in serial mode
60INFO : Resetting the caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
61INFO : Completed executing command(queryId=hive_20181218110339_879c2dd4-c43c-4c6d-b7ae-c0d6814f7f42); Time taken: 0.465 seconds
62INFO : OK
63No rows affected (0.484 seconds)
640: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l> SHOW TABLES;
65INFO : Compiling command(queryId=hive_20181218110347_32d8054e-72f4-4e8f-9870-354f34438cb6): SHOW TABLES
66INFO : We are setting the hadoop caller context from HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351 to hive_20181218110347_32d8054e-72f4-4e8f-9870-354f34438cb6
67INFO : Semantic Analysis Completed
68INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
69INFO : Completed compiling command(queryId=hive_20181218110347_32d8054e-72f4-4e8f-9870-354f34438cb6); Time taken: 0.006 seconds
70INFO : We are resetting the hadoop caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
71INFO : Concurrency mode is disabled, not creating a lock manager
72INFO : Setting caller context to query id hive_20181218110347_32d8054e-72f4-4e8f-9870-354f34438cb6
73INFO : Executing command(queryId=hive_20181218110347_32d8054e-72f4-4e8f-9870-354f34438cb6): SHOW TABLES
74INFO : Starting task [Stage-0:DDL] in serial mode
75INFO : Resetting the caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
76INFO : Completed executing command(queryId=hive_20181218110347_32d8054e-72f4-4e8f-9870-354f34438cb6); Time taken: 0.437 seconds
77INFO : OK
78+---------------+--+
79| tab_name |
80+---------------+--+
81| dacancellare |
82+---------------+--+
831 row selected (0.488 seconds)
840: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l> DROP TABLE dacancellare;
85INFO : Compiling command(queryId=hive_20181218110501_0a4d80e1-5b21-40fb-9b7a-2033054259ec): DROP TABLE dacancellare
86INFO : We are setting the hadoop caller context from HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351 to hive_20181218110501_0a4d80e1-5b21-40fb-9b7a-2033054259ec
87INFO : Semantic Analysis Completed
88INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
89INFO : Completed compiling command(queryId=hive_20181218110501_0a4d80e1-5b21-40fb-9b7a-2033054259ec); Time taken: 0.019 seconds
90INFO : We are resetting the hadoop caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
91INFO : Concurrency mode is disabled, not creating a lock manager
92INFO : Setting caller context to query id hive_20181218110501_0a4d80e1-5b21-40fb-9b7a-2033054259ec
93INFO : Executing command(queryId=hive_20181218110501_0a4d80e1-5b21-40fb-9b7a-2033054259ec): DROP TABLE dacancellare
94INFO : Starting task [Stage-0:DDL] in serial mode
95INFO : Resetting the caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
96INFO : Completed executing command(queryId=hive_20181218110501_0a4d80e1-5b21-40fb-9b7a-2033054259ec); Time taken: 0.535 seconds
97INFO : OK
98No rows affected (0.584 seconds)
990: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l> SHOW TABLES;
100INFO : Compiling command(queryId=hive_20181218110506_4cb21f5b-426e-43a9-aa3a-4fafa846fa6f): SHOW TABLES
101INFO : We are setting the hadoop caller context from HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351 to hive_20181218110506_4cb21f5b-426e-43a9-aa3a-4fafa846fa6f
102INFO : Semantic Analysis Completed
103INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
104INFO : Completed compiling command(queryId=hive_20181218110506_4cb21f5b-426e-43a9-aa3a-4fafa846fa6f); Time taken: 0.006 seconds
105INFO : We are resetting the hadoop caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
106INFO : Concurrency mode is disabled, not creating a lock manager
107INFO : Setting caller context to query id hive_20181218110506_4cb21f5b-426e-43a9-aa3a-4fafa846fa6f
108INFO : Executing command(queryId=hive_20181218110506_4cb21f5b-426e-43a9-aa3a-4fafa846fa6f): SHOW TABLES
109INFO : Starting task [Stage-0:DDL] in serial mode
110INFO : Resetting the caller context to HIVE_SSN_ID:98ed8585-6d0a-4536-accb-30ebf9c4e351
111INFO : Completed executing command(queryId=hive_20181218110506_4cb21f5b-426e-43a9-aa3a-4fafa846fa6f); Time taken: 0.422 seconds
112INFO : OK
113+-----------+--+
114| tab_name |
115+-----------+--+
116+-----------+--+
117No rows selected (0.437 seconds)
1180: jdbc:hive2://lcsgepalsv074.mis.priv:2181,l>