Sqoop вопросы и ответы для интервью
Вопрос 26. Explain the purpose of the --direct-split-size option in Sqoop.
The --direct-split-size option is used to specify the number of bytes per split when using direct mode for imports and exports.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --direct --direct-split-size 1000000
Вопрос 27. How can you perform an export operation in Sqoop to update existing records?
To update existing records during export in Sqoop, you can use the --update-key option along with --update-mode option set to allowinsert.
Example:
sqoop export --connect jdbc:mysql://localhost:3306/db --table mytable --update-key id --update-mode allowinsert --export-dir /user/hadoop/mytable
Вопрос 28. Explain the purpose of the --hcatalog-database option in Sqoop.
The --hcatalog-database option specifies the HCatalog database name when importing data into HCatalog.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --hcatalog-import --hcatalog-database mydatabase
Вопрос 29. What is the purpose of the --direct-split-size option in Sqoop?
The --direct-split-size option is used to specify the number of bytes per split when using direct mode for imports and exports.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --direct --direct-split-size 1000000
Вопрос 30. Explain the purpose of the --autoreset-to-one-mapper option in Sqoop.
The --autoreset-to-one-mapper option automatically resets the number of mappers to one if the initial split size is larger than the total number of rows in the table.
Example:
sqoop import --connect jdbc:mysql://localhost:3306/db --table mytable --autoreset-to-one-mapper
Самое полезное по оценкам пользователей: