[ 
https://issues.apache.org/jira/browse/HDFS-16781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaoqiao He resolved HDFS-16781.
--------------------------------
    Resolution: Invalid

[~zdltvxq] Thanks for your report. IIRC, setReplication api is kept for long 
time and there is no other interface to recursive setrep (include the latest 
release version). IMO it could prevent from overload of NameNode to process 
many files at one request. Another side, for Shell, it also get all files and 
request setReplication one by one.

BTW, just recommend: a). use English language when file new ticket. b) please 
send mail to u...@hadoop.apache.org or user...@hadoop.apache.org (which is for 
Chinese language) first when meet any issues to reach out. Generally, ticket 
here is about bugfix/feature/improvement for devs.

Thanks again. 

> setReplication方法不能设置整个目录的副本吗?whole folder?
> ------------------------------------------
>
>                 Key: HDFS-16781
>                 URL: https://issues.apache.org/jira/browse/HDFS-16781
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: dfs
>    Affects Versions: 2.6.0
>         Environment: org.apache.hadoop.fs.FileSystem
>            Reporter: zdl
>            Priority: Blocker
>
> org.apache.hadoop.fs.FileSystem里有个setReplication方法可以设置目标文件的副本数,但是只能指定到文件,如果指定目录,就不生效。
> 我希望指定目录时,整个目录下所有文件和子目录下的文件都能设置副本,实际上在命令行中用hadoop fs -setrep /dirs 
> 方法是可以实现这个目标的,为什么在这个java api里面反倒不行?
> 或者是说,这个问题是否已经在某个新版本里解决了?请指点!谢谢。
> I want to set replications for whole folder's files by 
> org.apache.hadoop.fs.FileSystem setReplication function, while now in v2.6.0 
> it can only set to a file.
> Is there any solutions or a later version can solve it ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to