tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hj...@apache.org
Subject [20/20] tajo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into hbase_storage
Date Tue, 25 Nov 2014 14:46:01 GMT
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into hbase_storage

Conflicts:
	tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java
	tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
	tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
	tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
	tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/87c957e4
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/87c957e4
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/87c957e4

Branch: refs/heads/hbase_storage
Commit: 87c957e4399aa4e8dc382c48c11b21fe4485335b
Parents: 337677b f6e09a5
Author: HyoungJun Kim <babokim@babokim-MacBook-Pro.local>
Authored: Tue Nov 25 23:44:58 2014 +0900
Committer: HyoungJun Kim <babokim@babokim-MacBook-Pro.local>
Committed: Tue Nov 25 23:44:58 2014 +0900

----------------------------------------------------------------------
 CHANGES                                         |  2 +
 .../org/apache/tajo/catalog/CatalogUtil.java    |  2 +-
 .../java/org/apache/tajo/catalog/TableDesc.java | 21 ++++---
 .../org/apache/tajo/catalog/TestTableDesc.java  | 10 +--
 .../tajo/catalog/store/HCatalogStore.java       | 11 ++--
 .../tajo/catalog/store/TestHCatalogStore.java   | 22 +++----
 .../org/apache/tajo/catalog/TestCatalog.java    | 16 ++---
 .../org/apache/tajo/jdbc/TajoResultSet.java     |  4 +-
 .../engine/planner/global/GlobalPlanner.java    |  2 +-
 .../planner/physical/PhysicalPlanUtil.java      |  7 ++-
 .../org/apache/tajo/master/GlobalEngine.java    | 18 +++---
 .../apache/tajo/master/querymaster/Query.java   |  6 +-
 .../tajo/master/querymaster/Repartitioner.java  |  2 +-
 .../apache/tajo/LocalTajoTestingUtility.java    |  2 +-
 .../java/org/apache/tajo/QueryTestCaseBase.java |  4 +-
 .../apache/tajo/cli/tools/TestDDLBuilder.java   |  8 +--
 .../org/apache/tajo/client/TestTajoClient.java  | 18 +++---
 .../apache/tajo/engine/eval/ExprTestBase.java   |  2 +-
 .../tajo/engine/eval/TestEvalTreeUtil.java      |  2 +-
 .../engine/planner/TestLogicalOptimizer.java    |  6 +-
 .../tajo/engine/planner/TestLogicalPlanner.java |  6 +-
 .../tajo/engine/planner/TestPlannerUtil.java    |  8 +--
 .../planner/physical/TestBNLJoinExec.java       | 14 +++--
 .../planner/physical/TestBSTIndexExec.java      |  2 +-
 .../planner/physical/TestExternalSortExec.java  |  6 +-
 .../physical/TestFullOuterHashJoinExec.java     | 23 ++++---
 .../physical/TestFullOuterMergeJoinExec.java    | 31 +++++-----
 .../planner/physical/TestHashAntiJoinExec.java  |  8 +--
 .../planner/physical/TestHashJoinExec.java      | 14 +++--
 .../planner/physical/TestHashSemiJoinExec.java  | 13 ++--
 .../physical/TestLeftOuterHashJoinExec.java     | 38 ++++++------
 .../physical/TestLeftOuterNLJoinExec.java       | 20 +++---
 .../planner/physical/TestMergeJoinExec.java     |  8 +--
 .../engine/planner/physical/TestNLJoinExec.java | 16 ++---
 .../planner/physical/TestPhysicalPlanner.java   | 65 ++++++++++----------
 .../physical/TestProgressExternalSortExec.java  |  6 +-
 .../physical/TestRightOuterHashJoinExec.java    | 18 +++---
 .../physical/TestRightOuterMergeJoinExec.java   | 26 ++++----
 .../engine/planner/physical/TestSortExec.java   |  2 +-
 .../apache/tajo/engine/query/TestCTASQuery.java |  8 +--
 .../tajo/engine/query/TestCreateTable.java      |  9 +--
 .../tajo/engine/query/TestInsertQuery.java      |  6 +-
 .../tajo/engine/query/TestJoinBroadcast.java    |  9 +--
 .../tajo/engine/query/TestTablePartitions.java  | 26 ++++----
 .../org/apache/tajo/jdbc/TestResultSet.java     |  2 +-
 .../tajo/worker/TestRangeRetrieverHandler.java  |  4 +-
 .../org/apache/tajo/plan/LogicalPlanner.java    |  9 +--
 .../apache/tajo/plan/logical/InsertNode.java    |  4 +-
 .../rewrite/rules/PartitionedTableRewriter.java |  4 +-
 .../org/apache/tajo/plan/util/PlannerUtil.java  |  4 +-
 .../apache/tajo/storage/FileStorageManager.java | 15 ++---
 51 files changed, 310 insertions(+), 279 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/CHANGES
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java
----------------------------------------------------------------------
diff --cc tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java
index b75e924,e99c0ff..c0b01e2
--- a/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java
+++ b/tajo-client/src/main/java/org/apache/tajo/jdbc/TajoResultSet.java
@@@ -93,7 -92,7 +93,7 @@@ public class TajoResultSet extends Tajo
          totalRow = INFINITE_ROW_NUM;
        }
  
