Home > other >  RDBMS to Hbase
RDBMS to Hbase

Time:09-26

 
[root @ flink102 sqoop - 1.4.6] # bin/sqoop import \
- connect the JDBC: mysql://flink102:3306/company \
- the username root \
- the password 123456 \
- table staff \
- the columns "id, name, sex" \
- the column font-family "info" \
- hbase - create - table \
- hbase - row - key "id" \
- hbase - table "hbase_company \
"> - num - mappers 1 \
- the split - by id



Found an error message said, error tools, import tool: run the import operation encountered IOException: unable to get position

 
20/03/29 22:36:51 INFO client. ZooKeeperRegistry: ClusterId read in ZooKeeper is null
20/03/29 22:37:53 ERROR tool. ImportTool: Encountered IOException running the import job: org.. Apache hadoop, hbase. Client. RetriesExhaustedException: Can 't get the locations
At org, apache hadoop. Hbase. Client. RpcRetryingCallerWithReadReplicas. GetRegionLocations (RpcRetryingCallerWithReadReplicas. Java: 319)
At org, apache hadoop. Hbase. Client. ScannerCallableWithReplicas. Call (156) ScannerCallableWithReplicas. Java:
At org, apache hadoop. Hbase. Client. ScannerCallableWithReplicas. Call (60) ScannerCallableWithReplicas. Java:
At org, apache hadoop. Hbase. Client. RpcRetryingCaller. CallWithoutRetries (RpcRetryingCaller. Java: 212)
At org, apache hadoop. Hbase. Client. ClientScanner. Call (314) ClientScanner. Java:
At org, apache hadoop. Hbase. Client. ClientScanner. NextScanner (ClientScanner. Java: 289)
At org, apache hadoop. Hbase. Client. ClientScanner. InitializeScannerInConstruction (ClientScanner. Java: 164)
At org, apache hadoop. Hbase. Client. ClientScanner. & lt; init> (ClientScanner. Java: 159)
At org, apache hadoop. Hbase. Client. HTable. GetScanner (HTable. Java: 796)
At org, apache hadoop. Hbase. MetaTableAccessor. FullScan (MetaTableAccessor. Java: 602)
At org, apache hadoop. Hbase. MetaTableAccessor. TableExists (MetaTableAccessor. Java: 366)
At org, apache hadoop. Hbase. Client. HBaseAdmin. TableExists (HBaseAdmin. Java: 408)
At org, apache hadoop. Hbase. Client. HBaseAdmin. TableExists (HBaseAdmin. Java: 418)
The at org. Apache. Sqoop. Graphs. HBaseImportJob. JobSetup (HBaseImportJob. Java: 217)
The at org. Apache. Sqoop. Graphs. ImportJobBase. RunImport (ImportJobBase. Java: 264)
The at org. Apache. Sqoop. Manager. SqlManager. ImportTable (SqlManager. Java: 673)
The at org. Apache. Sqoop. Manager. MySQLManager. ImportTable (MySQLManager. Java: 118)
The at org. Apache. Sqoop. Tool. ImportTool. ImportTable (ImportTool. Java: 497)
The at org. Apache. Sqoop. Tool. ImportTool. Run (ImportTool. Java: 605)
The at org. Apache. Sqoop. Sqoop. Run (sqoop. Java: 143)
At org, apache hadoop. Util. ToolRunner. Run (70) ToolRunner. Java:
The at org. Apache. Sqoop. Sqoop. RunSqoop (sqoop. Java: 179)
The at org. Apache. Sqoop. Sqoop. RunTool (sqoop. Java: 218)
The at org. Apache. Sqoop. Sqoop. RunTool (sqoop. Java: 227)
At org. Apache. Sqoop. Sqoop. Main (236) sqoop. Java:




Ask next, guys, how to solve? Thank you very much!

CodePudding user response:

Sqoop import \
- connect the JDBC: mysql://hadoop03:3306/mysql \
- the username root \
- the password 123456 \
- table help_keyword \
- hbase - table test_sqoop \
- the column font-family info \
- hbase - row - key help_keyword_id

CodePudding user response:

Thank you, the problem solved
  • Related