sh cca175-problem-02-sqoop-and-hdfs.sh

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh cca175-problem-02-sqoop-and-hdfs.sh相关的知识,希望对你有一定的参考价值。

// Step 1
sqoop import \
--connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" \
--username retail_dba \
--password cloudera \
--table products \
--as-textfile \
--target-dir /user/cloudera/products \
--fields-terminated-by '|';

// Step 2
hadoop fs -mkdir /user/cloudera/problem2/
hadoop fs -mkdir /user/cloudera/problem2/products
hadoop fs -mv /user/cloudera/products/* /user/cloudera/problem2/products/

// Step 3
//Read is 4, Write is 2 and execute is 1. 
//ReadWrite,Execute = 4 + 2 + 1 = 7
//Read,Write = 4+2 = 6
//Read ,Execute=4+1=5

hadoop fs -chmod 765 /user/cloudera/problem2/products/*

以上是关于sh cca175-problem-02-sqoop-and-hdfs.sh的主要内容,如果未能解决你的问题,请参考以下文章

sh cca175-problem-5-step-7-validation.sh

sh cca175-problem-07-step-01-flume.sh

sh cca175-problem-07-step-02-flume.sh

sh cca175-problem-02-sqoop-and-hdfs.sh

sh cca175-problem-03-import-all-tables.sh

sh cca175-problem-03-create-hive-table.sh