hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron.Dossett <Aaron.Doss...@target.com>
Subject [HDFS] Programatic way to determine is a file is under construction?
Date Fri, 30 Oct 2015 01:54:14 GMT
Hi,

I'm looking for a programatic way to determine if an HDFS file is open for writing (or under
construction).  `hadoop fsck` has options to show files that are open, but looking through
the HDFS source code none of the methods and classes used to determine if a file is open are
part of the public HDFS interface (for example FSDirectory has method to retrieve an INodeFile
for a given path, which can tell you if a file is under construction - but there is no way
to instantiate an FDDirectory object outside of the HDFS package).

In a perfect world, a public method like FileStatus.isUnderConstruction() would exist... are
there any alternatives?

Thanks in advance for any advice! -Aaron

Mime
View raw message