sqoop中的--direct模式是什么? [英] What is --direct mode in sqoop?

查看:1361
本文介绍了sqoop中的--direct模式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,sqoop用于将表/数据从数据库导入或导出到HDFS或Hive或HBASE.

As per my understanding sqoop is used to import or export table/data from the Database to HDFS or Hive or HBASE.

我们可以直接导入单个表或表列表.内部mapreduce程序(我认为只有map任务)将运行.

And we can directly import a single table or list of tables. Internally mapreduce program (i think only map task) will run.

我的疑问是什么是sqoop direct,什么时候使用sqoop direct选项?

My doubt is what is sqoop direct and what when to go with sqoop direct option?

推荐答案

只需阅读Sqoop文档!

Just read the Sqoop documentation!

  • 一般原则位于此处用于导入和用于出口
  • General principles are located here for imports and there for exports

某些数据库可以更高性能的方式执行导入 通过使用特定于数据库的数据移动工具(...)


某些数据库为导出(...)

提供了直接模式 有关在每个特定RDBMS上使用直接模式的详细信息,安装要求,可用的选项和限制,请参见第25章.

Some databases can perform imports in a more high-performance fashion by using database-specific data movement tools (...)


Some databases provides a direct mode for exports as well (...)

Details about use of direct mode with each specific RDBMS, installation requirements, available options and limitations can be found in Section 25

  • MySQL
  • 下的第25节
  • 用于Hadoop的Oracle数据连接器中的第25节
    • Section 25 under MySQL
    • Section 25 under Oracle data connector for Hadoop
    • etc.
    • 底线:直接模式"表示不同数据库的不同情况.
      对于MySQL或PostgreSQL,它与批量加载程序/卸载程序实用程序有关(即完全绕过JDBC);而对于Oracle,它与直接路径INSERT"有关,即与JDBC有关,但在非事务模式下(因此,最好使用临时表,否则可能会导致PK和损坏的表中有重复项) .

      Bottom line: "direct mode" means different things for different databases.
      For MySQL or PostgreSQL it relates to bulk loader/unloader utilities (i.e. completetely bypassing JDBC); while for Oracle it relates to "direct path INSERT" i.e. with JDBC but in a non-transactional mode (so you'd better use a temp table, or you might end up with duplicates in a PK and a corrupt table).

      这篇关于sqoop中的--direct模式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