-       List<Fragment> frags = getFragments(desc.getPath());
 -      List<FileFragment> frags = getFragments(new Path(desc.getPath()));
++      List<Fragment> frags = getFragments(new Path(desc.getPath()));
        scanner = new MergeScanner(conf, desc.getSchema(), desc.getMeta(), frags);
      }
    }

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalPlanUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
----------------------------------------------------------------------
diff --cc tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
index d87ca30,47a8750..0d3ae19
--- a/tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
+++ b/tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
@@@ -722,18 -692,32 +722,18 @@@ public class GlobalEngine extends Abstr
        meta = CatalogUtil.newTableMeta(createTable.getStorageType());
      }
  
 -    if(createTable.isExternal()){
 +    if(PlannerUtil.isFileStorageType(createTable.getStorageType()) && createTable.isExternal()){
        Preconditions.checkState(createTable.hasPath(), "ERROR: LOCATION must be given.");
 -    } else {
 -      String databaseName;
 -      String tableName;
 -      if (CatalogUtil.isFQTableName(createTable.getTableName())) {
 -        databaseName = CatalogUtil.extractQualifier(createTable.getTableName());
 -        tableName = CatalogUtil.extractSimpleName(createTable.getTableName());
 -      } else {
 -        databaseName = queryContext.getCurrentDatabase();
 -        tableName = createTable.getTableName();
 -      }
 -
 -      // create a table directory (i.e., ${WAREHOUSE_DIR}/${DATABASE_NAME}/${TABLE_NAME} )
 -      Path tablePath = StorageUtil.concatPath(sm.getWarehouseDir(), databaseName, tableName);
 -      createTable.setPath(tablePath);
      }
  
 -    return createTableOnPath(queryContext, createTable.getTableName(), createTable.getTableSchema(),
 -        meta, createTable.getPath(), createTable.isExternal(), createTable.getPartitionMethod(), ifNotExists);
 +    return createTable(queryContext, createTable.getTableName(), createTable.getStorageType(),
 +        createTable.getTableSchema(), meta, createTable.getPath(), createTable.isExternal(),
 +        createTable.getPartitionMethod(), ifNotExists);
    }
  
 -  public TableDesc createTableOnPath(QueryContext queryContext, String tableName, Schema schema, TableMeta meta,
 -                                     Path path, boolean isExternal, PartitionMethodDesc partitionDesc,
 -                                     boolean ifNotExists)
 -      throws IOException {
 +  public TableDesc createTable(QueryContext queryContext, String tableName, StoreType storeType,
-                                Schema schema, TableMeta meta, Path location, boolean isExternal,
++                               Schema schema, TableMeta meta, Path path, boolean isExternal,
 +                               PartitionMethodDesc partitionDesc, boolean ifNotExists) throws IOException {
      String databaseName;
      String simpleTableName;
      if (CatalogUtil.isFQTableName(tableName)) {
@@@ -757,9 -741,35 +757,9 @@@
        }
      }
  
 -    FileSystem fs = path.getFileSystem(context.getConf());
 -
 -    if (isExternal) {
 -      if(!fs.exists(path)) {
 -        LOG.error("ERROR: " + path.toUri() + " does not exist");
 -        throw new IOException("ERROR: " + path.toUri() + " does not exist");
 -      }
 -    } else {
 -      fs.mkdirs(path);
 -    }
 -
 -    long totalSize = 0;
 -
 -    try {
 -      totalSize = sm.calculateSize(path);
 -    } catch (IOException e) {
 -      LOG.warn("Cannot calculate the size of the relation", e);
 -    }
 -
 -    TableStats stats = new TableStats();
 -    stats.setNumBytes(totalSize);
 -
 -    if (isExternal) { // if it is an external table, there is no way to know the exact row number without processing.
 -      stats.setNumRows(TajoConstants.UNKNOWN_ROW_NUMBER);
 -    }
 -
      TableDesc desc = new TableDesc(CatalogUtil.buildFQName(databaseName, simpleTableName),
-         schema, meta, location, isExternal);
- 
 -        schema, meta, path.toUri(), isExternal);
 -    desc.setStats(stats);
++        schema, meta, (path != null ? path.toUri(): null), isExternal);
++    
      if (partitionDesc != null) {
        desc.setPartitionMethod(partitionDesc);
      }
