Skip to Main Content
Hadoop数据分析
book

Hadoop数据分析

by Benjamin Bengfort, Jenny Kim
April 2018
Intermediate to advanced content levelIntermediate to advanced
229 pages
6h 19m
Chinese
Posts & Telecom Press
Content preview from Hadoop数据分析
108
6
~$ $HIVE_HOME/bin/hive
hive> use log_data;
OK
Time taken: 0.221 seconds
使用 LOAD DATA 命令,并指定日志文件的
HDFS
路径,将内容写入到 apache_log 表中:
hive> LOAD DATA INPATH 'statistics/log_data/apache.log'
OVERWRITE INTO TABLE apache_log;
Loading data to table log_data.apache_log
rmr: DEPRECATED: Please use 'rm -r' instead.
Deleted hdfs://localhost:9000/user/hive/warehouse/log_data.db/apache_log
Table log_data.apache_log stats: [numFiles=1, numRows=0, totalSize=52276758,
rawDataSize=0]
OK
Time taken: 0.902 seconds
LOAD DATA
Hive
的批量加载命令。INPATH 携带一个指向默认文件系统(本例中为
HDFS
中的路径的参数。我们还可以使用 LOCAL INPATH 来指定本地文件系统上的路径。
Hive
将文
件移动到仓库位置。如果使用 OVERWRITE 关键字,则目标表中的所有已有数据将被删除并 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kudu:构建高性能实时数据分析存储系统

Kudu:构建高性能实时数据分析存储系统

Jean-Marc Spaggiari, Mladen Kovacevic, Brock Noland, Ryan Bosshart
Java并发编程实战

Java并发编程实战

Brian Goetz, Tim Peierls
面向机器学习的自然语言标注

面向机器学习的自然语言标注

James Pustejovsky, Amber Stubbs

Publisher Resources

ISBN: 9787115479648