carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvram...@apache.org
Subject [04/22] incubator-carbondata git commit: IUD checkstyle and scalasytle fixes
Date Fri, 06 Jan 2017 13:57:04 GMT
IUD checkstyle and scalasytle fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/002279ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/002279ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/002279ec

Branch: refs/heads/master
Commit: 002279ec24f7b4cbbec2413346aa0f10bff4c72c
Parents: cdae9ed
Author: sraghunandan <carbondatacontributions@gmail.com>
Authored: Mon Jan 2 13:04:47 2017 +0530
Committer: Venkata Ramana G <ramana.gollamudi@huawei.com>
Committed: Fri Jan 6 19:16:29 2017 +0530

----------------------------------------------------------------------
 .../iuddata/BlockletDeleteDeltaCacheLoader.java |   2 +-
 .../iuddata/DeleteDeltaDataUtil.java            |   2 +-
 .../carbon/datastore/SegmentTaskIndexStore.java |  36 +-
 .../carbon/datastore/block/TableBlockInfo.java  |   4 +-
 .../impl/btree/AbstractBTreeLeafNode.java       |   2 +-
 .../datastore/impl/btree/BTreeNonLeafNode.java  |   6 +-
 .../metadata/schema/table/CarbonTable.java      |   1 -
 .../table/column/CarbonImplicitDimension.java   |   2 +-
 .../core/carbon/path/CarbonTablePath.java       |   6 +-
 .../core/constants/CarbonCommonConstants.java   |   2 +-
 .../core/load/LoadMetadataDetails.java          |   8 +-
 .../core/memory/HeapMemoryAllocator.java        |   2 +-
 .../reader/CarbonDeleteDeltaFileReader.java     |   3 +-
 .../reader/CarbonDeleteDeltaFileReaderImpl.java |   5 +-
 .../reader/CarbonDeleteFilesDataReader.java     |  16 +-
 .../core/update/CarbonUpdateUtil.java           |  21 +-
 .../core/update/DeleteDeltaBlockDetails.java    |   6 +-
 .../core/updatestatus/SegmentStatusManager.java |  21 +-
 .../SegmentUpdateStatusManager.java             |  34 +-
 .../carbondata/core/util/CarbonProperties.java  |  10 +-
 .../core/writer/CarbonDeleteDeltaWriter.java    |   4 +-
 .../writer/CarbonDeleteDeltaWriterImpl.java     |  11 +-
 .../ImplicitIncludeFilterExecutorImpl.java      |   5 +-
 .../carbondata/scan/model/QueryModel.java       |   3 +-
 .../carbondata/hadoop/CarbonInputFormat.java    |  95 +-
 .../carbondata/hadoop/CarbonInputSplit.java     |   2 +-
 .../carbondata/spark/load/CarbonLoaderUtil.java |  24 +-
 .../spark/merger/CarbonDataMergerUtil.java      |  25 +-
 .../spark/merger/RowResultMerger.java           |   6 +-
 .../org/apache/carbondata/spark/KeyVal.scala    |   6 +-
 .../spark/rdd/CarbonGlobalDictionaryRDD.scala   |   3 +-
 .../spark/rdd/CarbonIUDMergerRDD.scala          |   2 +-
 .../carbondata/spark/rdd/CarbonMergerRDD.scala  |   7 +-
 .../apache/carbondata/spark/rdd/Compactor.scala |   7 +-
 .../spark/rdd/DataManagementFunc.scala          |   5 +-
 .../carbondata/spark/util/CommonUtil.scala      |   4 +-
 .../execution/command/carbonTableSchema.scala   |   5 +-
 .../spark/rdd/CarbonDataRDDFactory.scala        |   7 +-
 .../org/apache/spark/sql/CarbonContext.scala    |   2 +-
 .../spark/sql/CarbonDatasourceRelation.scala    |   3 +-
 .../org/apache/spark/sql/CarbonSqlParser.scala  | 902 +++++++++++++++++++
 .../sql/execution/command/IUDCommands.scala     |  35 +-
 .../execution/command/carbonTableSchema.scala   |  12 +-
 .../spark/sql/hive/CarbonAnalysisRules.scala    |   3 +-
 .../apache/spark/sql/hive/CarbonMetastore.scala |   3 +-
 .../spark/sql/optimizer/CarbonOptimizer.scala   |   5 +-
 .../processing/model/CarbonLoadModel.java       |   8 +-
 .../newflow/sort/unsafe/sort/TimSort.java       | 137 ++-
 48 files changed, 1275 insertions(+), 245 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/BlockletDeleteDeltaCacheLoader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/BlockletDeleteDeltaCacheLoader.java b/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/BlockletDeleteDeltaCacheLoader.java
