[
https://issues.apache.org/jira/browse/HADOOP-13236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314333#comment-15314333
]
Arpit Agarwal commented on HADOOP-13236:
----------------------------------------
Hi [~brahmareddy], which file/branch is that code snippet from? I see the
following in ViewFs.java in trunk which looks correct.
{code}
@Override
public boolean truncate(final Path f, final long newLength)
throws AccessControlException, FileNotFoundException,
UnresolvedLinkException, IOException {
InodeTree.ResolveResult<AbstractFileSystem> res =
fsState.resolve(getUriPath(f), true);
return res.targetFileSystem.truncate(res.remainingPath, newLength);
}
{code}
> truncate will fail when we use viewFS.
> --------------------------------------
>
> Key: HADOOP-13236
> URL: https://issues.apache.org/jira/browse/HADOOP-13236
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Brahma Reddy Battula
> Assignee: Brahma Reddy Battula
>
> truncate will fail when use viewFS.
> {code}
> @Override
> public boolean truncate(final Path f, final long newLength)
> throws IOException {
> InodeTree.ResolveResult<FileSystem> res =
> fsState.resolve(getUriPath(f), true);
> return res.targetFileSystem.truncate(f, newLength);
> }
> {code}
> *Path should be like below:*
> {{return res.targetFileSystem.truncate(f, newLength);}} *should be*
> {{return res.targetFileSystem.truncate(res.remainingPath, newLength);}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]