需要先创建表:

CREATE TABLE IF NOT EXISTS population (
state CHAR() NOT NULL, city VARCHAR NOT NULL, population BIGINT
CONSTRAINT my_pk PRIMARY KEY (state, city));

在phoenix 目录下执行

hadoop jar /home/phoenix-4.6.0-HBase-1.0-bin/phoenix-4.6.0-HBase-1.0-client.jar   org.apache.phoenix.mapreduce.CsvBulkLoadTool -t POPULATION -i /datas/us_population.csv

-t :tableName

-i: input file 文件必须在hdfs文件上。

后查询表数据是空。

问题: ERROR mapreduce.CsvBulkLoadTool: Error Wrong FS: file:/home/hadoop/tmp/partitions_101bd67a-ec2c-4808-bc9f-bf4cd6ea74b9, expected: hdfs://node11:9000 occurred submitting CSVBulkLoad

参数意义:

-a,--array-delimiter <arg> Array element delimiter (optional)
-c,--import-columns <arg> Comma-separated list of columns to be
imported
-d,--delimiter <arg> Input delimiter, defaults to comma
-e,--escape <arg> Supply a custom escape character, default is
a backslash
-g,--ignore-errors Ignore input errors
-h,--help Show this help and quit
-i,--input <arg> Input CSV path (mandatory)
-it,--index-table <arg> Phoenix index table name when just loading
this particualar index table
-o,--output <arg> Output path for temporary HFiles (optional)
-q,--quote <arg> Supply a custom phrase delimiter, defaults
to double quote character
-s,--schema <arg> Phoenix schema name (optional)
-t,--table <arg> Phoenix table name (mandatory)
-z,--zookeeper <arg> Supply zookeeper connection details
(optional)

phoenix 利用CsvBulkLoadTool 批量带入数据并自动创建索引的更多相关文章

  1. SqlServer 利用游标批量更新数据

    SqlServer 利用游标批量更新数据 Intro 游标在有时候会很有用,在更新一部分不多的数据时,可以很方便的更新数据,不需要再写一个小工具来做了,直接写 SQL 就可以了 Sample 下面来看 ...

  2. 大数据_Kafka_Kafka自动创建不存在的Topics / 删除已存在的Topics

    大数据_Kafka_Kafka自动创建不存在的Topics / 删除已存在的Topics 2016年10月11日 18:22:59 高达一号 阅读数:8655   版权声明:本文为博主原创文章,未经博 ...

  3. elasticsearch 5.6.4自动创建索引与mapping映射关系 +Java语言

    由于业务上的需求 ,最近在研究elasticsearch的相关知识 ,在网上查略了大部分资料 ,基本上对elasticsearch的数据增删改都没有太大问题 ,这里就不做总结了  .但是,在网上始终没 ...

  4. apach hadoop2.6 集群利用Phoenix 4.6-hbase 批量导入并自动创建索引

    基础环境: 1.安装apach 版本hadoop2.6 2.部署hbase1.0.0 3.下载phoenix-4.6.0-HBase-1.0.下载地址(http://mirror.nus.edu.sg ...

  5. Sql Server利用游标批量清空数据表

    先吐槽一下,由于公司要为新客户部署一个全新的系统,然而公司并没有空库,所以只能把正在线上运行的数据库给备份,然后清空相关数据 下面分享一下我在做清空数据库时写的一个批量清空数据表的方法 思路:查询出该 ...

  6. kibana自动创建索引

    一般索引按月.季或年为单位创建索引.我这里写成logstash-www-2019-03,www是URL的二级域名.格式类型完全根据自己方便就行. 当ELK集群中的索引过多时,我这里有100多个不同的日 ...

  7. 多表利用DIH批量导入数据并建立索引注意事项

    如果希望同时对多个表进行全文检索,那我们该如何处理呢?利用DIH导入数据并建立索引时.schema.xml中配置了uniqueKey为id <uniqueKey>id</unique ...

  8. 利用pipeline批量插入数据到redis

    在推荐系统中,推荐候选集格式一般是,itemid itemid_list.要把itemid作为key,推荐列表作为value批量插入到redis. 比如文件cf.data为: cf_763500210 ...

  9. 利用AXI-DMA批量发送数据到DMA

    1.1 主函数 int main(void) { XGpio_Initialize(&Gpio, AXI_GPIO_DEV_ID); XGpio_SetDataDirection(&G ...

随机推荐

  1. 查询事件状态,mysql查看事件是否开启,设置启动时自动开启方法

    1.查看事件是否开启 SHOW VARIABLES LIKE 'event_scheduler' 2.设置当前事件开启 SET GLOBAL event_scheduler = 1; 或 SET GL ...

  2. upc组队赛3 Congestion Charging Zon【模拟】

    Congestion Charging Zon 题目描述 Tehran municipality has set up a new charging method for the Congestion ...

  3. Java.math.BigDecimal.abs()方法

    java.math.BigDecimal.abs()返回一个BigDecimal,其值是此BigDecimal的绝对值,其标度是this.scale(). 声明 以下是java.math.BigDec ...

  4. Oracle中删表遇到ORA-14452

    删表的时候碰到表忙的情况,会报错. DROP TABLE TMP_TAB_T_AGENT * ERROR at line 1: ORA-14452: attempt to create, alter ...

  5. 实现一个EventEmitter类,这个类包含以下方法: on/ once/fire/off

    实现一个EventEmitter类,这个类包含以下方法: on(监听事件,该事件可以被触发多次)- once(也是监听事件,但只能被触发一次)- fire(触发指定的事件)- off(移除指定事件的某 ...

  6. 2018-8-10-win10-uwp-json

    title author date CreateTime categories win10 uwp json lindexi 2018-08-10 19:16:53 +0800 2018-2-13 1 ...

  7. android thread Runnable

    原文链接: http://blog.csdn.net/boyupeng/article/details/6208072 这篇文章中有三点需要提前说明一下, 一: 在android中有两种实现线程thr ...

  8. read -p 命令--shell 脚本

    #!/bin/bash #This is a Program.it will show your full name. #2019/07/17 fsq PATH=/bin:/sbin:/usr/bin ...

  9. 类定义包含vecot<类>对象

    #include "stdafx.h" #include <vector> using namespace std; class ControlPosition { p ...

  10. C++ 空类,默认产生哪些成员函数

    C++ 空类,默认产生哪些成员函数.     默认构造函数.默认拷贝构造函数.默认析构函数.默认赋值运算符 这四个是我们通常大都知道的.但是除了这四个,还有两个,那就是取址运算符和 取址运算符 con ...