tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [02/14] tajo git commit: initial work for TAJO-1591.
Date Tue, 12 May 2015 03:14:01 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git 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
index ef6f1ce..1bbaa66 100644
--- 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
@@ -24,7 +24,6 @@ import org.apache.tajo.TajoConstants;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.algebra.Expr;
 import org.apache.tajo.catalog.*;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.datum.Datum;
@@ -108,7 +107,7 @@ public class TestFullOuterMergeJoinExec {
     dep3Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep3Meta = CatalogUtil.newTableMeta("CSV");
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep3Meta, dep3Schema, dep3Path);
@@ -147,7 +146,7 @@ public class TestFullOuterMergeJoinExec {
     dep4Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep4Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep4Meta = CatalogUtil.newTableMeta("CSV");
     Path dep4Path = new Path(testDir, "dep4.csv");
     Appender appender4 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep4Meta, dep4Schema, dep4Path);
@@ -179,7 +178,7 @@ public class TestFullOuterMergeJoinExec {
     job3Schema.addColumn("job_title", Type.TEXT);
 
 
-    TableMeta job3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta job3Meta = CatalogUtil.newTableMeta("CSV");
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(job3Meta, job3Schema, job3Path);
@@ -219,7 +218,7 @@ public class TestFullOuterMergeJoinExec {
     emp3Schema.addColumn("job_id", Type.INT4);
 
 
-    TableMeta emp3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta emp3Meta = CatalogUtil.newTableMeta("CSV");
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(emp3Meta, emp3Schema, emp3Path);
@@ -272,7 +271,7 @@ public class TestFullOuterMergeJoinExec {
     phone3Schema.addColumn("phone_number", Type.TEXT);
 
 
-    TableMeta phone3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta phone3Meta = CatalogUtil.newTableMeta("CSV");
     Path phone3Path = new Path(testDir, "phone3.csv");
     Appender appender5 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(phone3Meta, phone3Schema, phone3Path);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 64efa28..30b9b19 100644
--- 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
@@ -82,7 +82,7 @@ public class TestHashAntiJoinExec {
     employeeSchema.addColumn("memid", Type.INT4);
     employeeSchema.addColumn("deptname", Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("CSV");
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(employeeMeta, employeeSchema, employeePath);
@@ -108,7 +108,7 @@ public class TestHashAntiJoinExec {
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);
     peopleSchema.addColumn("age", Type.INT4);
-    TableMeta peopleMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta peopleMeta = CatalogUtil.newTableMeta("CSV");
     Path peoplePath = new Path(testDir, "people.csv");
     appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(peopleMeta, peopleSchema, peoplePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 578b586..cd42d80 100644
--- 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
@@ -84,7 +84,7 @@ public class TestHashJoinExec {
     employeeSchema.addColumn("memid", Type.INT4);
     employeeSchema.addColumn("deptname", Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("CSV");
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(employeeMeta, employeeSchema, employeePath);
@@ -107,7 +107,7 @@ public class TestHashJoinExec {
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);
     peopleSchema.addColumn("age", Type.INT4);
-    TableMeta peopleMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta peopleMeta = CatalogUtil.newTableMeta("CSV");
     Path peoplePath = new Path(testDir, "people.csv");
     appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(peopleMeta, peopleSchema, peoplePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 42a018b..95debd4 100644
--- 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
@@ -83,7 +83,7 @@ public class TestHashSemiJoinExec {
     employeeSchema.addColumn("memid", Type.INT4);
     employeeSchema.addColumn("deptname", Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("CSV");
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(employeeMeta, employeeSchema, employeePath);
@@ -109,7 +109,7 @@ public class TestHashSemiJoinExec {
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);
     peopleSchema.addColumn("age", Type.INT4);
-    TableMeta peopleMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta peopleMeta = CatalogUtil.newTableMeta("CSV");
     Path peoplePath = new Path(testDir, "people.csv");
     appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(peopleMeta, peopleSchema, peoplePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 5747e58..e20686b 100644
--- 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
@@ -104,7 +104,7 @@ public class TestLeftOuterHashJoinExec {
     dep3Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep3Meta = CatalogUtil.newTableMeta("CSV");
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep3Meta, dep3Schema, dep3Path);
@@ -134,7 +134,7 @@ public class TestLeftOuterHashJoinExec {
     job3Schema.addColumn("job_title", Type.TEXT);
 
 
-    TableMeta job3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta job3Meta = CatalogUtil.newTableMeta("CSV");
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(job3Meta, job3Schema, job3Path);
@@ -174,7 +174,7 @@ public class TestLeftOuterHashJoinExec {
     emp3Schema.addColumn("job_id", Type.INT4);
 
 
-    TableMeta emp3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta emp3Meta = CatalogUtil.newTableMeta("CSV");
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(emp3Meta, emp3Schema, emp3Path);
@@ -227,7 +227,7 @@ public class TestLeftOuterHashJoinExec {
     phone3Schema.addColumn("phone_number", Type.TEXT);
 
 
-    TableMeta phone3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta phone3Meta = CatalogUtil.newTableMeta("CSV");
     Path phone3Path = new Path(testDir, "phone3.csv");
     Appender appender5 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(phone3Meta, phone3Schema, phone3Path);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestLeftOuterNLJoinExec.java
----------------------------------------------------------------------
diff --git 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
index ab4b881..10fd3d4 100644
--- 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
@@ -100,7 +100,7 @@ public class TestLeftOuterNLJoinExec {
     dep3Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep3Meta = CatalogUtil.newTableMeta("CSV");
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep3Meta, dep3Schema, dep3Path);
@@ -130,7 +130,7 @@ public class TestLeftOuterNLJoinExec {
     job3Schema.addColumn("job_title", Type.TEXT);
 
 
-    TableMeta job3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta job3Meta = CatalogUtil.newTableMeta("CSV");
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(job3Meta, job3Schema, job3Path);
@@ -170,7 +170,7 @@ public class TestLeftOuterNLJoinExec {
     emp3Schema.addColumn("job_id", Type.INT4);
 
 
-    TableMeta emp3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta emp3Meta = CatalogUtil.newTableMeta("CSV");
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(emp3Meta, emp3Schema, emp3Path);
@@ -223,7 +223,7 @@ public class TestLeftOuterNLJoinExec {
     phone3Schema.addColumn("phone_number", Type.TEXT);
 
 
-    TableMeta phone3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta phone3Meta = CatalogUtil.newTableMeta("CSV");
     Path phone3Path = new Path(testDir, "phone3.csv");
     Appender appender5 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(phone3Meta, phone3Schema, phone3Path);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestMergeJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 1cc4e63..6e7b5dc 100644
--- 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
@@ -84,7 +84,7 @@ public class TestMergeJoinExec {
     employeeSchema.addColumn("memid", Type.INT4);
     employeeSchema.addColumn("deptname", Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("CSV");
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(employeeMeta, employeeSchema, employeePath);
@@ -113,7 +113,7 @@ public class TestMergeJoinExec {
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);
     peopleSchema.addColumn("age", Type.INT4);
-    TableMeta peopleMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta peopleMeta = CatalogUtil.newTableMeta("CSV");
     Path peoplePath = new Path(testDir, "people.csv");
     appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(peopleMeta, peopleSchema, peoplePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 240e7fd..96c28ee 100644
--- 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
@@ -82,7 +82,7 @@ public class TestNLJoinExec {
     schema.addColumn("memid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("CSV");
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(employeeMeta, schema, employeePath);
@@ -106,7 +106,7 @@ public class TestNLJoinExec {
     peopleSchema.addColumn("fk_memid", Type.INT4);
     peopleSchema.addColumn("name", Type.TEXT);
     peopleSchema.addColumn("age", Type.INT4);
-    TableMeta peopleMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta peopleMeta = CatalogUtil.newTableMeta("CSV");
     Path peoplePath = new Path(testDir, "people.csv");
     appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(peopleMeta, peopleSchema, peoplePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
----------------------------------------------------------------------
diff --git 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
index e2216b9..3e0b231 100644
--- 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
@@ -118,7 +118,7 @@ public class TestPhysicalPlanner {
     scoreSchema.addColumn("score", Type.INT4);
     scoreSchema.addColumn("nullable", Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("CSV");
 
 
     Path employeePath = new Path(testDir, "employee.csv");
@@ -139,7 +139,7 @@ public class TestPhysicalPlanner {
     catalog.createTable(employee);
 
     Path scorePath = new Path(testDir, "score");
-    TableMeta scoreMeta = CatalogUtil.newTableMeta(StoreType.CSV, new KeyValueSet());
+    TableMeta scoreMeta = CatalogUtil.newTableMeta("CSV", new KeyValueSet());
     appender = sm.getAppender(scoreMeta, scoreSchema, scorePath);
     appender.init();
     score = new TableDesc(
@@ -180,7 +180,7 @@ public class TestPhysicalPlanner {
     CommonTestingUtil.cleanupTestDir(scoreLargePath.toString());
 
     Schema scoreSchmea = score.getSchema();
-    TableMeta scoreLargeMeta = CatalogUtil.newTableMeta(StoreType.RAW, new KeyValueSet());
+    TableMeta scoreLargeMeta = CatalogUtil.newTableMeta("RAW", new KeyValueSet());
     Appender appender =  ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(scoreLargeMeta, scoreSchmea, scoreLargePath);
     appender.enableStats();
@@ -435,7 +435,7 @@ public class TestPhysicalPlanner {
     LogicalPlan plan = planner.createPlan(defaultContext, context);
     LogicalNode rootNode = optimizer.optimize(plan);
 
-    TableMeta outputMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta outputMeta = CatalogUtil.newTableMeta("CSV");
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
     PhysicalExec exec = phyPlanner.createPlan(ctx, rootNode);
@@ -504,7 +504,7 @@ public class TestPhysicalPlanner {
     long totalNum = 0;
     for (FileStatus status : fs.listStatus(ctx.getOutputPath().getParent())) {
       Scanner scanner =  ((FileStorageManager)StorageManager.getFileStorageManager(conf)).getFileScanner(
-          CatalogUtil.newTableMeta(StoreType.CSV),
+          CatalogUtil.newTableMeta("CSV"),
           rootNode.getOutSchema(),
           status.getPath());
 
@@ -532,7 +532,7 @@ public class TestPhysicalPlanner {
     LogicalPlan plan = planner.createPlan(defaultContext, context);
     LogicalNode rootNode = optimizer.optimize(plan);
 
-    TableMeta outputMeta = CatalogUtil.newTableMeta(StoreType.RCFILE);
+    TableMeta outputMeta = CatalogUtil.newTableMeta("RCFILE");
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
     PhysicalExec exec = phyPlanner.createPlan(ctx, rootNode);
@@ -742,7 +742,7 @@ public class TestPhysicalPlanner {
       long expectedFileNum = (long) Math.ceil(fileVolumSum / (float)StorageUnit.MB);
       assertEquals(expectedFileNum, fileStatuses.length);
     }
-    TableMeta outputMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta outputMeta = CatalogUtil.newTableMeta("CSV");
     Scanner scanner = new MergeScanner(conf, rootNode.getOutSchema(), outputMeta, TUtil.newList(fragments));
     scanner.init();
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestProgressExternalSortExec.java
----------------------------------------------------------------------
diff --git 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
index 161b0d8..d56c3b0 100644
--- 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
@@ -85,7 +85,7 @@ public class TestProgressExternalSortExec {
     schema.addColumn("empid", TajoDataTypes.Type.INT4);
     schema.addColumn("deptname", TajoDataTypes.Type.TEXT);
 
-    TableMeta employeeMeta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.RAW);
+    TableMeta employeeMeta = CatalogUtil.newTableMeta("RAW");
     Path employeePath = new Path(testDir, "employee.csv");
     Appender appender = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(employeeMeta, schema, employeePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 06ab6c8..097d75b 100644
--- 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
@@ -99,7 +99,7 @@ public class TestRightOuterHashJoinExec {
     dep3Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep3Meta = CatalogUtil.newTableMeta("CSV");
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep3Meta, dep3Schema, dep3Path);
@@ -129,7 +129,7 @@ public class TestRightOuterHashJoinExec {
     job3Schema.addColumn("job_title", Type.TEXT);
 
 
-    TableMeta job3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta job3Meta = CatalogUtil.newTableMeta("CSV");
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(job3Meta, job3Schema, job3Path);
@@ -169,7 +169,7 @@ public class TestRightOuterHashJoinExec {
     emp3Schema.addColumn("job_id", Type.INT4);
 
 
-    TableMeta emp3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta emp3Meta = CatalogUtil.newTableMeta("CSV");
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(emp3Meta, emp3Schema, emp3Path);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestRightOuterMergeJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 30fd999..181f70e 100644
--- 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
@@ -106,7 +106,7 @@ public class TestRightOuterMergeJoinExec {
     dep3Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep3Meta = CatalogUtil.newTableMeta("CSV");
     Path dep3Path = new Path(testDir, "dep3.csv");
     Appender appender1 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep3Meta, dep3Schema, dep3Path);
@@ -145,7 +145,7 @@ public class TestRightOuterMergeJoinExec {
     dep4Schema.addColumn("loc_id", Type.INT4);
 
 
-    TableMeta dep4Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta dep4Meta = CatalogUtil.newTableMeta("CSV");
     Path dep4Path = new Path(testDir, "dep4.csv");
     Appender appender4 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(dep4Meta, dep4Schema, dep4Path);
@@ -177,7 +177,7 @@ public class TestRightOuterMergeJoinExec {
     job3Schema.addColumn("job_title", Type.TEXT);
 
 
-    TableMeta job3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta job3Meta = CatalogUtil.newTableMeta("CSV");
     Path job3Path = new Path(testDir, "job3.csv");
     Appender appender2 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(job3Meta, job3Schema, job3Path);
@@ -217,7 +217,7 @@ public class TestRightOuterMergeJoinExec {
     emp3Schema.addColumn("job_id", Type.INT4);
 
 
-    TableMeta emp3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta emp3Meta = CatalogUtil.newTableMeta("CSV");
     Path emp3Path = new Path(testDir, "emp3.csv");
     Appender appender3 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(emp3Meta, emp3Schema, emp3Path);
@@ -270,7 +270,7 @@ public class TestRightOuterMergeJoinExec {
     phone3Schema.addColumn("phone_number", Type.TEXT);
 
 
-    TableMeta phone3Meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta phone3Meta = CatalogUtil.newTableMeta("CSV");
     Path phone3Path = new Path(testDir, "phone3.csv");
     Appender appender5 = ((FileStorageManager)StorageManager.getFileStorageManager(conf))
         .getAppender(phone3Meta, phone3Schema, phone3Path);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
index f2c2b1a..32746f8 100644
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
@@ -77,7 +77,7 @@ public class TestSortExec {
     schema.addColumn("empid", Type.INT4);
     schema.addColumn("deptname", Type.TEXT);
 
-    employeeMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    employeeMeta = CatalogUtil.newTableMeta("CSV");
 
     tablePath = StorageUtil.concatPath(workDir, "employee", "table1");
     sm.getFileSystem().mkdirs(tablePath.getParent());

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
index f79f703..38d718e 100644
--- a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
@@ -220,7 +220,7 @@ public class TestCTASQuery extends QueryTestCaseBase {
 
     TableDesc desc =  client.getTableDesc(CatalogUtil.normalizeIdentifier(res2.getMetaData().getTableName(1)));
     assertNotNull(desc);
-    assertEquals(CatalogProtos.StoreType.RCFILE, desc.getMeta().getStoreType());
+    assertTrue("RCFILE".equalsIgnoreCase(desc.getMeta().getStoreType()));
   }
 
   @Test
@@ -234,7 +234,7 @@ public class TestCTASQuery extends QueryTestCaseBase {
 
     TableDesc desc =  client.getTableDesc(CatalogUtil.normalizeIdentifier(res2.getMetaData().getTableName(1)));
     assertNotNull(desc);
-    assertEquals(CatalogProtos.StoreType.TEXTFILE, desc.getMeta().getStoreType());
+    assertTrue("TEXT".equalsIgnoreCase(desc.getMeta().getStoreType()));
   }
 
   @Test
@@ -248,7 +248,7 @@ public class TestCTASQuery extends QueryTestCaseBase {
 
     TableDesc desc =  client.getTableDesc(CatalogUtil.normalizeIdentifier(res2.getMetaData().getTableName(1)));
     assertNotNull(desc);
-    assertEquals(CatalogProtos.StoreType.CSV, desc.getMeta().getStoreType());
+    assertTrue("CSV".equalsIgnoreCase(desc.getMeta().getStoreType()));
 
 
     KeyValueSet options = desc.getMeta().getOptions();

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
index 7ca766f..2bc16c6 100644
--- a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
@@ -205,7 +205,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
 
     assertTableExists("external_hbase_mapped_table");
 
-    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, StoreType.HBASE))
+    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, "HBASE"))
         .getConnection(testingCluster.getHBaseUtil().getConf());
     HTableInterface htable = hconn.getTable("external_hbase_table");
 
@@ -244,7 +244,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
 
     assertTableExists("external_hbase_mapped_table");
 
-    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, StoreType.HBASE))
+    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, "HBASE"))
         .getConnection(testingCluster.getHBaseUtil().getConf());
     HTableInterface htable = hconn.getTable("external_hbase_table");
 
@@ -297,7 +297,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
 
     assertTableExists("external_hbase_mapped_table");
 
-    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, StoreType.HBASE))
+    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, "HBASE"))
         .getConnection(testingCluster.getHBaseUtil().getConf());
     HTableInterface htable = hconn.getTable("external_hbase_table");
 
@@ -334,7 +334,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
 
     assertTableExists("external_hbase_mapped_table");
 
-    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, StoreType.HBASE))
+    HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, "HBASE"))
         .getConnection(testingCluster.getHBaseUtil().getConf());
     HTableInterface htable = hconn.getTable("external_hbase_table");
 
@@ -469,7 +469,7 @@ public class TestHBaseTable extends QueryTestCaseBase {
     EvalNode evalNodeEq = new BinaryEval(EvalType.EQUAL, new FieldEval(tableDesc.getLogicalSchema().getColumn("rk")),
         new ConstEval(new TextDatum("021")));
     scanNode.setQual(evalNodeEq);
-    StorageManager storageManager = StorageManager.getStorageManager(conf, StoreType.HBASE);
+    StorageManager storageManager = StorageManager.getStorageManager(conf, "HBASE");
     List<Fragment> fragments = storageManager.getSplits("hbase_mapped_table", tableDesc, scanNode);
     assertEquals(1, fragments.size());
     assertEquals("021", new String(((HBaseFragment)fragments.get(0)).getStartRow()));

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/jdbc/TestResultSet.java b/tajo-core/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
index 98e5ff9..1e4543c 100644
--- a/tajo-core/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
+++ b/tajo-core/src/test/java/org/apache/tajo/jdbc/TestResultSet.java
@@ -32,7 +32,6 @@ import org.apache.tajo.catalog.CatalogUtil;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.TableDesc;
 import org.apache.tajo.catalog.TableMeta;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.client.TajoClient;
 import org.apache.tajo.common.TajoDataTypes.Type;
@@ -72,7 +71,7 @@ public class TestResultSet {
     scoreSchema = new Schema();
     scoreSchema.addColumn("deptname", Type.TEXT);
     scoreSchema.addColumn("score", Type.INT4);
-    scoreMeta = CatalogUtil.newTableMeta(StoreType.CSV);
+    scoreMeta = CatalogUtil.newTableMeta("CSV");
     TableStats stats = new TableStats();
 
     Path p = sm.getTablePath("score");

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/master/TestExecutionBlockCursor.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/master/TestExecutionBlockCursor.java b/tajo-core/src/test/java/org/apache/tajo/master/TestExecutionBlockCursor.java
index 712243b..3d23d16 100644
--- a/tajo-core/src/test/java/org/apache/tajo/master/TestExecutionBlockCursor.java
+++ b/tajo-core/src/test/java/org/apache/tajo/master/TestExecutionBlockCursor.java
@@ -69,7 +69,7 @@ public class TestExecutionBlockCursor {
     tpch.loadSchemas();
     tpch.loadOutSchema();
     for (String table : tpch.getTableNames()) {
-      TableMeta m = CatalogUtil.newTableMeta(CatalogProtos.StoreType.CSV);
+      TableMeta m = CatalogUtil.newTableMeta("CSV");
       TableDesc d = CatalogUtil.newTableDesc(
           CatalogUtil.buildFQName(DEFAULT_DATABASE_NAME, table), tpch.getSchema(table), m, CommonTestingUtil.getTestDir());
       TableStats stats = new TableStats();

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/master/TestGlobalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/master/TestGlobalPlanner.java b/tajo-core/src/test/java/org/apache/tajo/master/TestGlobalPlanner.java
index 45c94a3..8591f88 100644
--- a/tajo-core/src/test/java/org/apache/tajo/master/TestGlobalPlanner.java
+++ b/tajo-core/src/test/java/org/apache/tajo/master/TestGlobalPlanner.java
@@ -90,7 +90,7 @@ public class TestGlobalPlanner {
     tpch.loadSchemas();
     tpch.loadOutSchema();
     for (int i = 0; i < tables.length; i++) {
-      TableMeta m = CatalogUtil.newTableMeta(CatalogProtos.StoreType.CSV);
+      TableMeta m = CatalogUtil.newTableMeta("CSV");
       TableStats stats = new TableStats();
       stats.setNumBytes(volumes[i]);
       TableDesc d = CatalogUtil.newTableDesc(

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/storage/TestRowFile.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/storage/TestRowFile.java b/tajo-core/src/test/java/org/apache/tajo/storage/TestRowFile.java
index 859a1f2..362cb24 100644
--- a/tajo-core/src/test/java/org/apache/tajo/storage/TestRowFile.java
+++ b/tajo-core/src/test/java/org/apache/tajo/storage/TestRowFile.java
@@ -66,7 +66,7 @@ public class TestRowFile {
     schema.addColumn("age", Type.INT8);
     schema.addColumn("description", Type.TEXT);
 
-    TableMeta meta = CatalogUtil.newTableMeta(StoreType.ROWFILE);
+    TableMeta meta = CatalogUtil.newTableMeta("ROWFILE");
 
     FileStorageManager sm =
         (FileStorageManager)StorageManager.getFileStorageManager(conf);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-core/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java b/tajo-core/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
index 6144534..8b1ca14 100644
--- a/tajo-core/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
+++ b/tajo-core/src/test/java/org/apache/tajo/ws/rs/resources/TestTablesResource.java
@@ -17,24 +17,9 @@
  */
 package org.apache.tajo.ws.rs.resources;
 
-import java.net.URI;
-import java.util.List;
-
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.GenericType;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-
+import com.google.gson.internal.StringMap;
 import org.apache.tajo.QueryTestCaseBase;
-import org.apache.tajo.catalog.CatalogUtil;
-import org.apache.tajo.catalog.Column;
-import org.apache.tajo.catalog.Schema;
-import org.apache.tajo.catalog.TableDesc;
-import org.apache.tajo.catalog.TableMeta;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
+import org.apache.tajo.catalog.*;
 import org.apache.tajo.common.TajoDataTypes;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.storage.StorageConstants;
@@ -46,7 +31,15 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.gson.internal.StringMap;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import java.net.URI;
+import java.util.List;
 
 import static org.junit.Assert.*;
 
@@ -84,7 +77,7 @@ public class TestTablesResource extends QueryTestCaseBase {
     Schema tableSchema = new Schema(new Column[] {new Column("column1", TajoDataTypes.Type.TEXT)});
     KeyValueSet tableOptions = new KeyValueSet();
     tableOptions.set(StorageConstants.TEXT_DELIMITER, StorageConstants.DEFAULT_FIELD_DELIMITER);
-    TableMeta tableMeta = new TableMeta(StoreType.CSV, tableOptions);
+    TableMeta tableMeta = new TableMeta("CSV", tableOptions);
     return new TableDesc(tableName, tableSchema, tableMeta, null);
   }
   

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java b/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
index e0b4f7e..8b1b56d 100644
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
@@ -1325,7 +1325,7 @@ public class LogicalPlanner extends BaseAlgebraVisitor<LogicalPlanner.PlanContex
   }
 
   private void updatePhysicalInfo(TableDesc desc) {
-    if (desc.getPath() != null && desc.getMeta().getStoreType() != StoreType.SYSTEM) {
+    if (desc.getPath() != null && desc.getMeta().getStoreType() != "SYSTEM") {
       try {
         Path path = new Path(desc.getPath());
         FileSystem fs = path.getFileSystem(new Configuration());
@@ -1666,7 +1666,7 @@ public class LogicalPlanner extends BaseAlgebraVisitor<LogicalPlanner.PlanContex
     insertNode.setTargetLocation(new Path(expr.getLocation()));
 
     if (expr.hasStorageType()) {
-      insertNode.setStorageType(CatalogUtil.getStoreType(expr.getStorageType()));
+      insertNode.setStorageType(expr.getStorageType());
     }
     if (expr.hasParams()) {
       KeyValueSet options = new KeyValueSet();
@@ -1740,9 +1740,9 @@ public class LogicalPlanner extends BaseAlgebraVisitor<LogicalPlanner.PlanContex
       return handleCreateTableLike(context, expr, createTableNode);
 
     if (expr.hasStorageType()) { // If storage type (using clause) is specified
-      createTableNode.setStorageType(CatalogUtil.getStoreType(expr.getStorageType()));
+      createTableNode.setStorageType(expr.getStorageType());
     } else { // otherwise, default type
-      createTableNode.setStorageType(CatalogProtos.StoreType.CSV);
+      createTableNode.setStorageType("CSV");
     }
 
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/function/python/PythonScriptEngine.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/java/org/apache/tajo/plan/function/python/PythonScriptEngine.java b/tajo-plan/src/main/java/org/apache/tajo/plan/function/python/PythonScriptEngine.java
index 878553f..49dce87 100644
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/function/python/PythonScriptEngine.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/function/python/PythonScriptEngine.java
@@ -272,7 +272,7 @@ public class PythonScriptEngine extends TajoScriptEngine {
   private int[] projectionCols;
 
   private final CSVLineSerDe lineSerDe = new CSVLineSerDe();
-  private final TableMeta pipeMeta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.TEXTFILE);
+  private final TableMeta pipeMeta = CatalogUtil.newTableMeta("TEXT");
 
   private final Tuple EMPTY_INPUT = new VTuple(0);
   private final Schema EMPTY_SCHEMA = new Schema();

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/logical/PersistentStoreNode.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/PersistentStoreNode.java b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/PersistentStoreNode.java
index 556ae7a..19a1820 100644
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/PersistentStoreNode.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/PersistentStoreNode.java
@@ -25,26 +25,24 @@ import org.apache.tajo.plan.PlanString;
 import org.apache.tajo.util.KeyValueSet;
 import org.apache.tajo.util.TUtil;
 
-import static org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
-
 
 /**
  * <code>PersistentStoreNode</code> an expression for a persistent data store step.
  * This includes some basic information for materializing data.
  */
 public abstract class PersistentStoreNode extends UnaryNode implements Cloneable {
-  @Expose protected StoreType storageType = StoreType.CSV;
+  @Expose protected String storageType = "CSV";
   @Expose protected KeyValueSet options = new KeyValueSet();
 
   protected PersistentStoreNode(int pid, NodeType nodeType) {
     super(pid, nodeType);
   }
 
-  public void setStorageType(StoreType storageType) {
+  public void setStorageType(String storageType) {
     this.storageType = storageType;
   }
 
-  public StoreType getStorageType() {
+  public String getStorageType() {
     return this.storageType;
   }
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/logical/ShuffleFileWriteNode.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/ShuffleFileWriteNode.java b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/ShuffleFileWriteNode.java
index 8215f51..537abdc 100644
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/ShuffleFileWriteNode.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/ShuffleFileWriteNode.java
@@ -103,7 +103,7 @@ public class ShuffleFileWriteNode extends PersistentStoreNode implements Cloneab
   public String toString() {
     StringBuilder sb = new StringBuilder("Shuffle Write (type=" + shuffleType.name().toLowerCase());
     if (storageType != null) {
-      sb.append(", storage="+ storageType.name());
+      sb.append(", storage="+ storageType);
     }
     sb.append(", part number=").append(numOutputs);
     if (shuffleKeys != null) {

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/logical/StoreTableNode.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/StoreTableNode.java b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/StoreTableNode.java
index 62f7db4..3a40f83 100644
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/logical/StoreTableNode.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/logical/StoreTableNode.java
@@ -111,7 +111,7 @@ public class StoreTableNode extends PersistentStoreNode implements Cloneable {
   public String toString() {
     StringBuilder sb = new StringBuilder("Store Table (table=").append(tableName);
     if (storageType != null) {
-      sb.append(", storage="+ storageType.name());
+      sb.append(", storage="+ storageType);
     }
     sb.append(")");
     return sb.toString();

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/util/PlannerUtil.java
----------------------------------------------------------------------
diff --git 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
index 763f938..f018546 100644
--- 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
@@ -179,7 +179,7 @@ public class PlannerUtil {
     
     for (LogicalNode node: scanNodes) {
       scanNode = (ScanNode) node;
-      isVirtualTable &= (scanNode.getTableDesc().getMeta().getStoreType() == StoreType.SYSTEM);
+      isVirtualTable &= (scanNode.getTableDesc().getMeta().getStoreType().equalsIgnoreCase("SYSTEM"));
     }
     
     return !checkIfDDLPlan(rootNode) && hasScanNode && isVirtualTable;
@@ -855,9 +855,9 @@ public class PlannerUtil {
   }
 
   public static void applySessionToTableProperties(OverridableConf sessionVars,
-                                                   StoreType storeType,
+                                                   String storeType,
                                                    KeyValueSet tableProperties) {
-    if (storeType == CSV || storeType == TEXTFILE) {
+    if (storeType.equalsIgnoreCase("CSV") || storeType.equalsIgnoreCase("TEXT")) {
       if (sessionVars.containsKey(SessionVars.NULL_CHAR)) {
         tableProperties.set(StorageConstants.TEXT_NULL, sessionVars.get(SessionVars.NULL_CHAR));
       }
@@ -890,15 +890,7 @@ public class PlannerUtil {
     }
   }
 
-  public static boolean isFileStorageType(StoreType storageType) {
-    if (storageType== StoreType.HBASE) {
-      return false;
-    } else {
-      return true;
-    }
-  }
-
-  public static StoreType getStoreType(LogicalPlan plan) {
+  public static String getStoreType(LogicalPlan plan) {
     LogicalRootNode rootNode = plan.getRootBlock().getRoot();
     NodeType nodeType = rootNode.getChild().getType();
     if (nodeType == NodeType.CREATE_TABLE) {

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/java/org/apache/tajo/plan/verifier/PreLogicalPlanVerifier.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/java/org/apache/tajo/plan/verifier/PreLogicalPlanVerifier.java b/tajo-plan/src/main/java/org/apache/tajo/plan/verifier/PreLogicalPlanVerifier.java
index 275ab3a..99b87e9 100644
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/verifier/PreLogicalPlanVerifier.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/verifier/PreLogicalPlanVerifier.java
@@ -181,8 +181,7 @@ public class PreLogicalPlanVerifier extends BaseAlgebraVisitor<PreLogicalPlanVer
   private boolean assertSupportedStoreType(VerificationState state, String name) {
     Preconditions.checkNotNull(name);
 
-    CatalogProtos.StoreType storeType = CatalogUtil.getStoreType(name);
-    if (storeType == null || storeType == CatalogProtos.StoreType.RAW) {
+    if (name.equalsIgnoreCase("RAW")) {
       state.addVerification(String.format("Store format %s is not supported.", name));
       return false;
     }

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/main/proto/Plan.proto
----------------------------------------------------------------------
diff --git a/tajo-plan/src/main/proto/Plan.proto b/tajo-plan/src/main/proto/Plan.proto
index de949d5..e8172ba 100644
--- a/tajo-plan/src/main/proto/Plan.proto
+++ b/tajo-plan/src/main/proto/Plan.proto
@@ -217,7 +217,7 @@ message PartitionTableScanSpec {
 
 message PersistentStoreNode {
   required int32 childSeq = 1;
-  required StoreType storageType = 2;
+  required string storageType = 2;
   required KeyValueSetProto tableProperties = 3;
 }
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-plan/src/test/java/org/apache/tajo/plan/TestLogicalNode.java
----------------------------------------------------------------------
diff --git a/tajo-plan/src/test/java/org/apache/tajo/plan/TestLogicalNode.java b/tajo-plan/src/test/java/org/apache/tajo/plan/TestLogicalNode.java
index bff7efb..694eeeb 100644
--- a/tajo-plan/src/test/java/org/apache/tajo/plan/TestLogicalNode.java
+++ b/tajo-plan/src/test/java/org/apache/tajo/plan/TestLogicalNode.java
@@ -44,13 +44,13 @@ public class TestLogicalNode {
     GroupbyNode groupbyNode = new GroupbyNode(0);
     groupbyNode.setGroupingColumns(new Column[]{schema.getColumn(1), schema.getColumn(2)});
     ScanNode scanNode = new ScanNode(0);
-    scanNode.init(CatalogUtil.newTableDesc("in", schema, CatalogUtil.newTableMeta(StoreType.CSV), new Path("in")));
+    scanNode.init(CatalogUtil.newTableDesc("in", schema, CatalogUtil.newTableMeta("CSV"), new Path("in")));
 
     GroupbyNode groupbyNode2 = new GroupbyNode(0);
     groupbyNode2.setGroupingColumns(new Column[]{schema.getColumn(1), schema.getColumn(2)});
     JoinNode joinNode = new JoinNode(0);
     ScanNode scanNode2 = new ScanNode(0);
-    scanNode2.init(CatalogUtil.newTableDesc("in2", schema, CatalogUtil.newTableMeta(StoreType.CSV), new Path("in2")));
+    scanNode2.init(CatalogUtil.newTableDesc("in2", schema, CatalogUtil.newTableMeta("CSV"), new Path("in2")));
 
     groupbyNode.setChild(scanNode);
     groupbyNode2.setChild(joinNode);
@@ -61,7 +61,7 @@ public class TestLogicalNode {
     assertFalse(groupbyNode.deepEquals(groupbyNode2));
 
     ScanNode scanNode3 = new ScanNode(0);
-    scanNode3.init(CatalogUtil.newTableDesc("in", schema, CatalogUtil.newTableMeta(StoreType.CSV), new Path("in")));
+    scanNode3.init(CatalogUtil.newTableDesc("in", schema, CatalogUtil.newTableMeta("CSV"), new Path("in")));
     groupbyNode2.setChild(scanNode3);
 
     assertTrue(groupbyNode.equals(groupbyNode2));

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/StorageManager.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/StorageManager.java b/tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/StorageManager.java
index ce963c8..fb497fb 100644
--- a/tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/StorageManager.java
+++ b/tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/StorageManager.java
@@ -28,7 +28,6 @@ import org.apache.tajo.*;
 import org.apache.tajo.catalog.*;
 import org.apache.tajo.catalog.proto.CatalogProtos;
 import org.apache.tajo.catalog.proto.CatalogProtos.FragmentProto;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.plan.LogicalPlan;
@@ -79,7 +78,7 @@ public abstract class StorageManager {
   };
 
   protected TajoConf conf;
-  protected StoreType storeType;
+  protected String storeType;
 
   /**
    * Cache of StorageManager.
@@ -106,7 +105,7 @@ public abstract class StorageManager {
   private static final Map<Class<?>, Constructor<?>> CONSTRUCTOR_CACHE =
       new ConcurrentHashMap<Class<?>, Constructor<?>>();
 
-  public StorageManager(StoreType storeType) {
+  public StorageManager(String storeType) {
     this.storeType = storeType;
   }
 
@@ -222,7 +221,7 @@ public abstract class StorageManager {
    * Returns the current storage type.
    * @return
    */
-  public StoreType getStoreType() {
+  public String getStoreType() {
     return storeType;
   }
 
@@ -271,7 +270,7 @@ public abstract class StorageManager {
    * @throws java.io.IOException
    */
   public static StorageManager getFileStorageManager(TajoConf tajoConf) throws IOException {
-    return getStorageManager(tajoConf, StoreType.CSV);
+    return getStorageManager(tajoConf, "CSV");
   }
 
   /**
@@ -283,22 +282,6 @@ public abstract class StorageManager {
    * @throws java.io.IOException
    */
   public static StorageManager getStorageManager(TajoConf tajoConf, String storeType) throws IOException {
-    if ("HBASE".equalsIgnoreCase(storeType)) {
-      return getStorageManager(tajoConf, StoreType.HBASE);
-    } else {
-      return getStorageManager(tajoConf, StoreType.CSV);
-    }
-  }
-
-  /**
-   * Returns the proper StorageManager instance according to the storeType.
-   *
-   * @param tajoConf Tajo system property.
-   * @param storeType Storage type
-   * @return
-   * @throws java.io.IOException
-   */
-  public static StorageManager getStorageManager(TajoConf tajoConf, StoreType storeType) throws IOException {
     FileSystem fileSystem = TajoConf.getWarehouseDir(tajoConf).getFileSystem(tajoConf);
     if (fileSystem != null) {
       return getStorageManager(tajoConf, storeType, fileSystem.getUri().toString());
@@ -317,15 +300,13 @@ public abstract class StorageManager {
    * @throws java.io.IOException
    */
   private static synchronized StorageManager getStorageManager (
-      TajoConf tajoConf, StoreType storeType, String managerKey) throws IOException {
+      TajoConf tajoConf, String storeType, String managerKey) throws IOException {
 
     String typeName;
-    switch (storeType) {
-      case HBASE:
-        typeName = "hbase";
-        break;
-      default:
-        typeName = "hdfs";
+    if (storeType.equalsIgnoreCase("HBASE")) {
+      typeName = "hbase";
+    } else {
+      typeName = "hdfs";
     }
 
     synchronized (storageManagers) {
@@ -344,7 +325,7 @@ public abstract class StorageManager {
           Constructor<? extends StorageManager> constructor =
               (Constructor<? extends StorageManager>) CONSTRUCTOR_CACHE.get(storageManagerClass);
           if (constructor == null) {
-            constructor = storageManagerClass.getDeclaredConstructor(new Class<?>[]{StoreType.class});
+            constructor = storageManagerClass.getDeclaredConstructor(new Class<?>[]{String.class});
             constructor.setAccessible(true);
             CONSTRUCTOR_CACHE.put(storageManagerClass, constructor);
           }
@@ -449,7 +430,7 @@ public abstract class StorageManager {
 
     Class<? extends Appender> appenderClass;
 
-    String handlerName = CatalogUtil.getStoreTypeString(meta.getStoreType()).toLowerCase();
+    String handlerName = meta.getStoreType().toLowerCase();
     appenderClass = APPENDER_HANDLER_CACHE.get(handlerName);
     if (appenderClass == null) {
       appenderClass = conf.getClass(
@@ -532,8 +513,8 @@ public abstract class StorageManager {
    * @return The Scanner class
    * @throws java.io.IOException
    */
-  public Class<? extends Scanner> getScannerClass(CatalogProtos.StoreType storeType) throws IOException {
-    String handlerName = CatalogUtil.getStoreTypeString(storeType).toLowerCase();
+  public Class<? extends Scanner> getScannerClass(String storeType) throws IOException {
+    String handlerName = storeType.toLowerCase();
     Class<? extends Scanner> scannerClass = SCANNER_HANDLER_CACHE.get(handlerName);
     if (scannerClass == null) {
       scannerClass = conf.getClass(
@@ -542,7 +523,7 @@ public abstract class StorageManager {
     }
 
     if (scannerClass == null) {
-      throw new IOException("Unknown Storage Type: " + storeType.name());
+      throw new IOException("Unknown Storage Type: " + storeType);
     }
 
     return scannerClass;

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
index e95aeec..32f1e43 100644
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
@@ -23,7 +23,6 @@ import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.SortSpec;
 import org.apache.tajo.catalog.TableDesc;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.plan.LogicalPlan;
 import org.apache.tajo.plan.PlanningException;
 import org.apache.tajo.plan.logical.LogicalNode;
@@ -55,7 +54,7 @@ public class AddSortForInsertRewriter implements LogicalPlanRewriteRule {
 
   @Override
   public boolean isEligible(OverridableConf queryContext, LogicalPlan plan) {
-    StoreType storeType = PlannerUtil.getStoreType(plan);
+    String storeType = PlannerUtil.getStoreType(plan);
     return storeType != null;
   }
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBasePutAppender.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBasePutAppender.java b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBasePutAppender.java
index 45a1bff..7f3cb04 100644
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBasePutAppender.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBasePutAppender.java
@@ -26,7 +26,6 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.tajo.TaskAttemptId;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.TableMeta;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.datum.Datum;
 import org.apache.tajo.storage.StorageManager;
@@ -48,7 +47,7 @@ public class HBasePutAppender extends AbstractHBaseAppender {
     super.init();
 
     Configuration hbaseConf = HBaseStorageManager.getHBaseConfiguration(conf, meta);
-    HConnection hconn = ((HBaseStorageManager) StorageManager.getStorageManager((TajoConf)conf, StoreType.HBASE))
+    HConnection hconn = ((HBaseStorageManager) StorageManager.getStorageManager((TajoConf)conf, "HBASE"))
         .getConnection(hbaseConf);
     htable = hconn.getTable(columnMapping.getHbaseTableName());
     htable.setAutoFlushTo(false);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseScanner.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseScanner.java b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseScanner.java
index ab56252..4303b59 100644
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseScanner.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseScanner.java
@@ -29,7 +29,6 @@ import org.apache.hadoop.hbase.filter.KeyOnlyFilter;
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.TableMeta;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.catalog.statistics.ColumnStats;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.conf.TajoConf;
@@ -179,7 +178,7 @@ public class HBaseScanner implements Scanner {
     }
 
     if (htable == null) {
-      HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, StoreType.HBASE))
+      HConnection hconn = ((HBaseStorageManager)StorageManager.getStorageManager(conf, "HBASE"))
           .getConnection(hbaseConf);
       htable = hconn.getTable(fragment.getHbaseTableName());
     }

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
index a9e5bde..a7c579a 100644
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
@@ -37,7 +37,6 @@ import org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter;
 import org.apache.hadoop.mapreduce.task.JobContextImpl;
 import org.apache.tajo.*;
 import org.apache.tajo.catalog.*;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf;
@@ -70,7 +69,7 @@ public class HBaseStorageManager extends StorageManager {
 
   private Map<HConnectionKey, HConnection> connMap = new HashMap<HConnectionKey, HConnection>();
 
-  public HBaseStorageManager (StoreType storeType) {
+  public HBaseStorageManager (String storeType) {
     super(storeType);
   }
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestColumnMapping.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestColumnMapping.java b/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestColumnMapping.java
index 68939d6..dd52324 100644
--- a/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestColumnMapping.java
+++ b/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestColumnMapping.java
@@ -20,7 +20,6 @@ package org.apache.tajo.storage.hbase;
 
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.TableMeta;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.util.KeyValueSet;
 import org.junit.Test;
@@ -42,7 +41,7 @@ public class TestColumnMapping {
     schema.addColumn("c3", Type.TEXT);
     schema.addColumn("c4", Type.TEXT);
 
-    TableMeta tableMeta = new TableMeta(StoreType.HBASE, keyValueSet);
+    TableMeta tableMeta = new TableMeta("HBASE", keyValueSet);
 
     ColumnMapping columnMapping = new ColumnMapping(schema, tableMeta);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestHBaseStorageManager.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestHBaseStorageManager.java b/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestHBaseStorageManager.java
index 1fc4065..aa7aa28 100644
--- a/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestHBaseStorageManager.java
+++ b/tajo-storage/tajo-storage-hbase/src/test/java/org/apache/tajo/storage/hbase/TestHBaseStorageManager.java
@@ -48,7 +48,7 @@ public class TestHBaseStorageManager {
     scanNode.setQual(evalNodeA);
 
     HBaseStorageManager storageManager =
-        (HBaseStorageManager) StorageManager.getStorageManager(new TajoConf(), StoreType.HBASE);
+        (HBaseStorageManager) StorageManager.getStorageManager(new TajoConf(), "HBASE");
     List<Set<EvalNode>> indexEvals = storageManager.findIndexablePredicateSet(scanNode, new Column[]{rowkeyColumn});
     assertNotNull(indexEvals);
     assertEquals(1, indexEvals.size());

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/FileStorageManager.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/FileStorageManager.java b/tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/FileStorageManager.java
index 8d425b4..fd4ab84 100644
--- a/tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/FileStorageManager.java
+++ b/tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/FileStorageManager.java
@@ -28,10 +28,9 @@ import org.apache.hadoop.fs.*;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.tajo.OverridableConf;
-import org.apache.tajo.TaskAttemptId;
 import org.apache.tajo.TajoConstants;
+import org.apache.tajo.TaskAttemptId;
 import org.apache.tajo.catalog.*;
-import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.plan.logical.LogicalNode;
@@ -86,7 +85,7 @@ public class FileStorageManager extends StorageManager {
   protected boolean blocksMetadataEnabled;
   private static final HdfsVolumeId zeroVolumeId = new HdfsVolumeId(Bytes.toBytes(0));
 
-  public FileStorageManager(StoreType storeType) {
+  public FileStorageManager(String storeType) {
     super(storeType);
   }
 
@@ -855,7 +854,7 @@ public class FileStorageManager extends StorageManager {
   public StorageProperty getStorageProperty() {
     StorageProperty storageProperty = new StorageProperty();
     storageProperty.setSortedInsert(false);
-    if (storeType == StoreType.RAW) {
+    if (storeType.equalsIgnoreCase("RAW")) {
       storageProperty.setSupportsInsertInto(false);
     } else {
       storageProperty.setSupportsInsertInto(true);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestCompressionStorages.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestCompressionStorages.java b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestCompressionStorages.java
index 3c78d6b..68a2cf2 100644
--- a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestCompressionStorages.java
+++ b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestCompressionStorages.java
@@ -54,11 +54,11 @@ public class TestCompressionStorages {
   private TajoConf conf;
   private static String TEST_PATH = "target/test-data/TestCompressionStorages";
 
-  private StoreType storeType;
+  private String storeType;
   private Path testDir;
   private FileSystem fs;
 
-  public TestCompressionStorages(StoreType type) throws IOException {
+  public TestCompressionStorages(String type) throws IOException {
     this.storeType = type;
     conf = new TajoConf();
 
@@ -69,10 +69,10 @@ public class TestCompressionStorages {
   @Parameterized.Parameters
   public static Collection<Object[]> generateParameters() {
     return Arrays.asList(new Object[][]{
-        {StoreType.CSV},
-        {StoreType.RCFILE},
-        {StoreType.SEQUENCEFILE},
-        {StoreType.TEXTFILE}
+        {"CSV"},
+        {"RCFILE"},
+        {"SEQUENCEFILE"},
+        {"TEXT"}
     });
   }
 
@@ -83,11 +83,11 @@ public class TestCompressionStorages {
 
   @Test
   public void testGzipCodecCompressionData() throws IOException {
-    if (storeType == StoreType.RCFILE) {
+    if (storeType.equalsIgnoreCase("RCFILE")) {
       if( ZlibFactory.isNativeZlibLoaded(conf)) {
         storageCompressionTest(storeType, GzipCodec.class);
       }
-    } else if (storeType == StoreType.SEQUENCEFILE) {
+    } else if (storeType.equalsIgnoreCase("SEQUENCEFILE")) {
       if( ZlibFactory.isNativeZlibLoaded(conf)) {
         storageCompressionTest(storeType, GzipCodec.class);
       }
@@ -109,7 +109,7 @@ public class TestCompressionStorages {
     storageCompressionTest(storeType, Lz4Codec.class);
   }
 
-  private void storageCompressionTest(StoreType storeType, Class<? extends CompressionCodec> codec) throws IOException {
+  private void storageCompressionTest(String storeType, Class<? extends CompressionCodec> codec) throws IOException {
     Schema schema = new Schema();
     schema.addColumn("id", Type.INT4);
     schema.addColumn("age", Type.FLOAT4);
@@ -157,7 +157,7 @@ public class TestCompressionStorages {
 
     Scanner scanner = StorageManager.getFileStorageManager(conf).getScanner(meta, schema, tablets[0], schema);
 
-    if (StoreType.CSV == storeType) {
+    if (storeType.equalsIgnoreCase("CSV")) {
       if (SplittableCompressionCodec.class.isAssignableFrom(codec)) {
         assertTrue(scanner.isSplittable());
       } else {
@@ -166,7 +166,7 @@ public class TestCompressionStorages {
     }
     scanner.init();
 
-    if (storeType == StoreType.SEQUENCEFILE) {
+    if (storeType.equalsIgnoreCase("SEQUENCEFILE")) {
       assertTrue(scanner instanceof SequenceFileScanner);
       Writable key = ((SequenceFileScanner) scanner).getKey();
       assertEquals(key.getClass().getCanonicalName(), LongWritable.class.getCanonicalName());

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestDelimitedTextFile.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestDelimitedTextFile.java b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestDelimitedTextFile.java
index 2db916a..6e15c51 100644
--- a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestDelimitedTextFile.java
+++ b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestDelimitedTextFile.java
@@ -101,7 +101,7 @@ public class TestDelimitedTextFile {
   public void testIgnoreAllErrors() throws IOException {
     TajoConf conf = new TajoConf();
 
-    TableMeta meta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.JSON);
+    TableMeta meta = CatalogUtil.newTableMeta("JSON");
     meta.putOption(StorageUtil.TEXT_ERROR_TOLERANCE_MAXNUM, "-1");
     FileFragment fragment =  getFileFragment("testErrorTolerance1.json");
     Scanner scanner =  StorageManager.getFileStorageManager(conf).getScanner(meta, schema, fragment);
@@ -123,7 +123,7 @@ public class TestDelimitedTextFile {
 
     TajoConf conf = new TajoConf();
 
-    TableMeta meta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.JSON);
+    TableMeta meta = CatalogUtil.newTableMeta("JSON");
     meta.putOption(StorageUtil.TEXT_ERROR_TOLERANCE_MAXNUM, "1");
     FileFragment fragment =  getFileFragment("testErrorTolerance1.json");
     Scanner scanner =  StorageManager.getFileStorageManager(conf).getScanner(meta, schema, fragment);
@@ -145,7 +145,7 @@ public class TestDelimitedTextFile {
   @Test
   public void testNoErrorTolerance() throws IOException {
     TajoConf conf = new TajoConf();
-    TableMeta meta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.JSON);
+    TableMeta meta = CatalogUtil.newTableMeta("JSON");
     meta.putOption(StorageUtil.TEXT_ERROR_TOLERANCE_MAXNUM, "0");
     FileFragment fragment =  getFileFragment("testErrorTolerance2.json");
     Scanner scanner =  StorageManager.getFileStorageManager(conf).getScanner(meta, schema, fragment);
@@ -164,7 +164,7 @@ public class TestDelimitedTextFile {
   @Test
   public void testIgnoreTruncatedValueErrorTolerance() throws IOException {
     TajoConf conf = new TajoConf();
-    TableMeta meta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.JSON);
+    TableMeta meta = CatalogUtil.newTableMeta("JSON");
     meta.putOption(StorageUtil.TEXT_ERROR_TOLERANCE_MAXNUM, "1");
     FileFragment fragment = getFileFragment("testErrorTolerance3.json");
     Scanner scanner = StorageManager.getFileStorageManager(conf).getScanner(meta, schema, fragment);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileStorageManager.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileStorageManager.java b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileStorageManager.java
index 4b39cdd..7d5eee1 100644
--- a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileStorageManager.java
+++ b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileStorageManager.java
@@ -68,7 +68,7 @@ public class TestFileStorageManager {
 		schema.addColumn("age",Type.INT4);
 		schema.addColumn("name",Type.TEXT);
 
-		TableMeta meta = CatalogUtil.newTableMeta(StoreType.CSV);
+		TableMeta meta = CatalogUtil.newTableMeta("CSV");
 		
 		Tuple[] tuples = new Tuple[4];
 		for(int i=0; i < tuples.length; i++) {
@@ -135,7 +135,7 @@ public class TestFileStorageManager {
       schema.addColumn("id", Type.INT4);
       schema.addColumn("age",Type.INT4);
       schema.addColumn("name",Type.TEXT);
-      TableMeta meta = CatalogUtil.newTableMeta(StoreType.CSV);
+      TableMeta meta = CatalogUtil.newTableMeta("CSV");
 
       List<Fragment> splits = Lists.newArrayList();
       // Get FileFragments in partition batch
@@ -189,7 +189,7 @@ public class TestFileStorageManager {
       schema.addColumn("id", Type.INT4);
       schema.addColumn("age", Type.INT4);
       schema.addColumn("name", Type.TEXT);
-      TableMeta meta = CatalogUtil.newTableMeta(StoreType.CSV);
+      TableMeta meta = CatalogUtil.newTableMeta("CSV");
 
       List<Fragment> splits = Lists.newArrayList();
       splits.addAll(sm.getSplits("data", meta, schema, tablePath));
@@ -221,11 +221,11 @@ public class TestFileStorageManager {
 
     try {
       /* Local FileSystem */
-      FileStorageManager sm = (FileStorageManager)StorageManager.getStorageManager(conf, StoreType.CSV);
+      FileStorageManager sm = (FileStorageManager)StorageManager.getStorageManager(conf, "CSV");
       assertEquals(fs.getUri(), sm.getFileSystem().getUri());
 
       /* Distributed FileSystem */
-      sm = (FileStorageManager)StorageManager.getStorageManager(tajoConf, StoreType.CSV);
+      sm = (FileStorageManager)StorageManager.getStorageManager(tajoConf, "CSV");
       assertNotEquals(fs.getUri(), sm.getFileSystem().getUri());
       assertEquals(cluster.getFileSystem().getUri(), sm.getFileSystem().getUri());
     } finally {

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileSystems.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileSystems.java b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileSystems.java
index ff7fe13..b4a60fc 100644
--- a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileSystems.java
+++ b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestFileSystems.java
@@ -103,7 +103,7 @@ public class TestFileSystems {
     schema.addColumn("age", Type.INT4);
     schema.addColumn("name", Type.TEXT);
 
-    TableMeta meta = CatalogUtil.newTableMeta(StoreType.CSV);
+    TableMeta meta = CatalogUtil.newTableMeta("CSV");
 
     Tuple[] tuples = new Tuple[4];
     for (int i = 0; i < tuples.length; i++) {

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestLineReader.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestLineReader.java b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestLineReader.java
index f405734..1078b84 100644
--- a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestLineReader.java
+++ b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestLineReader.java
@@ -64,7 +64,7 @@ public class TestLineReader {
     schema.addColumn("comment", Type.TEXT);
     schema.addColumn("comment2", Type.TEXT);
 
-    TableMeta meta = CatalogUtil.newTableMeta(StoreType.TEXTFILE);
+    TableMeta meta = CatalogUtil.newTableMeta("TEXT");
     Path tablePath = new Path(testDir, "line.data");
     FileAppender appender = (FileAppender) StorageManager.getFileStorageManager(conf).getAppender(
         null, null, meta, schema, tablePath);
@@ -115,7 +115,7 @@ public class TestLineReader {
     schema.addColumn("comment", Type.TEXT);
     schema.addColumn("comment2", Type.TEXT);
 
-    TableMeta meta = CatalogUtil.newTableMeta(StoreType.TEXTFILE);
+    TableMeta meta = CatalogUtil.newTableMeta("TEXT");
     meta.putOption("compression.codec", DeflateCodec.class.getCanonicalName());
 
     Path tablePath = new Path(testDir, "testLineDelimitedReaderWithCompression." + DeflateCodec.class.getSimpleName());
@@ -174,7 +174,7 @@ public class TestLineReader {
     schema.addColumn("comment", Type.TEXT);
     schema.addColumn("comment2", Type.TEXT);
 
-    TableMeta meta = CatalogUtil.newTableMeta(StoreType.TEXTFILE);
+    TableMeta meta = CatalogUtil.newTableMeta("TEXT");
 
     Path tablePath = new Path(testDir, "testLineDelimitedReader");
     FileAppender appender = (FileAppender) StorageManager.getFileStorageManager(conf).getAppender(
@@ -278,7 +278,7 @@ public class TestLineReader {
     schema.addColumn("comment", Type.TEXT);
     schema.addColumn("comment2", Type.TEXT);
 
-    TableMeta meta = CatalogUtil.newTableMeta(StoreType.TEXTFILE);
+    TableMeta meta = CatalogUtil.newTableMeta("TEXT");
     Path tablePath = new Path(testDir, "testSeekableByteBufLineReader.data");
     FileAppender appender = (FileAppender) StorageManager.getFileStorageManager(conf).getAppender(
         null, null, meta, schema, tablePath);

http://git-wip-us.apache.org/repos/asf/tajo/blob/863e53ea/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestMergeScanner.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestMergeScanner.java b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestMergeScanner.java
index 561e2ef..e2cfe8f 100644
--- a/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestMergeScanner.java
+++ b/tajo-storage/tajo-storage-hdfs/src/test/java/org/apache/tajo/storage/TestMergeScanner.java
@@ -67,22 +67,22 @@ public class TestMergeScanner {
       "}\n";
 
   private Path testDir;
-  private StoreType storeType;
+  private String storeType;
   private FileSystem fs;
 
-  public TestMergeScanner(StoreType storeType) {
+  public TestMergeScanner(String storeType) {
     this.storeType = storeType;
   }
 
   @Parameters
   public static Collection<Object[]> generateParameters() {
     return Arrays.asList(new Object[][] {
-        {StoreType.CSV},
-        {StoreType.RAW},
-        {StoreType.RCFILE},
-        {StoreType.PARQUET},
-        {StoreType.SEQUENCEFILE},
-        {StoreType.AVRO},
+        {"CSV"},
+        {"RAW"},
+        {"RCFILE"},
+        {"PARQUET"},
+        {"SEQUENCEFILE"},
+        {"AVRO"},
         // RowFile requires Byte-buffer read support, so we omitted RowFile.
         //{StoreType.ROWFILE},
     });
@@ -109,7 +109,7 @@ public class TestMergeScanner {
     KeyValueSet options = new KeyValueSet();
     TableMeta meta = CatalogUtil.newTableMeta(storeType, options);
     meta.setOptions(CatalogUtil.newPhysicalProperties(storeType));
-    if (storeType == StoreType.AVRO) {
+    if (storeType.equalsIgnoreCase("AVRO")) {
       meta.putOption(StorageConstants.AVRO_SCHEMA_LITERAL,
                      TEST_MULTIPLE_FILES_AVRO_SCHEMA);
     }
@@ -187,16 +187,15 @@ public class TestMergeScanner {
     assertEquals(tupleNum * 2, totalCounts);
 	}
 
-  private static boolean isProjectableStorage(StoreType type) {
-    switch (type) {
-      case RCFILE:
-      case PARQUET:
-      case SEQUENCEFILE:
-      case CSV:
-      case AVRO:
-        return true;
-      default:
-        return false;
+  private static boolean isProjectableStorage(String type) {
+    if (type.equalsIgnoreCase("RCFILE") ||
+        type.equalsIgnoreCase("PARQUET") ||
+        type.equalsIgnoreCase("SEQUENCEFILE") ||
+        type.equalsIgnoreCase("CSV") ||
+        type.equalsIgnoreCase("AVRO")) {
+      return true;
+    } else {
+      return false;
     }
   }
 }


Mime
View raw message