@@@ -864,10 -872,10 +864,10 @@@
  
      if (purge) {
        try {
-         StorageManager.getStorageManager(queryContext.getConf(), tableDesc.getMeta().getStoreType())
-             .purgeTable(tableDesc);
 -        FileSystem fs = path.getFileSystem(context.getConf());
 -        fs.delete(path, true);
++        StorageManager.getStorageManager(queryContext.getConf(),
++            tableDesc.getMeta().getStoreType()).purgeTable(tableDesc);
        } catch (IOException e) {
-         LOG.warn("Can't purge table: " + e.getMessage(), e);
+         throw new InternalError(e.getMessage());
        }
      }
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/main/java/org/apache/tajo/master/querymaster/Query.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
----------------------------------------------------------------------
diff --cc tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
index c5a41a1,55b1895..8164869
--- a/tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
+++ b/tajo-core/src/main/java/org/apache/tajo/master/querymaster/Repartitioner.java
@@@ -127,7 -121,7 +127,7 @@@ public class Repartitioner 
          if (fileFragments.size() > 0) {
            fragments[i] = fileFragments.get(0);
          } else {
-           fragments[i] = new FileFragment(scans[i].getCanonicalName(), tableDesc.getPath(), 0, 0, new String[]{UNKNOWN_HOST});
 -          fragments[i] = new FileFragment(scans[i].getCanonicalName(), tablePath, 0, 0, new String[]{UNKNOWN_HOST});
++          fragments[i] = new FileFragment(scans[i].getCanonicalName(), new Path(tableDesc.getPath()), 0, 0, new String[]{UNKNOWN_HOST});
          }
        }
      }

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/QueryTestCaseBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
index a1d657f,aef8064..9517e1b
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
@@@ -150,9 -150,11 +150,11 @@@ public class TestBNLJoinExec 
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.BLOCK_NESTED_LOOP_JOIN);
  
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()),
          Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testBNLCrossJoin");
@@@ -181,10 -183,10 +183,10 @@@
      LogicalNode plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf),
          context).getRootBlock().getRoot();
  
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), 
+         new Path(employee.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), 
+         new Path(people.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
index 89b623b,bb40b28..00d023e
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
@@@ -121,8 -121,8 +121,8 @@@ public class TestExternalSortExec 
  
    @Test
    public final void testNext() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      Path workDir = new Path(testDir, TestExternalSortExec.class.getName());
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(), new FileFragment[] { frags[0] }, workDir);

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
index dfabe18,c4ce43b..3a4e963
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
@@@ -266,8 -266,10 +266,10 @@@ public class TestFullOuterHashJoinExec 
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), dep3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] dep3Frags = StorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
++    FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
+         Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
+         Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(dep3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuterHashJoinExec0");
@@@ -303,8 -305,10 +305,10 @@@
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
+         Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
+         Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuter_HashJoinExec1");
@@@ -339,8 -343,10 +343,10 @@@
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
+         Integer.MAX_VALUE);
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
+         Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, job3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuterHashJoinExec2");
@@@ -376,8 -382,9 +382,9 @@@
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
+         Integer.MAX_VALUE);
 -    FileFragment[] phone3Frags = StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++    FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, phone3Frags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
index f3c0294,a82de92..6684002
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
@@@ -38,8 -39,11 +39,8 @@@ import org.apache.tajo.plan.PlanningExc
  import org.apache.tajo.plan.logical.JoinNode;
  import org.apache.tajo.plan.logical.LogicalNode;
  import org.apache.tajo.plan.logical.NodeType;
- import org.apache.tajo.engine.query.QueryContext;
+ import org.apache.tajo.plan.util.PlannerUtil;
 -import org.apache.tajo.storage.Appender;
 -import org.apache.tajo.storage.StorageManager;
 -import org.apache.tajo.storage.Tuple;
 -import org.apache.tajo.storage.VTuple;
 +import org.apache.tajo.storage.*;
  import org.apache.tajo.storage.fragment.FileFragment;
  import org.apache.tajo.util.CommonTestingUtil;
  import org.apache.tajo.util.TUtil;
