private DataFileStream < GenericRecord > getFileReader ( InputStream is , String sourceFileName ) throws StageException { try { DatumReader < GenericRecord > reader = new GenericDatumReader <> ( ) ; DataFileStream < GenericRecord > fileReader = new DataFileStream <> ( is , reader ) ; return fileReader ; } catch ( IOException ex ) { throw new TransformerStageCheckedException ( Errors . CONVERT_11 , sourceFileName , ex ) ; } }
Return the Avro file reader