index 81f344c..1cd3459 100644
--- a/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/BlockletDeleteDeltaCacheLoader.java
+++ b/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/BlockletDeleteDeltaCacheLoader.java
@@ -15,7 +15,7 @@ public class BlockletDeleteDeltaCacheLoader implements DeleteDeltaCacheLoaderInt
       LogServiceFactory.getLogService(BlockletDeleteDeltaCacheLoader.class.getName());
 
   public BlockletDeleteDeltaCacheLoader(String blockletID,
-                                        DataRefNode blockletNode, AbsoluteTableIdentifier absoluteIdentifier) {
+       DataRefNode blockletNode, AbsoluteTableIdentifier absoluteIdentifier) {
     this.blockletID = blockletID;
     this.blockletNode = blockletNode;
     this.absoluteIdentifier= absoluteIdentifier;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/DeleteDeltaDataUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/DeleteDeltaDataUtil.java b/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/DeleteDeltaDataUtil.java
index d7cc020..32ac31d 100644
--- a/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/DeleteDeltaDataUtil.java
+++ b/core/src/main/java/org/apache/carbondata/common/iudprocessor/iuddata/DeleteDeltaDataUtil.java
@@ -28,7 +28,7 @@ public class DeleteDeltaDataUtil {
    * @return boolean
    */
   public static boolean isSegmentStatusUpdated(SegmentStatusManager segmentStatusManager,
-                                               AbsoluteTableIdentifier tableIdentifier, String segmentID) {
+      AbsoluteTableIdentifier tableIdentifier, String segmentID) {
     CarbonTable table = CarbonMetadata.getInstance()
         .getCarbonTable(tableIdentifier.getCarbonTableIdentifier().getTableUniqueName());
     LoadMetadataDetails[] loadMetadataDetails =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/datastore/SegmentTaskIndexStore.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/SegmentTaskIndexStore.java b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/SegmentTaskIndexStore.java
index 08bd85f..dd78f5e 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/SegmentTaskIndexStore.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/SegmentTaskIndexStore.java
@@ -85,17 +85,42 @@ public class SegmentTaskIndexStore
 
   @Override
   public SegmentTaskIndexWrapper get(TableSegmentUniqueIdentifier tableSegmentUniqueIdentifier)
-      throws IOException {
-    SegmentTaskIndexWrapper segmentTaskIndexWrapper =
-        loadAndGetTaskIdToSegmentsMap(tableSegmentUniqueIdentifier.getSegmentToTableBlocksInfos(),
-            tableSegmentUniqueIdentifier.getAbsoluteTableIdentifier(),
-            tableSegmentUniqueIdentifier);
+      throws CarbonUtilException {
+    SegmentTaskIndexWrapper segmentTaskIndexWrapper = null;
+    try {
+      segmentTaskIndexWrapper =
+          loadAndGetTaskIdToSegmentsMap(tableSegmentUniqueIdentifier.getSegmentToTableBlocksInfos(),
+              tableSegmentUniqueIdentifier.getAbsoluteTableIdentifier(),
+              tableSegmentUniqueIdentifier);
+    } catch (IndexBuilderException e) {
+      throw new CarbonUtilException(e.getMessage(), e);
+    } catch (Throwable e) {
+      throw new CarbonUtilException("Problem in loading segment block.", e);
+    }
+	
     if (null != segmentTaskIndexWrapper) {
       segmentTaskIndexWrapper.incrementAccessCount();
     }
     return segmentTaskIndexWrapper;
   }
 
+  @Override public List<SegmentTaskIndexWrapper> getAll(
+      List<TableSegmentUniqueIdentifier> tableSegmentUniqueIdentifiers) throws CarbonUtilException {
+    List<SegmentTaskIndexWrapper> segmentTaskIndexWrappers =
+        new ArrayList<>(tableSegmentUniqueIdentifiers.size());
+    try {
+      for (TableSegmentUniqueIdentifier segmentUniqueIdentifier : tableSegmentUniqueIdentifiers) {
+        segmentTaskIndexWrappers.add(get(segmentUniqueIdentifier));
+      }
+    } catch (Throwable e) {
+      for (SegmentTaskIndexWrapper segmentTaskIndexWrapper : segmentTaskIndexWrappers) {
+        segmentTaskIndexWrapper.clear();
+      }
+      throw new CarbonUtilException("Problem in loading segment blocks.", e);
+    }
+    return segmentTaskIndexWrappers;
+  }
+
   /**
    * returns all the segments taskid_to_Blcoks map wrapper.
    *
@@ -174,6 +199,7 @@ public class SegmentTaskIndexStore
         Map<TaskBucketHolder, List<TableBlockInfo>> taskIdToTableBlockInfoMap =
             mappedAndGetTaskIdToTableBlockInfo(segmentToTableBlocksInfos);
         // get the existing map of task id to table segment map
+        UpdateVO updateVO = updateStatusManager.getInvalidTimestampRange(segmentId);
         // check if segment is already loaded, if segment is already loaded
         //no need to load the segment block
         String lruCacheKey = tableSegmentUniqueIdentifier.getUniqueTableSegmentIdentifier();

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/datastore/block/TableBlockInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/block/TableBlockInfo.java b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/block/TableBlockInfo.java
index 2c377c3..86b7b58 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/block/TableBlockInfo.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/block/TableBlockInfo.java
@@ -112,8 +112,8 @@ public class TableBlockInfo implements Distributable, Serializable {
    * @param blockStorageIdMap
    */
   public TableBlockInfo(String filePath, long blockOffset, String segmentId, String[] locations,
-                        long blockLength, BlockletInfos blockletInfos, ColumnarFormatVersion version,
-                        Map<String, String> blockStorageIdMap) {
+      long blockLength, BlockletInfos blockletInfos, ColumnarFormatVersion version,
+      Map<String, String> blockStorageIdMap) {
     this(filePath, blockOffset, segmentId, locations, blockLength, blockletInfos, version);
     this.blockStorageIdMap = blockStorageIdMap;
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/AbstractBTreeLeafNode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/AbstractBTreeLeafNode.java b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/AbstractBTreeLeafNode.java
index e8b7713..80024ca 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/AbstractBTreeLeafNode.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/AbstractBTreeLeafNode.java
@@ -20,13 +20,13 @@ package org.apache.carbondata.core.carbon.datastore.impl.btree;
 
 import java.io.IOException;
 
+import org.apache.carbondata.common.iudprocessor.cache.BlockletLevelDeleteDeltaDataCache;
 import org.apache.carbondata.core.carbon.datastore.DataRefNode;
 import org.apache.carbondata.core.carbon.datastore.IndexKey;
 import org.apache.carbondata.core.carbon.datastore.chunk.DimensionColumnDataChunk;
 import org.apache.carbondata.core.carbon.datastore.chunk.MeasureColumnDataChunk;
 import org.apache.carbondata.core.datastorage.store.FileHolder;
 
-import org.apache.carbondata.common.iudprocessor.cache.BlockletLevelDeleteDeltaDataCache;
 
 /**
  * Non leaf node abstract class

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeNonLeafNode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeNonLeafNode.java b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeNonLeafNode.java
index e805919..bddebf8 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeNonLeafNode.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeNonLeafNode.java
@@ -18,6 +18,9 @@
  */
 package org.apache.carbondata.core.carbon.datastore.impl.btree;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.carbondata.common.iudprocessor.cache.BlockletLevelDeleteDeltaDataCache;
 import org.apache.carbondata.core.carbon.datastore.DataRefNode;
 import org.apache.carbondata.core.carbon.datastore.IndexKey;
@@ -26,8 +29,7 @@ import org.apache.carbondata.core.carbon.datastore.chunk.MeasureColumnDataChunk;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.store.FileHolder;
 
-import java.util.ArrayList;
-import java.util.List;
+
 
 /**
  * No leaf node of a b+tree class which will keep the matadata(start key) of the

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/CarbonTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/CarbonTable.java b/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/CarbonTable.java
index d02aebf..f859a8f 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/CarbonTable.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/CarbonTable.java
@@ -21,7 +21,6 @@ package org.apache.carbondata.core.carbon.metadata.schema.table;
 
 import java.io.Serializable;
 import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/column/CarbonImplicitDimension.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/column/CarbonImplicitDimension.java b/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/column/CarbonImplicitDimension.java
index 2292b10..2ad5346 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/column/CarbonImplicitDimension.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/metadata/schema/table/column/CarbonImplicitDimension.java
@@ -133,7 +133,7 @@ public class CarbonImplicitDimension extends CarbonDimension {
   /**
    * To specify the visibily of the column by default its false
    */
-    public boolean isInvisible() {
+  public boolean isInvisible() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/carbon/path/CarbonTablePath.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/carbon/path/CarbonTablePath.java b/core/src/main/java/org/apache/carbondata/core/carbon/path/CarbonTablePath.java
index 43c274a..f941992 100644
--- a/core/src/main/java/org/apache/carbondata/core/carbon/path/CarbonTablePath.java
+++ b/core/src/main/java/org/apache/carbondata/core/carbon/path/CarbonTablePath.java
@@ -18,16 +18,18 @@
  */
 package org.apache.carbondata.core.carbon.path;
 
+import java.io.File;
+
 import org.apache.carbondata.core.carbon.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFileFilter;
 import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import static org.apache.carbondata.core.constants.CarbonCommonConstants.INVALID_SEGMENT_ID;
+
 import org.apache.hadoop.fs.Path;
 
-import java.io.File;
 
-import static org.apache.carbondata.core.constants.CarbonCommonConstants.INVALID_SEGMENT_ID;
 
 /**
  * Helps to get Table content paths.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
index 293237f..8c01ba5 100644
--- a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
+++ b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
@@ -947,7 +947,7 @@ public final class CarbonCommonConstants {
    */
   public static final String CARBON_DATA_FILE_VERSION = "carbon.data.file.version";
 
- /**
+  /**
    * property to set is IS_DRIVER_INSTANCE
    */
   public static final String UPDATE_INDEX_FILE_EXT = ".carbonindex";

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/load/LoadMetadataDetails.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/load/LoadMetadataDetails.java b/core/src/main/java/org/apache/carbondata/core/load/LoadMetadataDetails.java
index d6b1e35..f067f07 100644
--- a/core/src/main/java/org/apache/carbondata/core/load/LoadMetadataDetails.java
+++ b/core/src/main/java/org/apache/carbondata/core/load/LoadMetadataDetails.java
@@ -19,15 +19,15 @@
 
 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 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;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/memory/HeapMemoryAllocator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/memory/HeapMemoryAllocator.java b/core/src/main/java/org/apache/carbondata/core/memory/HeapMemoryAllocator.java
index 62d5bdb..c5a6087 100644
--- a/core/src/main/java/org/apache/carbondata/core/memory/HeapMemoryAllocator.java
+++ b/core/src/main/java/org/apache/carbondata/core/memory/HeapMemoryAllocator.java
@@ -17,11 +17,11 @@
 
 package org.apache.carbondata.core.memory;
 
-import javax.annotation.concurrent.GuardedBy;
 import java.lang.ref.WeakReference;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
+import javax.annotation.concurrent.GuardedBy;
 
 import org.apache.carbondata.core.unsafe.CarbonUnsafe;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReader.java b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReader.java
index ea0323a..10f7029 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReader.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReader.java
@@ -19,9 +19,10 @@
 
 package org.apache.carbondata.core.reader;
 
+import java.io.IOException;
+
 import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;
 
-import java.io.IOException;
 
 /**
  * CarbonDeleteDeltaFileReader contains all methods to read delete delta file data

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java
index fdc5909..8697dbb 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteDeltaFileReaderImpl.java
@@ -19,7 +19,8 @@
 
 package org.apache.carbondata.core.reader;
 
-import com.google.gson.Gson;
+import java.io.*;
+
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
@@ -29,7 +30,7 @@ import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.fileoperations.AtomicFileOperations;
 import org.apache.carbondata.fileoperations.AtomicFileOperationsImpl;
 
-import java.io.*;
+import com.google.gson.Gson;
 
 /**
  * This class perform the functionality of reading the delete delta file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java
index 6cda03d..7e9d9e8 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDeleteFilesDataReader.java
@@ -19,6 +19,13 @@
 
 package org.apache.carbondata.core.reader;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.*;
+
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
@@ -26,14 +33,9 @@ import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
 import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;
 import org.apache.carbondata.core.update.DeleteDeltaBlockletDetails;
 import org.apache.carbondata.core.util.CarbonProperties;
+
 import org.apache.commons.lang.ArrayUtils;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.*;
 
 /**
  * This class perform the functionality of reading multiple delete delta files
@@ -117,7 +119,7 @@ public class CarbonDeleteFilesDataReader {
   }
 
   public DeleteDeltaBlockDetails getCompactedDeleteDeltaFileFromBlock(List<String> deltaFiles,
-                                                                      String blockName) throws Exception {
+      String blockName) throws Exception {
     // get the data.
     List<Future<DeleteDeltaBlockDetails>> taskSubmitList = new ArrayList<>(deltaFiles.size());
     ExecutorService executorService = Executors.newFixedThreadPool(thread_pool_size);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 b404b61..26418a6 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
@@ -1,6 +1,11 @@
 
 package org.apache.carbondata.core.update;
 
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
 import org.apache.carbondata.common.iudprocessor.iuddata.BlockMappingVO;
 import org.apache.carbondata.common.iudprocessor.iuddata.RowCountDetailsVO;
 import org.apache.carbondata.common.logging.LogService;
@@ -21,10 +26,6 @@ import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.core.util.CarbonUtilException;
 import org.apache.carbondata.locks.ICarbonLock;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
 
 /**
  *
@@ -52,7 +53,7 @@ public class CarbonUpdateUtil {
    */
   public static String getSegmentWithBlockFromTID(String Tid) {
     return getRequiredFieldFromTID(Tid, TupleIdEnum.SEGMENT_ID)
-            + CarbonCommonConstants.FILE_SEPARATOR + getRequiredFieldFromTID(Tid, TupleIdEnum.BLOCK_ID);
+        + CarbonCommonConstants.FILE_SEPARATOR + getRequiredFieldFromTID(Tid, TupleIdEnum.BLOCK_ID);
   }
 
   /**
@@ -83,7 +84,7 @@ public class CarbonUpdateUtil {
   public static String getDeleteDeltaFilePath(String blockPath, String blockName,
                                               String timestamp) {
     return blockPath + CarbonCommonConstants.FILE_SEPARATOR + blockName
-            + CarbonCommonConstants.HYPHEN + timestamp + CarbonCommonConstants.DELETE_DELTA_FILE_EXT;
+        + CarbonCommonConstants.HYPHEN + timestamp + CarbonCommonConstants.DELETE_DELTA_FILE_EXT;
 
   }
 
@@ -94,7 +95,7 @@ public class CarbonUpdateUtil {
    * @return
    */
   public static boolean updateSegmentStatus(List<SegmentUpdateDetails> updateDetailsList,
-                                            CarbonTable table, String updateStatusFileIdentifier, boolean isCompaction) {
+      CarbonTable table, String updateStatusFileIdentifier, boolean isCompaction) {
     boolean status = false;
     SegmentUpdateStatusManager segmentUpdateStatusManager =
             new SegmentUpdateStatusManager(table.getAbsoluteTableIdentifier());
@@ -241,7 +242,7 @@ public class CarbonUpdateUtil {
       if (lockStatus) {
         if (carbonLock.unlock()) {
           LOGGER.info(
-                  "Table unlocked successfully after table status updation" + table.getDatabaseName()
+                 "Table unlocked successfully after table status updation" + table.getDatabaseName()
                           + "." + table.getFactTableName());
         } else {
           LOGGER.error(
@@ -347,7 +348,7 @@ public class CarbonUpdateUtil {
    */
   public static String getBlockName(String completeBlockName) {
     String blockName =
-            completeBlockName.substring(0, completeBlockName.lastIndexOf(CarbonCommonConstants.HYPHEN));
+        completeBlockName.substring(0, completeBlockName.lastIndexOf(CarbonCommonConstants.HYPHEN));
     return blockName;
   }
 
@@ -453,7 +454,7 @@ public class CarbonUpdateUtil {
         return dateToStr.getTime();
       } catch (ParseException e1) {
         LOGGER
-                .error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e1.getMessage());
+            .error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e1.getMessage());
         return 0;
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/update/DeleteDeltaBlockDetails.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/DeleteDeltaBlockDetails.java b/core/src/main/java/org/apache/carbondata/core/update/DeleteDeltaBlockDetails.java
index b7a7107..f8f56fb 100644
--- a/core/src/main/java/org/apache/carbondata/core/update/DeleteDeltaBlockDetails.java
+++ b/core/src/main/java/org/apache/carbondata/core/update/DeleteDeltaBlockDetails.java
@@ -19,13 +19,13 @@
 
 package org.apache.carbondata.core.update;
 
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.carbondata.common.logging.LogService;
+import org.apache.carbondata.common.logging.LogServiceFactory;
+
 /**
  * This class stores the block details of delete delta file
  */

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 c400637..5c2fef5 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,12 @@
  */
 package org.apache.carbondata.core.updatestatus;
 
-import com.google.gson.Gson;
+import java.io.*;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.carbon.AbsoluteTableIdentifier;
@@ -37,13 +42,9 @@ import org.apache.carbondata.locks.CarbonLockFactory;
 import org.apache.carbondata.locks.CarbonLockUtil;
 import org.apache.carbondata.locks.ICarbonLock;
 import org.apache.carbondata.locks.LockUsage;
-import org.apache.hadoop.security.AccessControlException;
 
-import java.io.*;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import com.google.gson.Gson;
+
 /**
  * Manages Load/Segment status
  */
@@ -84,7 +85,7 @@ public class SegmentStatusManager {
   }
 
   public List<Long> getUpdateDeltaStartEndTimeStamp(final String loadIds,
-                                                    LoadMetadataDetails[] listOfLoadFolderDetailsArray) {
+      LoadMetadataDetails[] listOfLoadFolderDetailsArray) {
     List<Long> updateDeltaStartEndTimestamp = new ArrayList<>();
     for (LoadMetadataDetails loadMetadata : listOfLoadFolderDetailsArray) {
       if (loadIds.equalsIgnoreCase(loadMetadata.getLoadName())) {
@@ -452,7 +453,7 @@ public class SegmentStatusManager {
    * @return invalidLoadIds
    */
   private static List<String> updateDeletionStatus(List<String> loadIds,
-                                            LoadMetadataDetails[] listOfLoadFolderDetailsArray, List<String> invalidLoadIds) {
+      LoadMetadataDetails[] listOfLoadFolderDetailsArray, List<String> invalidLoadIds) {
     for (String loadId : loadIds) {
       boolean loadFound = false;
       // For each load id loop through data and if the
@@ -628,7 +629,7 @@ public class SegmentStatusManager {
     private final List<String> listOfInvalidSegments;
 
     private ValidAndInvalidSegmentsInfo(List<String> listOfValidSegments,
-                                        List<String> listOfValidUpdatedSegments, List<String> listOfInvalidUpdatedSegments) {
+        List<String> listOfValidUpdatedSegments, List<String> listOfInvalidUpdatedSegments) {
       this.listOfValidSegments = listOfValidSegments;
       this.listOfValidUpdatedSegments = listOfValidUpdatedSegments;
       this.listOfInvalidSegments = listOfInvalidUpdatedSegments;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 dc8320f..a946383 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
@@ -1,6 +1,11 @@
 package org.apache.carbondata.core.updatestatus;
 
-import com.google.gson.Gson;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.carbon.AbsoluteTableIdentifier;
@@ -24,11 +29,7 @@ import org.apache.carbondata.locks.CarbonLockFactory;
 import org.apache.carbondata.locks.ICarbonLock;
 import org.apache.carbondata.locks.LockUsage;
 
-import java.io.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.google.gson.Gson;
 
 /**
  * Manages Segment & block status of carbon table
@@ -324,8 +325,9 @@ public class SegmentUpdateStatusManager {
    * @return
    */
   public List<String> getDeltaFiles(CarbonFile blockDir, final String blockNameFromTuple,
-                                    SegmentUpdateDetails[] listOfSegmentUpdateDetailsArray, final String extension,
-                                    String segment) {
+      SegmentUpdateDetails[] listOfSegmentUpdateDetailsArray,
+      final String extension,
+      String segment) {
     List<String> deleteFileList = null;
     for (SegmentUpdateDetails block : listOfSegmentUpdateDetailsArray) {
       if (block.getBlockName().equalsIgnoreCase(blockNameFromTuple) && block.getSegmentName()
@@ -347,8 +349,8 @@ public class SegmentUpdateStatusManager {
   }
 
   private List<String> getFilePaths(CarbonFile blockDir, final String blockNameFromTuple,
-                                    final String extension, List<String> deleteFileList, final long deltaStartTimestamp,
-                                    final long deltaEndTimeStamp) {
+      final String extension, List<String> deleteFileList, final long deltaStartTimestamp,
+      final long deltaEndTimeStamp) {
     CarbonFile[] files = blockDir.getParentFile().listFiles(new CarbonFileFilter() {
 
       @Override public boolean accept(CarbonFile pathName) {
@@ -436,8 +438,8 @@ public class SegmentUpdateStatusManager {
    * @return
    */
   public CarbonFile[] getUpdateDeltaFilesList(String segmentId, final boolean validUpdateFiles,
-                                              final String fileExtension, final boolean excludeOriginalFact,
-                                              CarbonFile[] allFilesOfSegment) {
+      final String fileExtension, final boolean excludeOriginalFact,
+      CarbonFile[] allFilesOfSegment) {
 
     CarbonTablePath carbonTablePath = CarbonStorePath
         .getCarbonTablePath(absoluteTableIdentifier.getStorePath(),
@@ -517,8 +519,8 @@ public class SegmentUpdateStatusManager {
    * @return
    */
   public CarbonFile[] getUpdateDeltaFilesForSegment(String segmentId,
-                                                    final boolean validUpdateFiles, final String fileExtension, final boolean excludeOriginalFact,
-                                                    CarbonFile[] allFilesOfSegment) {
+      final boolean validUpdateFiles, final String fileExtension, final boolean excludeOriginalFact,
+      CarbonFile[] allFilesOfSegment) {
 
     String endTimeStamp = "";
     String startTimeStamp = "";
@@ -904,8 +906,8 @@ public class SegmentUpdateStatusManager {
    * @return
    */
   public CarbonFile[] getDeleteDeltaInvalidFilesList(final String segmentId,
-                                                     final SegmentUpdateDetails block, final boolean needCompleteList,
-                                                     CarbonFile[] allSegmentFiles) {
+      final SegmentUpdateDetails block, final boolean needCompleteList,
+      CarbonFile[] allSegmentFiles) {
 
     final long deltaStartTimestamp =
         getStartTimeOfDeltaFile(CarbonCommonConstants.DELETE_DELTA_FILE_EXT, block);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 f10d64f..d0895df 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
@@ -19,17 +19,17 @@
 
 package org.apache.carbondata.core.util;
 
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.carbon.ColumnarFormatVersion;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.Properties;
 
+import org.apache.carbondata.common.logging.LogService;
+import org.apache.carbondata.common.logging.LogServiceFactory;
+import org.apache.carbondata.core.carbon.ColumnarFormatVersion;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+
 public final class CarbonProperties {
   /**
    * Attribute for Carbon LOGGER.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriter.java b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriter.java
index dae0ddb..8f3b4d8 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriter.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriter.java
@@ -18,10 +18,10 @@
  */
 package org.apache.carbondata.core.writer;
 
-import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;
-
 import java.io.IOException;
 
+import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;
+
 /**
  * Delete delta file writer interface
  */

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
index 42dc959..2ce4914 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
@@ -19,7 +19,11 @@
 
 package org.apache.carbondata.core.writer;
 
-import com.google.gson.Gson;
+import java.io.BufferedWriter;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
@@ -27,10 +31,7 @@ import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
 import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;
 import org.apache.carbondata.core.util.CarbonUtil;
 
-import java.io.BufferedWriter;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
+import com.google.gson.Gson;
 
 /**
  * This class is responsible for writing the delete delta file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/scan/filter/executer/ImplicitIncludeFilterExecutorImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/filter/executer/ImplicitIncludeFilterExecutorImpl.java b/core/src/main/java/org/apache/carbondata/scan/filter/executer/ImplicitIncludeFilterExecutorImpl.java
index 8eec63e..eaf45e9 100644
--- a/core/src/main/java/org/apache/carbondata/scan/filter/executer/ImplicitIncludeFilterExecutorImpl.java
+++ b/core/src/main/java/org/apache/carbondata/scan/filter/executer/ImplicitIncludeFilterExecutorImpl.java
@@ -60,8 +60,9 @@ public class ImplicitIncludeFilterExecutorImpl implements ImplicitColumnFilterEx
   public BitSet isScanRequired(byte[][] blockMaxValue, byte[][] blockMinValue) {
     return null;
   }
-   public BitSet isFilterValuesPresentInBlockOrBlocklet(DataRefNode dataRefNode,
-      String uniqueBlockPath) {
+
+  public BitSet isFilterValuesPresentInBlockOrBlocklet(DataRefNode dataRefNode,
+                                                       String uniqueBlockPath) {
     BitSet bitSet = new BitSet(1);
     boolean isScanRequired = false;
     if (uniqueBlockPath.endsWith(".carbondata")) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/core/src/main/java/org/apache/carbondata/scan/model/QueryModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/model/QueryModel.java b/core/src/main/java/org/apache/carbondata/scan/model/QueryModel.java
index 0afefa4..55e1caa 100644
--- a/core/src/main/java/org/apache/carbondata/scan/model/QueryModel.java
+++ b/core/src/main/java/org/apache/carbondata/scan/model/QueryModel.java
@@ -105,7 +105,8 @@ public class QueryModel implements Serializable {
    * or compacted
    */
   private List<String> invalidSegmentIds;
-  private Map<String, UpdateVO> invalidSegmentBlockIdMap = new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
+  private Map<String, UpdateVO> invalidSegmentBlockIdMap =
+      new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
 
   public QueryModel() {
     tableBlockInfos = new ArrayList<TableBlockInfo>();

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java
index 8f94ae0..0e953a8 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java
@@ -18,6 +18,10 @@
  */
 package org.apache.carbondata.hadoop;
 
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.*;
+
 import org.apache.carbondata.common.iudprocessor.iuddata.BlockMappingVO;
 import org.apache.carbondata.common.iudprocessor.iuddata.DeleteDeltaDataUtil;
 import org.apache.carbondata.core.cache.Cache;
@@ -36,9 +40,7 @@ import org.apache.carbondata.core.carbon.datastore.impl.btree.BlockBTreeLeafNode
 import org.apache.carbondata.core.carbon.metadata.schema.table.CarbonTable;
 import org.apache.carbondata.core.carbon.path.CarbonStorePath;
 import org.apache.carbondata.core.carbon.path.CarbonTablePath;
-import org.apache.carbondata.core.carbon.querystatistics.QueryStatistic;
-import org.apache.carbondata.core.carbon.querystatistics.QueryStatisticsConstants;
-import org.apache.carbondata.core.carbon.querystatistics.QueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.keygenerator.KeyGenException;
 import org.apache.carbondata.core.update.SegmentUpdateDetails;
@@ -59,6 +61,7 @@ import org.apache.carbondata.scan.filter.FilterUtil;
 import org.apache.carbondata.scan.filter.resolver.FilterResolverIntf;
 import org.apache.carbondata.scan.model.CarbonQueryPlan;
 import org.apache.carbondata.scan.model.QueryModel;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -328,6 +331,7 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
       if (segmentId.equals(CarbonCommonConstants.INVALID_SEGMENT_ID)) {
         continue;
       }
+	  // Huawei IUD confirm from vishal 
       carbonSplits.add(CarbonInputSplit.from(segmentId, fileSplit,
               ColumnarFormatVersion.valueOf(
                   CarbonCommonConstants.CARBON_DATA_FILE_DEFAULT_VERSION)));
@@ -358,7 +362,7 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
     for (String segmentNo : getSegmentsToAccess(job)) {
       List<DataRefNode> dataRefNodes =
           getDataBlocksOfSegment(job, filterExpressionProcessor, absoluteTableIdentifier,
-              filterResolver, segmentNo, updateStatusManager);
+              filterResolver, segmentNo, cacheClient, updateStatusManager);
       for (DataRefNode dataRefNode : dataRefNodes) {
         BlockBTreeLeafNode leafNode = (BlockBTreeLeafNode) dataRefNode;
         TableBlockInfo tableBlockInfo = leafNode.getTableBlockInfo();
@@ -466,7 +470,7 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
     return tableBlockInfoList;
   }
 
-  public boolean isValidBlockBasedOnUpdateDetails(Set<String> taskKeys,
+  private boolean isValidBlockBasedOnUpdateDetails(Set<String> taskKeys,
                                                   CarbonInputSplit carbonInputSplit, UpdateVO updateDetails,
                                                   SegmentUpdateStatusManager updateStatusManager, String segmentId) {
     String taskID = null;
@@ -555,7 +559,7 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
    * @throws IndexBuilderException
    * @throws KeyGenException
    */
-  private Map<SegmentTaskIndexStore.TaskBucketHolder, AbstractIndex> getSegmentAbstractIndexs(
+private Map<SegmentTaskIndexStore.TaskBucketHolder, AbstractIndex> getSegmentAbstractIndexs(
       JobContext job, AbsoluteTableIdentifier absoluteTableIdentifier, String segmentId,
       CacheClient cacheClient) throws IOException {
     Map<SegmentTaskIndexStore.TaskBucketHolder, AbstractIndex> segmentIndexMap = null;
@@ -566,7 +570,6 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
     if (null != segmentTaskIndexWrapper) {
       segmentIndexMap = segmentTaskIndexWrapper.getTaskIdToTableSegmentMap();
     }
-
     // if segment tree is not loaded, load the segment tree
     if (segmentIndexMap == null) {
       // List<FileStatus> fileStatusList = new LinkedList<FileStatus>();
@@ -579,6 +582,7 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
       // get Btree blocks for given segment
       tableSegmentUniqueIdentifier.setSegmentToTableBlocksInfos(segmentToTableBlocksInfos);
       segmentTaskIndexWrapper =
+          cacheClient.getSegmentTaskIndexWrapper(tableSegmentUniqueIdentifier);
           cacheClient.getSegmentAccessClient().get(tableSegmentUniqueIdentifier);
       segmentIndexMap = segmentTaskIndexWrapper.getTaskIdToTableSegmentMap();
     for (String eachValidSeg : validAndInvalidSegments.getValidSegments()) {
@@ -605,9 +609,65 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
 
   }
 
+  public BlockMappingVO getBlockRowCount(JobContext job,
+                                         AbsoluteTableIdentifier absoluteTableIdentifier)
+          throws IOException, CarbonUtilException, IndexBuilderException, KeyGenException {
+    CacheClient cacheClient = new CacheClient(absoluteTableIdentifier.getStorePath());
+    try {
+      SegmentUpdateStatusManager updateStatusManager =
+              new SegmentUpdateStatusManager(absoluteTableIdentifier);
+      SegmentStatusManager.ValidAndInvalidSegmentsInfo validAndInvalidSegments =
+              new SegmentStatusManager(absoluteTableIdentifier).getValidAndInvalidSegments();
+      Map<String, Long> blockRowCountMapping =
+              new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
+      Map<String, Long> segmentAndBlockCountMapping =
+              new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
+
+    // if segment tree is not loaded, load the segment tree
+    if (segmentIndexMap == null) {
+      // List<FileStatus> fileStatusList = new LinkedList<FileStatus>();
+      List<TableBlockInfo> tableBlockInfoList = getTableBlockInfo(job, segmentId);
+      // getFileStatusOfSegments(job, new int[]{ segmentId }, fileStatusList);
+
+    Map<String, Long> blockRowCountMapping =
+            new HashMap<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
+
+      // get Btree blocks for given segment
+      tableSegmentUniqueIdentifier.setSegmentToTableBlocksInfos(segmentToTableBlocksInfos);
+      segmentTaskIndexWrapper =
+          cacheClient.getSegmentAccessClient().getIfPresent(tableSegmentUniqueIdentifier);
+      segmentIndexMap = segmentTaskIndexWrapper.getTaskIdToTableSegmentMap();
+    for (String eachValidSeg : validAndInvalidSegments.getValidSegments()) {
+
+      long countOfBlocksInSeg = 0;
+
+      Map<String, AbstractIndex> taskAbstractIndexMap =
+              getSegmentAbstractIndexs(job, absoluteTableIdentifier, eachValidSeg, updateStatusManager);
+
+      for (Map.Entry<String, AbstractIndex> taskMap : taskAbstractIndexMap.entrySet()) {
+
+        AbstractIndex taskAbstractIndex = taskMap.getValue();
+
+        countOfBlocksInSeg += new BlockLevelTraverser()
+                .getBlockRowMapping(taskAbstractIndex, blockRowCountMapping, eachValidSeg,
+                        updateStatusManager);
+      }
+
+      segmentAndBlockCountMapping.put(eachValidSeg, countOfBlocksInSeg);
+
+      return new BlockMappingVO(blockRowCountMapping, segmentAndBlockCountMapping);
+    }
+
+    return new BlockMappingVO(blockRowCountMapping, segmentAndBlockCountMapping);
+
+    finally {
+      cacheClient.close();
+    }
+  }
+
 
   private boolean isSegmentUpdate(SegmentTaskIndexWrapper segmentTaskIndexWrapper,
-                                  UpdateVO updateDetails) {
+      UpdateVO updateDetails) {
     if (null != updateDetails.getLatestUpdateTimestamp()
             && updateDetails.getLatestUpdateTimestamp() > segmentTaskIndexWrapper
             .getRefreshedTimeStamp()) {
@@ -649,6 +709,14 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
   @Override public RecordReader<Void, T> createRecordReader(InputSplit inputSplit,
       TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException {
     Configuration configuration = taskAttemptContext.getConfiguration();
+    QueryModel queryModel = getQueryModel(inputSplit, taskAttemptContext);
+    CarbonReadSupport readSupport = getReadSupportClass(configuration);
+    return new CarbonRecordReader<T>(queryModel, readSupport);
+  }
+
+  public QueryModel getQueryModel(InputSplit inputSplit, TaskAttemptContext taskAttemptContext)
+      throws IOException {
+    Configuration configuration = taskAttemptContext.getConfiguration();
     CarbonTable carbonTable = getCarbonTable(configuration);
     AbsoluteTableIdentifier identifier = getAbsoluteTableIdentifier(configuration);
 
@@ -670,13 +738,16 @@ public class CarbonInputFormat<T> extends FileInputFormat<Void, T> {
       if (invalidSegments.size() > 0) {
         queryModel.setInvalidSegmentIds(invalidSegments);
       }
+      List<UpdateVO> invalidTimestampRangeList =
+          split.getAllSplits().get(0).getInvalidTimestampRange();
+      if (invalidTimestampRangeList.size() > 0) {
+        queryModel.setInvalidBlockForSegmentId(invalidTimestampRangeList);
+      }
     }
-
-    CarbonReadSupport readSupport = getReadSupportClass(configuration);
-    return new CarbonRecordReader<T>(queryModel, readSupport);
+    return queryModel;
   }
 
-  private CarbonReadSupport getReadSupportClass(Configuration configuration) {
+  public CarbonReadSupport getReadSupportClass(Configuration configuration) {
     String readSupportClass = configuration.get(CARBON_READ_SUPPORT);
     //By default it uses dictionary decoder read class
     CarbonReadSupport readSupport = null;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
index cabbff9..16a8ef3 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
@@ -110,7 +110,7 @@ public class CarbonInputSplit extends FileSplit
    * @param blockStorageIdMap
    */
   public CarbonInputSplit(String segmentId, Path path, long start, long length, String[] locations,
-                          int numberOfBlocklets, ColumnarFormatVersion version, Map<String, String> blockStorageIdMap) {
+      int numberOfBlocklets, ColumnarFormatVersion version, Map<String, String> blockStorageIdMap) {
     this(segmentId, path, start, length, locations, numberOfBlocklets, version);
     this.blockStorageIdMap = blockStorageIdMap;
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 5f0e954..a550331 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
@@ -18,27 +18,7 @@
  */
 package org.apache.carbondata.spark.load;
 
-import java.io.BufferedWriter;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.nio.charset.Charset;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
+import com.google.gson.Gson;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.cache.Cache;
@@ -84,8 +64,6 @@ import org.apache.carbondata.processing.model.CarbonLoadModel;
 import org.apache.carbondata.processing.util.CarbonDataProcessorUtil;
 import org.apache.carbondata.spark.merger.NodeBlockRelation;
 import org.apache.carbondata.spark.merger.NodeMultiBlockRelation;
-
-import com.google.gson.Gson;
 import org.apache.spark.SparkConf;
 import org.apache.spark.util.Utils;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 3e070a8..a42d8b0 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
@@ -19,16 +19,11 @@
 
 package org.apache.carbondata.spark.merger;
 
+import java.io.File;
 import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
@@ -56,12 +51,6 @@ import org.apache.carbondata.locks.LockUsage;
 import org.apache.carbondata.processing.model.CarbonLoadModel;
 import org.apache.carbondata.spark.load.CarbonLoaderUtil;
 
-import java.io.File;
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
 /**
  * utility class for load merging.
  */
@@ -1277,7 +1266,7 @@ public final class CarbonDataMergerUtil {
         tempSegmentUpdateDetails.setDeleteDeltaStartTimestamp(
                 carbonDataMergerUtilResult.getDeleteDeltaStartTimestamp());
         tempSegmentUpdateDetails
-                .setDeleteDeltaEndTimestamp(carbonDataMergerUtilResult.getDeleteDeltaEndTimestamp());
+              .setDeleteDeltaEndTimestamp(carbonDataMergerUtilResult.getDeleteDeltaEndTimestamp());
 
         segmentUpdateDetails.add(tempSegmentUpdateDetails);
       } else return false;
@@ -1331,7 +1320,7 @@ public final class CarbonDataMergerUtil {
       if (lockStatus) {
         if (carbonLock.unlock()) {
           LOGGER.info(
-                  "Table unlocked successfully after table status updation" + table.getDatabaseName()
+                 "Table unlocked successfully after table status updation" + table.getDatabaseName()
                           + "." + table.getFactTableName());
         } else {
           LOGGER.error(
@@ -1349,8 +1338,8 @@ public final class CarbonDataMergerUtil {
    * @param changedSegDetails
    */
   public static void updateMajorCompactionPropertyInSegment(CarbonLoadModel model,
-                                                            List<LoadMetadataDetails> changedSegDetails,
-                                                            List<LoadMetadataDetails> preservedSegment) throws Exception {
+      List<LoadMetadataDetails> changedSegDetails,
+      List<LoadMetadataDetails> preservedSegment) throws Exception {
 
     String metadataPath = model.getCarbonDataLoadSchema().getCarbonTable().getMetaDataFilepath();
     AbsoluteTableIdentifier absoluteTableIdentifier =
@@ -1374,7 +1363,7 @@ public final class CarbonDataMergerUtil {
     try {
       if (carbonTableStatusLock.lockWithRetries()) {
         LOGGER.info(
-                "Acquired lock for the table " + model.getDatabaseName() + "." + model.getTableName()
+            "Acquired lock for the table " + model.getDatabaseName() + "." + model.getTableName()
                         + " for table status updation ");
         CarbonTablePath carbonTablePath = CarbonStorePath
                 .getCarbonTablePath(absoluteTableIdentifier.getStorePath(),

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/RowResultMerger.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/RowResultMerger.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/RowResultMerger.java
index 324abbf..457a0b5 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/RowResultMerger.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/RowResultMerger.java
@@ -18,6 +18,9 @@
  */
 package org.apache.carbondata.spark.merger;
 
+import java.io.File;
+import java.util.*;
+
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.carbon.CarbonTableIdentifier;
@@ -46,9 +49,6 @@ import org.apache.carbondata.processing.store.writer.exception.CarbonDataWriterE
 import org.apache.carbondata.scan.result.iterator.RawResultIterator;
 import org.apache.carbondata.scan.wrappers.ByteArrayWrapper;
 
-import java.io.File;
-import java.util.*;
-
 /**
  * This is the Merger class responsible for the merging of the segments.
  */

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 7825f5e..ad621bc 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
@@ -25,9 +25,11 @@
 
 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.spark.sql.execution.command.ExecutionErrors
+
 
 trait Value[V] extends Serializable {
   def getValue(value: Array[Object]): V
@@ -78,7 +80,7 @@ trait DeleteDelataResult[K, V] extends Serializable {
 class DeleteDelataResultImpl
   extends DeleteDelataResult[String, (SegmentUpdateDetails, ExecutionErrors)] {
   override def getKey(key: String,
-                      value: (SegmentUpdateDetails, ExecutionErrors)): (String, (SegmentUpdateDetails,
+      value: (SegmentUpdateDetails, ExecutionErrors)): (String, (SegmentUpdateDetails,
     ExecutionErrors)) = {
     (key, value)
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
index 1950fb7..2db2ed8 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
@@ -22,8 +22,6 @@ import java.nio.charset.Charset
 import java.text.SimpleDateFormat
 import java.util.regex.Pattern
 
-import org.apache.carbondata.locks.{LockUsage, CarbonLockFactory}
-
 import scala.collection.mutable
 import scala.collection.mutable.ArrayBuffer
 import scala.util.control.Breaks.{break, breakable}
@@ -44,6 +42,7 @@ import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.datastorage.store.impl.FileFactory
 import org.apache.carbondata.core.service.PathService
 import org.apache.carbondata.core.util.{CarbonProperties, CarbonTimeStatisticsFactory, CarbonUtil}
+import org.apache.carbondata.locks.{CarbonLockFactory, LockUsage}
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark.load.CarbonLoaderUtil
 import org.apache.carbondata.spark.tasks.{DictionaryWriterTask, SortIndexWriterTask}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonIUDMergerRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonIUDMergerRDD.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonIUDMergerRDD.scala
index 841189b..e8310f5 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonIUDMergerRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonIUDMergerRDD.scala
@@ -29,8 +29,8 @@ import org.apache.spark.sql.execution.command.CarbonMergerMapping
 
 import org.apache.carbondata.core.carbon.{AbsoluteTableIdentifier, CarbonTableIdentifier}
 import org.apache.carbondata.core.carbon.datastore.block.{Distributable, TableBlockInfo}
+import org.apache.carbondata.hadoop.{CarbonInputFormat, CarbonInputSplit, CarbonMultiBlockSplit}
 import org.apache.carbondata.hadoop.util.CarbonInputFormatUtil
-import org.apache.carbondata.hadoop.{CarbonMultiBlockSplit, CarbonInputFormat, CarbonInputSplit}
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark.MergeResult
 import org.apache.carbondata.spark.merger.CarbonDataMergerUtil

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
index d426e6a..a84df14 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
@@ -21,9 +21,6 @@ import java.io.IOException
 import java.util
 import java.util.{Collections, List}
 
-import org.apache.carbondata.core.update.UpdateVO
-import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager
-
 import scala.collection.JavaConverters._
 import scala.collection.mutable
 import scala.util.Random
@@ -42,7 +39,9 @@ import org.apache.carbondata.core.carbon.datastore.block.{Distributable, Segment
 import org.apache.carbondata.core.carbon.metadata.blocklet.DataFileFooter
 import org.apache.carbondata.core.carbon.path.CarbonTablePath
 import org.apache.carbondata.core.constants.CarbonCommonConstants
-import org.apache.carbondata.core.util.{CarbonProperties, CarbonUtil}
+import org.apache.carbondata.core.update.UpdateVO
+import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager
+import org.apache.carbondata.core.util.{CarbonProperties, CarbonUtil, CarbonUtilException}
 import org.apache.carbondata.hadoop.{CarbonInputFormat, CarbonInputSplit, CarbonMultiBlockSplit}
 import org.apache.carbondata.hadoop.util.CarbonInputFormatUtil
 import org.apache.carbondata.processing.model.CarbonLoadModel

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/Compactor.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/Compactor.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/Compactor.scala
index e06937b..a2941e5 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/Compactor.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/Compactor.scala
@@ -17,17 +17,16 @@
 
 package org.apache.carbondata.spark.rdd
 
-import org.apache.carbondata.core.update.CarbonUpdateUtil
-import org.apache.carbondata.core.updatestatus.SegmentStatusManager
-
 import scala.collection.JavaConverters._
 
 import org.apache.spark.sql.execution.command.{CarbonMergerMapping, CompactionCallableModel}
 
 import org.apache.carbondata.common.logging.LogServiceFactory
+import org.apache.carbondata.core.update.CarbonUpdateUtil
+import org.apache.carbondata.core.updatestatus.SegmentStatusManager
 import org.apache.carbondata.spark.MergeResultImpl
 import org.apache.carbondata.spark.load.CarbonLoaderUtil
-import org.apache.carbondata.spark.merger.{CompactionType, CarbonDataMergerUtil}
+import org.apache.carbondata.spark.merger.{CarbonDataMergerUtil, CompactionType}
 
 /**
  * Compactor class which handled the compaction cases.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 47fdf89..bfd0e2d 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
@@ -36,8 +36,9 @@ import org.apache.carbondata.core.carbon.metadata.CarbonMetadata
 import org.apache.carbondata.core.carbon.metadata.schema.table.CarbonTable
 import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.load.LoadMetadataDetails
-import org.apache.carbondata.lcm.locks.{CarbonLockFactory, CarbonLockUtil, LockUsage}
-import org.apache.carbondata.lcm.status.SegmentStatusManager
+import org.apache.carbondata.core.update.CarbonUpdateUtil
+import org.apache.carbondata.core.updatestatus.SegmentStatusManager
+import org.apache.carbondata.locks.{CarbonLockFactory, CarbonLockUtil, LockUsage}
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark._
 import org.apache.carbondata.spark.load._

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
index 9ea9f13..b8cb4f7 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
@@ -19,8 +19,6 @@ package org.apache.carbondata.spark.util
 
 import java.util
 
-import org.apache.carbondata.core.updatestatus.SegmentStatusManager
-
 import scala.collection.JavaConverters._
 import scala.collection.mutable.Map
 
@@ -33,8 +31,8 @@ import org.apache.spark.util.FileUtils
 import org.apache.carbondata.common.logging.LogServiceFactory
 import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.util.CarbonProperties
+import org.apache.carbondata.core.updatestatus.SegmentStatusManager
 import org.apache.carbondata.hadoop.csv.CSVInputFormat
-import org.apache.carbondata.lcm.status.SegmentStatusManager
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark.exception.MalformedCarbonCommandException
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/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 3b2895f..42114a4 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
@@ -20,9 +20,6 @@ package org.apache.spark.sql.execution.command
 import java.util
 import java.util.UUID
 
-import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager
-import org.apache.carbondata.spark.load.FailureCauses
-
 import scala.collection.JavaConverters._
 import scala.collection.mutable.Map
 
@@ -37,8 +34,10 @@ import org.apache.carbondata.core.carbon.metadata.schema.table.{CarbonTable, Tab
 import org.apache.carbondata.core.carbon.metadata.schema.table.column.ColumnSchema
 import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.load.LoadMetadataDetails
+import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.spark.CarbonSparkFactory
+import org.apache.carbondata.spark.load.FailureCauses
 import org.apache.carbondata.spark.merger.CompactionType
 import org.apache.carbondata.spark.util.DataTypeConverterUtil
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala b/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
index af69652..1bf8654 100644
--- a/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
+++ b/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
@@ -20,10 +20,6 @@ package org.apache.carbondata.spark.rdd
 import java.util
 import java.util.concurrent._
 
-import org.apache.carbondata.core.update.CarbonUpdateUtil
-import org.apache.carbondata.core.updatestatus.SegmentStatusManager
-import org.apache.carbondata.locks.{LockUsage, CarbonLockFactory, ICarbonLock}
-
 import scala.collection.JavaConverters._
 import scala.collection.mutable.ListBuffer
 import scala.util.Random
@@ -48,7 +44,10 @@ import org.apache.carbondata.core.carbon.metadata.schema.table.CarbonTable
 import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.dictionary.server.DictionaryServer
 import org.apache.carbondata.core.load.{BlockDetails, LoadMetadataDetails}
+import org.apache.carbondata.core.update.CarbonUpdateUtil
+import org.apache.carbondata.core.updatestatus.SegmentStatusManager
 import org.apache.carbondata.core.util.CarbonProperties
+import org.apache.carbondata.locks.{CarbonLockFactory, ICarbonLock, LockUsage}
 import org.apache.carbondata.processing.etl.DataLoadingException
 import org.apache.carbondata.processing.model.CarbonLoadModel
 import org.apache.carbondata.processing.newflow.exception.CarbonDataLoadingException

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark/src/main/scala/org/apache/spark/sql/CarbonContext.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonContext.scala b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonContext.scala
index 2c9b7b2..2ec68ab 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonContext.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonContext.scala
@@ -188,4 +188,4 @@ object CarbonContext {
 
 object SQLParser {
   def parse(sql: String, sqlContext: SQLContext): LogicalPlan = sqlContext.parseSql(sql)
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/002279ec/integration/spark/src/main/scala/org/apache/spark/sql/CarbonDatasourceRelation.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonDatasourceRelation.scala b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonDatasourceRelation.scala
index 427e982..72cc13b 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonDatasourceRelation.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonDatasourceRelation.scala
@@ -17,8 +17,6 @@
 
 package org.apache.spark.sql
 
-import org.apache.carbondata.core.updatestatus.SegmentStatusManager
-
 import scala.collection.JavaConverters._
 import scala.language.implicitConversions
 
@@ -34,6 +32,7 @@ import org.apache.spark.sql.types.{DataType, StructType}
 import org.apache.carbondata.core.carbon.metadata.schema.table.column.{CarbonColumn, CarbonDimension}
 import org.apache.carbondata.core.carbon.path.CarbonStorePath
 import org.apache.carbondata.core.datastorage.store.impl.FileFactory
+import org.apache.carbondata.core.updatestatus.SegmentStatusManager
 import org.apache.carbondata.spark.{CarbonOption, _}
 import org.apache.carbondata.spark.merger.TableMeta
 


Mime
View raw message