@@ -49,13 +49,13 @@ public class RestructureAvroRecords {
49
49
50
50
private final RecordConverterFactory converterFactory ;
51
51
52
- private File outputPath = new File ( "." ) ;
53
- private File offsetsPath = new File ( outputPath , OFFSETS_FILE_NAME ) ;
52
+ private File outputPath ;
53
+ private File offsetsPath ;
54
54
private OffsetRangeSet seenFiles ;
55
55
private final Frequency bins = new Frequency ();
56
56
57
57
private final Configuration conf = new Configuration ();
58
- private final DatumReader <GenericRecord > datumReader ;
58
+ private DatumReader <GenericRecord > datumReader ;
59
59
60
60
private int processedFileCount ;
61
61
private int processedRecordsCount ;
@@ -88,7 +88,6 @@ public static void main(String [] args) throws Exception {
88
88
public RestructureAvroRecords (String inputPath , String outputPath ) {
89
89
this .setInputWebHdfsURL (inputPath );
90
90
this .setOutputPath (outputPath );
91
- datumReader = new GenericDatumReader <>();
92
91
93
92
if (System .getProperty ("org.radarcns.format" , "csv" ).equalsIgnoreCase ("json" )) {
94
93
converterFactory = JsonAvroConverter .getFactory ();
@@ -155,6 +154,7 @@ private void processTopic(Path topicPath, RecordConverterFactory converterFactor
155
154
RemoteIterator <LocatedFileStatus > files = fs .listFiles (topicPath , true );
156
155
157
156
String topicName = topicPath .getName ();
157
+ datumReader = new GenericDatumReader <>();
158
158
159
159
try (FileCache cache = new FileCache (converterFactory , 100 )) {
160
160
while (files .hasNext ()) {
0 commit comments