Buggy code:
public class AegisthusInputFormat extends FileInputFormat < AegisthusKey , AtomWritable > { private static final Logger LOG = LoggerFactory . getLogger ( AegisthusInputFormat . class ) ; @ Override public RecordReader < AegisthusKey , AtomWritable > createRecordReader ( InputSplit inputSplit , TaskAttemptContext context ) throws IOException , InterruptedException { } List < InputSplit > getSSTableSplitsForFile ( JobContext job , FileStatus file ) throws IOException { long length = file . getLen ( ) ; if ( length == 0 ) { AegisthusInputFormat . LOG . info ( "skipping<seq2seq4repair_space>zero<seq2seq4repair_space>length<seq2seq4repair_space>file:<seq2seq4repair_space>{}" , file . getPath ( ) ) ; return Collections . emptyList ( ) ; } Path path = file . getPath ( ) ; FileSystem fs = path . getFileSystem ( job . getConfiguration ( ) ) ; BlockLocation [ ] blkLocations = fs . getFileBlockLocations ( file , 0 , length ) ; Path compressionPath = new Path ( path . getParent ( ) , path . getName ( ) . replaceAll ( "-Data.db" , "-CompressionInfo.db" ) ) ; if ( fs . exists ( compressionPath ) ) { <START_BUG> return ImmutableList . of ( ( ( InputSplit ) ( AegCompressedSplit . createAegCompressedSplit ( path , length , length , blkLocations [ ( ( blkLocations . length ) - 1 ) ] . getHosts ( ) , compressionPath ) ) ) ) ; <END_BUG> } long blockSize = file . getBlockSize ( ) ; long maxSplitSize = ( ( long ) ( blockSize * 0.99 ) ) ; long fuzzySplit = ( ( long ) ( blockSize * 1.2 ) ) ; long bytesRemaining = length ; List < InputSplit > splits = Lists . newArrayList ( ) ; IndexDatabaseScanner scanner = null ; if ( fuzzySplit < length ) { Path indexPath = new Path ( path . getParent ( ) , path . getName ( ) . replaceAll ( "-Data.db" , "-Index.db" ) ) ; if ( ! ( fs . exists ( indexPath ) ) ) { fuzzySplit = length ; } else { FSDataInputStream fileIn = fs . open ( indexPath ) ; scanner = new IndexDatabaseScanner ( new BufferedInputStream ( fileIn ) ) ; } } long splitStart = 0 ; while ( ( ( ( splitStart + fuzzySplit ) < length ) && ( scanner != null ) ) && ( scanner . hasNext ( ) ) ) { long splitSize = 0 ; while ( ( splitSize < maxSplitSize ) && ( scanner . hasNext ( ) ) ) { IndexDatabaseScanner . OffsetInfo offsetInfo = scanner . next ( ) ; splitSize = ( offsetInfo . getDataFileOffset ( ) ) - splitStart ; } int blkIndex = getBlockIndex ( blkLocations , ( splitStart + ( splitSize // 2 ) ) ) ; AegisthusInputFormat . LOG . debug ( "split<seq2seq4repair_space>path:<seq2seq4repair_space>{}:{}:{}" , path . getName ( ) , splitStart , splitSize ) ; splits . add ( AegSplit . createSplit ( path , splitStart , splitSize , blkLocations [ blkIndex ] . getHosts ( ) ) ) ; bytesRemaining -= splitSize ; splitStart += splitSize ; } if ( scanner != null ) { scanner . close ( ) ; } if ( bytesRemaining != 0 ) { AegisthusInputFormat . LOG . debug ( "end<seq2seq4repair_space>path:<seq2seq4repair_space>{}:{}:{}" , path . getName ( ) , ( length - bytesRemaining ) , bytesRemaining ) ; splits . add ( AegSplit . createSplit ( path , ( length - bytesRemaining ) , bytesRemaining , blkLocations [ ( ( blkLocations . length ) - 1 ) ] . getHosts ( ) ) ) ; } return splits ; } @ Override public List < InputSplit > getSplits ( JobContext job ) throws IOException { } }

Fix:
return ImmutableList . of ( ( ( InputSplit ) ( AegCompressedSplit . createAegCompressedSplit ( path , 0 , length , blkLocations [ ( ( blkLocations . length ) - 1 ) ] . getHosts ( ) , compressionPath ) ) ) ) ;