Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2752#discussion_r219894302
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java
---
@@ -266,16 +268,18 @@ private void notifyDataMapBlockEnd() {
* Finish writing current file. It will flush stream, copy and rename
temp file to final file
* @param copyInCurrentThread set to false if want to do data copy in a
new thread
*/
- protected void commitCurrentFile(boolean copyInCurrentThread) {
+ protected void commitCurrentFile(boolean copyInCurrentThread) throws
IOException {
notifyDataMapBlockEnd();
CarbonUtil.closeStreams(this.fileOutputStream, this.fileChannel);
- if (!enableDirectlyWriteData2Hdfs) {
- if (copyInCurrentThread) {
-
CarbonUtil.copyCarbonDataFileToCarbonStorePath(carbonDataFileTempPath,
- model.getCarbonDataDirectoryPath(), fileSizeInBytes);
- } else {
- executorServiceSubmitList.add(executorService.submit(
- new CompleteHdfsBackendThread(carbonDataFileTempPath)));
+ if (null != carbonDataFileTempPath &&
FileFactory.isFileExist(carbonDataFileTempPath)) {
--- End diff --
Why do we need this judgement? In what circumstance will the temp file do
not exist?
---