Skip to content

Commit

Permalink
optimize code smell in streaming module (#4327)
Browse files Browse the repository at this point in the history
  • Loading branch information
xubo245 committed Oct 19, 2023
1 parent 448564a commit f18846c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class CarbonStreamOutputFormat extends FileOutputFormat<Void, Object> {

public static final int CARBON_STREAM_CACHE_SIZE_DEFAULT = 32 * 1024 * 1024;

private static final String LOAD_Model = "mapreduce.output.carbon.load.model";
private static final String LOAD_MODEL = "mapreduce.output.carbon.load.model";

private static final String SEGMENT_ID = "carbon.segment.id";

Expand All @@ -62,12 +62,12 @@ public RecordWriter<Void, Object> getRecordWriter(TaskAttemptContext job)
public static void setCarbonLoadModel(Configuration hadoopConf, CarbonLoadModel carbonLoadModel)
throws IOException {
if (carbonLoadModel != null) {
hadoopConf.set(LOAD_Model, ObjectSerializationUtil.convertObjectToString(carbonLoadModel));
hadoopConf.set(LOAD_MODEL, ObjectSerializationUtil.convertObjectToString(carbonLoadModel));
}
}

public static CarbonLoadModel getCarbonLoadModel(Configuration hadoopConf) throws IOException {
String value = hadoopConf.get(LOAD_Model);
String value = hadoopConf.get(LOAD_MODEL);
if (value == null) {
return null;
} else {
Expand Down

0 comments on commit f18846c

Please sign in to comment.