You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Sean Bigdatafun <se...@gmail.com> on 2011/03/13 17:52:15 UTC
Will blocks of an unclosed file get lost when HDFS client (or the
HDFS cluster) crashes?
Let's say an HDFS client starts writing a file A (which is 10 blocks
long) and 5 blocks have been writen to datanodes.
At this time, if the HDFS client crashes (apparently without a close
op), will we see 5 valid blocks for file A?
Similary, at this time if the HDFS cluster crashes, will we see 5
valid blocks for file A?
(I guess both answers are yes, but I'd have some confirmation :-)
--
--Sean
Re: HDFS + ZooKeeper
Posted by Mag Gam <ma...@gmail.com>.
Will the avatar node be part of 0.22?
On Sat, Apr 23, 2011 at 6:29 PM, Dhruba Borthakur <dh...@gmail.com> wrote:
> The AvatarNode does use zookeeper (but since this is not directly related to
> Apache HDFS code, if u have more questions, please send it to me directly).
> The latest AvatarNode code is in
> https://github.com/facebook/hadoop-20-append/tree/master/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs
> thanks,
> dhruba
>
> On Sat, Apr 23, 2011 at 11:17 AM, Jason Rutherglen
> <ja...@gmail.com> wrote:
>>
>> This is an interesting question. AvatarNode doesn't use Zookeeper?
>> Is there a drawback to implementing ZK for the NameNode other than the
>> potential bugs from a newly engineered feature?
>>
>> Perhaps this issue is the main one for implementing the NameNode in
>> ZK? HDFS-1623
>>
>> On Fri, Apr 22, 2011 at 10:41 PM, Jean-Daniel Cryans
>> <jd...@apache.org> wrote:
>> > This is a 1M$ question. You could start thinking about this problem by
>> > looking at what "AvatarNode" does:
>> > https://issues.apache.org/jira/browse/HDFS-976
>> >
>> > J-D
>> >
>> > On Fri, Apr 22, 2011 at 10:17 PM, Ozcan ILIKHAN <il...@cs.wisc.edu>
>> > wrote:
>> >> Hi,
>> >> Does anyone have any idea about how we can use HDFS with ZooKeeper?
>> >> More
>> >> elaborately if NameNode fails DataNodes should be able to retrieve
>> >> address
>> >> of new NameNode from ZooKeeper.
>> >>
>> >> Thanks,
>> >> ---------------------------------
>> >> Ozcan ILIKHAN
>> >> PhD Student, Graduate Research Assistant
>> >> Department of Computer Sciences
>> >> University of Wisconsin-Madison
>> >> http://pages.cs.wisc.edu/~ilikhan
>> >>
>> >
>
>
>
> --
> Connect to me at http://www.facebook.com/dhruba
>
Re: HDFS + ZooKeeper
Posted by Dhruba Borthakur <dh...@gmail.com>.
The AvatarNode does use zookeeper (but since this is not directly related to
Apache HDFS code, if u have more questions, please send it to me directly).
The latest AvatarNode code is in
https://github.com/facebook/hadoop-20-append/tree/master/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs
thanks,
dhruba
On Sat, Apr 23, 2011 at 11:17 AM, Jason Rutherglen <
jason.rutherglen@gmail.com> wrote:
> This is an interesting question. AvatarNode doesn't use Zookeeper?
> Is there a drawback to implementing ZK for the NameNode other than the
> potential bugs from a newly engineered feature?
>
> Perhaps this issue is the main one for implementing the NameNode in
> ZK? HDFS-1623
>
> On Fri, Apr 22, 2011 at 10:41 PM, Jean-Daniel Cryans
> <jd...@apache.org> wrote:
> > This is a 1M$ question. You could start thinking about this problem by
> > looking at what "AvatarNode" does:
> > https://issues.apache.org/jira/browse/HDFS-976
> >
> > J-D
> >
> > On Fri, Apr 22, 2011 at 10:17 PM, Ozcan ILIKHAN <il...@cs.wisc.edu>
> wrote:
> >> Hi,
> >> Does anyone have any idea about how we can use HDFS with ZooKeeper? More
> >> elaborately if NameNode fails DataNodes should be able to retrieve
> address
> >> of new NameNode from ZooKeeper.
> >>
> >> Thanks,
> >> ---------------------------------
> >> Ozcan ILIKHAN
> >> PhD Student, Graduate Research Assistant
> >> Department of Computer Sciences
> >> University of Wisconsin-Madison
> >> http://pages.cs.wisc.edu/~ilikhan
> >>
> >
>
--
Connect to me at http://www.facebook.com/dhruba
Re: HDFS + ZooKeeper
Posted by Mahadev Konar <ma...@apache.org>.
Andy/others,
The BookKeeper work hasnt been completed yet. There is ongoing work in
https://issues.apache.org/jira/browse/HDFS-1580
and others.
Hopefully we'll have NN's running on BK soon!
thanks
mahadev
On Sun, Apr 24, 2011 at 10:20 AM, Andrew Purtell <ap...@apache.org> wrote:
>> From: Jason Rutherglen <ja...@gmail.com>
>> Right and AN is not using ZK for the actual NameNode
>> methods/functions, only for the failover election of the 'backup'
>> NameNode?
>
> What do you mean by "actual NameNode methods/functions"? I believe there was an effort during the development of AvatarNode to use BookKeeper (http://zookeeper.apache.org/doc/r3.3.3/bookkeeperOverview.html) to distribute the edit log. Is this what you mean?
>
> That effort ran into various problems but I don't know the detail.
>
> - Andy
>
>
--
thanks
mahadev
@mahadevkonar
Re: HDFS + ZooKeeper
Posted by Andrew Purtell <ap...@apache.org>.
> From: Jason Rutherglen <ja...@gmail.com>
> Right and AN is not using ZK for the actual NameNode
> methods/functions, only for the failover election of the 'backup'
> NameNode?
What do you mean by "actual NameNode methods/functions"? I believe there was an effort during the development of AvatarNode to use BookKeeper (http://zookeeper.apache.org/doc/r3.3.3/bookkeeperOverview.html) to distribute the edit log. Is this what you mean?
That effort ran into various problems but I don't know the detail.
- Andy
Re: HDFS + ZooKeeper
Posted by Jason Rutherglen <ja...@gmail.com>.
Right and AN is not using ZK for the actual NameNode
methods/functions, only for the failover election of the 'backup'
NameNode?
On Sun, Apr 24, 2011 at 4:06 AM, Ozcan ILIKHAN <il...@cs.wisc.edu> wrote:
> I have read Dhruba's blog entry about AvatarNode long ago. If I am not
> wrong initially it was not using ZooKeeper. That is way I raised that
> question. Also, AvatorNode is build on HDFS 0.20 but my intension is to
> utilize BackupNode that comes with HDFS 0.21
>
> Thanks,
> Ozcan.
>
> -----Original Message----- From: Jason Rutherglen
> Sent: Saturday, April 23, 2011 1:17 PM
> To: hdfs-user@hadoop.apache.org
> Subject: Re: HDFS + ZooKeeper
>
> This is an interesting question. AvatarNode doesn't use Zookeeper?
> Is there a drawback to implementing ZK for the NameNode other than the
> potential bugs from a newly engineered feature?
>
> Perhaps this issue is the main one for implementing the NameNode in
> ZK? HDFS-1623
>
> On Fri, Apr 22, 2011 at 10:41 PM, Jean-Daniel Cryans
> <jd...@apache.org> wrote:
>>
>> This is a 1M$ question. You could start thinking about this problem by
>> looking at what "AvatarNode" does:
>> https://issues.apache.org/jira/browse/HDFS-976
>>
>> J-D
>>
>> On Fri, Apr 22, 2011 at 10:17 PM, Ozcan ILIKHAN <il...@cs.wisc.edu>
>> wrote:
>>>
>>> Hi,
>>> Does anyone have any idea about how we can use HDFS with ZooKeeper? More
>>> elaborately if NameNode fails DataNodes should be able to retrieve
>>> address
>>> of new NameNode from ZooKeeper.
>>>
>>> Thanks,
>>> ---------------------------------
>>> Ozcan ILIKHAN
>>> PhD Student, Graduate Research Assistant
>>> Department of Computer Sciences
>>> University of Wisconsin-Madison
>>> http://pages.cs.wisc.edu/~ilikhan
>>>
>>
>
>
Re: HDFS + ZooKeeper
Posted by Ozcan ILIKHAN <il...@cs.wisc.edu>.
I have read Dhruba's blog entry about AvatarNode long ago. If I am not
wrong initially it was not using ZooKeeper. That is way I raised that
question. Also, AvatorNode is build on HDFS 0.20 but my intension is to
utilize BackupNode that comes with HDFS 0.21
Thanks,
Ozcan.
-----Original Message-----
From: Jason Rutherglen
Sent: Saturday, April 23, 2011 1:17 PM
To: hdfs-user@hadoop.apache.org
Subject: Re: HDFS + ZooKeeper
This is an interesting question. AvatarNode doesn't use Zookeeper?
Is there a drawback to implementing ZK for the NameNode other than the
potential bugs from a newly engineered feature?
Perhaps this issue is the main one for implementing the NameNode in
ZK? HDFS-1623
On Fri, Apr 22, 2011 at 10:41 PM, Jean-Daniel Cryans
<jd...@apache.org> wrote:
> This is a 1M$ question. You could start thinking about this problem by
> looking at what "AvatarNode" does:
> https://issues.apache.org/jira/browse/HDFS-976
>
> J-D
>
> On Fri, Apr 22, 2011 at 10:17 PM, Ozcan ILIKHAN <il...@cs.wisc.edu>
> wrote:
>> Hi,
>> Does anyone have any idea about how we can use HDFS with ZooKeeper? More
>> elaborately if NameNode fails DataNodes should be able to retrieve
>> address
>> of new NameNode from ZooKeeper.
>>
>> Thanks,
>> ---------------------------------
>> Ozcan ILIKHAN
>> PhD Student, Graduate Research Assistant
>> Department of Computer Sciences
>> University of Wisconsin-Madison
>> http://pages.cs.wisc.edu/~ilikhan
>>
>
Re: HDFS + ZooKeeper
Posted by Jason Rutherglen <ja...@gmail.com>.
This is an interesting question. AvatarNode doesn't use Zookeeper?
Is there a drawback to implementing ZK for the NameNode other than the
potential bugs from a newly engineered feature?
Perhaps this issue is the main one for implementing the NameNode in
ZK? HDFS-1623
On Fri, Apr 22, 2011 at 10:41 PM, Jean-Daniel Cryans
<jd...@apache.org> wrote:
> This is a 1M$ question. You could start thinking about this problem by
> looking at what "AvatarNode" does:
> https://issues.apache.org/jira/browse/HDFS-976
>
> J-D
>
> On Fri, Apr 22, 2011 at 10:17 PM, Ozcan ILIKHAN <il...@cs.wisc.edu> wrote:
>> Hi,
>> Does anyone have any idea about how we can use HDFS with ZooKeeper? More
>> elaborately if NameNode fails DataNodes should be able to retrieve address
>> of new NameNode from ZooKeeper.
>>
>> Thanks,
>> ---------------------------------
>> Ozcan ILIKHAN
>> PhD Student, Graduate Research Assistant
>> Department of Computer Sciences
>> University of Wisconsin-Madison
>> http://pages.cs.wisc.edu/~ilikhan
>>
>
Re: HDFS + ZooKeeper
Posted by Jean-Daniel Cryans <jd...@apache.org>.
This is a 1M$ question. You could start thinking about this problem by
looking at what "AvatarNode" does:
https://issues.apache.org/jira/browse/HDFS-976
J-D
On Fri, Apr 22, 2011 at 10:17 PM, Ozcan ILIKHAN <il...@cs.wisc.edu> wrote:
> Hi,
> Does anyone have any idea about how we can use HDFS with ZooKeeper? More
> elaborately if NameNode fails DataNodes should be able to retrieve address
> of new NameNode from ZooKeeper.
>
> Thanks,
> ---------------------------------
> Ozcan ILIKHAN
> PhD Student, Graduate Research Assistant
> Department of Computer Sciences
> University of Wisconsin-Madison
> http://pages.cs.wisc.edu/~ilikhan
>
HDFS + ZooKeeper
Posted by Ozcan ILIKHAN <il...@cs.wisc.edu>.
Hi,
Does anyone have any idea about how we can use HDFS with ZooKeeper? More
elaborately if NameNode fails DataNodes should be able to retrieve address
of new NameNode from ZooKeeper.
Thanks,
---------------------------------
Ozcan ILIKHAN
PhD Student, Graduate Research Assistant
Department of Computer Sciences
University of Wisconsin-Madison
http://pages.cs.wisc.edu/~ilikhan
Re: Will blocks of an unclosed file get lost when HDFS client (or the HDFS cluster) crashes?
Posted by Allen Wittenauer <aw...@apache.org>.
No.
If a close hasn't been committed to the file, the associated blocks/files disappear in both client crash and namenode crash scenarios.
On Mar 13, 2011, at 10:09 PM, Sean Bigdatafun wrote:
> I meant an HDFS chunk (the size of 64MB), and I meant the version of
> 0.20.2 without append patch.
>
> I think even without the append patch, the previous 64MB blocks (in my
> example, the first 5 blocks) should be safe. Isn't it?
>
>
> On 3/13/11, Ted Dunning <td...@maprtech.com> wrote:
>> What do you mean by block? An HDFS chunk? Or a flushed write?
>>
>> The answer depends a bit on which version of HDFS / Hadoop you are using.
>> With the append branches, things happen a lot more like what you expect.
>> Without that version, it is difficult to say what will happen.
>>
>> Also, there are very few guarantees about what happens if the namenode
>> crashes. There are some provisions for recovery, but none of them really
>> have any sort of transactional guarantees. This means that there may be
>> some unspecified time before the writes that you have done are actually
>> persisted in a recoverable way.
>>
>> On Sun, Mar 13, 2011 at 9:52 AM, Sean Bigdatafun
>> <se...@gmail.com>wrote:
>>
>>> Let's say an HDFS client starts writing a file A (which is 10 blocks
>>> long) and 5 blocks have been writen to datanodes.
>>>
>>> At this time, if the HDFS client crashes (apparently without a close
>>> op), will we see 5 valid blocks for file A?
>>>
>>> Similary, at this time if the HDFS cluster crashes, will we see 5
>>> valid blocks for file A?
>>>
>>> (I guess both answers are yes, but I'd have some confirmation :-)
>>> --
>>> --Sean
>>>
>>
>
>
> --
> --Sean
Re: Will blocks of an unclosed file get lost when HDFS client (or the
HDFS cluster) crashes?
Posted by Sean Bigdatafun <se...@gmail.com>.
I meant an HDFS chunk (the size of 64MB), and I meant the version of
0.20.2 without append patch.
I think even without the append patch, the previous 64MB blocks (in my
example, the first 5 blocks) should be safe. Isn't it?
On 3/13/11, Ted Dunning <td...@maprtech.com> wrote:
> What do you mean by block? An HDFS chunk? Or a flushed write?
>
> The answer depends a bit on which version of HDFS / Hadoop you are using.
> With the append branches, things happen a lot more like what you expect.
> Without that version, it is difficult to say what will happen.
>
> Also, there are very few guarantees about what happens if the namenode
> crashes. There are some provisions for recovery, but none of them really
> have any sort of transactional guarantees. This means that there may be
> some unspecified time before the writes that you have done are actually
> persisted in a recoverable way.
>
> On Sun, Mar 13, 2011 at 9:52 AM, Sean Bigdatafun
> <se...@gmail.com>wrote:
>
>> Let's say an HDFS client starts writing a file A (which is 10 blocks
>> long) and 5 blocks have been writen to datanodes.
>>
>> At this time, if the HDFS client crashes (apparently without a close
>> op), will we see 5 valid blocks for file A?
>>
>> Similary, at this time if the HDFS cluster crashes, will we see 5
>> valid blocks for file A?
>>
>> (I guess both answers are yes, but I'd have some confirmation :-)
>> --
>> --Sean
>>
>
--
--Sean
Re: Will blocks of an unclosed file get lost when HDFS client (or the
HDFS cluster) crashes?
Posted by Ted Dunning <td...@maprtech.com>.
What do you mean by block? An HDFS chunk? Or a flushed write?
The answer depends a bit on which version of HDFS / Hadoop you are using.
With the append branches, things happen a lot more like what you expect.
Without that version, it is difficult to say what will happen.
Also, there are very few guarantees about what happens if the namenode
crashes. There are some provisions for recovery, but none of them really
have any sort of transactional guarantees. This means that there may be
some unspecified time before the writes that you have done are actually
persisted in a recoverable way.
On Sun, Mar 13, 2011 at 9:52 AM, Sean Bigdatafun
<se...@gmail.com>wrote:
> Let's say an HDFS client starts writing a file A (which is 10 blocks
> long) and 5 blocks have been writen to datanodes.
>
> At this time, if the HDFS client crashes (apparently without a close
> op), will we see 5 valid blocks for file A?
>
> Similary, at this time if the HDFS cluster crashes, will we see 5
> valid blocks for file A?
>
> (I guess both answers are yes, but I'd have some confirmation :-)
> --
> --Sean
>