Hadoop fs -get仅复制特定文件(Hadoop fs -get copy only specific files)
有没有办法只复制特定文件,比如根据文件类型使用fs -get或fs -copyToLocal? 注意:我希望这是递归的并遍历整个集群。
想出来但我不能回答我自己的问题。
这是我们如何做到的。 刚写了一个快速的shell脚本。
mkdir /tmp/txt for F in `hadoop fs -fs hdfs://namenode.mycluster -lsr / | grep '/*.txt$' | awk '{print $NF}'; do hadoop fs -fs hdfs://namenode.mycluster -copyToLocal $F /tmp/las/ done
Is there a way to copy only specific files, say based on file type using fs -get or fs -copyToLocal? Note: I would like this to be recursive and traverse the entire cluster.
Figured it out but I can't answer my own question.
Here's how we did it. Just wrote a quick shell script.
mkdir /tmp/txt for F in `hadoop fs -fs hdfs://namenode.mycluster -lsr / | grep '/*.txt$' | awk '{print $NF}'; do hadoop fs -fs hdfs://namenode.mycluster -copyToLocal $F /tmp/las/ done
原文:https://stackoverflow.com/questions/10686625
最满意答案
尝试从
<li>
删除inline
显示,然后使用float:left
。试一试: http : //jsfiddle.net/RGvjj/1/
#navigation li { font-size: 20px; margin-left: 10px; padding-left: 10px; border-left: 3px solid #1161A5; color: #ffffdd; text-decoration: none; float:left; }
编辑:为了解释,我猜这种情况正在发生,因为当您为元素设置动画时,jQuery会将
display
更改为block
。 所以你最终得到一个内inline
元素(<li>
)中的block
元素(<a>
),它不起作用。通过使用
float:left
,<li>
保留其block
显示,这使得<a>
成为block
有效。Try removing the
inline
display from the<li>
and usefloat:left
instead.Try it out: http://jsfiddle.net/RGvjj/1/
#navigation li { font-size: 20px; margin-left: 10px; padding-left: 10px; border-left: 3px solid #1161A5; color: #ffffdd; text-decoration: none; float:left; }
EDIT: To explain, I'm guessing this is happening because when you animate an element, jQuery changes the
display
toblock
. So you were ending up with ablock
element (the<a>
) inside aninline
element (the<li>
) which doesn't work.By using
float:left
, the<li>
retains itsblock
display, which makes it valid for the<a>
to beblock
.
相关问答
更多-
在容器中插入另一个div并在其上应用jquery代码即
-
那是因为它是jQuery UI包的一部分。 尝试添加此行 That's because it's part of the jQuery UI package. Try adding this line 从你的评论 , 可能错过了检查 From the jsfiddle provided by Spokey works. My conclusion is, you're not including jQuery UI. Try adding it.