You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kunal642 <gi...@git.apache.org> on 2018/07/11 06:20:13 UTC

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

GitHub user kunal642 opened a pull request:

    https://github.com/apache/carbondata/pull/2484

    [WIP] added hadoop conf to thread local

    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
    
     - [ ] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kunal642/carbondata hadoop_conf_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/2484.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2484
    
----
commit 89ff67e601ea842db2693c269f783d7ddc701c02
Author: kunal642 <ku...@...>
Date:   2018-07-10T06:38:41Z

    added hadoop conf to thread local

----


---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7175/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5801/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7343/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7324/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202585892
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java ---
    @@ -43,11 +45,19 @@
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(FileFactory.class.getName());
    -  private static Configuration configuration = null;
     
    -  static {
    -    configuration = new Configuration();
    +  public static Configuration getConfiguration() {
    --- End diff --
    
    removed config parameters from FileFactory


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6166/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6208/



---

[GitHub] carbondata pull request #2484: [HOTFIX] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r203263435
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonRDD.scala ---
    @@ -79,14 +66,11 @@ abstract class CarbonRDD[T: ClassTag](@transient sc: SparkContext,
       }
     
       def getConf: Configuration = {
    -    val configuration = new Configuration(false)
    -    val bai = new ByteArrayInputStream(CompressorFactory.getInstance().getCompressor
    -      .unCompressByte(confBytes))
    -    val ois = new ObjectInputStream(bai)
    -    configuration.readFields(ois)
    -    ois.close()
    -    configuration
    +    val carbonConfiguration = carbonSessionInfo.getThreadParams.getExtraInfo("carbonConf")
    --- End diff --
    
    done


---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by KanakaKumar <gi...@git.apache.org>.
Github user KanakaKumar commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202580900
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonConfiguration.java ---
    @@ -0,0 +1,73 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.util;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.ByteArrayOutputStream;
    +import java.io.IOException;
    +import java.io.ObjectInputStream;
    +import java.io.ObjectOutputStream;
    +import java.io.Serializable;
    +
    +import org.apache.carbondata.core.datastore.compression.CompressorFactory;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.hadoop.fs.Path;
    +
    +public class CarbonConfiguration implements Serializable {
    +
    +  private static final long serialVersionUID = 3811544264223154007L;
    +  private transient Configuration configuration;
    +  private byte[] confBytes;
    +
    +  public CarbonConfiguration(Configuration configuration) {
    +    ByteArrayOutputStream bao = new ByteArrayOutputStream();
    +    try {
    +      ObjectOutputStream oos = new ObjectOutputStream(bao);
    +      configuration.write(oos);
    +      oos.close();
    +      this.confBytes =
    +          CompressorFactory.getInstance().getCompressor().compressByte(bao.toByteArray());
    +    } catch (IOException e) {
    +      throw new RuntimeException(e);
    +    }
    +  }
    +
    +  public CarbonConfiguration() {
    +    this.configuration = new Configuration();
    +  }
    +
    +  public Configuration getConfiguration() {
    +    if (configuration == null) {
    +      if (confBytes == null) {
    +        throw new RuntimeException("Configuration not specified");
    +      }
    +      configuration = new Configuration(false);
    +      ByteArrayInputStream bias = new ByteArrayInputStream(
    +          CompressorFactory.getInstance().getCompressor().unCompressByte(confBytes));
    +      try {
    +        ObjectInputStream ois = new ObjectInputStream(bias);
    +        configuration.readFields(ois);
    +        ois.close();
    +      } catch (IOException e) {
    +        throw new RuntimeException(e);
    +      }
    +    }
    +    configuration.addResource(new Path("../core-default.xml"));
    --- End diff --
    
    Move add resource from core-site.xml to the line just after new Configuration(); Otherwise it may overwrite the details got from de-serialized bytes


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7276/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7088/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6273/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6144/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6237/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by KanakaKumar <gi...@git.apache.org>.
Github user KanakaKumar commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202581713
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java ---
    @@ -43,11 +45,19 @@
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(FileFactory.class.getName());
    -  private static Configuration configuration = null;
     
    -  static {
    -    configuration = new Configuration();
    +  public static Configuration getConfiguration() {
    --- End diff --
    
    1) Please segregate all cofig handling to CarbonConfiguration. You can add a util function as getConfFromSession
    2) FileFactory.getDataInputStream already accepts the config parameter. I suggest to unify the callers of this method also through CarbonConfiguration 


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7379/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5994/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6045/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5891/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7468/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5813/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7395/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7329/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7210/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6161/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7456/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7460/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6085/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7436/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5873/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7060/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7035/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6033/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202585994
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonConfiguration.java ---
    @@ -0,0 +1,73 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.util;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.ByteArrayOutputStream;
    +import java.io.IOException;
    +import java.io.ObjectInputStream;
    +import java.io.ObjectOutputStream;
    +import java.io.Serializable;
    +
    +import org.apache.carbondata.core.datastore.compression.CompressorFactory;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.hadoop.fs.Path;
    +
    +public class CarbonConfiguration implements Serializable {
    +
    +  private static final long serialVersionUID = 3811544264223154007L;
    +  private transient Configuration configuration;
    +  private byte[] confBytes;
    +
    +  public CarbonConfiguration(Configuration configuration) {
    +    ByteArrayOutputStream bao = new ByteArrayOutputStream();
    +    try {
    +      ObjectOutputStream oos = new ObjectOutputStream(bao);
    +      configuration.write(oos);
    +      oos.close();
    +      this.confBytes =
    +          CompressorFactory.getInstance().getCompressor().compressByte(bao.toByteArray());
    +    } catch (IOException e) {
    +      throw new RuntimeException(e);
    +    }
    +  }
    +
    +  public CarbonConfiguration() {
    +    this.configuration = new Configuration();
    +  }
    +
    +  public Configuration getConfiguration() {
    +    if (configuration == null) {
    +      if (confBytes == null) {
    +        throw new RuntimeException("Configuration not specified");
    +      }
    +      configuration = new Configuration(false);
    +      ByteArrayInputStream bias = new ByteArrayInputStream(
    +          CompressorFactory.getInstance().getCompressor().unCompressByte(confBytes));
    +      try {
    +        ObjectInputStream ois = new ObjectInputStream(bias);
    +        configuration.readFields(ois);
    +        ois.close();
    +      } catch (IOException e) {
    +        throw new RuntimeException(e);
    +      }
    +    }
    +    configuration.addResource(new Path("../core-default.xml"));
    --- End diff --
    
    done


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5910/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7378/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5789/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6107/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5973/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7494/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5968/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5835/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6148/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6140/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7018/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7518/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7012/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7197/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7281/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest sdv please



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7030/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6139/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7287/



---

[GitHub] carbondata pull request #2484: [HOTFIX] added hadoop conf to thread local

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r203057588
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonConfiguration.java ---
    @@ -0,0 +1,74 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.util;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.ByteArrayOutputStream;
    +import java.io.IOException;
    +import java.io.ObjectInputStream;
    +import java.io.ObjectOutputStream;
    +import java.io.Serializable;
    +
    +import org.apache.carbondata.core.datastore.compression.CompressorFactory;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.hadoop.fs.Path;
    +
    +public class CarbonConfiguration implements Serializable {
    +
    +  private static final long serialVersionUID = 3811544264223154007L;
    +  private transient Configuration configuration;
    +  private byte[] confBytes;
    +
    +  public CarbonConfiguration(Configuration configuration) {
    +    ByteArrayOutputStream bao = new ByteArrayOutputStream();
    +    try {
    +      ObjectOutputStream oos = new ObjectOutputStream(bao);
    +      configuration.write(oos);
    +      oos.close();
    +      this.confBytes =
    +          CompressorFactory.getInstance().getCompressor().compressByte(bao.toByteArray());
    +    } catch (IOException e) {
    +      throw new RuntimeException(e);
    +    }
    +  }
    +
    +  public CarbonConfiguration() {
    +    this.configuration = new Configuration();
    +    configuration.addResource(new Path("../core-default.xml"));
    +  }
    +
    +  public Configuration getConfiguration() {
    --- End diff --
    
    Better to have explicit methods to serialize and de-serialize, otherwise every configuration call needs to deserialize, which is not required


---

[GitHub] carbondata pull request #2484: [HOTFIX] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r203071359
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonConfiguration.java ---
    @@ -0,0 +1,74 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.util;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.ByteArrayOutputStream;
    +import java.io.IOException;
    +import java.io.ObjectInputStream;
    +import java.io.ObjectOutputStream;
    +import java.io.Serializable;
    +
    +import org.apache.carbondata.core.datastore.compression.CompressorFactory;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.hadoop.fs.Path;
    +
    +public class CarbonConfiguration implements Serializable {
    +
    +  private static final long serialVersionUID = 3811544264223154007L;
    +  private transient Configuration configuration;
    +  private byte[] confBytes;
    +
    +  public CarbonConfiguration(Configuration configuration) {
    +    ByteArrayOutputStream bao = new ByteArrayOutputStream();
    +    try {
    +      ObjectOutputStream oos = new ObjectOutputStream(bao);
    +      configuration.write(oos);
    +      oos.close();
    +      this.confBytes =
    +          CompressorFactory.getInstance().getCompressor().compressByte(bao.toByteArray());
    +    } catch (IOException e) {
    +      throw new RuntimeException(e);
    +    }
    +  }
    +
    +  public CarbonConfiguration() {
    +    this.configuration = new Configuration();
    +    configuration.addResource(new Path("../core-default.xml"));
    +  }
    +
    +  public Configuration getConfiguration() {
    --- End diff --
    
    Once CarbonConfiguration is set into ThreadLocal only FileFactory and CarbonRDD will try to deserialize the configuration. This will be done once per instance of CarbonConfiguration. If configuration is already deserialized we will return the same object.


---

[GitHub] carbondata pull request #2484: [HOTFIX] added hadoop conf to thread local

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r203050151
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java ---
    @@ -43,11 +45,19 @@
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(FileFactory.class.getName());
    -  private static Configuration configuration = null;
     
    -  static {
    -    configuration = new Configuration();
    -    configuration.addResource(new Path("../core-default.xml"));
    +  public static Configuration getConfiguration() {
    +    Configuration configuration;
    +    if (ThreadLocalSessionInfo.getCarbonSessionInfo() == null) {
    +      configuration = new Configuration();
    +      configuration.addResource(new Path("../core-default.xml"));
    +    } else {
    +      CarbonConfiguration carbonConfiguration =
    +          (CarbonConfiguration) ThreadLocalSessionInfo.getCarbonSessionInfo().getThreadParams()
    --- End diff --
    
    Also handle case carbonConf not present even ThreadLocalSessionInfo is present, required for other than spark cases


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by brijoobopanna <gi...@git.apache.org>.
Github user brijoobopanna commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5954/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5961/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6054/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7480/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r201614265
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonRDD.scala ---
    @@ -46,18 +46,12 @@ abstract class CarbonRDD[T: ClassTag](@transient sc: SparkContext,
           info = new CarbonSessionInfo
           info.setSessionParams(new SessionParams())
         }
    +    info.getThreadParams
    --- End diff --
    
    1. Here configuration should be taken from SparkSession,sessionState
    2. Remove hadoopConf from constructor


---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5764/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6226/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5985/



---

[GitHub] carbondata pull request #2484: [HOTFIX] added hadoop conf to thread local

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r203061344
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonRDD.scala ---
    @@ -79,14 +66,11 @@ abstract class CarbonRDD[T: ClassTag](@transient sc: SparkContext,
       }
     
       def getConf: Configuration = {
    -    val configuration = new Configuration(false)
    -    val bai = new ByteArrayInputStream(CompressorFactory.getInstance().getCompressor
    -      .unCompressByte(confBytes))
    -    val ois = new ObjectInputStream(bai)
    -    configuration.readFields(ois)
    -    ois.close()
    -    configuration
    +    val carbonConfiguration = carbonSessionInfo.getThreadParams.getExtraInfo("carbonConf")
    --- End diff --
    
    Also need to handle InputFormat and OutputFormat cases where configuration is explicitly passed using job interface.


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7265/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 closed the pull request at:

    https://github.com/apache/carbondata/pull/2484


---

[GitHub] carbondata pull request #2484: [HOTFIX] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r203263551
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java ---
    @@ -43,11 +45,19 @@
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(FileFactory.class.getName());
    -  private static Configuration configuration = null;
     
    -  static {
    -    configuration = new Configuration();
    -    configuration.addResource(new Path("../core-default.xml"));
    +  public static Configuration getConfiguration() {
    +    Configuration configuration;
    +    if (ThreadLocalSessionInfo.getCarbonSessionInfo() == null) {
    +      configuration = new Configuration();
    +      configuration.addResource(new Path("../core-default.xml"));
    +    } else {
    +      CarbonConfiguration carbonConfiguration =
    +          (CarbonConfiguration) ThreadLocalSessionInfo.getCarbonSessionInfo().getThreadParams()
    --- End diff --
    
    already handled If carbonConf is not present taking new CarbonConfiguration  as default value


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    retest this please


---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6216/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5794/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6094/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7383/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5951/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7403/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6098/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5863/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7038/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6091/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5835/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7490/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202585871
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/spark/rdd/UpdateCoalescedRDD.scala ---
    @@ -0,0 +1,89 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.rdd
    +
    +import scala.reflect.ClassTag
    +
    +import org.apache.spark._
    +
    +import org.apache.carbondata.spark.rdd.CarbonRDD
    +
    +
    +// This RDD distributes previous RDD data based on number of nodes. i.e., one partition for one node
    +
    +class UpdateCoalescedRDD[T: ClassTag](
    --- End diff --
    
    removed


---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5769/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by KanakaKumar <gi...@git.apache.org>.
Github user KanakaKumar commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202580853
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java ---
    @@ -43,11 +45,19 @@
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(FileFactory.class.getName());
    -  private static Configuration configuration = null;
     
    -  static {
    -    configuration = new Configuration();
    +  public static Configuration getConfiguration() {
    +    Configuration configuration;
    +    if (ThreadLocalSessionInfo.getCarbonSessionInfo() == null) {
    +      configuration = new Configuration();
    +    } else {
    +      CarbonConfiguration carbonConfiguration =
    +          (CarbonConfiguration) ThreadLocalSessionInfo.getCarbonSessionInfo().getThreadParams()
    +              .getExtraInfo("carbonConf", new CarbonConfiguration());
    +      configuration = carbonConfiguration.getConfiguration();
    +    }
         configuration.addResource(new Path("../core-default.xml"));
    --- End diff --
    
    Move add resource from core-site.xml to the line just after new Configuration(); Otherwise it may overwrite the details got from thread.


---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by gvramana <gi...@git.apache.org>.
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r201612604
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala ---
    @@ -262,9 +223,9 @@ class NewCarbonDataLoadRDD[K, V](
     
           def getInputIterators: Array[CarbonIterator[Array[AnyRef]]] = {
             val attemptId = new TaskAttemptID(jobTrackerId, id, TaskType.MAP, theSplit.index, 0)
    -        var configuration: Configuration = getConf
    +        var configuration: Configuration = CarbonRDD.getConf
             if (configuration == null) {
    -          configuration = new Configuration()
    +          configuration = CarbonRDD.getConf
    --- End diff --
    
    it should be new Configuration


---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5836/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6193/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5865/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6248/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7319/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7387/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7333/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/5959/



---

[GitHub] carbondata issue #2484: [HOTFIX] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6048/



---

[GitHub] carbondata issue #2484: [WIP] added hadoop conf to thread local

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/2484
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/5807/



---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by KanakaKumar <gi...@git.apache.org>.
Github user KanakaKumar commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202582047
  
    --- Diff: integration/spark-common/src/main/scala/org/apache/spark/rdd/UpdateCoalescedRDD.scala ---
    @@ -0,0 +1,89 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.rdd
    +
    +import scala.reflect.ClassTag
    +
    +import org.apache.spark._
    +
    +import org.apache.carbondata.spark.rdd.CarbonRDD
    +
    +
    +// This RDD distributes previous RDD data based on number of nodes. i.e., one partition for one node
    +
    +class UpdateCoalescedRDD[T: ClassTag](
    --- End diff --
    
    newly added class required?


---

[GitHub] carbondata pull request #2484: [WIP] added hadoop conf to thread local

Posted by kunal642 <gi...@git.apache.org>.
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2484#discussion_r202586005
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java ---
    @@ -43,11 +45,19 @@
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(FileFactory.class.getName());
    -  private static Configuration configuration = null;
     
    -  static {
    -    configuration = new Configuration();
    +  public static Configuration getConfiguration() {
    +    Configuration configuration;
    +    if (ThreadLocalSessionInfo.getCarbonSessionInfo() == null) {
    +      configuration = new Configuration();
    +    } else {
    +      CarbonConfiguration carbonConfiguration =
    +          (CarbonConfiguration) ThreadLocalSessionInfo.getCarbonSessionInfo().getThreadParams()
    +              .getExtraInfo("carbonConf", new CarbonConfiguration());
    +      configuration = carbonConfiguration.getConfiguration();
    +    }
         configuration.addResource(new Path("../core-default.xml"));
    --- End diff --
    
    done


---