prasadkarkera commented on code in PR #3818:
URL: https://github.com/apache/gobblin/pull/3818#discussion_r1380656778
##########
gobblin-modules/gobblin-orc/src/main/java/org/apache/gobblin/writer/GobblinBaseOrcWriter.java:
##########
@@ -258,7 +261,18 @@ public void close()
public void commit()
throws IOException {
closeInternal();
+ if(this.validateORCDuringCommit) {
+ try {
+ OrcFile.createReader(this.stagingFile, new
OrcFile.ReaderOptions(conf));
+ } catch (Exception e) {
+ log.error("Found error when validating ORC file during commit phase",
e);
+ HadoopUtils.deletePath(this.fs, this.stagingFile, false);
+ log.error("Delete the malformed ORC file after close the writer: {}",
this.stagingFile);
Review Comment:
if thats the case you can modify the error message to be like at line 269.
"Found error when validating ORC file during commit phase. Deleting the
malformed ORC file and closing the writer."
The tense of the statement is important in logs to understand whats being
done and what is already done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]