carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [41/57] [abbrv] incubator-carbondata git commit: move load
Date Sat, 14 Jan 2017 07:57:50 GMT
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/processor/BlocksChunkHolder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/processor/BlocksChunkHolder.java b/core/src/main/java/org/apache/carbondata/core/scan/processor/BlocksChunkHolder.java
index 81628b3..788488a 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/processor/BlocksChunkHolder.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/processor/BlocksChunkHolder.java
@@ -18,10 +18,10 @@
  */
 package org.apache.carbondata.core.scan.processor;
 
+import org.apache.carbondata.core.datastorage.FileHolder;
 import org.apache.carbondata.core.datastore.DataRefNode;
 import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
 import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
-import org.apache.carbondata.core.datastorage.FileHolder;
 
 /**
  * Block chunk holder which will hold the dimension and

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/processor/impl/DataBlockIteratorImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/processor/impl/DataBlockIteratorImpl.java b/core/src/main/java/org/apache/carbondata/core/scan/processor/impl/DataBlockIteratorImpl.java
index 4de9685..6df1b98 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/processor/impl/DataBlockIteratorImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/processor/impl/DataBlockIteratorImpl.java
@@ -21,11 +21,11 @@ package org.apache.carbondata.core.scan.processor.impl;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.carbondata.core.stats.QueryStatisticsModel;
 import org.apache.carbondata.core.datastorage.FileHolder;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator;
 import org.apache.carbondata.core.scan.result.vector.CarbonColumnarBatch;
+import org.apache.carbondata.core.stats.QueryStatisticsModel;
 
 /**
  * Below class will be used to process the block for detail query

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/result/AbstractScannedResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/result/AbstractScannedResult.java b/core/src/main/java/org/apache/carbondata/core/scan/result/AbstractScannedResult.java
index 82649b4..cbe9e5f 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/result/AbstractScannedResult.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/result/AbstractScannedResult.java
@@ -25,18 +25,18 @@ import java.math.BigDecimal;
 import java.nio.ByteBuffer;
 import java.util.Map;
 
-import org.apache.carbondata.core.update.data.BlockletLevelDeleteDeltaDataCache;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
 import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
 import org.apache.carbondata.core.path.CarbonTablePath;
-import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.executor.infos.KeyStructureInfo;
 import org.apache.carbondata.core.scan.filter.GenericQueryType;
 import org.apache.carbondata.core.scan.result.vector.CarbonColumnVector;
 import org.apache.carbondata.core.scan.result.vector.ColumnVectorInfo;
+import org.apache.carbondata.core.update.data.BlockletLevelDeleteDeltaDataCache;
+import org.apache.carbondata.core.util.CarbonUtil;
 
 /**
  * Scanned result class which will store and provide the result on request

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/AbstractDetailQueryResultIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/AbstractDetailQueryResultIterator.java b/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/AbstractDetailQueryResultIterator.java
index 88c0144..69bd273 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/AbstractDetailQueryResultIterator.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/result/iterator/AbstractDetailQueryResultIterator.java
@@ -24,22 +24,22 @@ import java.util.concurrent.ExecutorService;
 import org.apache.carbondata.common.CarbonIterator;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.DataRefNode;
-import org.apache.carbondata.core.datastore.DataRefNodeFinder;
-import org.apache.carbondata.core.datastore.impl.btree.BTreeDataRefNodeFinder;
-import org.apache.carbondata.core.stats.QueryStatistic;
-import org.apache.carbondata.core.stats.QueryStatisticsConstants;
-import org.apache.carbondata.core.stats.QueryStatisticsModel;
-import org.apache.carbondata.core.stats.QueryStatisticsRecorder;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.FileHolder;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.util.CarbonProperties;
+import org.apache.carbondata.core.datastore.DataRefNode;
+import org.apache.carbondata.core.datastore.DataRefNodeFinder;
+import org.apache.carbondata.core.datastore.impl.btree.BTreeDataRefNodeFinder;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.model.QueryModel;
 import org.apache.carbondata.core.scan.processor.AbstractDataBlockIterator;
 import org.apache.carbondata.core.scan.processor.impl.DataBlockIteratorImpl;
 import org.apache.carbondata.core.scan.result.vector.CarbonColumnarBatch;
+import org.apache.carbondata.core.stats.QueryStatistic;
+import org.apache.carbondata.core.stats.QueryStatisticsConstants;
+import org.apache.carbondata.core.stats.QueryStatisticsModel;
+import org.apache.carbondata.core.stats.QueryStatisticsRecorder;
+import org.apache.carbondata.core.util.CarbonProperties;
 
 /**
  * In case of detail query we cannot keep all the records in memory so for

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/scanner/AbstractBlockletScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/scanner/AbstractBlockletScanner.java b/core/src/main/java/org/apache/carbondata/core/scan/scanner/AbstractBlockletScanner.java
index 32b3ac2..2f62523 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/scanner/AbstractBlockletScanner.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/scanner/AbstractBlockletScanner.java
@@ -20,16 +20,16 @@ package org.apache.carbondata.core.scan.scanner;
 
 import java.io.IOException;
 
-import org.apache.carbondata.core.update.data.BlockletDeleteDeltaCacheLoader;
-import org.apache.carbondata.core.update.data.DeleteDeltaCacheLoaderIntf;
-import org.apache.carbondata.core.stats.QueryStatistic;
-import org.apache.carbondata.core.stats.QueryStatisticsConstants;
-import org.apache.carbondata.core.stats.QueryStatisticsModel;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.expression.exception.FilterUnsupportedException;
 import org.apache.carbondata.core.scan.processor.BlocksChunkHolder;
 import org.apache.carbondata.core.scan.result.AbstractScannedResult;
+import org.apache.carbondata.core.stats.QueryStatistic;
+import org.apache.carbondata.core.stats.QueryStatisticsConstants;
+import org.apache.carbondata.core.stats.QueryStatisticsModel;
+import org.apache.carbondata.core.update.data.BlockletDeleteDeltaCacheLoader;
+import org.apache.carbondata.core.update.data.DeleteDeltaCacheLoaderIntf;
 
 /**
  * Blocklet scanner class to process the block

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/FilterScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/FilterScanner.java b/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/FilterScanner.java
index 48c9af2..3d17985 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/FilterScanner.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/FilterScanner.java
@@ -22,17 +22,10 @@ package org.apache.carbondata.core.scan.scanner.impl;
 import java.io.IOException;
 import java.util.BitSet;
 
-import org.apache.carbondata.core.update.data.BlockletDeleteDeltaCacheLoader;
-import org.apache.carbondata.core.update.data.DeleteDeltaCacheLoaderIntf;
-import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
-import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
-import org.apache.carbondata.core.stats.QueryStatistic;
-import org.apache.carbondata.core.stats.QueryStatisticsConstants;
-import org.apache.carbondata.core.stats.QueryStatisticsModel;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.FileHolder;
-import org.apache.carbondata.core.util.CarbonProperties;
-import org.apache.carbondata.core.util.CarbonUtil;
+import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
+import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.expression.exception.FilterUnsupportedException;
 import org.apache.carbondata.core.scan.filter.executer.FilterExecuter;
@@ -40,6 +33,13 @@ import org.apache.carbondata.core.scan.processor.BlocksChunkHolder;
 import org.apache.carbondata.core.scan.result.AbstractScannedResult;
 import org.apache.carbondata.core.scan.result.impl.FilterQueryScannedResult;
 import org.apache.carbondata.core.scan.scanner.AbstractBlockletScanner;
+import org.apache.carbondata.core.stats.QueryStatistic;
+import org.apache.carbondata.core.stats.QueryStatisticsConstants;
+import org.apache.carbondata.core.stats.QueryStatisticsModel;
+import org.apache.carbondata.core.update.data.BlockletDeleteDeltaCacheLoader;
+import org.apache.carbondata.core.update.data.DeleteDeltaCacheLoaderIntf;
+import org.apache.carbondata.core.util.CarbonProperties;
+import org.apache.carbondata.core.util.CarbonUtil;
 
 /**
  * Below class will be used for filter query processing

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/NonFilterScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/NonFilterScanner.java b/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/NonFilterScanner.java
index f07c2be..cc0838f 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/NonFilterScanner.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/scanner/impl/NonFilterScanner.java
@@ -18,10 +18,10 @@
  */
 package org.apache.carbondata.core.scan.scanner.impl;
 
