diff --git a/src/main/java/io/confluent/connect/hdfs/parquet/ParquetRecordWriterProvider.java b/src/main/java/io/confluent/connect/hdfs/parquet/ParquetRecordWriterProvider.java index 23d2a6a12..f45c7bf60 100644 --- a/src/main/java/io/confluent/connect/hdfs/parquet/ParquetRecordWriterProvider.java +++ b/src/main/java/io/confluent/connect/hdfs/parquet/ParquetRecordWriterProvider.java @@ -56,6 +56,9 @@ public RecordWriter getRecordWriter(HdfsSinkConnectorConfig conf, String filenam return new SizeAwareRecordWriter() { @Override public long getDataSize() { + if (writer == null) { + return 0; + } return writer.getDataSize(); }