You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by gvramana <gi...@git.apache.org> on 2018/02/20 16:37:25 UTC
[GitHub] carbondata pull request #1984: [CARBONDATA-2187] Partition restructure
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1984#discussion_r169380463
--- Diff: core/src/main/java/org/apache/carbondata/core/datamap/Segment.java ---
@@ -0,0 +1,93 @@
+/*
+ * 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.datamap;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Represents one load of carbondata
+ */
+public class Segment implements Serializable {
+
+ private static final long serialVersionUID = 7044555408162234064L;
+
+ private String segmentId;
+
+ private String segmentFileName;
+
+ public Segment(String segmentId, String segmentFileName) {
+ this.segmentId = segmentId;
+ this.segmentFileName = segmentFileName;
+ }
+
+ public String getSegmentId() {
+ return segmentId;
+ }
+
+ public String getSegmentFileName() {
+ return segmentFileName;
+ }
+
+ public static List<Segment> toSegmentList(String[] segmentIds) {
--- End diff --
this segmentId parameter is different from this.segmentId. Parameter can be renamed to segmentFullId with (segementId#SegmentFileName). Or this.segmentId renamed to segmentNo.
---