-import org.apache.carbondata.core.stats.QueryStatisticsModel;
 import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.result.impl.NonFilterQueryScannedResult;
 import org.apache.carbondata.core.scan.scanner.AbstractBlockletScanner;
+import org.apache.carbondata.core.stats.QueryStatisticsModel;
 
 /**
  * Non filter processor which will be used for non filter query

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/service/CarbonCommonFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/service/CarbonCommonFactory.java b/core/src/main/java/org/apache/carbondata/core/service/CarbonCommonFactory.java
index 3c33867..bc63d01 100644
--- a/core/src/main/java/org/apache/carbondata/core/service/CarbonCommonFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/service/CarbonCommonFactory.java
@@ -21,9 +21,6 @@ package org.apache.carbondata.core.service;
 import org.apache.carbondata.core.service.impl.ColumnUniqueIdGenerator;
 import org.apache.carbondata.core.service.impl.DictionaryFactory;
 import org.apache.carbondata.core.service.impl.PathFactory;
-import org.apache.carbondata.core.service.ColumnUniqueIdService;
-import org.apache.carbondata.core.service.DictionaryService;
-import org.apache.carbondata.core.service.PathService;
 
 /**
  * Interface to get services

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java b/core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java
index 35812dd..d41c57d 100644
--- a/core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/stats/DriverQueryStatisticsRecorderImpl.java
@@ -27,10 +27,10 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 
-import static org.apache.carbondata.core.util.CarbonUtil.printLine;
-
 import org.apache.commons.lang3.StringUtils;
 
+import static org.apache.carbondata.core.util.CarbonUtil.printLine;
+
 /**
  * Class will be used to record and log the query statistics
  */

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/update/CarbonUpdateUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/CarbonUpdateUtil.java b/core/src/main/java/org/apache/carbondata/core/update/CarbonUpdateUtil.java
index 59e8c25..3af7e65 100644
--- a/core/src/main/java/org/apache/carbondata/core/update/CarbonUpdateUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/update/CarbonUpdateUtil.java
@@ -20,26 +20,32 @@ package org.apache.carbondata.core.update;
 import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
-import org.apache.carbondata.core.path.CarbonStorePath;
-import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFileFilter;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
+import org.apache.carbondata.core.path.CarbonStorePath;
+import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.update.data.BlockMappingVO;
 import org.apache.carbondata.core.update.data.RowCountDetailsVO;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.updatestatus.SegmentStatusManager;
 import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager;
