Apache Hive 2.3.9 on top of Apache Hadoop 3.3.1 and running YARN is the job executer
10K+
/opt/hive-2.3.9docker build -t laithleo/hive:2.3.9 .
docker pull laithleo/hive:2.3.9
docker run -p 8088:8088 -p 10000:10000 -it laithleo/hive:2.3.9 /tmp/bootstrap.sh -bash
beeline> !connect jdbc:hive2://localhost:10000/;
Connecting to jdbc:hive2://localhost:10000/;
Enter username for jdbc:hive2://localhost:10000/: user
Enter password for jdbc:hive2://localhost:10000/: ****
Connected to: Apache Hive (version 2.3.9)
Driver: Hive JDBC (version 2.3.9)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000/> show databases;
OK
+----------------+
| database_name |
+----------------+
| default |
+----------------+
1 row selected (1.813 seconds)
0: jdbc:hive2://localhost:10000/>
You can use one of the provided examples:
0: jdbc:hive2://localhost:10000/> CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);
OK
No rows affected (0.822 seconds)
0: jdbc:hive2://localhost:10000/> LOAD DATA LOCAL INPATH '/opt/hive-2.3.9/examples/files/kv2.txt' OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-15');
Loading data to table default.invites partition (ds=2008-08-15)
OK
No rows affected (1.448 seconds)
0: jdbc:hive2://localhost:10000/>```
To see some output of your data with select, do:
```0: jdbc:hive2://localhost:10000/> select * from invites LIMIT 10;
OK
+--------------+--------------+-------------+
| invites.foo | invites.bar | invites.ds |
+--------------+--------------+-------------+
| 474 | val_475 | 2008-08-15 |
| 281 | val_282 | 2008-08-15 |
| 179 | val_180 | 2008-08-15 |
| 291 | val_292 | 2008-08-15 |
| 62 | val_63 | 2008-08-15 |
| 271 | val_272 | 2008-08-15 |
| 217 | val_218 | 2008-08-15 |
| 135 | val_136 | 2008-08-15 |
| 167 | val_168 | 2008-08-15 |
| 468 | val_469 | 2008-08-15 |
+--------------+--------------+-------------+
10 rows selected (0.257 seconds)
0: jdbc:hive2://localhost:10000/>
Content type
Image
Digest
Size
1.6 GB
Last updated
almost 5 years ago
docker pull laithleo/hive