[HBASE] Dimporttsv시 에러 해결
2022. 4. 6. 11:32ㆍ개발 기타/빅데이터 분산
에러 메세지
ERROR: No columns specified. Please specify with -Dimporttsv.columns=...
Usage: importtsv -Dimporttsv.columns=a,b,c <tablename> <inputdir>
Imports the given input directory of TSV data into the specified table.
The column names of the TSV data must be specified using the -Dimporttsv.columns
option. This option takes the form of comma-separated column names, where each
column name is either a simple column family, or a columnfamily:qualifier. The special
column name HBASE_ROW_KEY is used to designate that this column should be used
as the row key for each imported record. You must specify exactly one column
to be the row key, and you must specify a column name for every column that exists in the
input data. Another special columnHBASE_TS_KEY designates that this column should be
used as timestamp for each record. Unlike HBASE_ROW_KEY, HBASE_TS_KEY is optional.
You must specify at most one column as timestamp key for each imported record.
Record with invalid timestamps (blank, non-numeric) will be treated as bad record.
Note: if you use this option, then 'importtsv.timestamp' option will be ignored.
Other special columns that can be specified are HBASE_CELL_TTL and HBASE_CELL_VISIBILITY.
HBASE_CELL_TTL designates that this column will be used as a Cell's Time To Live (TTL) attribute.
HBASE_CELL_VISIBILITY designates that this column contains the visibility label expression.
HBASE_ATTRIBUTES_KEY can be used to specify Operation Attributes per record.
Should be specified as key=>value where -1 is used
as the seperator. Note that more than one OperationAttributes can be specified.
By default importtsv will load data directly into HBase. To instead generate
HFiles of data to prepare for a bulk data load, pass the option:
-Dimporttsv.bulk.output=/path/for/output
Note: if you do not use this option, then the target table must already exist in HBase
Other options that may be specified with -D include:
-Dimporttsv.dry.run=true - Dry run mode. Data is not actually populated into table. If table does not exist, it is created but deleted in the end.
-Dimporttsv.skip.bad.lines=false - fail if encountering an invalid line
-Dimporttsv.log.bad.lines=true - logs invalid lines to stderr
-Dimporttsv.skip.empty.columns=false - If true then skip empty columns in bulk import
'-Dimporttsv.separator=|' - eg separate on pipes instead of tabs
-Dimporttsv.timestamp=currentTimeAsLong - use the specified timestamp for the import
-Dimporttsv.mapper.class=my.Mapper - A user-defined Mapper to use instead of org.apache.hadoop.hbase.mapreduce.TsvImporterMapper
-Dmapreduce.job.name=jobName - use the specified mapreduce job name for the import
-Dcreate.table=no - can be used to avoid creation of table by this tool
Note: if you set this to 'no', then the target table must already exist in HBase
-Dno.strict=true - ignore column family check in hbase table. Default is false
For performance consider the following options:
-Dmapreduce.map.speculative=false
-Dmapreduce.reduce.speculative=false
해결
참고
위 링크를 참고했다. 세상에... 띄어쓰기가 문제였다.
-Dimporttsv.columns= HBASE_ROW_KEY에서 = 뒤의 띄어쓰기를 지우니까 실행된다....
'개발 기타 > 빅데이터 분산' 카테고리의 다른 글
[HBase] Could not start ZK at requested port of 2181. 해결 (0) | 2022.04.04 |
---|---|
[Zookeeper] Starting zookeeper ... FAILED TO START 해결 (0) | 2022.04.04 |