carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [37/57] [abbrv] incubator-carbondata git commit: move identifier to metadata package
Date Sat, 14 Jan 2017 07:57:46 GMT
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java b/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
deleted file mode 100644
index e61dcd5..0000000
--- a/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
+++ /dev/null
@@ -1,164 +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.locks;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-import java.nio.channels.OverlappingFileLockException;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.impl.FileFactory;
-
-/**
- * This class handles the file locking in the local file system.
- * This will be handled using the file channel lock API.
- */
-public class LocalFileLock extends AbstractCarbonLock {
-  /**
-   * location is the location of the lock file.
-   */
-  private String location;
-
-  /**
-   * fileOutputStream of the local lock file
-   */
-  private FileOutputStream fileOutputStream;
-
-  /**
-   * channel is the FileChannel of the lock file.
-   */
-  private FileChannel channel;
-
-  /**
-   * fileLock NIO FileLock Object
-   */
-  private FileLock fileLock;
-
-  /**
-   * lock file
-   */
-  private String lockFile;
-
-  public static final String tmpPath;
-
-  private  String lockFilePath;
-
-  /**
-   * LOGGER for  logging the messages.
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(LocalFileLock.class.getName());
-
-  static {
-    tmpPath = System.getProperty("java.io.tmpdir");
-  }
-
-  /**
-   * @param lockFileLocation
-   * @param lockFile
-   */
-  public LocalFileLock(String lockFileLocation, String lockFile) {
-    this.location = tmpPath + CarbonCommonConstants.FILE_SEPARATOR + lockFileLocation;
-    this.lockFile = lockFile;
-    initRetry();
-  }
-
-  /**
-   * @param tableIdentifier
-   * @param lockFile
-   */
-  public LocalFileLock(CarbonTableIdentifier tableIdentifier, String lockFile) {
-    this(tableIdentifier.getDatabaseName() + CarbonCommonConstants.FILE_SEPARATOR + tableIdentifier
-        .getTableName(), lockFile);
-    initRetry();
-  }
-
-  /**
-   * Lock API for locking of the file channel of the lock file.
-   *
-   * @return
-   */
-  @Override public boolean lock() {
-    try {
-      if (!FileFactory.isFileExist(location, FileFactory.getFileType(tmpPath))) {
-        FileFactory.mkdirs(location, FileFactory.getFileType(tmpPath));
-      }
-      lockFilePath = location + CarbonCommonConstants.FILE_SEPARATOR +
-          lockFile;
-      if (!FileFactory.isFileExist(lockFilePath, FileFactory.getFileType(location))) {
-        FileFactory.createNewLockFile(lockFilePath, FileFactory.getFileType(location));
-      }
-
-      fileOutputStream = new FileOutputStream(lockFilePath);
-      channel = fileOutputStream.getChannel();
-      try {
-        fileLock = channel.tryLock();
-      } catch (OverlappingFileLockException e) {
-        return false;
-      }
-      if (null != fileLock) {
-        return true;
-      } else {
-        return false;
-      }
-    } catch (IOException e) {
-      return false;
-    }
-
-  }
-
-  /**
-   * Unlock API for unlocking of the acquired lock.
-   *
-   * @return
-   */
-  @Override public boolean unlock() {
-    boolean status;
-    try {
-      if (null != fileLock) {
-        fileLock.release();
-      }
-      status = true;
-    } catch (IOException e) {
-      status = false;
-    } finally {
-      if (null != fileOutputStream) {
-        try {
-          fileOutputStream.close();
-          // deleting the lock file after releasing the lock.
-          if (FileFactory.getCarbonFile(lockFilePath, FileFactory.getFileType(lockFilePath))
-              .delete()) {
-            LOGGER.info("Successfully deleted the lock file " + lockFilePath);
-          } else {
-            LOGGER.error("Not able to delete the lock file " + lockFilePath);
-          }
-        } catch (IOException e) {
-          LOGGER.error(e.getMessage());
-        }
-      }
-    }
-    return status;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/main/java/org/apache/carbondata/locks/LockUsage.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/locks/LockUsage.java b/core/src/main/java/org/apache/carbondata/locks/LockUsage.java
deleted file mode 100644
index b323447..0000000
--- a/core/src/main/java/org/apache/carbondata/locks/LockUsage.java
+++ /dev/null
@@ -1,36 +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.locks;
-
-/**
- * This enum is used to define the usecase of the lock.
- * Each enum value is one specific lock case.
- */
-public class LockUsage {
-  public static final String LOCK = ".lock";
-  public static final String METADATA_LOCK = "meta.lock";
-  public static final String COMPACTION_LOCK = "compaction.lock";
-  public static final String SYSTEMLEVEL_COMPACTION_LOCK = "system_level_compaction.lock";
-  public static final String TABLE_STATUS_LOCK = "tablestatus.lock";
-  public static final String TABLE_UPDATE_STATUS_LOCK = "tableupdatestatus.lock";
-  public static final String DELETE_SEGMENT_LOCK = "delete_segment.lock";
-  public static final String CLEAN_FILES_LOCK = "clean_files.lock";
-  public static final String DROP_TABLE_LOCK = "droptable.lock";
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/main/java/org/apache/carbondata/locks/ZooKeeperLocking.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/locks/ZooKeeperLocking.java b/core/src/main/java/org/apache/carbondata/locks/ZooKeeperLocking.java
deleted file mode 100644
index 1661eb2..0000000
--- a/core/src/main/java/org/apache/carbondata/locks/ZooKeeperLocking.java
+++ /dev/null
@@ -1,195 +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.locks;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.util.CarbonProperties;
-
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooDefs.Ids;
-import org.apache.zookeeper.ZooKeeper;
-
-/**
- * For Handling the zookeeper locking implementation
- */
-public class ZooKeeperLocking extends AbstractCarbonLock {
-
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(ZooKeeperLocking.class.getName());
-
-  /**
-   * zk is the zookeeper client instance
-   */
-  private static ZooKeeper zk;
-
-  /**
-   * zooKeeperLocation is the location in the zoo keeper file system where the locks will be
-   * maintained.
-   */
-  private static final String zooKeeperLocation = CarbonCommonConstants.ZOOKEEPER_LOCATION;
-
-  /**
-   * Unique folder for each table with DatabaseName_TableName
-   */
-  private final String tableIdFolder;
-
-  /**
-   * lockName is the name of the lock to use. This name should be same for every process that want
-   * to share the same lock
-   */
-  private String lockName;
-
-  /**
-   * lockPath is the unique path created for the each instance of the carbon lock.
-   */
-  private String lockPath;
-
-  private String lockTypeFolder;
-
-  public ZooKeeperLocking(CarbonTableIdentifier tableIdentifier, String lockFile) {
-    this(tableIdentifier.getDatabaseName() + File.separator + tableIdentifier.getTableName(),
-        lockFile);
-  }
-
-  /**
-   * @param lockLocation
-   * @param lockFile
-   */
-  public ZooKeeperLocking(String lockLocation, String lockFile) {
-    this.lockName = lockFile;
-    this.tableIdFolder = zooKeeperLocation + CarbonCommonConstants.FILE_SEPARATOR + lockLocation;
-
-    String zooKeeperUrl =
-        CarbonProperties.getInstance().getProperty(CarbonCommonConstants.ZOOKEEPER_URL);
-    zk = ZookeeperInit.getInstance(zooKeeperUrl).getZookeeper();
-
-    this.lockTypeFolder = zooKeeperLocation + CarbonCommonConstants.FILE_SEPARATOR + lockLocation
-        + CarbonCommonConstants.FILE_SEPARATOR + lockFile;
-    try {
-      createBaseNode();
-      // if exists returns null then path doesnt exist. so creating.
-      if (null == zk.exists(this.tableIdFolder, true)) {
-        createRecursivly(this.tableIdFolder);
-      }
-      // if exists returns null then path doesnt exist. so creating.
-      if (null == zk.exists(this.lockTypeFolder, true)) {
-        zk.create(this.lockTypeFolder, new byte[1], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-      }
-    } catch (KeeperException | InterruptedException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    initRetry();
-  }
-
-  /**
-   * Creating a znode in which all the znodes (lock files )are maintained.
-   */
-  private void createBaseNode() throws KeeperException, InterruptedException {
-    if (null == zk.exists(zooKeeperLocation, true)) {
-      // creating a znode in which all the znodes (lock files )are maintained.
-      zk.create(zooKeeperLocation, new byte[1], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-    }
-  }
-
-  /**
-   * Create zookeepr node if not exist
-   * @param path
-   * @throws KeeperException
-   * @throws InterruptedException
-   */
-  private void createRecursivly(String path) throws KeeperException, InterruptedException {
-    try {
-      if (zk.exists(path, true) == null && path.length() > 0) {
-        String temp = path.substring(0, path.lastIndexOf(File.separator));
-        createRecursivly(temp);
-        zk.create(path, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-      } else {
-        return;
-      }
-    } catch (KeeperException e) {
-      throw e;
-    } catch (InterruptedException e) {
-      throw e;
-    }
-
-  }
-  /**
-   * Handling of the locking mechanism using zoo keeper.
-   */
-  @Override public boolean lock() {
-    try {
-      // create the lock file with lockName.
-      lockPath =
-          zk.create(this.lockTypeFolder + CarbonCommonConstants.FILE_SEPARATOR + lockName, null,
-              Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL_SEQUENTIAL);
-
-      // get the children present in zooKeeperLocation.
-      List<String> nodes = zk.getChildren(this.lockTypeFolder, null);
-
-      // sort the childrens
-      Collections.sort(nodes);
-
-      // here the logic is , for each lock request zookeeper will create a file ending with
-      // incremental digits.
-      // so first request will be 00001 next is 00002 and so on.
-      // if the current request is 00002 and already one previous request(00001) is present then get
-      // children will give both nodes.
-      // after the sort we are checking if the lock path is first or not .if it is first then lock
-      // has been acquired.
-
-      if (lockPath.endsWith(nodes.get(0))) {
-        return true;
-      } else {
-        // if locking failed then deleting the created lock as next time again new lock file will be
-        // created.
-        zk.delete(lockPath, -1);
-        return false;
-      }
-    } catch (KeeperException | InterruptedException e) {
-      LOGGER.error(e, e.getMessage());
-      return false;
-    }
-  }
-
-  /**
-   * @return status where lock file is unlocked or not.
-   */
-  @Override public boolean unlock() {
-    try {
-      // exists will return null if the path doesn't exists.
-      if (null != zk.exists(lockPath, true)) {
-        zk.delete(lockPath, -1);
-        lockPath = null;
-      }
-    } catch (KeeperException | InterruptedException e) {
-      LOGGER.error(e, e.getMessage());
-      return false;
-    }
-    return true;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/main/java/org/apache/carbondata/locks/ZookeeperInit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/locks/ZookeeperInit.java b/core/src/main/java/org/apache/carbondata/locks/ZookeeperInit.java
deleted file mode 100644
index b70579e..0000000
--- a/core/src/main/java/org/apache/carbondata/locks/ZookeeperInit.java
+++ /dev/null
@@ -1,82 +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.locks;
-
-import java.io.IOException;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-
-import org.apache.zookeeper.WatchedEvent;
-import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.ZooKeeper;
-
-/**
- * This is a singleton class for initialization of zookeeper client.
- */
-public class ZookeeperInit {
-
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(ZookeeperInit.class.getName());
-
-  private static ZookeeperInit zooKeeperInit;
-  /**
-   * zk is the zookeeper client instance
-   */
-  private ZooKeeper zk;
-
-  private ZookeeperInit(String zooKeeperUrl) {
-
-    int sessionTimeOut = 100000;
-    try {
-      zk = new ZooKeeper(zooKeeperUrl, sessionTimeOut, new DummyWatcher());
-
-    } catch (IOException e) {
-      LOGGER.error(e.getMessage());
-    }
-
-  }
-
-  public static ZookeeperInit getInstance(String zooKeeperUrl) {
-
-    if (null == zooKeeperInit) {
-      synchronized (ZookeeperInit.class) {
-        if (null == zooKeeperInit) {
-          LOGGER.info("Initiating Zookeeper client.");
-          zooKeeperInit = new ZookeeperInit(zooKeeperUrl);
-        }
-      }
-    }
-    return zooKeeperInit;
-
-  }
-
-  public static ZookeeperInit getInstance() {
-    return zooKeeperInit;
-  }
-
-  public ZooKeeper getZookeeper() {
-    return zk;
-  }
-
-  private static class DummyWatcher implements Watcher {
-    public void process(WatchedEvent event) {
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/AbsoluteTableIdentifierTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/AbsoluteTableIdentifierTest.java b/core/src/test/java/org/apache/carbondata/core/AbsoluteTableIdentifierTest.java
index aaf0d97..42a5057 100644
--- a/core/src/test/java/org/apache/carbondata/core/AbsoluteTableIdentifierTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/AbsoluteTableIdentifierTest.java
@@ -19,8 +19,8 @@
 
 package org.apache.carbondata.core;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 
 import org.junit.BeforeClass;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/CarbonTableIdentifierTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/CarbonTableIdentifierTest.java b/core/src/test/java/org/apache/carbondata/core/CarbonTableIdentifierTest.java
index 942291c..bf0402d 100644
--- a/core/src/test/java/org/apache/carbondata/core/CarbonTableIdentifierTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/CarbonTableIdentifierTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.carbondata.core;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 
 import org.junit.BeforeClass;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/ColumnIdentifierTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/ColumnIdentifierTest.java b/core/src/test/java/org/apache/carbondata/core/ColumnIdentifierTest.java
index f4e7094..4ce3cd5 100644
--- a/core/src/test/java/org/apache/carbondata/core/ColumnIdentifierTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/ColumnIdentifierTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.carbondata.core;
 
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
index 4fd4d37..30bfdd5 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
@@ -32,8 +32,8 @@ import java.util.List;
 import java.util.Properties;
 
 import org.apache.carbondata.core.cache.Cache;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
index cae1b06..dbfc628 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
@@ -26,8 +26,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.reader.CarbonDictionaryReaderImpl;
 import org.apache.carbondata.core.reader.sortindex.CarbonDictionarySortIndexReaderImpl;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
index f5e9854..2fc8bcd 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
@@ -21,8 +21,8 @@ package org.apache.carbondata.core.cache.dictionary;
 import mockit.Mock;
 import mockit.MockUp;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryCacheTest.java
index 020f65a..c6fda5c 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryCacheTest.java
@@ -30,8 +30,8 @@ import java.util.UUID;
 import org.apache.carbondata.core.cache.Cache;
 import org.apache.carbondata.core.cache.CacheProvider;
 import org.apache.carbondata.core.cache.CacheType;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.writer.sortindex.CarbonDictionarySortIndexWriter;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
index 7bb60aa..c0310d7 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
@@ -34,8 +34,8 @@ import mockit.MockUp;
 import org.apache.carbondata.core.cache.Cache;
 import org.apache.carbondata.core.cache.CacheProvider;
 import org.apache.carbondata.core.cache.CacheType;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.reader.CarbonDictionaryColumnMetaChunk;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
index 56ed162..180c82f 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
@@ -27,9 +27,9 @@ import java.util.Map;
 
 import org.apache.carbondata.core.cache.CacheProvider;
 import org.apache.carbondata.core.cache.CacheType;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.block.AbstractIndex;
 import org.apache.carbondata.core.datastore.block.SegmentTaskIndex;
 import org.apache.carbondata.core.datastore.block.SegmentTaskIndexWrapper;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/datastore/block/BlockInfoTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/BlockInfoTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/BlockInfoTest.java
index e71d4f9..f0e16c5 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/BlockInfoTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/block/BlockInfoTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.carbondata.core.datastore.block;
 
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.junit.BeforeClass;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/datastore/block/TableBlockInfoTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/TableBlockInfoTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/TableBlockInfoTest.java
index 21270e7..3592a16 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/TableBlockInfoTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/block/TableBlockInfoTest.java
@@ -21,7 +21,7 @@ package org.apache.carbondata.core.datastore.block;
 import mockit.Mock;
 import mockit.MockUp;
 
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.path.CarbonTablePath;
 
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/datastore/block/TableTaskInfoTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/TableTaskInfoTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/TableTaskInfoTest.java
index c64c33f..c2229cf 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/TableTaskInfoTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/block/TableTaskInfoTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.carbondata.core.datastore.block;
 
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.junit.BeforeClass;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/path/CarbonFormatDirectoryStructureTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/path/CarbonFormatDirectoryStructureTest.java b/core/src/test/java/org/apache/carbondata/core/path/CarbonFormatDirectoryStructureTest.java
index 684d48d..50c68bb 100644
--- a/core/src/test/java/org/apache/carbondata/core/path/CarbonFormatDirectoryStructureTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/path/CarbonFormatDirectoryStructureTest.java
@@ -22,9 +22,8 @@ package org.apache.carbondata.core.path;
 import java.io.IOException;
 import java.util.UUID;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.path.CarbonStorePath;
-import org.apache.carbondata.core.path.CarbonTablePath;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+
 import org.junit.Test;
 
 import static junit.framework.TestCase.assertTrue;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImplTest.java b/core/src/test/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImplTest.java
index 59ac840..5432ad6 100644
--- a/core/src/test/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImplTest.java
@@ -27,8 +27,8 @@ import java.util.UUID;
 
 import org.apache.carbondata.core.service.impl.PathFactory;
 import org.apache.carbondata.core.service.CarbonCommonFactory;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.service.PathService;
 
 import mockit.Mock;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImplTest.java b/core/src/test/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImplTest.java
index e1e0e94..e0708dc 100644
--- a/core/src/test/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImplTest.java
@@ -24,8 +24,8 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
 import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.util.CarbonUtil;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java b/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
index 1da4415..72fa8af 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
@@ -23,8 +23,8 @@ import java.util.List;
 import java.util.UUID;
 
 import org.apache.carbondata.core.cache.dictionary.AbstractDictionaryCacheTest;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.datastore.IndexKey;
 import org.apache.carbondata.core.datastore.block.SegmentProperties;
 import org.apache.carbondata.core.metadata.DataType;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLockTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLockTest.java b/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLockTest.java
new file mode 100644
index 0000000..d69b6be
--- /dev/null
+++ b/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/LocalFileLockTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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.locks;
+
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.pentaho.di.core.util.Assert;
+
+/**
+ * Test class to test the functionality of the local file locking.
+ *
+ * @author Administrator
+ */
+public class LocalFileLockTest {
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @Before public void setUp() throws Exception {
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @After public void tearDown() throws Exception {
+  }
+
+  @Test public void testingLocalFileLockingByAcquiring2Locks() {
+
+	CarbonTableIdentifier carbonTableIdentifier = new CarbonTableIdentifier("databaseName", "tableName", "tableId");
+    LocalFileLock localLock1 =
+        new LocalFileLock(carbonTableIdentifier,
+            LockUsage.METADATA_LOCK);
+    Assert.assertTrue(localLock1.lock());
+    LocalFileLock localLock2 =
+        new LocalFileLock(carbonTableIdentifier,
+            LockUsage.METADATA_LOCK);
+    Assert.assertTrue(!localLock2.lock());
+
+    Assert.assertTrue(localLock1.unlock());
+    Assert.assertTrue(localLock2.lock());
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLockingTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLockingTest.java b/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLockingTest.java
new file mode 100644
index 0000000..f0037cf
--- /dev/null
+++ b/core/src/test/java/org/apache/carbondata/core/updatestatus/locks/ZooKeeperLockingTest.java
@@ -0,0 +1,142 @@
+/*
+ * 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.locks;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.Properties;
+
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.util.CarbonProperties;
+
+import mockit.NonStrictExpectations;
+import org.apache.zookeeper.server.ServerConfig;
+import org.apache.zookeeper.server.ZooKeeperServerMain;
+import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author Administrator
+ */
+public class ZooKeeperLockingTest {
+
+  int freePort;
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @Before public void setUp() throws Exception {
+    Properties startupProperties = new Properties();
+    startupProperties.setProperty("dataDir", (new File("./target").getAbsolutePath()));
+    startupProperties.setProperty("dataLogDir", (new File("./target").getAbsolutePath()));
+    freePort = findFreePort();
+    startupProperties.setProperty("clientPort", "" + freePort);
+    QuorumPeerConfig quorumConfiguration = new QuorumPeerConfig();
+    try {
+      quorumConfiguration.parseProperties(startupProperties);
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+
+    final ZooKeeperServerMain zooKeeperServer = new ZooKeeperServerMain();
+    final ServerConfig configuration = new ServerConfig();
+    configuration.readFrom(quorumConfiguration);
+    new Thread() {
+      public void run() {
+        try {
+          zooKeeperServer.runFromConfig(configuration);
+        } catch (IOException e) {
+          System.out.println("ZooKeeper failure");
+        }
+      }
+    }.start();
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @After public void tearDown() throws Exception {
+  }
+
+  @Test public void testZooKeeperLockingByTryingToAcquire2Locks()
+      throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException,
+      SecurityException {
+
+    final CarbonProperties cp = CarbonProperties.getInstance();
+    new NonStrictExpectations(cp) {
+      {
+        cp.getProperty("/CarbonLocks");
+        result = "/carbontests";
+        cp.getProperty("spark.deploy.zookeeper.url");
+        result = "127.0.0.1:" + freePort;
+      }
+    };
+
+    ZookeeperInit zki = ZookeeperInit.getInstance("127.0.0.1:" + freePort);
+
+    CarbonTableIdentifier tableIdentifier = new CarbonTableIdentifier("dbName", "tableName", "tableId");
+    ZooKeeperLocking zkl =
+        new ZooKeeperLocking(tableIdentifier,
+            LockUsage.METADATA_LOCK);
+    Assert.assertTrue(zkl.lock());
+
+    ZooKeeperLocking zk2 = new ZooKeeperLocking(
+    		tableIdentifier, LockUsage.METADATA_LOCK);
+    Assert.assertTrue(!zk2.lock());
+
+    Assert.assertTrue(zkl.unlock());
+    Assert.assertTrue(zk2.lock());
+    Assert.assertTrue(zk2.unlock());
+  }
+
+  /**
+   * For finding the free port available.
+   *
+   * @return
+   */
+  private static int findFreePort() {
+    ServerSocket socket = null;
+    try {
+      socket = new ServerSocket(0);
+      socket.setReuseAddress(true);
+      int port = socket.getLocalPort();
+      try {
+        socket.close();
+      } catch (IOException e) {
+        // Ignore IOException on close()
+      }
+      return port;
+    } catch (Exception e) {
+      // Ignore
+    } finally {
+      if (socket != null) {
+        try {
+          socket.close();
+        } catch (IOException e) {
+          throw new RuntimeException(e);
+        }
+      }
+    }
+    return 2181;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java b/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
index 7f6edd1..37f1ef6 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
@@ -21,7 +21,7 @@ package org.apache.carbondata.core.util;
 import mockit.Mock;
 import mockit.MockUp;
 
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;
 import org.apache.carbondata.core.datastore.chunk.impl.FixedLengthDimensionDataChunk;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java b/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
index f1ee0a0..f1b8070 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
@@ -22,7 +22,7 @@ package org.apache.carbondata.core.util;
 import mockit.Mock;
 import mockit.MockUp;
 
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.blocklet.SegmentInfo;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImplTest.java b/core/src/test/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImplTest.java
index 6037ee8..4994942 100644
--- a/core/src/test/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImplTest.java
@@ -34,8 +34,8 @@ import java.util.List;
 import java.util.Properties;
 import java.util.UUID;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImplTest.java b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImplTest.java
index 2f5841c..2b689be 100644
--- a/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImplTest.java
@@ -24,8 +24,8 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.reader.sortindex.CarbonDictionarySortIndexReader;
 import org.apache.carbondata.core.reader.sortindex.CarbonDictionarySortIndexReaderImpl;
 import org.apache.carbondata.core.util.CarbonUtil;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/examples/spark/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
----------------------------------------------------------------------
diff --git a/examples/spark/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala b/examples/spark/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
index 148940a..1a0e9bc 100644
--- a/examples/spark/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
+++ b/examples/spark/src/main/scala/org/apache/carbondata/examples/GenerateDictionaryExample.scala
@@ -19,11 +19,11 @@ package org.apache.carbondata.examples
 
 import org.apache.spark.sql.{CarbonContext, CarbonEnv, CarbonRelation}
 
-import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension
 import org.apache.carbondata.core.path.CarbonStorePath
 import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier
 import org.apache.carbondata.examples.util.ExampleUtils
 import org.apache.carbondata.spark.load.CarbonLoaderUtil
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 23429c4..362510e 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java
@@ -23,8 +23,8 @@ import java.lang.reflect.Constructor;
 import java.util.*;
 
 import org.apache.carbondata.core.update.data.BlockMappingVO;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.DataRefNode;
 import org.apache.carbondata.core.datastore.DataRefNodeFinder;
 import org.apache.carbondata.core.datastore.IndexKey;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 a42995f..115fc7d 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java
@@ -27,7 +27,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.carbondata.core.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.block.BlockletInfos;
 import org.apache.carbondata.core.datastore.block.Distributable;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonMultiBlockSplit.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonMultiBlockSplit.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonMultiBlockSplit.java
index ff30b2f..06118ab 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonMultiBlockSplit.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonMultiBlockSplit.java
@@ -25,7 +25,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.mapreduce.InputSplit;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/internal/index/impl/InMemoryBTreeIndex.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/internal/index/impl/InMemoryBTreeIndex.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/internal/index/impl/InMemoryBTreeIndex.java
index a036b2a..221700c 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/internal/index/impl/InMemoryBTreeIndex.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/internal/index/impl/InMemoryBTreeIndex.java
@@ -26,7 +26,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.datastore.DataRefNode;
 import org.apache.carbondata.core.datastore.DataRefNodeFinder;
 import org.apache.carbondata.core.datastore.IndexKey;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/CarbonReadSupport.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/CarbonReadSupport.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/CarbonReadSupport.java
index d96ad4c..0a99615 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/CarbonReadSupport.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/CarbonReadSupport.java
@@ -20,7 +20,7 @@ package org.apache.carbondata.hadoop.readsupport;
 
 import java.io.IOException;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/AbstractDictionaryDecodedReadSupport.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/AbstractDictionaryDecodedReadSupport.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/AbstractDictionaryDecodedReadSupport.java
index c561ec4..6ce7495 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/AbstractDictionaryDecodedReadSupport.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/AbstractDictionaryDecodedReadSupport.java
@@ -25,7 +25,7 @@ import org.apache.carbondata.core.cache.CacheProvider;
 import org.apache.carbondata.core.cache.CacheType;
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+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.schema.table.column.CarbonColumn;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/ArrayWritableReadSupport.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/ArrayWritableReadSupport.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/ArrayWritableReadSupport.java
index bf48952..c787d3e 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/ArrayWritableReadSupport.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/ArrayWritableReadSupport.java
@@ -18,7 +18,7 @@
  */
 package org.apache.carbondata.hadoop.readsupport.impl;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn;
 import org.apache.carbondata.hadoop.readsupport.CarbonReadSupport;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/RawDataReadSupport.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/RawDataReadSupport.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/RawDataReadSupport.java
index b08b665..479c066 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/RawDataReadSupport.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/readsupport/impl/RawDataReadSupport.java
@@ -18,7 +18,7 @@
  */
 package org.apache.carbondata.hadoop.readsupport.impl;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn;
 import org.apache.carbondata.hadoop.readsupport.CarbonReadSupport;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonInputFormatUtil.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonInputFormatUtil.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonInputFormatUtil.java
index 7585032..790a42c 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonInputFormatUtil.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/CarbonInputFormatUtil.java
@@ -22,7 +22,7 @@ package org.apache.carbondata.hadoop.util;
 import java.io.IOException;
 import java.util.List;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/SchemaReader.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/SchemaReader.java b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/SchemaReader.java
index 9b95f0a..4450339 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/util/SchemaReader.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/util/SchemaReader.java
@@ -20,7 +20,7 @@ package org.apache.carbondata.hadoop.util;
 
 import java.io.IOException;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.CarbonMetadata;
 import org.apache.carbondata.core.metadata.converter.SchemaConverter;
 import org.apache.carbondata.core.metadata.converter.ThriftWrapperSchemaConverterImpl;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
index def162c..5bbbb83 100644
--- a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
+++ b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
@@ -25,7 +25,7 @@ import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.hadoop.CarbonInputFormat;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 fa3710f..384e7c6 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
@@ -26,10 +26,10 @@ import org.apache.carbondata.core.cache.CacheProvider;
 import org.apache.carbondata.core.cache.CacheType;
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.CarbonDataLoadSchema;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.processing.model.CarbonDataLoadSchema;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.CarbonMetadata;
 import org.apache.carbondata.core.metadata.converter.SchemaConverter;
 import org.apache.carbondata.core.metadata.converter.ThriftWrapperSchemaConverterImpl;
@@ -59,9 +59,9 @@ import org.apache.carbondata.core.writer.sortindex.CarbonDictionarySortIndexWrit
 import org.apache.carbondata.core.writer.sortindex.CarbonDictionarySortIndexWriterImpl;
 import org.apache.carbondata.core.writer.sortindex.CarbonDictionarySortInfo;
 import org.apache.carbondata.core.writer.sortindex.CarbonDictionarySortInfoPreparator;
-import org.apache.carbondata.fileoperations.AtomicFileOperations;
-import org.apache.carbondata.fileoperations.AtomicFileOperationsImpl;
-import org.apache.carbondata.fileoperations.FileWriteOperation;
+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.processing.api.dataloader.DataLoadModel;
 import org.apache.carbondata.processing.api.dataloader.SchemaInfo;
 import org.apache.carbondata.processing.constants.TableOptionConstant;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
index 5691605..01a4c66 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
@@ -23,9 +23,9 @@ import org.apache.spark.sql.Row
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension
 import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier
 
 /**
  * Test class of creating and loading for carbon table with double

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionBoundaryConditionsTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionBoundaryConditionsTest.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionBoundaryConditionsTest.scala
index 246f779..487dab8 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionBoundaryConditionsTest.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionBoundaryConditionsTest.scala
@@ -21,8 +21,8 @@ package org.apache.carbondata.spark.testsuite.datacompaction
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.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/d0d25c9b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
index 47976b7..5cc7af9 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionCardinalityBoundryTest.scala
@@ -24,8 +24,9 @@ import org.apache.spark.sql.Row
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.{AbsoluteTableIdentifier, CarbonTableIdentifier}
+import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonTableIdentifier}
 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/d0d25c9b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
index 4e7f6da..83753c5 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionLockTest.scala
@@ -25,12 +25,13 @@ import scala.collection.JavaConverters._
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.{AbsoluteTableIdentifier, CarbonTableIdentifier}
+import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.path.{CarbonStorePath, CarbonTablePath}
 import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonTableIdentifier}
 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.core.updatestatus.locks.{CarbonLockFactory, ICarbonLock, LockUsage}
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
index 8e29471..97d5fb0 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionIgnoreInMinorTest.scala
@@ -23,11 +23,12 @@ import scala.collection.JavaConverters._
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.{AbsoluteTableIdentifier, CarbonTableIdentifier}
+import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.datastore.TableSegmentUniqueIdentifier
 import org.apache.carbondata.core.datastore.block.SegmentTaskIndexWrapper
 import org.apache.carbondata.core.path.CarbonStorePath
 import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonTableIdentifier}
 import org.apache.carbondata.core.updatestatus.SegmentStatusManager
 import org.apache.carbondata.core.util.CarbonProperties
 import org.apache.carbondata.hadoop.CacheClient

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
index 6691f49..ce8f547 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
@@ -23,8 +23,9 @@ import scala.collection.JavaConverters._
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.{AbsoluteTableIdentifier, CarbonTableIdentifier}
+import org.apache.carbondata.core.CarbonTableIdentifier
 import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonTableIdentifier}
 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/d0d25c9b/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 92b7c71..76e815f 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
@@ -22,16 +22,17 @@ package org.apache.carbondata.spark.testsuite.dataretention
 import java.text.SimpleDateFormat
 
 import org.apache.carbondata.core.updatestatus.SegmentStatusManager
-import org.apache.carbondata.locks.{CarbonLockFactory, ICarbonLock, LockUsage}
+import org.apache.carbondata.core.updatestatus.locks.{CarbonLockFactory, ICarbonLock, LockUsage}
 import org.apache.commons.lang3.time.DateUtils
 import org.apache.spark.sql.Row
 import org.apache.spark.sql.common.util.QueryTest
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.{AbsoluteTableIdentifier, CarbonTableIdentifier}
+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/d0d25c9b/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 fbcccda..9c80d7c 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
@@ -32,9 +32,9 @@ import org.apache.carbondata.core.cache.CacheProvider;
 import org.apache.carbondata.core.cache.CacheType;
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.CarbonTableIdentifier;
-import org.apache.carbondata.core.ColumnIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.datastore.block.Distributable;
 import org.apache.carbondata.core.metadata.CarbonMetadata;
 import org.apache.carbondata.core.metadata.DataType;
@@ -51,10 +51,10 @@ 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.core.util.CarbonUtil;
-import org.apache.carbondata.fileoperations.AtomicFileOperations;
-import org.apache.carbondata.fileoperations.AtomicFileOperationsImpl;
-import org.apache.carbondata.fileoperations.FileWriteOperation;
-import org.apache.carbondata.locks.ICarbonLock;
+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.ICarbonLock;
 import org.apache.carbondata.processing.api.dataloader.DataLoadModel;
 import org.apache.carbondata.processing.api.dataloader.SchemaInfo;
 import org.apache.carbondata.processing.csvload.DataGraphExecuter;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 16dfcba..3c18f64 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
@@ -35,7 +35,7 @@ import java.util.List;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.CarbonTableIdentifier;
+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;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonCompactionUtil.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonCompactionUtil.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonCompactionUtil.java
index e9bd4ae..fb19387 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonCompactionUtil.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonCompactionUtil.java
@@ -26,7 +26,7 @@ import java.util.Map;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.datastore.block.TableBlockInfo;
 import org.apache.carbondata.core.datastore.block.TaskBlockInfo;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 5523dcf..7ef4cec 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
@@ -27,8 +27,8 @@ import java.util.*;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
@@ -45,9 +45,9 @@ import org.apache.carbondata.core.updatestatus.SegmentStatusManager;
 import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.writer.CarbonDeleteDeltaWriterImpl;
-import org.apache.carbondata.locks.CarbonLockFactory;
-import org.apache.carbondata.locks.ICarbonLock;
-import org.apache.carbondata.locks.LockUsage;
+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.processing.model.CarbonLoadModel;
 import org.apache.carbondata.spark.load.CarbonLoaderUtil;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 825c98d..3802ed2 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
@@ -23,7 +23,7 @@ import java.util.*;
 
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.datastore.block.SegmentProperties;
 import org.apache.carbondata.core.metadata.CarbonMetadata;
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/TableMeta.java
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/TableMeta.java b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/TableMeta.java
index f88c678..887c06c 100644
--- a/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/TableMeta.java
+++ b/integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/TableMeta.java
@@ -21,7 +21,7 @@ package org.apache.carbondata.spark.merger;
 
 import java.io.Serializable;
 
-import org.apache.carbondata.core.CarbonTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
 
 public class TableMeta implements Serializable {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common/src/main/scala/org/apache/carbondata/api/CarbonStore.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/api/CarbonStore.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/api/CarbonStore.scala
index a3bdfc6..df3ee75 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/api/CarbonStore.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/api/CarbonStore.scala
@@ -27,8 +27,7 @@ import org.apache.spark.sql.catalyst.expressions.{Cast, Literal}
 import org.apache.spark.sql.types.TimestampType
 
 import org.apache.carbondata.common.logging.LogServiceFactory
-import org.apache.carbondata.core.AbsoluteTableIdentifier
-import org.apache.carbondata.core.metadata.CarbonMetadata
+import org.apache.carbondata.core.metadata.{AbsoluteTableIdentifier, CarbonMetadata}
 import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.updatestatus.SegmentStatusManager
 import org.apache.carbondata.spark.exception.MalformedCarbonCommandException

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonSparkFactory.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonSparkFactory.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonSparkFactory.scala
index 7cc1dcb..89cbe41 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonSparkFactory.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonSparkFactory.scala
@@ -16,8 +16,8 @@
  */
 package org.apache.carbondata.spark
 
-import org.apache.carbondata.core.{CarbonTableIdentifier, ColumnIdentifier}
 import org.apache.carbondata.core.metadata.schema.table.column.{CarbonDimension, ColumnSchema}
+import org.apache.carbondata.core.metadata.{CarbonTableIdentifier, ColumnIdentifier}
 
  /**
   * Column validator

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/DictionaryDetailHelper.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/DictionaryDetailHelper.scala b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/DictionaryDetailHelper.scala
index bd8e54c..9ebda94 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/DictionaryDetailHelper.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/DictionaryDetailHelper.scala
@@ -22,8 +22,8 @@ import scala.collection.mutable.HashMap
 import org.apache.carbondata.core.datastorage.filesystem.{CarbonFile, CarbonFileFilter}
 import org.apache.carbondata.core.datastorage.impl.FileFactory
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension
+import org.apache.carbondata.core.metadata.{CarbonTableIdentifier, ColumnIdentifier}
 import org.apache.carbondata.core.path.{CarbonStorePath, CarbonTablePath}
-import org.apache.carbondata.core.{CarbonTableIdentifier, ColumnIdentifier}
 
 class DictionaryDetailHelper extends DictionaryDetailService {
   def getDictionaryDetail(dictfolderPath: String, primDimensions: Array[CarbonDimension],

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d0d25c9b/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 045ed2f..c6247d0 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
@@ -33,15 +33,16 @@ import org.apache.spark.rdd.RDD
 import org.apache.spark.sql.Row
 
 import org.apache.carbondata.common.logging.LogServiceFactory
-import org.apache.carbondata.core.{CarbonTableIdentifier, ColumnIdentifier}
+import org.apache.carbondata.core.metadata.ColumnIdentifier
 import org.apache.carbondata.core.cache.dictionary.Dictionary
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension
 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.metadata.{CarbonTableIdentifier, ColumnIdentifier}
 import org.apache.carbondata.core.service.{CarbonCommonFactory, PathService}
 import org.apache.carbondata.core.util.{CarbonProperties, CarbonTimeStatisticsFactory, CarbonUtil}
-import org.apache.carbondata.locks.{CarbonLockFactory, LockUsage}
+import org.apache.carbondata.core.updatestatus.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}



Mime
View raw message