private List<InputSplit> parseManifest(FileSystem fs,Path manifestPath,JobConf job) throws IOException {
  List<InputSplit> splits=null;
  FSDataInputStream fp=fs.open(manifestPath);
  JsonReader reader=new JsonReader(new InputStreamReader(fp,Charsets.UTF_8));
  reader.beginObject();
  while (reader.hasNext()) {
    String name=reader.nextName();
switch (name) {
case VERSION_JSON_KEY:
      job.set(DynamoDBConstants.EXPORT_FORMAT_VERSION,String.valueOf(reader.nextInt()));
    break;
case ENTRIES_JSON_KEY:
  splits=readEntries(reader,job);
break;
default :
log.info("Skipping a JSON key in the manifest file: " + name);
reader.skipValue();
break;
}
}
reader.endObject();
if (splits == null) {
return Collections.emptyList();
}
return splits;
}

private List < InputSplit > parseManifest ( FileSystem fs , Path manifestPath , JobConf job ) throws IOException { List < InputSplit > splits = null ; FSDataInputStream fp = fs . open ( manifestPath ) ; JsonReader reader = new JsonReader ( new InputStreamReader ( fp , Charsets . UTF_8 ) ) ; reader . beginObject ( ) ; while ( reader . hasNext ( ) ) { String name = reader . nextName ( ) ; switch ( name ) { case VERSION_JSON_KEY : job . set ( DynamoDBConstants . EXPORT_FORMAT_VERSION , String . valueOf ( reader . nextInt ( ) ) ) ; break ; case ENTRIES_JSON_KEY : splits = readEntries ( reader , job ) ; break ; default : log . info ( "Skipping a JSON key in the manifest file: " + name ) ; reader . skipValue ( ) ; break ; } } reader . endObject ( ) ; if ( splits == null ) { return Collections . emptyList ( ) ; } return splits ; }
an example manifest file looks like { " name " : " dynamodb - export " , " version " : 3 , " entries " : [ { " url " : " s3 : / / path / to / object / 92dd1414 - a049 - 4c68 - 88fb - a23acd44907e " , " mandatory " : true } , { " url " : " s3 : / / path / to / object / ba3f3535 - 7aa1 - 4f97 - a530 - e72938bf4b76 " , " mandatory " : true } ] }
