Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8226C11643 for ; Mon, 2 Jun 2014 08:01:57 +0000 (UTC) Received: (qmail 46765 invoked by uid 500); 2 Jun 2014 08:01:53 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 46624 invoked by uid 500); 2 Jun 2014 08:01:52 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 46617 invoked by uid 99); 2 Jun 2014 08:01:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2014 08:01:52 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ashshabani@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qa0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2014 08:01:48 +0000 Received: by mail-qa0-f48.google.com with SMTP id i13so2223730qae.7 for ; Mon, 02 Jun 2014 01:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZndCG+w0E9fQma86Twc1hGGySzAo6W+GQ0oL0hT9WLQ=; b=hEB2mPMlbCXbTbCpoWyHZT9GaJNS1SSyt+sFDa19W+OZCKfuo04dvL3rAi4MwO8ci8 f+61YPf80xmuH0u9QEYwOVrHAncOHkmzbxY/kAn2FsDIy7S9M6FoOC+VGMLYB0uCVejn iBrDzgdXDPevEe8ercl4JD4SWlLT8oZDJ5DkcspgmmzKSQKXvIwca99D/YL4jIomKTaI NiHSPVoEq9Rkr2fx8lRAG6izWTloVjCKWGFRbZrRdS6vIQF4ZBOFJoMOCb/0ab1OCamF SfN1dWddcnmYAeIWZkkoznSEW7f9OZ0wV1HPPjOy42kFN/tG+FZ9MnUPW2V/zq/Ndwyk 8ERw== MIME-Version: 1.0 X-Received: by 10.224.25.133 with SMTP id z5mr46983494qab.97.1401696084930; Mon, 02 Jun 2014 01:01:24 -0700 (PDT) Received: by 10.224.33.147 with HTTP; Mon, 2 Jun 2014 01:01:24 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 Jun 2014 10:01:24 +0200 Message-ID: Subject: Re: HDFS undo Overwriting From: Amjad ALSHABANI To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7bdc17a439b5dc04fad5cdd4 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc17a439b5dc04fad5cdd4 Content-Type: text/plain; charset=UTF-8 Thanx Zesheng, I should admit that I m not an expert in Hadoop infrastructure, but I have heard my colleagues talking about HDFS replicas? Couldn't that help in retrieving the lost data?? Amjad On Fri, May 30, 2014 at 1:44 PM, Zesheng Wu wrote: > I am afraid this cannot undo, in HDFS only the data which is deleted by > the dfs client and goes into the trash can be undone. > > > 2014-05-30 18:18 GMT+08:00 Amjad ALSHABANI : > > Hello Everybody, >> >> I ve made a mistake when writing to HDFS. I created new database in Hive >> giving the location on HDFS but I found that it removed all other data that >> exist already. >> >> ===== >> before creation, the directory on HDFS contains : >> pns@app11:~$ hadoop fs -ls /user/hive/warehouse >> Found 25 items >> drwxr-xr-x - user1 supergroup 0 2013-11-20 13:40 >> */user/hive/warehouse/*dfy_ans_autres >> drwxr-xr-x - user1 supergroup 0 2013-11-20 13:40 >> /user/hive/warehouse/dfy_ans_maillog >> drwxr-xr-x - user1 supergroup 0 2013-11-20 14:28 >> /user/hive/warehouse/dfy_cnx >> drwxr-xr-x - user2 supergroup 0 2014-05-30 06:05 >> /user/hive/warehouse/pns.db >> drwxr-xr-x - user2 supergroup 0 2014-02-24 17:00 >> /user/hive/warehouse/pns_fr_integ >> drwxr-xr-x - user2 supergroup 0 2014-05-06 15:33 >> /user/hive/warehouse/pns_logstat.db >> ... >> ... >> ... >> >> >> hive -e "CREATE DATABASE my_stats LOCATION 'hdfs://XXXX:9000 >> */user/hive/warehouse/*mystats.db'" >> >> but now I couldn't see the other directories on HDFS: >> >> pns@app11:~/aalshabani$ hls /user/hive/warehouse >> Found 1 items >> drwxr-xr-x - user2 supergroup 0 2014-05-30 11:37 >> */user/hive/warehouse*/mystats.db >> >> >> Is there anyway I could restore the other directories?? >> >> >> Best regards. >> > > > > -- > Best Wishes! > > Yours, Zesheng > --047d7bdc17a439b5dc04fad5cdd4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanx Zesheng,

I should admit that I m = not an expert in Hadoop infrastructure, but I have heard my colleagues talk= ing about HDFS replicas?
Couldn't that help in retrieving the= lost data??

Amjad


On Fri, May 30, 2014 at 1:44 PM, Zesheng Wu <w= uzesheng86@gmail.com> wrote:
I am afraid this cannot und= o, in HDFS only the data which is deleted by the dfs client and goes into t= he trash can be undone.


2014-05-30 18= :18 GMT+08:00 Amjad ALSHABANI <ashshabani@gmail.com>:

Hello Everybody,

I ve m= ade a mistake when writing to HDFS. I created new database in Hive giving t= he location on HDFS but I found that it removed all other data that exist a= lready.

=
=3D=3D=3D=3D=3D<= /div>
before crea= tion, the directory on HDFS contains :
pns@app11:~= $ hadoop fs -ls /user/hive/warehouse
Found 25 items
drw= xr-xr-x =C2=A0 - user1 supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 2013-= 11-20 13:40=C2=A0/user/hive/warehouse/dfy_ans_autres
drwxr-xr-x =C2=A0 - user1 supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A00 2013-11-20 13:40 /user/hive/warehouse/dfy_ans_maillog
drwxr-= xr-x =C2=A0 - user1 supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 2013-11-= 20 14:28 /user/hive/warehouse/dfy_cnx
drwxr-xr-x =C2=A0 - us= er2 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 supergroup =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A00 2014-05-30 06:05 /user/hive/warehouse/pns.db
drwxr-xr-x =C2=A0 - user2 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0supergroup= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 2014-02-24 17:00 /user/hive/warehouse/= pns_fr_integ
drwxr-xr-x =C2=A0 - user2 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 2014-05-06 15:33 /= user/hive/warehouse/pns_logstat.db
...
...
...


hive -e "CREATE DATAB= ASE my_stats LOCATION 'hdfs://XXXX:9000/user/hive/warehouse/myst= ats.db'"

=
but now I couldn= 't see the other directories on HDFS:

p= ns@app11:~/aalshabani$ hls /user/hive/warehouse
Found 1 items
drwxr-xr-x =C2=A0 - user2 supergroup =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A00 2014-05-30 11:37=C2=A0/user/hive/warehouse/mystats.db

=

Is there anyway I coul= d restore the other directories??


Best regards.



--
Best Wishes!

Yours, Z= esheng

--047d7bdc17a439b5dc04fad5cdd4--