You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by qi...@apache.org on 2020/01/09 11:07:37 UTC

[carbondata] branch master updated: [CARBONDATA-3660] Fix FileNotFound error when concurrent loading

This is an automated email from the ASF dual-hosted git repository.

qiangcai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git


The following commit(s) were added to refs/heads/master by this push:
     new 1a03b2d  [CARBONDATA-3660] Fix FileNotFound error when concurrent loading
1a03b2d is described below

commit 1a03b2d521695acba7e003f53ee49055fc131d08
Author: liuzhi <37...@qq.com>
AuthorDate: Thu Jan 9 16:47:48 2020 +0800

    [CARBONDATA-3660] Fix FileNotFound error when concurrent loading
    
    When multiple threads use SDK write data, they will transfer CarbonLoadModel parameter with the same Configuration object,
    the following process may use an CarbonLoadModel which set by other thread,this will lead to a series of problems.
    Different thread use different configuration object.
    
    This closes #3570
---
 .../main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java b/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java
index 8865303..eb47a8d 100644
--- a/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java
+++ b/store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java
@@ -621,7 +621,7 @@ public class CarbonWriterBuilder {
     CarbonProperties.getInstance()
         .addProperty(CarbonCommonConstants.CARBON_WRITTEN_BY_APPNAME, writtenByApp);
     if (hadoopConf == null) {
-      hadoopConf = FileFactory.getConfiguration();
+      hadoopConf = new Configuration(FileFactory.getConfiguration());
     }
     if (this.writerType == WRITER_TYPE.AVRO) {
       // AVRO records are pushed to Carbon as Object not as Strings. This was done in order to