Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6EA7D200BBD for ; Tue, 8 Nov 2016 11:13:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6B8E2160B0A; Tue, 8 Nov 2016 10:13:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8DC06160AFA for ; Tue, 8 Nov 2016 11:13:46 +0100 (CET) Received: (qmail 40432 invoked by uid 500); 8 Nov 2016 10:13:44 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 40415 invoked by uid 99); 8 Nov 2016 10:13:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2016 10:13:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8BB3CC0C69 for ; Tue, 8 Nov 2016 10:13:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.409 X-Spam-Level: * X-Spam-Status: No, score=1.409 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=ksambaiah.org Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id zENJlEUkZA93 for ; Tue, 8 Nov 2016 10:13:41 +0000 (UTC) Received: from sg2nlsmtp01.shr.prod.sin2.secureserver.net (sg2nlsmtp01.shr.prod.sin2.secureserver.net [182.50.132.200]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A11395F202 for ; Tue, 8 Nov 2016 10:13:40 +0000 (UTC) Received: from sg2plcpnl0023.prod.sin2.secureserver.net ([182.50.132.92]) by : HOSTING RELAY : with SMTP id 43NucC9tc8E4843Nucckab; Tue, 08 Nov 2016 03:12:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ksambaiah.org; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hXOKSIMCvWQjMjpZW/eGrWnEhnWjbwIUPnbtxoLf/M4=; b=HOuNbk6WBNh2sCsCu3/Wm01Qy+ REZf8mXWSTI8UqdwFKfkkA9Pnb2jRv10JW6RF3o5p7Rl7WBJDYEKE136rS0cpSqmWAf6aFzVtc0Qo ILyqKo5ESfcn5kcCb7B/Zd8DBaiIzumRQQQ7Fh+30tPHvR2Kj86Q3WZ9ObR99nNs7VeIrsqB0M7t7 6+XGYwixbyBZzBnoqlL8uMqJE6HVxF3cdvVXksbn83gyUJ0sHhxBJTtlq6Al7gIrE5R37k0tESIPE mOhW+2Lz28CVpRpUA7JhhRbKKsZ89fX1gIaw8qTM+XqYZP2EYAM01Jq6LzoDHplUPtTn/+lMeGzN/ MdALgNFA==; Received: from [103.16.69.252] (port=63364 helo=BANL128a3f394.local) by sg2plcpnl0023.prod.sin2.secureserver.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1c43OK-0033Uf-Em for user@hadoop.apache.org; Tue, 08 Nov 2016 03:12:32 -0700 Subject: Re: [jira] Lantao Jin shared "HDFS-11102: Deleting .Trash without -skipTrash should be confirmed" with you To: user@hadoop.apache.org References: <465228157.20373.1478242078367.JavaMail.jiratomcat@arcas> From: Sambaiah Kilaru Message-ID: <186743fc-4b71-191b-a824-c0f6823271b9@ksambaiah.org> Date: Tue, 8 Nov 2016 15:42:26 +0530 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <465228157.20373.1478242078367.JavaMail.jiratomcat@arcas> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sg2plcpnl0023.prod.sin2.secureserver.net X-AntiAbuse: Original Domain - hadoop.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - ksambaiah.org X-Get-Message-Sender-Via: sg2plcpnl0023.prod.sin2.secureserver.net: authenticated_id: ksambaiah@ksambaiah.org X-Authenticated-Sender: sg2plcpnl0023.prod.sin2.secureserver.net: ksambaiah@ksambaiah.org X-Source: X-Source-Args: X-Source-Dir: X-CMAE-Envelope: MS4wfEpuSS7RukzVH7Ovq/sm5ddIGk8wYkpibTfAIKwFD6mc0Tv5npCcFyo9ZV1xEe9qj2kDDAqYOSaHNeFCH/07kPw66sgHClyIgM6ovRPXSu56B6qsdvBb fap69Nt+vZwbxv7L+54Wco5VK0DHW6klF9u2WjTHTY6WJdhtPJUn2g1muRhWD/Wre+kR2gFKm8lg1tDW3jycKaqw6QivbBh82R0= archived-at: Tue, 08 Nov 2016 10:13:47 -0000 expunge is safe option. I do -rm -r and some times wanted to clean, run expunge command. On 11/4/16 12:17 PM, Lantao Jin (JIRA) wrote: > Lantao Jin shared an issue with you > ----------------------------------- > > > >> Deleting .Trash without -skipTrash should be confirmed >> ------------------------------------------------------ >> >> Key: HDFS-11102 >> URL: https://issues.apache.org/jira/browse/HDFS-11102 >> Project: Hadoop HDFS >> Issue Type: Improvement >> Components: hdfs >> Reporter: Lantao Jin >> >> As a Hadoop DEVOPS, I saw lots of cases that user delete their data by mistake. Most of them can be recovered from trash but the rest ones were not luck. >> A system can’t guess user's purpose,but a good system should help user to avoid their mistakes. >> There is a very common case like: >> If a user want to delete some dir from HDFS, they may use: >> {code} >> hadoop -fs -rm -r /user/someone/pathToBeDelete >> {code} >> The directory /user/someone/pathToBeDelete will move into >> {code} >> /user/someone/.Trash/current/user/someone/pathToBeDelete >> {code} >> If user want delete it permanently, option "-skipTrash" can be attached. That's the design and Hadoop knows the user's purpose well. >> Usually, user didn't use "skipTrash" for safety consideration. That's good till now. >> But the purpose is to delete some data for saving more space. Then the user begin to delete it from Trash with the below command: >> {code} >> hadoop -fs -rm -r /user/someone/ .Trash >> {code} >> Why not just delete "/user/someone/.Trash/current/user/someone/pathToBeDelete" is that because the user knows only pathToBeDelete in trash directory now. >> The trash include pathToBeDelete will be deleted permanently. >> *But Wait! Do you see the blank space before the dot?* >> If you also type this command by "copy-paste" include some space or invisible char, the whole /user/someone directory and the whole /user/someone/.Trash will be deleted unfortunately. *Jesus, that's means the directory /user/someone is deleted permanently and unexpectedly!* >> So I think *any ".Trash" word appears in the "rm" command without "skip" should be launched a double checking by system to help people to avoid their mistake.* >> If you also agree this design, I will offer a patch. > Also shared with > hdfs-issues@hadoop.apache.org > hdfs-dev@hadoop.apache.org > > > > -- > This message was sent by Atlassian JIRA > (v6.3.4#6332) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org > For additional commands, e-mail: user-help@hadoop.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org For additional commands, e-mail: user-help@hadoop.apache.org