@@@ -314,9 -318,9 +315,9 @@@ public class TestFullOuterMergeJoinExe
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] dep3Frags =
-         FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), dep3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, dep3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin0");
@@@ -351,9 -355,9 +352,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] job3Frags =
-         FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin1");
@@@ -388,9 -392,9 +389,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] job3Frags =
-         FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin2");
@@@ -426,9 -430,9 +427,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] dep4Frags =
-         FileStorageManager.splitNG(conf, DEP4_NAME, dep4.getMeta(), dep4.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, DEP4_NAME, dep4.getMeta(), new Path(dep4.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, DEP4_NAME, dep4.getMeta(), new Path(dep4.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, dep4Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin3");
@@@ -466,9 -470,9 +467,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] phone3Frags =
-         FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -        StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++        FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, phone3Frags);
  
@@@ -505,9 -509,9 +506,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] phone3Frags =
-         FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -        StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++        FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(phone3Frags,emp3Frags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
index 760a470,20d4651..48c1cae
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
@@@ -150,10 -150,10 +150,10 @@@ public class TestHashAntiJoinExec 
  
    @Test
    public final void testHashAntiJoin() throws IOException, PlanningException {
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()), Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
index c3604a5,d1fa28a..dcd18cd
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
@@@ -152,8 -152,10 +152,10 @@@ public class TestHashJoinExec 
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(), Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashInnerJoin");
@@@ -193,10 -195,10 +195,10 @@@
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashInnerJoin");

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
index 26507de,7a43a55..5cb1a7d
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
@@@ -36,8 -38,10 +38,7 @@@ import org.apache.tajo.plan.LogicalPlan
  import org.apache.tajo.plan.LogicalPlanner;
  import org.apache.tajo.plan.PlanningException;
  import org.apache.tajo.plan.logical.LogicalNode;
- import org.apache.tajo.engine.query.QueryContext;
 -import org.apache.tajo.storage.Appender;
 -import org.apache.tajo.storage.StorageManager;
 -import org.apache.tajo.storage.Tuple;
 -import org.apache.tajo.storage.VTuple;
 +import org.apache.tajo.storage.*;
  import org.apache.tajo.storage.fragment.FileFragment;
  import org.apache.tajo.util.CommonTestingUtil;
  import org.apache.tajo.util.TUtil;
@@@ -154,10 -158,10 +155,10 @@@ public class TestHashSemiJoinExec 
  
    @Test
    public final void testHashSemiJoin() throws IOException, PlanningException {
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()), Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
index 9e3226b,ec9daa7..d709554
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
@@@ -270,8 -270,10 +270,10 @@@ public class TestLeftOuterHashJoinExec 
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.IN_MEMORY_HASH_JOIN);
  
