Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A27517851 for ; Thu, 15 Jan 2015 08:20:33 +0000 (UTC) Received: (qmail 82056 invoked by uid 500); 15 Jan 2015 08:20:34 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 82004 invoked by uid 500); 15 Jan 2015 08:20:34 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 81992 invoked by uid 99); 15 Jan 2015 08:20:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2015 08:20:34 +0000 Date: Thu, 15 Jan 2015 08:20:34 +0000 (UTC) From: "Konstantin Shvachko (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-7057) Expose truncate API via FileSystem and shell command MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 (v6.3.4#6332)