Sqoop num-mapper not working


#1

I’ve provided two sqoop command,

while the first sqoop command produced 3 hdfs file , the second one produced only one file. why is that so?.. ,

the difference between them is only in where condition in --boundary-query argument.

sqoop import
–connect ‘jdbc:mysql://nn01.itversity.com:3306/retail_db’
–username retail_dba
–password itversity
–table products
–fields-terminated-by ‘|’
–null-non-string -1
–null-string ‘NOT-AVAILABLE’
–where ‘product_id <0 and product_id>1001’
–boundary-query ‘select min(product_id) ,max(product_id) from products where product_id between 1 and 1000’
–num-mappers 3
–target-dir ‘/user/hariharanp1094/problem5/products-text’
–delete-target-dir
–as-textfile

sqoop import
–connect ‘jdbc:mysql://nn01.itversity.com:3306/retail_db’
–username retail_dba
–password itversity
–table products
–fields-terminated-by ‘|’
–null-non-string -1
–null-string ‘NOT-AVAILABLE’
–where ‘product_id <0 and product_id>1001’
–boundary-query ‘select min(product_id) ,max(product_id) from products where product_id<0 and product_id>1001’
–num-mappers 3
–target-dir ‘/user/hariharanp1094/problem5/products-text’
–delete-target-dir
–as-textfile