hadoop-yarn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Wittenauer ...@altiscale.com>
Subject Re: fts(3) versus nftw(3) in hadoop-yarn-server container-executor.c
Date Thu, 25 Jun 2015 13:41:11 GMT

On Jun 25, 2015, at 2:30 AM, Alan Burlison <Alan.Burlison@oracle.com> wrote:

> YARN's container-executor.c uses fts(3) to implement the recursive deletion of directories
in delete_path(). However fts(3) isn't available everywhere (e.g. Solaris) as it came originally
from BSD and isn't a POSIX API. There is an equivalent POSIX API, nftw(3) that's more widely
available, including BSD, OSX, Linux and Solaris.
> 
> fts(3) is an iterative API whereas nftw(3) is callback-based but the two APIs provide
broadly equivalent functionality.
> 
> I have a patch that implements delete_path() using either fts(3) as at present, or nftw(3).
I can provide that as-is but I'm wondering if it wouldn't be better to just switch over to
the POSIX nftw(3) API rather than having to do compile-time probing. It would be less code
and in case of changes/bugs in the deletion logic, only one thing to change rather than two.
> 
> Thoughts?

	POSIX > everything else.

	Nuke the old fts code.



Mime
View raw message