diff --git a/src/main/java/com/hadoop/compression/lzo/DistributedLzoIndexer.java b/src/main/java/com/hadoop/compression/lzo/DistributedLzoIndexer.java index edbde8f4..c360526b 100644 --- a/src/main/java/com/hadoop/compression/lzo/DistributedLzoIndexer.java +++ b/src/main/java/com/hadoop/compression/lzo/DistributedLzoIndexer.java @@ -43,7 +43,7 @@ private void walkPath(Path path, PathFilter pathFilter, List accumulator) for (FileStatus childStatus : children) { walkPath(childStatus.getPath(), pathFilter, accumulator); } - } else if (path.toString().endsWith(LZO_EXTENSION)) { + } else if (path.toString().endsWith(LZO_EXTENSION) && fileStatus.getLen() > fileStatus.getBlockSize()) { Path lzoIndexPath = path.suffix(LzoIndex.LZO_INDEX_SUFFIX); if (fs.exists(lzoIndexPath)) { // If the index exists and is of nonzero size, we're already done.