- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
当我在配置单元中运行 INSERT OVERWRITE DIRECTORY
查询时,它似乎将结果存储在 .hivexxxx
暂存文件夹中,然后将文件从那里移动到该目录...
在 map reduce 过程结束时,显示如下:
Moving data to: hdfs://nameservice1/user/events/Click2/.hive-staging_hive_2015-11-21_08-32-49_909_6034680686432863037-1/-ext-10000
Moving data to: /user/events/Click2
这个移动过程运行得非常慢而且似乎没有使用distcp
有没有办法设置
配置单元在那个过程中使用distcp,或者有没有办法设置
它不把数据放到那个staging foler?我看不出那个暂存文件夹有什么意义...
最佳答案
除非您正在使用 HDFS 联合,并且您已将配置单元配置为将作业的 .staging* 目录放在与目标目录不同的 FS/命名空间上,(这在默认设置下不太可能发生)您可能不希望 hive 执行 distcp。问题是 hive 现在正在做的是它正在将所有输出文件从 .staging 目录复制到最终目标目录,并且使用 distcp 将做同样的事情 - 复制 - 加上开销为每个文件 生成整个 mapreduce 作业(这是我在 Hive 1.1 中看到的行为),因此性能可能会很多。唯一可能的异常(exception)是如果您的输出文件非常大...
但如果没有必要,为什么要复制呢?这意味着读取和重写所有文件。 HDFS 移动/重命名只是更改文件的元数据并且几乎是即时的。
要获得该行为,我建议将以下(不幸的是未记录)属性添加到您的 hive-site.xml -
<property>
<name>hive.exec.stagingdir</name>
<value>${hive.exec.scratchdir}/${user.name}/.staging</value>
<description>
In Hive >= 0.14, set to ${hive.exec.scratchdir}/${user.name}/.staging
In Hive < 0.14, set to ${hive.exec.scratchdir}/.staging
You may need to manually create and/or set appropriate permissions on
the parent dirs ahead of time.
</description>
</property>
如果${hive.exec.scratchdir}
不会在您的 Hive 版本中自动替换,只需查找它的值并在上面的值中手动替换它。例如,默认值为 hive.exec.scratchdir
在 Hive > 0.14
,您可以将此值设置为 /tmp/hive/${user.name}/.staging
在Hive < 0.14
, 设置为 /tmp/hive-${user.name}/.staging
(您不必使用 ${user.name}
执行此操作,并且出于与此答案无关的原因,这样做不是一个好主意)
关于hadoop - 配置单元覆盖目录移动过程作为 distcp?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33844381/
我正在尝试使用 distcp 在两个 hadoop 集群之间移动数据。大量的小文件需要移动大量的数据。为了让它更快,我尝试使用 -strategy dynamic,根据文档,它“允许更快的数据节点比更
有什么区别 hadoop distcp 和 hadoop distcp -update 他们都做同样的工作,只是我们称呼他们的方式略有不同。它们都不会覆盖目标中已经存在的文件。那么两组不同的命令有什么
我只需要 distcp x 个文件。 找不到解决方法。 一个想法是将它复制到一个临时目录,然后distcp 该目录。完成后,我可以删除该临时目录。 单独的 distcp 命令(针对每个文件)。这可能会
作为一些背景,我们有 2 个集群,目前用于生产和开发。作为其中的一部分,我们正在将文件(使用 hadoop distcp -update)从生产集群复制到开发集群,这些文件是由实时进程生成的(即它也有
我想使用distcp将文件列表(> 1K文件)复制到hdfs中。我已经将文件列表存储在本地目录中,现在可以使用-f复制所有文件吗?如果是,我必须在文件列表文件中保留什么格式?还是还有其他更好的方法?
我正在尝试将数据从一个 HDFS 复制到另一个 HDFS。有什么建议为什么第一个有效但第二个无效? (作品) hadoop distcp hdfs://abc.net:8020/foo/bar web
我正在尝试从一个系统到另一个具有相同配置的系统(比如 A 到 B)执行 distcp。但是我在 A 中创建的分区在从 A 到 B 的 distcp 后没有显示在 B 中。我必须在 B 中手动创建分区。
我们正在使用 dictcp 将数据从 CDH4 复制到 CDH5。当我们在 CDH5 目标名称节点上运行命令时,我们得到以下异常。如果您已经遇到问题并知道解决方案,请告诉我。谢谢。 5/01/05 1
我正在尝试在两个启用 kerberos 的 hadoop 集群(版本 - Hadoop 2.0.0-cdh4.3.0)之间建立 Hadoop Distcp 当我在目标集群中使用命令“hadoop di
我在两个不同的 hadoop 集群之间执行 distcp 命令时遇到问题, Caused by: java.io.IOException: Mismatch in length of source:h
当我在配置单元中运行 INSERT OVERWRITE DIRECTORY 查询时,它似乎将结果存储在 .hivexxxx 暂存文件夹中,然后将文件从那里移动到该目录... 在 map reduce
我在集群 A 中有一个目录:/a/b/c。该目录包含目录“一”、“二”、“三”、...、“九十”。在集群 B 中,我有目录/a/b/c。该目录包含目录“一”。我想将目录“一”到“九十”从集群 A 复制
几天来我一直在与 distcp 作斗争,我发誓我已经用 google 搜索了足够多的东西。这是我的用例: 用例 我在某个位置有一个主文件夹,比如 /hdfs/root,里面有很多子目录(深度不固定)和
有什么方法可以运行 DistCp,但可以选择在文件名冲突时重命名?也许用一个例子来解释是最容易的。 假设我正在将 hdfs:///foo 复制到 hdfs:///bar,foo 包含这些文件: hdf
是否可以使用 DistCp 仅复制与特定模式匹配的文件?例如。对于/foo 我只想要 *.log 文件。 最佳答案 我意识到这是一个旧线程。但我自己对这个问题的答案很感兴趣——dk89 也在 2013
我正在使用hadoop distcp -update将目录从一个HDFS集群复制到另一个集群。 有时(经常),我得到这种异常: 13/07/03 00:20:03 INFO tools.DistCp:
我试图复制400+ GB的数据和35.6 GB的数据量,这又是一个distcp作业,但是两者都花了将近2 -3个小时来完成。 集群中确实有足够的资源。 但是,当我检查了容器日志后,发现复制小文件花费了
如何列出事件的 DISTCP 作业? 我正在两个集群之间运行一个 distcp 作业。hadoop distcp hdfs://x/y/x/y 我想持续运行它,但需要确保现有的 distcp 任务已完
我正在尝试将所有符合特定条件的文件复制到一个文件夹中 ${NAME_NODE}${PATH_COMVERSE}${CURRENT_DATE_NO_DASH}_*/*mta.
我正在运行 hadoop distcp 将整个目录 (500GB+) 从 /path/to/source 复制到 /path/to/destination。但是,不是运行 $ hadoop distc
我是一名优秀的程序员,十分优秀!