-     FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), dep3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] dep3Frags = StorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(),
++    FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(),
+         new Path(dep3.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
+         new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(dep3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuterHashJoinExec0");
@@@ -298,10 -300,10 +300,10 @@@
  
    @Test
    public final void testLeftOuter_HashJoinExec1() throws IOException, PlanningException {
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(),
+         new Path(job3.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
+         new Path(emp3.getPath()), Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
  
@@@ -339,10 -341,10 +341,10 @@@
      @Test
    public final void testLeftOuter_HashJoinExec2() throws IOException, PlanningException {
      
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
+         new Path(emp3.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(),
+         new Path(job3.getPath()), Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(emp3Frags, job3Frags);
  
@@@ -381,10 -383,10 +383,10 @@@
     @Test
    public final void testLeftOuter_HashJoinExec3() throws IOException, PlanningException {
      
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(),
+         new Path(emp3.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] phone3Frags = StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(),
++    FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(),
+         new Path(phone3.getPath()), Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(emp3Frags, phone3Frags);
  
@@@ -423,10 -425,10 +425,10 @@@
     @Test
    public final void testLeftOuter_HashJoinExec4() throws IOException, PlanningException {
      
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, "default.emp3", emp3.getMeta(), emp3.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, "default.phone3", phone3.getMeta(), phone3.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, "default.emp3", emp3.getMeta(),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, "default.emp3", emp3.getMeta(),
+         new Path(emp3.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] phone3Frags = StorageManager.splitNG(conf, "default.phone3", phone3.getMeta(),
++    FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, "default.phone3", phone3.getMeta(),
+         new Path(phone3.getPath()), Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(phone3Frags, emp3Frags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
index bc13e06,b3d1f33..89f5feb
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
@@@ -254,9 -254,9 +254,9 @@@ public class TestLeftOuterNLJoinExec 
  
    @Test
    public final void testLeftOuterNLJoinExec0() throws IOException, PlanningException {
-     FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), dep3.getPath(),
 -    FileFragment[] dep3Frags = StorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
++    FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(dep3Frags, emp3Frags);
@@@ -295,9 -295,9 +295,9 @@@
  
    @Test
    public final void testLeftOuterNLJoinExec1() throws IOException, PlanningException {
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(),
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
@@@ -340,9 -340,9 +340,9 @@@
  
    @Test
    public final void testLeftOuter_NLJoinExec2() throws IOException, PlanningException {
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(),
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(emp3Frags, job3Frags);
@@@ -385,9 -385,9 +385,9 @@@
  
    @Test
    public final void testLeftOuter_NLJoinExec3() throws IOException, PlanningException {
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -    FileFragment[] phone3Frags = StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++    FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(emp3Frags, phone3Frags);
@@@ -429,9 -429,9 +429,9 @@@
  
      @Test
    public final void testLeftOuter_NLJoinExec4() throws IOException, PlanningException {
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -    FileFragment[] phone3Frags = StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++    FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(phone3Frags, emp3Frags);

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
index ff8e1d9,cae5de5..12509f1
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
@@@ -165,10 -165,10 +165,10 @@@ public class TestMergeJoinExec 
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e",
-         employee.getMeta(), employee.getPath(), Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
-         people.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] empFrags = sm.splitNG(conf, "default.e", employee.getMeta(), new Path(employee.getPath()),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), new Path(employee.getPath()),
+         Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = sm.splitNG(conf, "default.p", people.getMeta(), new Path(people.getPath()),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), new Path(people.getPath()),
+         Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testMergeInnerJoin");

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
index 4cead82,a5d1dc5..abace81
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
@@@ -144,10 -144,10 +144,10 @@@ public class TestNLJoinExec 
    
    @Test
    public final void testNLCrossJoin() throws IOException, PlanningException {
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()), Integer.MAX_VALUE);
      
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  
@@@ -173,10 -173,10 +173,10 @@@
  
    @Test
    public final void testNLInnerJoin() throws IOException, PlanningException {
-     FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
-     FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(),
++    FileFragment[] empFrags = FileStorageManager.splitNG(conf, "default.e", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(),
++    FileFragment[] peopleFrags = FileStorageManager.splitNG(conf, "default.p", people.getMeta(),
+         new Path(people.getPath()), Integer.MAX_VALUE);
      
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
index 06f4001,d507b97..6aad738
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
@@@ -45,10 -45,12 +45,13 @@@ import org.apache.tajo.engine.planner.g
  import org.apache.tajo.engine.planner.global.MasterPlan;
  import org.apache.tajo.engine.query.QueryContext;
  import org.apache.tajo.master.session.Session;
- import org.apache.tajo.plan.*;
+ import org.apache.tajo.plan.LogicalOptimizer;
+ import org.apache.tajo.plan.LogicalPlan;
+ import org.apache.tajo.plan.LogicalPlanner;
+ import org.apache.tajo.plan.PlanningException;
  import org.apache.tajo.plan.expr.AggregationFunctionCallEval;
  import org.apache.tajo.plan.logical.*;
 +import org.apache.tajo.plan.serder.PlanProto.ShuffleType;
  import org.apache.tajo.plan.util.PlannerUtil;
  import org.apache.tajo.storage.*;
  import org.apache.tajo.storage.RowStoreUtil.RowStoreEncoder;
@@@ -244,8 -246,8 +247,8 @@@ public class TestPhysicalPlanner 
  
    @Test
    public final void testCreateScanPlan() throws IOException, PlanningException {
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
-         employee.getPath(), Integer.MAX_VALUE);
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testCreateScanPlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
@@@ -275,8 -277,8 +278,8 @@@
  
    @Test
    public final void testCreateScanWithFilterPlan() throws IOException, PlanningException {
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
-         employee.getPath(), Integer.MAX_VALUE);
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testCreateScanWithFilterPlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
@@@ -304,7 -306,7 +307,7 @@@
  
    @Test
    public final void testGroupByPlan() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testGroupByPlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -335,7 -337,7 +338,7 @@@
    @Test
    public final void testHashGroupByPlanWithALLField() throws IOException, PlanningException {
      // TODO - currently, this query does not use hash-based group operator.
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir(
          "target/test-data/testHashGroupByPlanWithALLField");
@@@ -365,7 -367,7 +368,7 @@@
  
    @Test
    public final void testSortGroupByPlan() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testSortGroupByPlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -428,7 -430,7 +431,7 @@@
  
    @Test
    public final void testStorePlan() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -474,8 -477,8 +477,8 @@@
      TableStats stats = largeScore.getStats();
      assertTrue("Checking meaningfulness of test", stats.getNumBytes() > StorageUnit.MB);
  
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score_large", largeScore.getMeta(),
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score_large", largeScore.getMeta(),
-         largeScore.getPath(), Integer.MAX_VALUE);
+         new Path(largeScore.getPath()), Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlanWithMaxOutputFileSize");
  
      QueryContext queryContext = new QueryContext(conf, session);
@@@ -525,7 -528,7 +528,7 @@@
  
    @Test
    public final void testStorePlanWithRCFile() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlanWithRCFile");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -566,7 -569,7 +569,7 @@@
  
    @Test
    public final void testEnforceForDefaultColumnPartitionStorePlan() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -593,7 -596,7 +596,7 @@@
      Enforcer enforcer = new Enforcer();
      enforcer.enforceColumnPartitionAlgorithm(createTableNode.getPID(), ColumnPartitionAlgorithm.HASH_PARTITION);
  
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -617,7 -620,7 +620,7 @@@
      Enforcer enforcer = new Enforcer();
      enforcer.enforceColumnPartitionAlgorithm(createTableNode.getPID(), ColumnPartitionAlgorithm.SORT_PARTITION);
  
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -633,7 -636,7 +636,7 @@@
  
    @Test
    public final void testPartitionedStorePlan() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf), id, new FileFragment[] { frags[0] },
@@@ -702,8 -705,8 +705,8 @@@
    public final void testPartitionedStorePlanWithMaxFileSize() throws IOException, PlanningException {
  
      // Preparing working dir and input fragments
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score_large", largeScore.getMeta(),
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score_large", largeScore.getMeta(),
-         largeScore.getPath(), Integer.MAX_VALUE);
+         new Path(largeScore.getPath()), Integer.MAX_VALUE);
      QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testPartitionedStorePlanWithMaxFileSize");
  
@@@ -766,7 -769,7 +769,7 @@@
    @Test
    public final void testPartitionedStorePlanWithEmptyGroupingSet()
        throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
  
@@@ -833,7 -836,7 +836,7 @@@
  
    @Test
    public final void testAggregationFunction() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testAggregationFunction");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -864,7 -867,7 +867,7 @@@
  
    @Test
    public final void testCountFunction() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testCountFunction");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -892,7 -895,7 +895,7 @@@
  
    @Test
    public final void testGroupByWithNullValue() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
          Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testGroupByWithNullValue");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -917,8 -920,8 +920,8 @@@
  
    @Test
    public final void testUnionPlan() throws IOException, PlanningException, CloneNotSupportedException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testUnionPlan");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
@@@ -982,8 -985,8 +985,8 @@@
  
    //@Test
    public final void testCreateIndex() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testCreateIndex");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
@@@ -1009,8 -1012,8 +1012,8 @@@
  
    @Test
    public final void testDuplicateEliminate() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(),
+         new Path(score.getPath()), Integer.MAX_VALUE);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testDuplicateEliminate");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -1043,8 -1046,8 +1046,8 @@@
  
    @Test
    public final void testIndexedStoreExec() throws IOException, PlanningException {
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
-         employee.getPath(), Integer.MAX_VALUE);
+         new Path(employee.getPath()), Integer.MAX_VALUE);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testIndexedStoreExec");
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
@@@ -1136,8 -1139,8 +1139,8 @@@
  
    @Test
    public final void testSortEnforcer() throws IOException, PlanningException {
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
-         employee.getPath(), Integer.MAX_VALUE);
+         new Path(employee.getPath()), Integer.MAX_VALUE);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testSortEnforcer");
      Expr context = analyzer.parse(SORT_QUERY[0]);
@@@ -1187,8 -1190,8 +1190,8 @@@
  
    @Test
    public final void testGroupByEnforcer() throws IOException, PlanningException {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), score.getPath(), Integer.MAX_VALUE);
- 
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
+         Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testGroupByEnforcer");
      Expr context = analyzer.parse(QUERIES[7]);
      LogicalPlan plan = planner.createPlan(defaultContext, context);

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
index 312da9e,a23a2d1..f3936b1
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
@@@ -136,8 -136,8 +136,8 @@@ public class TestProgressExternalSortEx
    }
  
    private void testProgress(int sortBufferBytesNum) throws Exception {
-     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(), employee.getPath(),
-         Integer.MAX_VALUE);
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employee.getMeta(),
++    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employee.getMeta(),
+         new Path(employee.getPath()), Integer.MAX_VALUE);
      Path workDir = new Path(testDir, TestExternalSortExec.class.getName());
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(), new FileFragment[] { frags[0] }, workDir);

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
index 6f88b30,9ebe871..400d00f
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
@@@ -29,14 -29,17 +29,14 @@@ import org.apache.tajo.conf.TajoConf
  import org.apache.tajo.datum.Datum;
  import org.apache.tajo.datum.DatumFactory;
  import org.apache.tajo.engine.parser.SQLAnalyzer;
- import org.apache.tajo.plan.LogicalPlanner;
  import org.apache.tajo.engine.planner.PhysicalPlanner;
  import org.apache.tajo.engine.planner.PhysicalPlannerImpl;
- import org.apache.tajo.plan.PlanningException;
  import org.apache.tajo.engine.planner.enforce.Enforcer;
- import org.apache.tajo.plan.logical.LogicalNode;
  import org.apache.tajo.engine.query.QueryContext;
+ import org.apache.tajo.plan.LogicalPlanner;
+ import org.apache.tajo.plan.PlanningException;
+ import org.apache.tajo.plan.logical.LogicalNode;
 -import org.apache.tajo.storage.Appender;
 -import org.apache.tajo.storage.StorageManager;
 -import org.apache.tajo.storage.Tuple;
 -import org.apache.tajo.storage.VTuple;
 +import org.apache.tajo.storage.*;
  import org.apache.tajo.storage.fragment.FileFragment;
  import org.apache.tajo.util.CommonTestingUtil;
  import org.apache.tajo.util.TUtil;
@@@ -229,9 -232,9 +229,9 @@@ public class TestRightOuterHashJoinExe
  
    @Test
    public final void testRightOuter_HashJoinExec0() throws IOException, PlanningException {
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), dep3.getPath(),
 -    FileFragment[] dep3Frags = StorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
++    FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(emp3Frags, dep3Frags);
@@@ -270,9 -273,9 +270,9 @@@
  
    @Test
    public final void testRightOuter_HashJoinExec1() throws IOException, PlanningException {
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(),
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(emp3Frags, job3Frags);
@@@ -311,9 -314,9 +311,9 @@@
      @Test
    public final void testRightOuter_HashJoinExec2() throws IOException, PlanningException {
      
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(),
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
          Integer.MAX_VALUE);
-     FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(),
 -    FileFragment[] job3Frags = StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
++    FileFragment[] job3Frags = FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()),
          Integer.MAX_VALUE);
  
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
index 35238f4,4956b7f..2708273
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
@@@ -313,8 -313,10 +313,10 @@@ public class TestRightOuterMergeJoinExe
      Enforcer enforcer = new Enforcer();
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
-     FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), dep3.getPath(), Integer.MAX_VALUE);
 -    FileFragment[] emp3Frags = StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
++    FileFragment[] emp3Frags = FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()),
+         Integer.MAX_VALUE);
 -    FileFragment[] dep3Frags = StorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
