carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #1530: [CARBONDATA-1766] fix serialization issue for...
Date Sat, 18 Nov 2017 15:42:19 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1530#discussion_r151840214
  
    --- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/streaming/CarbonStreamRecordWriter.java
---
    @@ -99,13 +100,21 @@
         initialize(job);
       }
     
    +  public CarbonStreamRecordWriter(TaskAttemptContext job, CarbonLoadModel carbonLoadModel)
    +      throws IOException {
    +    this.carbonLoadModel = carbonLoadModel;
    +    initialize(job);
    +  }
    +
       private void initialize(TaskAttemptContext job) throws IOException {
         // set basic information
         hadoopConf = job.getConfiguration();
    -    CarbonLoadModel carbonLoadModel = CarbonStreamOutputFormat.getCarbonLoadModel(hadoopConf);
         if (carbonLoadModel == null) {
    -      throw new IOException(
    -          "CarbonStreamRecordWriter require configuration: mapreduce.output.carbon.load.model");
    +      carbonLoadModel = CarbonStreamOutputFormat.getCarbonLoadModel(hadoopConf);
    +      if (carbonLoadModel == null) {
    +        throw new IOException(
    +            "CarbonStreamRecordWriter require configuration: mapreduce.output.carbon.load.model");
    --- End diff --
    
    This configuration should start with `carbon`, change to `carbon.load.model`


---

Mime
View raw message