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`
---