> I think you'd need to exec a shell command and parse
the output.
We might need to invoke this for a lot of blocks at run
time.
The use case is that datanode needs to know if a block is
also linked by
a back up (after start-dfs.sh -upgrade).
The current use case is when we want to update block
metadata when
datanode verifies a block (HADOOP-2012). Shell command might
fine for
this. Later this might be used for appends.
Raghu.
Doug Cutting wrote:
> Raghu Angadi wrote:
>> Is there a way to find hard link count for a file
in Java? (id
>> 'st_nlink' in struct stat).
>
> I think you'd need to exec a shell command and parse
the output.
>
> You could add this to FileUtil.java...
>
> Doug
|