文字資料匯入HBASE庫找不到類com/google/common/collect/Multimap
打算將文字檔案匯入HBASE庫,在執行命令的時候找不到類com/google/common/collect/Multima
[hadoop@hadoop1 lib]$ hadoop jar /home/hadoop/hbase-0.94.6/hbase-0.94.6.jar importtsv
Warning: $HADOOP_HOME is deprecated.
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Multimap
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 6 more
後來將$HBASE_HOME/lib下的包guava-11.0.2.jar 複製到 $HADOOP_HOME/lib 下, 問題搞定。
[hadoop@hadoop1 lib]$ pwd
/home/hadoop/hadoop-1.0.4/lib
[hadoop@hadoop1 lib]$ cp /home/hadoop/hbase-0.94.6/lib/guava-11.0.2.jar .
[hadoop@hadoop1 lib]$ hadoop jar /home/hadoop/hbase-0.94.6/hbase-0.94.6.jar importtsv
Warning: $HADOOP_HOME is deprecated.
ERROR: Wrong number of arguments: 0
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 column HBASE_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 atmost 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.
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.skip.bad.lines=false - fail if encountering an invalid line
'-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
For performance consider the following options:
-Dmapred.map.tasks.speculative.execution=false
-Dmapred.reduce.tasks.speculative.execution=false
[hadoop@hadoop1 lib]$ hadoop jar /home/hadoop/hbase-0.94.6/hbase-0.94.6.jar importtsv
Warning: $HADOOP_HOME is deprecated.
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
at org.apache.hadoop.hbase.mapreduce.Driver.main(Driver.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Multimap
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 6 more
後來將$HBASE_HOME/lib下的包guava-11.0.2.jar 複製到 $HADOOP_HOME/lib 下, 問題搞定。
[hadoop@hadoop1 lib]$ pwd
/home/hadoop/hadoop-1.0.4/lib
[hadoop@hadoop1 lib]$ cp /home/hadoop/hbase-0.94.6/lib/guava-11.0.2.jar .
[hadoop@hadoop1 lib]$ hadoop jar /home/hadoop/hbase-0.94.6/hbase-0.94.6.jar importtsv
Warning: $HADOOP_HOME is deprecated.
ERROR: Wrong number of arguments: 0
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 column HBASE_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 atmost 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.
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.skip.bad.lines=false - fail if encountering an invalid line
'-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
For performance consider the following options:
-Dmapred.map.tasks.speculative.execution=false
-Dmapred.reduce.tasks.speculative.execution=false
相關文章
- 大文字資料,匯入匯出到資料庫資料庫
- 資料匯入終章:如何將HBase的資料匯入HDFS?
- java.lang.NoClassDefFoundError:com/google/common/base/MoreobjectsJavaErrorGoObject
- 資料庫 MySQL 資料匯入匯出資料庫MySql
- Mysql 資料庫匯入與匯出MySql資料庫
- Hive資料匯入HBase引起資料膨脹引發的思考Hive
- Access 匯入 oracle 資料庫Oracle資料庫
- excel 匯入sqlyog資料庫ExcelSQL資料庫
- SQL資料庫的匯入和匯出SQL資料庫
- TP5.1excel匯入資料庫的程式碼?php excel如何匯入資料庫?Excel資料庫PHP
- 匯入excel資源到資料庫Excel資料庫
- Oracle資料庫匯入匯出。imp匯入命令和exp匯出命令Oracle資料庫
- 然後再全庫匯入排除view資料庫在impdp匯入View資料庫
- 將資料庫中資料匯入至solr索引庫資料庫Solr索引
- HHDBCS資料庫一鍵匯入資料庫
- 如何將Excl內資料匯入資料庫?資料庫
- java 從EXCEL匯入到資料庫JavaExcel資料庫
- 100萬資料,如何快速的匯入資料庫?資料庫
- MapReduce之----往hbase資料庫寫入資料時, 出現資料異常資料庫
- Hbase資料庫安裝部署資料庫
- OracleDatabase——資料庫表空間dmp匯出與匯入OracleDatabase資料庫
- 達夢資料庫遷移資料/複製表/匯入匯出2資料庫
- Linux基礎命令---mysqlimport匯入資料庫LinuxMySqlImport資料庫
- [Docker核心之容器、資料庫檔案的匯入匯出、容器映象的匯入匯出]Docker資料庫
- 《分散式資料庫HBase案例教程》分散式資料庫
- HBase資料庫效能調優OW資料庫
- 教你兩種資料庫覆蓋式資料匯入方法資料庫
- PostgreSQL資料庫匯入大量資料時如何最佳化SQL資料庫
- sqoop資料匯入匯出OOP
- Oracle 資料匯入匯出Oracle
- 資料泵匯出匯入
- Oracle資料匯入匯出Oracle
- phpMyAdmin匯入/匯出資料PHP
- 把TXT文字匯入SQLServer 出錯:資料轉換失敗SQLServer
- IIS 日誌匯入到資料庫的方法資料庫
- 一次資料庫匯入解決方案資料庫
- Linux雲伺服器手動匯入匯出mysql資料庫Linux伺服器MySql資料庫
- MySQL入門--匯出和匯入資料MySql
- MATLAB匯入資料Matlab