Failing input data staging if the file size is 0
@@ -106,8 +106,8 @@ public class InputDataStagingTask extends DataStagingTask {
File localFile = new File(localSourceFilePath);
if (localFile.exists()) {
if (localFile.length() == 0) {
- logger.warn("Local file " + localSourceFilePath +" size is 0 so ignoring the upload");
- return onSuccess("Input staging has skipped as file size is 0");
+ logger.error("Local file " + localSourceFilePath +" size is 0 so ignoring the upload");
+ return onFail("Input staging has failed as file " + localSourceFilePath + " size is 0", true, null);
}
} else {
throw new TaskOnFailException("Local file does not exist at " + localSourceFilePath, true, null);
