hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7057) Expose truncate API via FileSystem and shell command
Date Thu, 15 Jan 2015 08:20:34 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278414#comment-14278414

Konstantin Shvachko commented on HDFS-7057:

Milan, the shell command usage looks good to me.
# For FileSystem it is good that you first made truncate() method abstract. That way you know
all the subclasses. But we don't want to implement them all at once, and we do not want to
break third party systems, which may or may not choose to use truncate. So it would be better
to implement truncate inside FileSystem as throwing {{UnsupportedOperationException}} same
as {{concat()}}. This should address Alan's comment.
# I think in this patch we should only provide implementation of truncate for the following
file systems: LocalFileSystem through FilterFileSystem, ViewFileSystem, and HarFileSystem.
Just as you did.
# FileSystem.truncate() should have a comprehensive JavaDoc, explaining parameters and the
return value. I think you can move JavaDoc from DistributedFileSystem to FileSystem and remove
it from DFS.

> Expose truncate API via FileSystem and shell command
> ----------------------------------------------------
>                 Key: HDFS-7057
>                 URL: https://issues.apache.org/jira/browse/HDFS-7057
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>    Affects Versions: 3.0.0
>            Reporter: Konstantin Shvachko
>            Assignee: Milan Desai
>         Attachments: HDFS-7057.patch
> Add truncate operation to FileSystem and expose it to users via shell command.

This message was sent by Atlassian JIRA

View raw message