++    FileFragment[] dep3Frags = FileStorageManager.splitNG(conf, DEP3_NAME, dep3.getMeta(), new Path(dep3.getPath()),
+         Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, dep3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin0");
@@@ -349,9 -351,9 +351,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] job3Frags =
-         FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin1");
@@@ -385,9 -387,9 +387,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] job3Frags =
-         FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), job3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, JOB3_NAME, job3.getMeta(), new Path(job3.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(job3Frags, emp3Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin2");
@@@ -421,9 -423,9 +423,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] dep4Frags =
-         FileStorageManager.splitNG(conf, DEP4_NAME, dep4.getMeta(), dep4.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, DEP4_NAME, dep4.getMeta(), new Path(dep4.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, DEP4_NAME, dep4.getMeta(), new Path(dep4.getPath()), Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, dep4Frags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuter_MergeJoin3");
@@@ -458,9 -460,9 +460,9 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
      FileFragment[] phone3Frags =
-         FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -        StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++        FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(emp3Frags, phone3Frags);
  
@@@ -495,8 -497,8 +497,8 @@@
      enforcer.enforceJoinAlgorithm(joinNode.getPID(), JoinAlgorithm.MERGE_JOIN);
  
      FileFragment[] emp3Frags =
-         FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), emp3.getPath(), Integer.MAX_VALUE);
-     FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), phone3.getPath(),
 -        StorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
 -    FileFragment[] phone3Frags = StorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
