You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Raghu Angadi <ra...@yahoo-inc.com> on 2007/12/01 01:04:55 UTC

Re: hard link count for a file

I am back to writing this code as part of periodic block verification.

Another approach I am thinking of is to check curFile.lastModified() and 
backupFile.lastModified(). As long as these two are different, we could 
assume they are different files. This is simpler than trying to lock the 
files.

Raghu.

Raghu Angadi wrote:
> 
> Thanks Nigel.
> 
> Another hack I can think of is, if DataNode is not finalized we can try 
> to lock current/subdir.../blk_id and previous/subdir../blk_id. If second 
> lock fails, we can assume they are the same.
> 
> Raghu.
> 
> Nigel Daley wrote:
>> Raghu,
>>
>> LGPL not allowed in distro:
>> http://people.apache.org/~cliffs/3party.html
>>
>> Nige
>>
>> On Nov 6, 2007, at 11:32 PM, Raghu Angadi wrote:
>>
> 


Re: hard link count for a file

Posted by Raghu Angadi <ra...@yahoo-inc.com>.
dhruba Borthakur wrote:
> Hi Raghu,
> 
> Can you pl explain what curFile and backupFile refer to in this context?
> Are you referring to the block data file and the metafile?

backupFile refers to the hard link under "previous" directory (previous 
directory is created during upgrade).
So if dir1/current/subdir41/blk_### is curFile, backupFile would be 
dir1/previous/subdir41/blk_###.

Raghu.

> Thanks,
> dhruba
> 
> -----Original Message-----
> From: Raghu Angadi [mailto:rangadi@yahoo-inc.com] 
> Sent: Friday, November 30, 2007 4:05 PM
> To: hadoop-dev@lucene.apache.org
> Subject: Re: hard link count for a file
> 
> 
> I am back to writing this code as part of periodic block verification.
> 
> Another approach I am thinking of is to check curFile.lastModified() and
> 
> backupFile.lastModified(). As long as these two are different, we could 
> assume they are different files. This is simpler than trying to lock the
> 
> files.
> 
> Raghu.
> 
> Raghu Angadi wrote:
>> Thanks Nigel.
>>
>> Another hack I can think of is, if DataNode is not finalized we can
> try 
>> to lock current/subdir.../blk_id and previous/subdir../blk_id. If
> second 
>> lock fails, we can assume they are the same.
>>
>> Raghu.
>>
>> Nigel Daley wrote:
>>> Raghu,
>>>
>>> LGPL not allowed in distro:
>>> http://people.apache.org/~cliffs/3party.html
>>>
>>> Nige
>>>
>>> On Nov 6, 2007, at 11:32 PM, Raghu Angadi wrote:
>>>
> 


RE: hard link count for a file

Posted by dhruba Borthakur <dh...@yahoo-inc.com>.
Hi Raghu,

Can you pl explain what curFile and backupFile refer to in this context?
Are you referring to the block data file and the metafile?

Thanks,
dhruba

-----Original Message-----
From: Raghu Angadi [mailto:rangadi@yahoo-inc.com] 
Sent: Friday, November 30, 2007 4:05 PM
To: hadoop-dev@lucene.apache.org
Subject: Re: hard link count for a file


I am back to writing this code as part of periodic block verification.

Another approach I am thinking of is to check curFile.lastModified() and

backupFile.lastModified(). As long as these two are different, we could 
assume they are different files. This is simpler than trying to lock the

files.

Raghu.

Raghu Angadi wrote:
> 
> Thanks Nigel.
> 
> Another hack I can think of is, if DataNode is not finalized we can
try 
> to lock current/subdir.../blk_id and previous/subdir../blk_id. If
second 
> lock fails, we can assume they are the same.
> 
> Raghu.
> 
> Nigel Daley wrote:
>> Raghu,
>>
>> LGPL not allowed in distro:
>> http://people.apache.org/~cliffs/3party.html
>>
>> Nige
>>
>> On Nov 6, 2007, at 11:32 PM, Raghu Angadi wrote:
>>
>