Yes, I believe that was the intent as well. However, it uses implementation
details of the DistributedFileSystem. Using mtime will give about the same
effect and can use the FileSystem interface.


On Tue, Feb 26, 2013 at 10:24 AM, Dave Revell <notifications@github.com>wrote:

> In src/main/java/com/urbanairship/hbackup/datasources/HdfsSource.java:
>
> > @@ -62,12 +58,10 @@ private void addFiles(List<SourceFile> files, Path path, boolean recursive, Stri
> >              } else { // stat isn't a directory, so it's a file
> >                  String filename = stat.getPath().toUri().getPath(); // Looks like /dir/dir/filename
> >                  long fileLength = stat.getLen();
> > -
> > -                LocatedBlocks fileBlocks = dfs.getClient().namenode.getBlockLocations(filename, 0, fileLength);
> > -                if(fileBlocks.isUnderConstruction()) {
>
> Just FYI: if I recall correctly, the original intent of this code was to
> avoid re-uploading the same file repeatedly if it was being appended, which
> might waste bandwidth.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/urbanairship/hbackup/pull/16/files#r3157852>
> .
>