phoenix 利用CsvBulkLoadTool 批量带入数据并自动创建索引
2016-02-16 10:13
495 查看
需要先创建表:
在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)
CREATE TABLE IF NOT EXISTS population ( state CHAR(2) 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)
相关文章推荐
- vba 操作文件夹和txt文件
- VB.net版机房收费系统——三层登录
- Vb.net 的 OrElse
- 利用VBoxManage对虚拟机格式vdi、vmdk、vhd进行互转
- 【VB.Net】使用SHA256进行简单的XOR文本加密与解密
- VB 当控件被数据绑定时,无法以编程方式向 DataGridView 的行集合中添加行
- 【VB.NET】台湾和大陆术语对照
- VB.NET视频总结(1-7集)
- 【VB】On Error略解
- 【VB6】实现VB6中类的静态方法
- 【VB6】实现VB6中类的静态方法
- VB.NET视频打开方式
- 【VB6】VB6类库项目中的Persistable
- 【VB6】VB6类库项目中的MTSTransactionMode
- 【VB6】VB6类库项目中Instancing属性
- vb学习之十三
- vb学习之十二
- vb学习之十一
- vb学习之十
- vb学习之六