You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ak...@apache.org on 2019/12/19 05:44:32 UTC
[carbondata] branch master updated: [HOTFIX] Solve GSON jar
dependency conflict with Hadoop
This is an automated email from the ASF dual-hosted git repository.
akashrn5 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 730d25b [HOTFIX] Solve GSON jar dependency conflict with Hadoop
730d25b is described below
commit 730d25b83de861c6d709c80aa668929983625dcd
Author: Jacky Li <ja...@qq.com>
AuthorDate: Wed Dec 18 22:23:50 2019 +0800
[HOTFIX] Solve GSON jar dependency conflict with Hadoop
Why this PR?
Hadoop common uses gson 2.2.4 and carbondata uses 2.4, because of this, @alternate annotation sometimes
doesn't work if the 2.2.4 gets loaded first. Reverting the @alternate annotation.
This closes #3508
---
.../core/statusmanager/LoadMetadataDetails.java | 18 ------------------
.../carbondata/core/statusmanager/SegmentStatus.java | 4 ++--
2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java b/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
index c04f219..1b9a20c 100644
--- a/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
+++ b/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
@@ -25,7 +25,6 @@ import java.util.Date;
import org.apache.carbondata.common.logging.LogServiceFactory;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import com.google.gson.annotations.SerializedName;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
@@ -63,82 +62,65 @@ public class LoadMetadataDetails implements Serializable {
private static final SimpleDateFormat parser =
new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP_MILLIS);
- @SerializedName(value = "ts", alternate = "timestamp")
private String timestamp;
// For backward compatibility, this member is required to read from JSON in the table_status file
- @SerializedName(value = "ls", alternate = "loadStatus")
private SegmentStatus loadStatus;
// name of the segment
- @SerializedName(value = "ln", alternate = "loadName")
private String loadName;
- @SerializedName(value = "ds", alternate = "dataSize")
private String dataSize;
- @SerializedName(value = "is", alternate = "indexSize")
private String indexSize;
// update delta end timestamp
- @SerializedName(value = "ue", alternate = "updateDeltaEndTimestamp")
private String updateDeltaEndTimestamp;
// update delta start timestamp
- @SerializedName(value = "us", alternate = "updateDeltaStartTimestamp")
private String updateDeltaStartTimestamp;
// this will represent the update status file name at that point of time.
- @SerializedName(value = "uf", alternate = "updateStatusFileName")
private String updateStatusFileName;
/**
* Segment modification or deletion time stamp
*/
- @SerializedName(value = "mt", alternate = "modificationOrdeletionTimesStamp")
private String modificationOrdeletionTimesStamp;
- @SerializedName(value = "lt", alternate = "loadStartTime")
private String loadStartTime;
- @SerializedName(value = "mn", alternate = "mergedLoadName")
private String mergedLoadName;
/**
* visibility is used to determine whether to the load is visible or not.
* by default it is true
*/
- @SerializedName(value = "v", alternate = "visibility")
private String visibility;
/**
* To know if the segment is a major compacted segment or not.
*/
- @SerializedName(value = "mc", alternate = "majorCompacted")
private String majorCompacted;
/**
* the file format of this segment, by default it is FileFormat.COLUMNAR_V3
*/
- @SerializedName(value = "ff", alternate = "fileFormat")
private String fileFormat;
/**
* Segment path if the segment is added externally.
*/
- @SerializedName(value = "p", alternate = "path")
private String path;
/**
* Segment file name where it has the information of partition information.
*/
- @SerializedName(value = "sf", alternate = "segmentFile")
private String segmentFile;
/**
* extraInfo will contain segment mapping Information for datamap table
*/
- @SerializedName(value = "ei", alternate = "extraInfo")
private String extraInfo;
public String getDataSize() {
diff --git a/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatus.java b/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatus.java
index eb6a368..3b62ec9 100644
--- a/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatus.java
+++ b/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatus.java
@@ -28,7 +28,7 @@ public enum SegmentStatus {
/**
* Data load success, it is visible for read
*/
- @SerializedName(value = "S", alternate = "Success")
+ @SerializedName("Success")
SUCCESS("Success"),
/**
@@ -58,7 +58,7 @@ public enum SegmentStatus {
/**
* Segment is compacted
*/
- @SerializedName(value = "C", alternate = "Compacted")
+ @SerializedName("Compacted")
COMPACTED("Compacted"),
/**