[
https://issues.apache.org/jira/browse/HDFS-16781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
zdl updated HDFS-16781:
-----------------------
Description:
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 ?
was:
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 ?
> 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: [email protected]
For additional commands, e-mail: [email protected]