You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Sanjay Radia (JIRA)" <ji...@apache.org> on 2013/10/09 20:56:44 UTC
[jira] [Commented] (HADOOP-9631) ViewFs should use underlying
FileSystem's server side defaults
[ https://issues.apache.org/jira/browse/HADOOP-9631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790714#comment-13790714 ]
Sanjay Radia commented on HADOOP-9631:
--------------------------------------
Here are two early comments (haven't finished reviewing the whole patch).
* viewfs#getServerDefaults(path) can be simplified. See how open or list are implemented and it take advantage of the internal class InternalDirOfViewOf.
Something like this should work:
{code}
viewfs#getServerDefaults(f) {
InodeTree.ResolveResult<AbstractFileSystem> res =
fsState.resolve(getUriPath(f), true);
return res.targetFileSystem.getServerDefailts(res.remainingPath);
}
InternalDirOfViewFs#getServerDefaults() {
return LocalConfigKeys.getServerDefaults();
}
InternalDirOfViewFs#getServerDefaults(f) {
checkPathIsSlash(f);
return LocalConfigKeys.getServerDefaults();
}
{code}
* FIleSystem#getServerDefaults(f) is incorrect due to getDefaultReplication(). It should use getDefaultReplciation(f). Hence move the code for FIleSystem#getServerDefaults() to FIleSystem#getServerDefaults(f), changing the getDefaultReplication to pass the pathname f. Have FIleSystem#getServerDefaults() call FIleSystem#getServerDefaults("/");
> ViewFs should use underlying FileSystem's server side defaults
> --------------------------------------------------------------
>
> Key: HADOOP-9631
> URL: https://issues.apache.org/jira/browse/HADOOP-9631
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs, viewfs
> Affects Versions: 2.0.4-alpha
> Reporter: Lohit Vijayarenu
> Attachments: HADOOP-9631.trunk.1.patch, HADOOP-9631.trunk.2.patch, HADOOP-9631.trunk.3.patch, HADOOP-9631.trunk.4.patch, TestFileContext.java
>
>
> On a cluster with ViewFS as default FileSystem, creating files using FileContext will always result with replication factor of 1, instead of underlying filesystem default (like HDFS)
--
This message was sent by Atlassian JIRA
(v6.1#6144)