++        FileStorageManager.splitNG(conf, EMP3_NAME, emp3.getMeta(), new Path(emp3.getPath()), Integer.MAX_VALUE);
++    FileFragment[] phone3Frags = FileStorageManager.splitNG(conf, PHONE3_NAME, phone3.getMeta(), new Path(phone3.getPath()),
          Integer.MAX_VALUE);
      FileFragment[] merged = TUtil.concat(phone3Frags,emp3Frags);
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
index 1698828,c1cec2b..b74f634
--- a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinBroadcast.java
@@@ -563,9 -563,9 +563,9 @@@ public class TestJoinBroadcast extends 
            appender.flush();
            appender.close();
          }
-         Path dataPath = new Path(table.getPath(), fileIndex + ".csv");
+         Path dataPath = new Path(table.getPath().toString(), fileIndex + ".csv");
          fileIndex++;
 -        appender = StorageManager.getStorageManager(conf).getAppender(tableMeta, schema,
 +        appender = StorageManager.getFileStorageManager(conf).getAppender(tableMeta, schema,
              dataPath);
          appender.init();
        }

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
----------------------------------------------------------------------
diff --cc tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
index a16d9f0,186a7f5..517f425
--- a/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
+++ b/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
@@@ -142,10 -142,10 +142,10 @@@ public class TestRangeRetrieverHandler 
  
      TableDesc employee = new TableDesc(
          CatalogUtil.buildFQName(TajoConstants.DEFAULT_DATABASE_NAME, "employee"), schema, employeeMeta,
-         tableDir);
+         tableDir.toUri());
      catalog.createTable(employee);
  
 -    FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employeeMeta, tableDir, Integer.MAX_VALUE);
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employeeMeta, tableDir, Integer.MAX_VALUE);
  
      TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
          LocalTajoTestingUtility.newQueryUnitAttemptId(),
@@@ -265,10 -265,10 +265,10 @@@
      appender.close();
  
      TableDesc employee = new TableDesc(
-         CatalogUtil.buildFQName(TajoConstants.DEFAULT_DATABASE_NAME, "employee"), schema, meta, tablePath);
+         CatalogUtil.buildFQName(TajoConstants.DEFAULT_DATABASE_NAME, "employee"), schema, meta, tablePath.toUri());
      catalog.createTable(employee);
  
 -    FileFragment[] frags = sm.splitNG(conf, "default.employee", meta, tablePath, Integer.MAX_VALUE);
 +    FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", meta, tablePath, Integer.MAX_VALUE);
  
      TaskAttemptContext
          ctx = new TaskAttemptContext(new QueryContext(conf),

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-plan/src/main/java/org/apache/tajo/plan/logical/InsertNode.java
----------------------------------------------------------------------
diff --cc tajo-plan/src/main/java/org/apache/tajo/plan/logical/InsertNode.java
index f860f08,df55b63..d1d8582
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/InsertNode.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/InsertNode.java
@@@ -46,7 -46,7 +46,9 @@@ public class InsertNode extends StoreTa
      } else {
        tableSchema = desc.getSchema();
      }
