Buggy code:
public static boolean isReduceInactive = false ; public static boolean isSpatialJoinOutputRequired = true ; public static boolean isFilterOnly = false ; public static int joiningThresholdPerOnce = 50000 ; public static class IndexedText implements Writable { public byte index ; public Text text ; IndexedText ( ) { } @ Override public void write ( DataOutput out ) throws IOException { } @ Override public void readFields ( DataInput in ) throws IOException { } } public static class SelfSJMRMap extends MapReduceBase implements Mapper < Rectangle , Shape , IntWritable , Shape > { private GridInfo gridInfo ; private IntWritable cellId = new IntWritable ( ) ; @ Override public void map ( Rectangle key , Shape shape , OutputCollector < IntWritable , Shape > output , Reporter reporter ) throws IOException { } } public static class SJMRMap extends MapReduceBase implements Mapper < Rectangle , Text , IntWritable , SJMR . IndexedText > { private Shape shape ; private SJMR . IndexedText outputValue = new SJMR . IndexedText ( ) ; private GridInfo gridInfo ; private IntWritable cellId = new IntWritable ( ) ; private Path [ ] inputFiles ; private InputSplit currentSplit ; @ Override public void configure ( JobConf job ) { } @ Override public void map ( Rectangle cellMbr , Text value , OutputCollector < IntWritable , SJMR . IndexedText > output , Reporter reporter ) throws IOException { } } public static class SelfSJMRReduce < S extends Shape > extends MapReduceBase implements Reducer < IntWritable , S , S , S > { private GridInfo grid ; @ Override public void configure ( JobConf job ) { } @ Override public void reduce ( IntWritable cellId , Iterator < S > values , final OutputCollector < S , S > output , Reporter reporter ) throws IOException { } } public static class SJMRReduce < S extends Shape > extends MapReduceBase implements Reducer < IntWritable , SJMR . IndexedText , S , S > { private static final Log sjmrReduceLOG = LogFactory . getLog ( SJMR . SJMRReduce . class ) ; private int inputFileCount ; private GridInfo grid ; private boolean inactiveMode ; private boolean isFilterOnly ; private int shapesThresholdPerOnce ; private S shape ; @ Override public void configure ( JobConf job ) { } @ Override public void reduce ( IntWritable cellId , Iterator < SJMR . IndexedText > values , final OutputCollector < S , S > output , Reporter reporter ) throws IOException { } } public static < S extends Shape > long sjmr ( Path [ ] inFiles , Path userOutputPath , OperationsParams params ) throws IOException , InterruptedException { } private static void printUsage ( ) { } public static void main ( String [ ] args ) throws IOException , InterruptedException { OperationsParams params = new OperationsParams ( new GenericOptionsParser ( args ) ) ; Path [ ] allFiles = params . getPaths ( ) ; if ( ( allFiles . length ) < 2 ) { System . err . println ( "Input<seq2seq4repair_space>files<seq2seq4repair_space>are<seq2seq4repair_space>missing" ) ; SJMR . printUsage ( ) ; System . exit ( 1 ) ; } if ( ( ( allFiles . length ) == 2 ) && ( ! ( params . checkInput ( ) ) ) ) { SJMR . printUsage ( ) ; System . exit ( 1 ) ; } if ( ( ( allFiles . length ) > 2 ) && ( ! ( params . checkInputOutput ( ) ) ) ) { SJMR . printUsage ( ) ; System . exit ( 1 ) ; } Path [ ] inputFiles = new Path [ ] { allFiles [ 0 ] , allFiles [ 1 ] } ; JobConf conf = new JobConf ( DistributedJoin . class ) ; FileSystem fs = inputFiles [ 0 ] . getFileSystem ( conf ) ; if ( ( ! ( fs . exists ( inputFiles [ 0 ] ) ) ) || ( ! ( fs . exists ( inputFiles [ 1 ] ) ) ) ) { SJMR . printUsage ( ) ; throw new RuntimeException ( "Input<seq2seq4repair_space>file<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ; } <START_BUG> if ( params . get ( "repartition-only" ) . equals ( "yes" ) ) { <END_BUG> System . out . println ( "Repartition-only<seq2seq4repair_space>is<seq2seq4repair_space>true" ) ; SJMR . isReduceInactive = true ; } if ( ( params . get ( "joining-per-once" ) ) != null ) { System . out . println ( ( "joining-per-once<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( params . get ( "joining-per-once" ) ) ) ) ; SJMR . joiningThresholdPerOnce = Integer . parseInt ( params . get ( "joining-per-once" ) ) ; } if ( ( params . get ( "filter-only" ) ) != null ) { System . out . println ( ( "filer-only<seq2seq4repair_space>mode<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( params . get ( "filter-only" ) ) ) ) ; if ( params . get ( "filter-only" ) . equals ( "yes" ) ) { SJMR . isFilterOnly = true ; } else { SJMR . isFilterOnly = false ; } } if ( ( params . get ( "no-output" ) ) != null ) { System . out . println ( ( "no-output<seq2seq4repair_space>mode<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( params . get ( "no-output" ) ) ) ) ; if ( params . get ( "no-output" ) . equals ( "yes" ) ) { SJMR . isSpatialJoinOutputRequired = false ; } else { SJMR . isSpatialJoinOutputRequired = true ; } } Path outputPath = ( ( allFiles . length ) > 2 ) ? allFiles [ 2 ] : null ; long t1 = System . currentTimeMillis ( ) ; long resultSize = SJMR . sjmr ( inputFiles , outputPath , params ) ; long t2 = System . currentTimeMillis ( ) ; System . out . println ( ( ( "Total<seq2seq4repair_space>time:<seq2seq4repair_space>" + ( t2 - t1 ) ) + "<seq2seq4repair_space>millis" ) ) ; System . out . println ( ( "Result<seq2seq4repair_space>size:<seq2seq4repair_space>" + resultSize ) ) ; } }

Fix:
if ( params . get ( "repartition-only" , "no" ) . equals ( "yes" ) ) {