Created 09-17-2018 06:29 AM
$ sqoop import \ --connect jdbc:mysql://localhost/userdb \ --username root \ --table emp --m 1
Created 09-17-2018 06:33 AM
-m represents the number of mappers run to extract the data from the source database. Here '-m 1' means running one mapper.
Created 09-17-2018 06:33 AM
-m represents the number of mappers run to extract the data from the source database. Here '-m 1' means running one mapper.
Created 09-17-2018 06:36 AM
@Sindhu If I increase the mappers, will the time consumed be less or How many mappers can we keep in general ??? Thanks!
Created 09-17-2018 10:41 AM
The optimal number of mappers depends on many variables: you need to take into account your database type, the hardware that is used for your database server, and the impact to other requests that your database needs to serve. There is no optimal number of mappers that works for all scenarios. Instead, you’re encouraged to experiment to find the optimal degree of parallelism for your environment and use case. It’s a good idea to start with a small number of mappers, slowly ramping up, rather than to start with a large number of mappers, working your way down.
When you run sqoop import with -m 1 option, 1 mapper will be launched and in case this parameter is specified, sqoop will run 4 mappers by default.
Created 09-17-2018 06:42 AM
-m denotes number of mappers to launch to run your query.
Created 09-17-2018 10:37 AM
@Sudharsan
Ganeshkumar
Yes, you can increase the number of mappers to improve parallelism depending on your cluster resources.
Created 09-17-2018 10:37 AM
@Sudharsan
Ganeshkumar
Yes, you can increase the number of mappers to improve parallelism depending on your cluster resources.