• 从hdfs上导入表
    • 从 HDFS 文件中导入数据到 SequoiaDB 表

    从hdfs上导入表

    从 HDFS 文件中导入数据到 SequoiaDB 表

    1. hive> insert overwrite table sdb_tab select * from hdfs_tab;
    2.  
    3. Total MapReduce jobs = 1
    4. Launching Job 1 out of 1
    5. Number of reduce tasks is set to 0 since there's no reduce operator
    6. Starting Job = job_201310172156_0010, Tracking URL = http://bl465-5:50030/jobdetails.jsp?jobid=job_201310172156_0010
    7. Kill Command = /opt/hadoop-hive/hadoop-1.2.1/libexec/../bin/hadoop job -kill job_201310172156_0010
    8. Hadoop job information for Stage-0: number of mappers: 1; number of reducers: 0
    9. 2013-10-18 04:44:47,733 Stage-0 map = 0%, reduce = 0%
    10. 2013-10-18 04:44:49,763 Stage-0 map = 100%, reduce = 0%, Cumulative CPU 1.85 sec
    11. 2013-10-18 04:44:50,777 Stage-0 map = 100%, reduce = 0%, Cumulative CPU 1.85 sec
    12. 2013-10-18 04:44:51,795 Stage-0 map = 100%, reduce = 100%, Cumulative CPU 1.85 sec
    13. MapReduce Total cumulative CPU time: 1 seconds 850 msec
    14. Ended Job = job_201310172156_0010
    15. 10 Rows loaded to sdb_tab
    16. MapReduce Jobs Launched:
    17. Job 0: Map: 1 Cumulative CPU: 1.85 sec HDFS Read: 2301 HDFS Write: 0 SUCCESS
    18. Total MapReduce CPU Time Spent: 1 seconds 850 msec
    19. OK
    20. Time taken: 12.201 seconds

    Note:

    在导入数据到 SequoiaDB 表之前,请确保已经创建基于 HDFS 文件的 hdfs_tab 数据表,并 load 了数据。