Friday, 28 December 2018

SQOOP Eval List Databases and List Tables


[cloudera@quickstart ~]$ sqoop list-databases --connect jdbc:mysql://localhost --username root -password cloudera
information_schema
TRVL_DB
cm
firehose
hue
metastore
mysql
nav
navms
oozie
retail_db
rman
sentry
world


[cloudera@quickstart ~]$ sqoop list-tables --connect jdbc:mysql://localhost/world --username root -password cloudera
City
Country
CountryLanguage


[cloudera@quickstart ~]$ sqoop eval --query "select count(*) from Country" --connect jdbc:mysql://localhost/world --username root -password cloudera
------------------------
| count(*)             |
------------------------
| 239                  |
------------------------

Flume - Simple Demo

// create a folder in hdfs : $ hdfs dfs -mkdir /user/flumeExa // Create a shell script which generates : Hadoop in real world <n>...