-     setPath(desc.getPath());
 -    setPath(new Path(desc.getPath()));
++    if (desc.getPath() != null) {
++      setPath(new Path(desc.getPath()));
++    }
      setOptions(desc.getMeta().getOptions());
      setStorageType(desc.getMeta().getStoreType());
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/PartitionedTableRewriter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/87c957e4/tajo-plan/src/main/java/org/apache/tajo/plan/util/PlannerUtil.java
----------------------------------------------------------------------
diff --cc tajo-plan/src/main/java/org/apache/tajo/plan/util/PlannerUtil.java
index a7db188,6868b6c..b5d2db3
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/util/PlannerUtil.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/util/PlannerUtil.java
@@@ -775,109 -776,4 +775,109 @@@ public class PlannerUtil 
  
      return explains.toString();
    }
 +
 +  public static boolean isFileStorageType(String storageType) {
 +    if (storageType.equalsIgnoreCase("hbase")) {
 +      return false;
 +    } else {
 +      return true;
 +    }
 +  }
 +
 +  public static boolean isFileStorageType(StoreType storageType) {
 +    if (storageType== StoreType.HBASE) {
 +      return false;
 +    } else {
 +      return true;
 +    }
 +  }
 +
 +  public static StoreType getStoreType(LogicalPlan plan) {
 +    LogicalRootNode rootNode = plan.getRootBlock().getRoot();
 +    NodeType nodeType = rootNode.getChild().getType();
 +    if (nodeType == NodeType.CREATE_TABLE) {
 +      return ((CreateTableNode)rootNode.getChild()).getStorageType();
 +    } else if (nodeType == NodeType.INSERT) {
 +      return ((InsertNode)rootNode.getChild()).getStorageType();
 +    } else {
 +      return null;
 +    }
 +  }
 +
 +  public static String getStoreTableName(LogicalPlan plan) {
 +    LogicalRootNode rootNode = plan.getRootBlock().getRoot();
 +    NodeType nodeType = rootNode.getChild().getType();
 +    if (nodeType == NodeType.CREATE_TABLE) {
 +      return ((CreateTableNode)rootNode.getChild()).getTableName();
 +    } else if (nodeType == NodeType.INSERT) {
 +      return ((InsertNode)rootNode.getChild()).getTableName();
 +    } else {
 +      return null;
 +    }
 +  }
 +
 +  public static TableDesc getTableDesc(CatalogService catalog, LogicalNode node) throws IOException {
 +    if (node.getType() == NodeType.CREATE_TABLE) {
 +      return createTableDesc((CreateTableNode)node);
 +    }
 +    String tableName = null;
 +    InsertNode insertNode = null;
 +    if (node.getType() == NodeType.INSERT) {
 +      insertNode = (InsertNode)node;
 +      tableName = insertNode.getTableName();
 +    } else {
 +      return null;
 +    }
 +
 +    if (tableName != null) {
 +      String[] tableTokens = tableName.split("\\.");
 +      if (tableTokens.length >= 2) {
 +        if (catalog.existsTable(tableTokens[0], tableTokens[1])) {
 +          return catalog.getTableDesc(tableTokens[0], tableTokens[1]);
 +        }
 +      }
 +    } else {
 +      if (insertNode.getPath() != null) {
 +        //insert ... location
 +        return createTableDesc(insertNode);
 +      }
 +    }
 +    return null;
 +  }
 +
 +  private static TableDesc createTableDesc(CreateTableNode createTableNode) {
 +    TableMeta meta = new TableMeta(createTableNode.getStorageType(), createTableNode.getOptions());
 +
 +    TableDesc tableDescTobeCreated =
 +        new TableDesc(
 +            createTableNode.getTableName(),
 +            createTableNode.getTableSchema(),
 +            meta,
-             createTableNode.getPath());
++            createTableNode.getPath() != null ? createTableNode.getPath().toUri() : null);
 +
 +    tableDescTobeCreated.setExternal(createTableNode.isExternal());
 +
 +    if (createTableNode.hasPartition()) {
 +      tableDescTobeCreated.setPartitionMethod(createTableNode.getPartitionMethod());
 +    }
 +
 +    return tableDescTobeCreated;
 +  }
 +
 +  private static TableDesc createTableDesc(InsertNode insertNode) {
 +    TableMeta meta = new TableMeta(insertNode.getStorageType(), insertNode.getOptions());
 +
 +    TableDesc tableDescTobeCreated =
 +        new TableDesc(
 +            insertNode.getTableName(),
 +            insertNode.getTableSchema(),
 +            meta,
-             insertNode.getPath());
++            insertNode.getPath() != null ? insertNode.getPath().toUri() : null);
 +
 +    if (insertNode.hasPartition()) {
 +      tableDescTobeCreated.setPartitionMethod(insertNode.getPartitionMethod());
 +    }
 +
 +    return tableDescTobeCreated;
 +  }
  }


Mime
View raw message