+import org.apache.carbondata.core.updatestatus.locks.ICarbonLock;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.util.CarbonUtil;
-import org.apache.carbondata.core.updatestatus.locks.ICarbonLock;
 
 
 /**
@@ -407,75 +413,6 @@ public class CarbonUpdateUtil {
 
   }
 
-  public static String getLatestBlockNameForSegment(String segmentId, CarbonTablePath tablePath) {
-    String segmentDirPath = tablePath.getCarbonDataDirectoryPath("0", segmentId);
-
-    // scan all the carbondata files and get the latest task ID.
-    CarbonFile segment =
-            FileFactory.getCarbonFile(segmentDirPath, FileFactory.getFileType(segmentDirPath));
-
-    CarbonFile[] dataFiles = segment.listFiles(new CarbonFileFilter() {
-      @Override public boolean accept(CarbonFile file) {
-        int max = 0;
-        if (file.getName().endsWith(CarbonCommonConstants.FACT_FILE_EXT)) {
-          int taskNumber = Integer.parseInt(CarbonTablePath.DataFileUtil.getTaskNo(file.getName()));
-          if (taskNumber >= max) {
-            return true;
-          }
-        }
-        return false;
-      }
-    });
-
-    // get the latest among the data files. highest task number will be at the last.
-    return dataFiles[dataFiles.length - 1].getName();
-  }
-
-  /**
-   * This method will convert a given timestamp to long value and then to string back
-   *
-   * @param factTimeStamp
-   * @return
-   */
-  public static String convertTimeStampToString(String factTimeStamp) {
-    SimpleDateFormat parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP);
-    Date dateToStr = null;
-    try {
-      dateToStr = parser.parse(factTimeStamp);
-      return Long.toString(dateToStr.getTime());
-    } catch (ParseException e) {
-      LOGGER.error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e.getMessage());
-      return null;
-    }
-  }
-
-  /**
-   * This method will convert a given timestamp to long value and then to string back
-   *
-   * @param factTimeStamp
-   * @return
-   */
-  public static long convertTimeStampToLong(String factTimeStamp) {
-    SimpleDateFormat parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP_MILLIS);
-    Date dateToStr = null;
-    try {
-      dateToStr = parser.parse(factTimeStamp);
-      return dateToStr.getTime();
-    } catch (ParseException e) {
-      LOGGER.error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e.getMessage());
-      parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP);
-      try {
-        dateToStr = parser.parse(factTimeStamp);
-        return dateToStr.getTime();
-      } catch (ParseException e1) {
-        LOGGER
-            .error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e1.getMessage());
-        return 0;
-      }
-    }
-  }
-
-
   /**
    * Handling of the clean up of old carbondata files, index files , delte delta,
    * update status files.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/update/data/BlockletDeleteDeltaCacheLoader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/data/BlockletDeleteDeltaCacheLoader.java b/core/src/main/java/org/apache/carbondata/core/update/data/BlockletDeleteDeltaCacheLoader.java
index f7c2a2d..30aeab8 100644
--- a/core/src/main/java/org/apache/carbondata/core/update/data/BlockletDeleteDeltaCacheLoader.java
+++ b/core/src/main/java/org/apache/carbondata/core/update/data/BlockletDeleteDeltaCacheLoader.java
@@ -19,8 +19,8 @@ package org.apache.carbondata.core.update.data;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.datastore.DataRefNode;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetails.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetails.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetails.java
new file mode 100644
index 0000000..89b0604
--- /dev/null
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetails.java
@@ -0,0 +1,344 @@
+/*
+ * 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.updatestatus;
+
+import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.apache.carbondata.common.logging.LogService;
+import org.apache.carbondata.common.logging.LogServiceFactory;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+
+public class LoadMetadataDetails implements Serializable {
+
+  private static final long serialVersionUID = 1106104914918491724L;
+  private String timestamp;
+  private String loadStatus;
+  private String loadName;
+  private String partitionCount;
+  private String isDeleted = CarbonCommonConstants.KEYWORD_FALSE;
+
+  // update delta end timestamp
+  private String updateDeltaEndTimestamp = "";
+
+  // update delta start timestamp
+  private String updateDeltaStartTimestamp = "";
+
+  // this will represent the update status file name at that point of time.
+  private String updateStatusFileName = "";
+
+  /**
+   * LOGGER
+   */
+  private static final LogService LOGGER =
+      LogServiceFactory.getLogService(LoadMetadataDetails.class.getName());
+
+  // dont remove static as the write will fail.
+  private static final SimpleDateFormat parser =
+      new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP);
+  /**
+   * Segment modification or deletion time stamp
+   */
+  private String modificationOrdeletionTimesStamp;
+  private String loadStartTime;
+
+  private String mergedLoadName;
+  /**
+   * visibility is used to determine whether to the load is visible or not.
+   */
+  private String visibility = "true";
+
+  /**
+   * To know if the segment is a major compacted segment or not.
+   */
+  private String majorCompacted;
+
+  public String getPartitionCount() {
+    return partitionCount;
+  }
+
+  public void setPartitionCount(String partitionCount) {
+    this.partitionCount = partitionCount;
+  }
+
+  public long getLoadEndTime() {
+    return convertTimeStampToLong(timestamp);
+  }
+
+  public void setLoadEndTime(long timestamp) {
+    this.timestamp = getTimeStampConvertion(timestamp);;
+  }
+
+  public String getLoadStatus() {
+    return loadStatus;
+  }
+
+  public void setLoadStatus(String loadStatus) {
+    this.loadStatus = loadStatus;
+  }
+
+  public String getLoadName() {
+    return loadName;
+  }
+
+  public void setLoadName(String loadName) {
+    this.loadName = loadName;
+  }
+
+  /**
+   * @return the modificationOrdeletionTimesStamp
+   */
+  public long getModificationOrdeletionTimesStamp() {
+    if(null == modificationOrdeletionTimesStamp) {
+      return 0;
+    }
+    return convertTimeStampToLong(modificationOrdeletionTimesStamp);
+  }
+
+  /**
+   * @param modificationOrdeletionTimesStamp the modificationOrdeletionTimesStamp to set
+   */
+  public void setModificationOrdeletionTimesStamp(long modificationOrdeletionTimesStamp) {
+    this.modificationOrdeletionTimesStamp =
+        getTimeStampConvertion(modificationOrdeletionTimesStamp);
+  }
+
+  /* (non-Javadoc)
+   * @see java.lang.Object#hashCode()
+   */
+  @Override public int hashCode() {
+    final int prime = 31;
+    int result = 1;
+    result = prime * result + ((loadName == null) ? 0 : loadName.hashCode());
+    return result;
+  }
+
+  /* (non-Javadoc)
+   * @see java.lang.Object#equals(java.lang.Object)
+   */
+  @Override public boolean equals(Object obj) {
+    if (obj == null) {
+      return false;
+
+    }
+    if (!(obj instanceof LoadMetadataDetails)) {
+      return false;
+    }
+    LoadMetadataDetails other = (LoadMetadataDetails) obj;
+    if (loadName == null) {
+      if (other.loadName != null) {
+        return false;
+      }
+    } else if (!loadName.equals(other.loadName)) {
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * @return the startLoadTime
+   */
+  public long getLoadStartTime() {
+    return convertTimeStampToLong(loadStartTime);
+  }
+
+  /**
+   * return loadStartTime
+   *
+   * @return
+   */
+  public long getLoadStartTimeAsLong() {
+    return (!loadStartTime.isEmpty()) ? getTimeStamp(loadStartTime) : 0;
+  }
+
+  /**
+   * This method will convert a given timestamp to long value and then to string back
+   *
+   * @param factTimeStamp
+   * @return
+   */
+  private long convertTimeStampToLong(String factTimeStamp) {
+    SimpleDateFormat parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP_MILLIS);
+    Date dateToStr = null;
+    try {
+      dateToStr = parser.parse(factTimeStamp);
+      return dateToStr.getTime();
+    } catch (ParseException e) {
+      LOGGER.error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e.getMessage());
+      parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP);
+      try {
+        dateToStr = parser.parse(factTimeStamp);
+        return dateToStr.getTime();
+      } catch (ParseException e1) {
+        LOGGER
+            .error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e1.getMessage());
+        return 0;
+      }
+    }
+  }
+
+  /**
+   * returns load start time as long value
+   *
+   * @param loadStartTime
+   * @return
+   */
+  public Long getTimeStamp(String loadStartTime) {
+    Date dateToStr = null;
+    try {
+      dateToStr = parser.parse(loadStartTime);
+      return dateToStr.getTime() * 1000;
+    } catch (ParseException e) {
+      LOGGER.error("Cannot convert" + loadStartTime + " to Time/Long type value" + e.getMessage());
+      return null;
+    }
+  }
+
+  private String getTimeStampConvertion(long time) {
+    SimpleDateFormat sdf = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP_MILLIS);
+    return sdf.format(time);
+  }
+
+  /**
+   * @param loadStartTime
+   */
+  public void setLoadStartTime(long loadStartTime) {
+    this.loadStartTime = getTimeStampConvertion(loadStartTime);
+  }
+
+  /**
+   * @return the mergedLoadName
+   */
+  public String getMergedLoadName() {
+    return mergedLoadName;
+  }
+
+  /**
+   * @param mergedLoadName the mergedLoadName to set
+   */
+  public void setMergedLoadName(String mergedLoadName) {
+    this.mergedLoadName = mergedLoadName;
+  }
+
+  /**
+   * @return the visibility
+   */
+  public String getVisibility() {
+    return visibility;
+  }
+
+  /**
+   * @param visibility the visibility to set
+   */
+  public void setVisibility(String visibility) {
+    this.visibility = visibility;
+  }
+
+  /**
+   * Return true if it is a major compacted segment.
+   * @return majorCompacted
+   */
+  public String isMajorCompacted() {
+    return majorCompacted;
+  }
+
+  /**
+   * Set true if it is a major compacted segment.
+   *
+   * @param majorCompacted
+   */
+  public void setMajorCompacted(String majorCompacted) {
+    this.majorCompacted = majorCompacted;
+  }
+
+  /**
+   * To get isDeleted property.
+   *
+   * @return isDeleted
+   */
+  public String getIsDeleted() {
+    return isDeleted;
+  }
+
+  /**
+   * To set isDeleted property.
+   *
+   * @param isDeleted
+   */
+  public void setIsDeleted(String isDeleted) {
+    this.isDeleted = isDeleted;
+  }
+
+  /**
+   * To get the update delta end timestamp
+   *
+   * @return updateDeltaEndTimestamp
+   */
+  public String getUpdateDeltaEndTimestamp() {
+    return updateDeltaEndTimestamp;
+  }
+
+  /**
+   * To set the update delta end timestamp
+   *
+   * @param updateDeltaEndTimestamp
+   */
+  public void setUpdateDeltaEndTimestamp(String updateDeltaEndTimestamp) {
+    this.updateDeltaEndTimestamp = updateDeltaEndTimestamp;
+  }
+
+  /**
+   * To get the update delta start timestamp
+   *
+   * @return updateDeltaStartTimestamp
+   */
+  public String getUpdateDeltaStartTimestamp() {
+    return updateDeltaStartTimestamp;
+  }
+
+  /**
+   * To set the update delta start timestamp
+   *
+   * @param updateDeltaStartTimestamp
+   */
+  public void setUpdateDeltaStartTimestamp(String updateDeltaStartTimestamp) {
+    this.updateDeltaStartTimestamp = updateDeltaStartTimestamp;
+  }
+
+  /**
+   * To get the updateStatusFileName
+   *
+   * @return updateStatusFileName
+   */
+  public String getUpdateStatusFileName() {
+    return updateStatusFileName;
+  }
+
+  /**
+   * To set the updateStatusFileName
+   *
+   * @param updateStatusFileName
+   */
+  public void setUpdateStatusFileName(String updateStatusFileName) {
+    this.updateStatusFileName = updateStatusFileName;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
index e01ba6d..9ebbbfb 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
@@ -18,7 +18,14 @@
  */
 package org.apache.carbondata.core.updatestatus;
 
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.Closeable;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -26,22 +33,21 @@ import java.util.List;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
+import org.apache.carbondata.core.atomic.AtomicFileOperations;
+import org.apache.carbondata.core.atomic.AtomicFileOperationsImpl;
+import org.apache.carbondata.core.atomic.FileWriteOperation;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
-import org.apache.carbondata.core.util.CarbonUtil;
-import org.apache.carbondata.core.atomic.AtomicFileOperations;
-import org.apache.carbondata.core.atomic.AtomicFileOperationsImpl;
-import org.apache.carbondata.core.atomic.FileWriteOperation;
 import org.apache.carbondata.core.updatestatus.locks.CarbonLockFactory;
 import org.apache.carbondata.core.updatestatus.locks.CarbonLockUtil;
 import org.apache.carbondata.core.updatestatus.locks.ICarbonLock;
 import org.apache.carbondata.core.updatestatus.locks.LockUsage;
+import org.apache.carbondata.core.util.CarbonUtil;
 
 import com.google.gson.Gson;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
index 4e44661..425b039 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
@@ -17,7 +17,14 @@
 
 package org.apache.carbondata.core.updatestatus;
 
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.Closeable;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -25,26 +32,25 @@ import java.util.Map;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.path.CarbonStorePath;
-import org.apache.carbondata.core.path.CarbonTablePath;
+import org.apache.carbondata.core.atomic.AtomicFileOperations;
+import org.apache.carbondata.core.atomic.AtomicFileOperationsImpl;
+import org.apache.carbondata.core.atomic.FileWriteOperation;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFileFilter;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.path.CarbonStorePath;
+import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.reader.CarbonDeleteFilesDataReader;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
 import org.apache.carbondata.core.update.SegmentUpdateDetails;
 import org.apache.carbondata.core.update.TupleIdEnum;
 import org.apache.carbondata.core.update.data.UpdateVO;
-import org.apache.carbondata.core.util.CarbonUtil;
-import org.apache.carbondata.core.atomic.AtomicFileOperations;
-import org.apache.carbondata.core.atomic.AtomicFileOperationsImpl;
-import org.apache.carbondata.core.atomic.FileWriteOperation;
 import org.apache.carbondata.core.updatestatus.locks.CarbonLockFactory;
 import org.apache.carbondata.core.updatestatus.locks.ICarbonLock;
 import org.apache.carbondata.core.updatestatus.locks.LockUsage;
+import org.apache.carbondata.core.util.CarbonUtil;
 
 import com.google.gson.Gson;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/CarbonLockFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/CarbonLockFactory.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/CarbonLockFactory.java
index 0828ada..228d59c 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/CarbonLockFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/CarbonLockFactory.java
@@ -18,8 +18,8 @@
  */
 package org.apache.carbondata.core.updatestatus.locks;
 
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.util.CarbonProperties;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/HdfsFileLock.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/HdfsFileLock.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/HdfsFileLock.java
index 1d1de81..ca741c1 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/HdfsFileLock.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/HdfsFileLock.java
@@ -23,10 +23,10 @@ import java.io.IOException;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.util.CarbonProperties;
 
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLock.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLock.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLock.java
index cdee312..eeca76c 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLock.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLock.java
@@ -26,9 +26,9 @@ import java.nio.channels.OverlappingFileLockException;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 
 /**
  * This class handles the file locking in the local file system.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLocking.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLocking.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLocking.java
index 2d742cf..5e750b5 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLocking.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLocking.java
@@ -24,8 +24,8 @@ import java.util.List;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.util.CarbonProperties;
 
 import org.apache.zookeeper.CreateMode;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java b/core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java
index fa8410a..78dd3ad 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/AbstractDataFileFooterConverter.java
@@ -24,9 +24,13 @@ import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.List;
 
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastore.block.BlockInfo;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.DataType;
+import org.apache.carbondata.core.metadata.Encoding;
+import org.apache.carbondata.core.metadata.ValueEncoderMeta;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.blocklet.SegmentInfo;
 import org.apache.carbondata.core.metadata.blocklet.datachunk.DataChunk;
@@ -34,11 +38,7 @@ import org.apache.carbondata.core.metadata.blocklet.datachunk.PresenceMeta;
 import org.apache.carbondata.core.metadata.blocklet.index.BlockletBTreeIndex;
 import org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex;
 import org.apache.carbondata.core.metadata.blocklet.index.BlockletMinMaxIndex;
-import org.apache.carbondata.core.metadata.DataType;
-import org.apache.carbondata.core.metadata.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.metadata.ValueEncoderMeta;
 import org.apache.carbondata.core.reader.CarbonIndexFileReader;
 import org.apache.carbondata.format.BlockIndex;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
index 79d5b7b..35cca0f 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
@@ -30,14 +30,14 @@ import java.util.Set;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
-import org.apache.carbondata.core.datastore.block.SegmentProperties;
-import org.apache.carbondata.core.metadata.index.BlockIndexInfo;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.compression.CompressorFactory;
 import org.apache.carbondata.core.datastorage.compression.WriterCompressModel;
+import org.apache.carbondata.core.datastore.block.SegmentProperties;
 import org.apache.carbondata.core.metadata.BlockletInfoColumnar;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.metadata.ValueEncoderMeta;
+import org.apache.carbondata.core.metadata.index.BlockIndexInfo;
 import org.apache.carbondata.format.BlockIndex;
 import org.apache.carbondata.format.BlockletBTreeIndex;
 import org.apache.carbondata.format.BlockletIndex;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
index 95d099a..281a13e 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
@@ -27,8 +27,8 @@ import java.util.Properties;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 
 public final class CarbonProperties {
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java
index 1bf2878..90b2317 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java
@@ -17,12 +17,12 @@
 
 package org.apache.carbondata.core.util;
 
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.stats.DriverQueryStatisticsRecorderDummy;
 import org.apache.carbondata.core.stats.DriverQueryStatisticsRecorderImpl;
 import org.apache.carbondata.core.stats.QueryStatisticsRecorder;
 import org.apache.carbondata.core.stats.QueryStatisticsRecorderDummy;
 import org.apache.carbondata.core.stats.QueryStatisticsRecorderImpl;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
 
 public class CarbonTimeStatisticsFactory {
   private static String loadStatisticsInstanceType;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
index 34f1ac9..7e59345 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
@@ -40,19 +40,10 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier;
-import org.apache.carbondata.core.datastore.block.AbstractIndex;
-import org.apache.carbondata.core.datastore.block.TableBlockInfo;
-import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
-import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
-import org.apache.carbondata.core.datastore.chunk.impl.FixedLengthDimensionDataChunk;
-import org.apache.carbondata.core.path.CarbonStorePath;
-import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.FileHolder;
 import org.apache.carbondata.core.datastorage.columnar.ColumnGroupModel;
@@ -61,7 +52,13 @@ import org.apache.carbondata.core.datastorage.compression.MeasureMetaDataModel;
 import org.apache.carbondata.core.datastorage.compression.WriterCompressModel;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
+import org.apache.carbondata.core.datastore.block.AbstractIndex;
+import org.apache.carbondata.core.datastore.block.TableBlockInfo;
+import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
+import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
+import org.apache.carbondata.core.datastore.chunk.impl.FixedLengthDimensionDataChunk;
 import org.apache.carbondata.core.keygenerator.mdkey.NumberCompressor;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.metadata.Encoding;
 import org.apache.carbondata.core.metadata.ValueEncoderMeta;
@@ -69,13 +66,16 @@ import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
+import org.apache.carbondata.core.path.CarbonStorePath;
+import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.reader.ThriftReader;
 import org.apache.carbondata.core.reader.ThriftReader.TBaseCreator;
+import org.apache.carbondata.core.scan.model.QueryDimension;
+import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.core.service.PathService;
 import org.apache.carbondata.core.update.data.UpdateVO;
 import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager;
 import org.apache.carbondata.format.DataChunk2;
-import org.apache.carbondata.core.scan.model.QueryDimension;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
index eadac33..e590a5c 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
@@ -23,15 +23,15 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
+import org.apache.carbondata.core.datastorage.FileHolder;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.metadata.blocklet.BlockletInfo;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.blocklet.datachunk.DataChunk;
 import org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-import org.apache.carbondata.core.datastorage.FileHolder;
-import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.reader.CarbonFooterReader;
 import org.apache.carbondata.format.FileFooter;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter2.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter2.java b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter2.java
index 0808cea..0d71d7e 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter2.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter2.java
@@ -22,8 +22,8 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.metadata.blocklet.BlockletInfo;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java b/core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java
index a4aa931..c636555 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java
@@ -31,10 +31,10 @@ import java.util.Map;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
 
 import org.apache.spark.unsafe.types.UTF8String;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
index e024653..e368788 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
@@ -25,18 +25,18 @@ import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
-import org.apache.carbondata.core.metadata.ColumnIdentifier;
-import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
+import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.reader.CarbonDictionaryColumnMetaChunk;
 import org.apache.carbondata.core.reader.CarbonDictionaryMetadataReader;
 import org.apache.carbondata.core.reader.CarbonDictionaryMetadataReaderImpl;
+import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.core.service.PathService;
 import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.format.ColumnDictionaryChunk;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
index 1d37b5b..89a1c52 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
@@ -23,15 +23,15 @@ import java.util.Arrays;
 import java.util.Comparator;
 import java.util.List;
 
-import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
-import org.apache.carbondata.core.metadata.ColumnIdentifier;
-import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
+import org.apache.carbondata.core.path.CarbonTablePath;
+import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.core.service.PathService;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.util.CarbonUtil;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
index aa35565..1d4f366 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
@@ -25,8 +25,8 @@ import java.util.List;
 
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryChunksWrapper;
-import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.DataType;
 
 import org.apache.commons.lang.ArrayUtils;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
index 6ec89f5..03604c2 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
@@ -22,8 +22,8 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.util.CarbonProperties;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/test/java/org/apache/carbondata/core/load/LoadMetadataDetailsUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/load/LoadMetadataDetailsUnitTest.java b/core/src/test/java/org/apache/carbondata/core/load/LoadMetadataDetailsUnitTest.java
deleted file mode 100644
index 0dbac8f..0000000
--- a/core/src/test/java/org/apache/carbondata/core/load/LoadMetadataDetailsUnitTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.load;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-
-import static junit.framework.Assert.*;
-
-public class LoadMetadataDetailsUnitTest {
-
-  private LoadMetadataDetails loadMetadataDetails;
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(LoadMetadataDetails.class.getName());
-
-  @Before public void setup() {
-    loadMetadataDetails = new LoadMetadataDetails();
-  }
-
-  /**
-   * This method will test Hashcode which will return 31 if we don't set loadName.
-   *
-   * @throws Exception
-   */
-
-  @Test public void testHashCodeLoadNameNull() throws Exception {
-    int expected_result = 31;
-    int data = loadMetadataDetails.hashCode();
-    assertEquals(expected_result, data);
-  }
-
-  @Test public void testHashCodeValueInLoadName() throws Exception {
-    loadMetadataDetails.setLoadName("test");
-    int data = loadMetadataDetails.hashCode();
-    assertNotSame(31, data);
-  }
-
-  @Test public void testEqualsObjectIsNotLoadMetadataDetails() throws Exception {
-    Object obj = new Object();
-    boolean result = loadMetadataDetails.equals(obj);
-    assertEquals(false, result);
-  }
-
-  @Test public void testEqualsObjectIsNull() throws Exception {
-    boolean result = loadMetadataDetails.equals(new Object());
-    assertEquals(false, result);
-  }
-
-  @Test public void testEqualsObjectIsLoadMetadataDetailsWithoutLoadName() throws Exception {
-    LoadMetadataDetails obj = new LoadMetadataDetails();
-    boolean result = loadMetadataDetails.equals(obj);
-    assertEquals(true, result);
-  }
-
-  @Test public void testEqualsObjectIsLoadMetadataDetails() throws Exception {
-    loadMetadataDetails.setLoadName("test");
-    LoadMetadataDetails obj = new LoadMetadataDetails();
-    boolean result = loadMetadataDetails.equals(obj);
-    assertEquals(false, result);
-  }
-
-  @Test public void testEqualsObjectIsLoadMetadataDetailsLoadNameNull() throws Exception {
-    LoadMetadataDetails obj = new LoadMetadataDetails();
-    obj.setLoadName("test");
-    boolean result = loadMetadataDetails.equals(obj);
-    assertEquals(false, result);
-  }
-
-  @Test public void testEqualsObjectIsLoadMetadataDetailsLoadNameEqualsObjectLoadName()
-      throws Exception {
-    loadMetadataDetails.setLoadName("test");
-    LoadMetadataDetails obj = new LoadMetadataDetails();
-    obj.setLoadName("test");
-    boolean result = loadMetadataDetails.equals(obj);
-    assertEquals(true, result);
-  }
-
-  @Test public void testGetTimeStampWithDate() throws Exception {
-    String date = "01-01-2016 00:00:00:000";
-    long longVal = loadMetadataDetails.getTimeStamp(date);
-    loadMetadataDetails.setLoadStartTime(longVal);
-    Long expected_result = getTime(date);
-    Long result = loadMetadataDetails.getLoadStartTime();
-    assertEquals(expected_result, result);
-  }
-
-  public static Long getTime(String date) {
-    SimpleDateFormat simpleDateFormat = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP_MILLIS);
-    try {
-      return simpleDateFormat.parse(date).getTime() * 1000;
-    } catch (ParseException e) {
-      LOGGER.error("Error while parsing " + date + " " + e.getMessage());
-      return null;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/core/src/test/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetailsUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetailsUnitTest.java b/core/src/test/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetailsUnitTest.java
new file mode 100644
index 0000000..a4b4708
--- /dev/null
+++ b/core/src/test/java/org/apache/carbondata/core/updatestatus/LoadMetadataDetailsUnitTest.java
@@ -0,0 +1,121 @@
+/*
+ * 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.updatestatus;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+
+import org.apache.carbondata.common.logging.LogService;
+import org.apache.carbondata.common.logging.LogServiceFactory;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotSame;
+
+public class LoadMetadataDetailsUnitTest {
+
+  private LoadMetadataDetails loadMetadataDetails;
+  private static final LogService LOGGER =
+      LogServiceFactory.getLogService(LoadMetadataDetails.class.getName());
+
+  @Before public void setup() {
+    loadMetadataDetails = new LoadMetadataDetails();
+  }
+
+  /**
+   * This method will test Hashcode which will return 31 if we don't set loadName.
+   *
+   * @throws Exception
+   */
+
+  @Test public void testHashCodeLoadNameNull() throws Exception {
+    int expected_result = 31;
+    int data = loadMetadataDetails.hashCode();
+    assertEquals(expected_result, data);
+  }
+
+  @Test public void testHashCodeValueInLoadName() throws Exception {
+    loadMetadataDetails.setLoadName("test");
+    int data = loadMetadataDetails.hashCode();
+    assertNotSame(31, data);
+  }
+
+  @Test public void testEqualsObjectIsNotLoadMetadataDetails() throws Exception {
+    Object obj = new Object();
+    boolean result = loadMetadataDetails.equals(obj);
+    assertEquals(false, result);
+  }
+
+  @Test public void testEqualsObjectIsNull() throws Exception {
+    boolean result = loadMetadataDetails.equals(new Object());
+    assertEquals(false, result);
+  }
+
+  @Test public void testEqualsObjectIsLoadMetadataDetailsWithoutLoadName() throws Exception {
+    LoadMetadataDetails obj = new LoadMetadataDetails();
+    boolean result = loadMetadataDetails.equals(obj);
+    assertEquals(true, result);
+  }
+
+  @Test public void testEqualsObjectIsLoadMetadataDetails() throws Exception {
+    loadMetadataDetails.setLoadName("test");
+    LoadMetadataDetails obj = new LoadMetadataDetails();
+    boolean result = loadMetadataDetails.equals(obj);
+    assertEquals(false, result);
+  }
+
+  @Test public void testEqualsObjectIsLoadMetadataDetailsLoadNameNull() throws Exception {
+    LoadMetadataDetails obj = new LoadMetadataDetails();
+    obj.setLoadName("test");
+    boolean result = loadMetadataDetails.equals(obj);
+    assertEquals(false, result);
+  }
+
+  @Test public void testEqualsObjectIsLoadMetadataDetailsLoadNameEqualsObjectLoadName()
+      throws Exception {
+    loadMetadataDetails.setLoadName("test");
+    LoadMetadataDetails obj = new LoadMetadataDetails();
+    obj.setLoadName("test");
+    boolean result = loadMetadataDetails.equals(obj);
+    assertEquals(true, result);
+  }
+
+  @Test public void testGetTimeStampWithDate() throws Exception {
+    String date = "01-01-2016 00:00:00:000";
+    long longVal = loadMetadataDetails.getTimeStamp(date);
+    loadMetadataDetails.setLoadStartTime(longVal);
+    Long expected_result = getTime(date);
+    Long result = loadMetadataDetails.getLoadStartTime();
+    assertEquals(expected_result, result);
+  }
+
+  public static Long getTime(String date) {
+    SimpleDateFormat simpleDateFormat = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP_MILLIS);
+    try {
+      return simpleDateFormat.parse(date).getTime() * 1000;
+    } catch (ParseException e) {
+      LOGGER.error("Error while parsing " + date + " " + e.getMessage());
+      return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java b/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
index 384e7c6..9a6e269 100644
--- a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
+++ b/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/StoreCreator.java
@@ -48,8 +48,8 @@ import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.load.BlockDetails;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.processing.csvreaderstep.BlockDetails;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.core.writer.CarbonDictionaryWriter;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
index 76e815f..e6922fe 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionTestCase.scala
@@ -21,7 +21,7 @@ package org.apache.carbondata.spark.testsuite.dataretention
 
 import java.text.SimpleDateFormat
 
-import org.apache.carbondata.core.updatestatus.SegmentStatusManager
+import org.apache.carbondata.core.updatestatus.{LoadMetadataDetails, SegmentStatusManager}
 import org.apache.carbondata.core.updatestatus.locks.{CarbonLockFactory, ICarbonLock, LockUsage}
 import org.apache.commons.lang3.time.DateUtils
 import org.apache.spark.sql.Row
@@ -31,7 +31,6 @@ import org.scalatest.BeforeAndAfterAll
 import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.path.CarbonStorePath
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.load.LoadMetadataDetails
 import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonTableIdentifier}
 import org.apache.carbondata.core.util.CarbonProperties
 import org.apache.carbondata.spark.exception.MalformedCarbonCommandException

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
index 9c80d7c..75bc294 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java
@@ -46,7 +46,7 @@ import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFileFilter;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.datastorage.impl.FileFactory.FileType;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
 import org.apache.carbondata.core.updatestatus.SegmentStatusManager;
 import org.apache.carbondata.core.util.CarbonProperties;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/DeleteLoadFolders.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/DeleteLoadFolders.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/DeleteLoadFolders.java
index 3c18f64..470ab9a 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/DeleteLoadFolders.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/load/DeleteLoadFolders.java
@@ -42,7 +42,7 @@ import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFileFilter;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
 
 public final class DeleteLoadFolders {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonDataMergerUtil.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonDataMergerUtil.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonDataMergerUtil.java
index 7ef4cec..82d3f0e 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonDataMergerUtil.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonDataMergerUtil.java
@@ -36,7 +36,7 @@ import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFileFilter;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.reader.CarbonDeleteFilesDataReader;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
 import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/CarbonQueryUtil.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/CarbonQueryUtil.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/CarbonQueryUtil.java
index ffce6cb..8db32a2 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/CarbonQueryUtil.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/CarbonQueryUtil.java
@@ -26,7 +26,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.scan.model.CarbonQueryPlan;
 import org.apache.carbondata.spark.partition.api.Partition;
 import org.apache.carbondata.spark.partition.api.impl.DefaultLoadBalancer;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/LoadMetadataUtil.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/LoadMetadataUtil.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/LoadMetadataUtil.java
index 9b67fe3..e8d4dde 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/LoadMetadataUtil.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/util/LoadMetadataUtil.java
@@ -31,7 +31,7 @@ package org.apache.carbondata.spark.util;
 import org.apache.carbondata.core.metadata.CarbonMetadata;
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.load.LoadMetadataDetails;
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails;
 import org.apache.carbondata.core.updatestatus.SegmentStatusManager;
 
 public final class LoadMetadataUtil {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/KeyVal.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/KeyVal.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/KeyVal.scala
index ad621bc..fbf0fd0 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/KeyVal.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/KeyVal.scala
@@ -27,8 +27,8 @@ package org.apache.carbondata.spark
 
 import org.apache.spark.sql.execution.command.ExecutionErrors
 
-import org.apache.carbondata.core.load.LoadMetadataDetails
 import org.apache.carbondata.core.update.SegmentUpdateDetails
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails
 
 
 trait Value[V] extends Serializable {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala
index 4392775..796ef7d 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala
@@ -36,15 +36,15 @@ import org.apache.spark.util.SparkUtil
 import org.apache.carbondata.common.logging.LogServiceFactory
 import org.apache.carbondata.common.logging.impl.StandardLogService
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.load.{BlockDetails, LoadMetadataDetails}
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails
 import org.apache.carbondata.core.util.{CarbonProperties, CarbonTimeStatisticsFactory}
 import org.apache.carbondata.processing.constants.DataProcessorConstants
-import org.apache.carbondata.processing.csvreaderstep.{JavaRddIterator, RddInputUtils}
+import org.apache.carbondata.processing.csvreaderstep.{BlockDetails, JavaRddIterator, RddInputUtils}
 import org.apache.carbondata.processing.etl.DataLoadingException
 import org.apache.carbondata.processing.graphgenerator.GraphGenerator
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark.DataLoadResult
-import org.apache.carbondata.spark.load.{_}
+import org.apache.carbondata.spark.load._
 import org.apache.carbondata.spark.splits.TableSplit
 import org.apache.carbondata.spark.util.CarbonQueryUtil
 import org.apache.carbondata.spark.util.CarbonScalaUtil

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDeleteLoadByDateRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDeleteLoadByDateRDD.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDeleteLoadByDateRDD.scala
index 33f453b..268d52c 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDeleteLoadByDateRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDeleteLoadByDateRDD.scala
@@ -23,7 +23,7 @@ import org.apache.spark.{Partition, SparkContext, TaskContext}
 import org.apache.spark.rdd.RDD
 
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.load.LoadMetadataDetails
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails
 import org.apache.carbondata.spark.DeletedLoadResult
 import org.apache.carbondata.spark.util.CarbonQueryUtil
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala
index de57639..e4d0671 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala
@@ -30,9 +30,8 @@ import org.apache.carbondata.common.logging.LogServiceFactory
 import org.apache.carbondata.core.metadata.{CarbonMetadata, CarbonTableIdentifier}
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.load.LoadMetadataDetails
 import org.apache.carbondata.core.update.CarbonUpdateUtil
-import org.apache.carbondata.core.updatestatus.SegmentStatusManager
+import org.apache.carbondata.core.updatestatus.{LoadMetadataDetails, SegmentStatusManager}
 import org.apache.carbondata.core.updatestatus.locks.{CarbonLockFactory, CarbonLockUtil, LockUsage}
 import org.apache.carbondata.processing.model.{CarbonDataLoadSchema, CarbonLoadModel}
 import org.apache.carbondata.spark._

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala
index 497df75..e63f904 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala
@@ -40,11 +40,11 @@ import org.apache.carbondata.common.CarbonIterator
 import org.apache.carbondata.common.logging.LogServiceFactory
 import org.apache.carbondata.common.logging.impl.StandardLogService
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.load.{BlockDetails, LoadMetadataDetails}
+import org.apache.carbondata.core.updatestatus.LoadMetadataDetails
 import org.apache.carbondata.core.util.{CarbonProperties, CarbonTimeStatisticsFactory}
 import org.apache.carbondata.hadoop.csv.CSVInputFormat
 import org.apache.carbondata.hadoop.csv.recorditerator.RecordReaderIterator
-import org.apache.carbondata.processing.csvreaderstep.JavaRddIterator
+import org.apache.carbondata.processing.csvreaderstep.{BlockDetails, JavaRddIterator}
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.processing.newflow.DataLoadExecutor
 import org.apache.carbondata.processing.newflow.exception.BadRecordFoundException

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala b/integration/spark-common/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
index 406c94f..ba468f8 100644
--- a/integration/spark-common/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
+++ b/integration/spark-common/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
@@ -32,9 +32,8 @@ import org.apache.carbondata.core.metadata.schema.{BucketingInfo, SchemaEvolutio
 import org.apache.carbondata.core.metadata.schema.table.{CarbonTable, TableInfo, TableSchema}
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.load.LoadMetadataDetails
 import org.apache.carbondata.core.service.CarbonCommonFactory
-import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager
+import org.apache.carbondata.core.updatestatus.{LoadMetadataDetails, SegmentUpdateStatusManager}
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark.CarbonSparkFactory
 import org.apache.carbondata.spark.load.FailureCauses

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/ae17158a/integration/spark-common/src/main/scala/org/apache/spark/util/SparkUtil.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/spark/util/SparkUtil.scala b/integration/spark-common/src/main/scala/org/apache/spark/util/SparkUtil.scala
index e2f4c3e..7c6665c 100644
--- a/integration/spark-common/src/main/scala/org/apache/spark/util/SparkUtil.scala
+++ b/integration/spark-common/src/main/scala/org/apache/spark/util/SparkUtil.scala
@@ -23,7 +23,7 @@ import org.apache.hadoop.mapreduce.lib.input.{FileInputFormat, FileSplit}
 import org.apache.spark.{SparkContext, TaskContext}
 import org.apache.spark.rdd.{NewHadoopPartition, NewHadoopRDD}
 
-import org.apache.carbondata.core.load.BlockDetails
+import org.apache.carbondata.processing.csvreaderstep.BlockDetails
 
 /*
  * this object use to handle file splits



Mime
View raw message