Advertisement
Guest User

Untitled

a guest
Aug 20th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. use testhadoop;
  2.  
  3. CREATE TABLE employee(
  4. empid INT(2),
  5. empname varchar(20),
  6. salray int (6)
  7. );
  8.  
  9. INSERT INTO employee VALUES
  10. (1,'emp1',15000),
  11. (1,'emp1',15000),
  12. (2,'emp2',12200),
  13. (3,'emp3',99999),
  14. (4,'emp4',17687),
  15. (5,'emp5',45788);**strong text**
  16.  
  17. cd $SQOOP_HOME
  18. bin/sqoop import --connect jdbc:mysql://localhost/testhadoop --username root -P --table employee --hbase-table employeeHBase
  19. --column-family info --hbase-row-key empid --hbase-create-table -m 1
  20.  
  21. 13/12/05 17:40:47 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
  22. 13/12/05 17:40:47 ERROR tool.ImportTool: Error during import: HBase jars are not present in classpath, cannot import to HBase!
  23.  
  24. export HBASE_HOME=/usr/lib/hbase
  25. sqoop import ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement