Sqoop Import - Specifying Number of Mappers

#1

Let us understand how to override number of mappers as part of sqoop import command.

  • Default number of mappers is 4.
  • We can increase or decrease based on the table size by using -m or –num-mappers
  • We need to understand the effects of increasing to a very high number. It can impact the database from which we are getting the data.

Here is the example of sqoop import with number of mappers as 8.

sqoop import \
  --connect "jdbc:mysql://ms.itversity.com:3306/retail_db" \
  --username retail_user \
  --password itversity \
  --table order_items \
  --warehouse-dir /user/training/sqoop_import/retail_db \
  --delete-target-dir \
  --num-mappers 8
0 Likes