tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [05/13] tajo git commit: TAJO-324: Rename the prefix 'QueryUnit' to Task.
Date Fri, 19 Dec 2014 12:48:53 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/TestTajoIds.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/TestTajoIds.java b/tajo-core/src/test/java/org/apache/tajo/TestTajoIds.java
index 60b6c22..d15e282 100644
--- a/tajo-core/src/test/java/org/apache/tajo/TestTajoIds.java
+++ b/tajo-core/src/test/java/org/apache/tajo/TestTajoIds.java
@@ -64,10 +64,10 @@ public class TestTajoIds {
     ExecutionBlockId subId = QueryIdFactory.newExecutionBlockId(queryId, 2);
     assertEquals("eb_" + timeId +"_0001_000002", subId.toString());
     
-    QueryUnitId qId = new QueryUnitId(subId, 5);
+    TaskId qId = new TaskId(subId, 5);
     assertEquals("t_" + timeId + "_0001_000002_000005", qId.toString());
 
-    QueryUnitAttemptId attemptId = new QueryUnitAttemptId(qId, 4);
+    TaskAttemptId attemptId = new TaskAttemptId(qId, 4);
     assertEquals("ta_" + timeId + "_0001_000002_000005_04", attemptId.toString());
   }
 
@@ -87,10 +87,10 @@ public class TestTajoIds {
     ExecutionBlockId sid3 = QueryIdFactory.newExecutionBlockId(queryId1, 1);
     assertEquals(sid1, sid3);
     
-    QueryUnitId qid1 = new QueryUnitId(sid1, 9);
-    QueryUnitId qid2 = new QueryUnitId(sid1, 10);
+    TaskId qid1 = new TaskId(sid1, 9);
+    TaskId qid2 = new TaskId(sid1, 10);
     assertNotSame(qid1, qid2);
-    QueryUnitId qid3 = new QueryUnitId(sid1, 9);
+    TaskId qid3 = new TaskId(sid1, 9);
     assertEquals(qid1, qid3);
   }
 
@@ -112,9 +112,9 @@ public class TestTajoIds {
     assertEquals(1, sid2.compareTo(sid1));
     assertEquals(0, sid3.compareTo(sid1));
     
-    QueryUnitId qid1 = new QueryUnitId(sid1, 9);
-    QueryUnitId qid2 = new QueryUnitId(sid1, 10);
-    QueryUnitId qid3 = new QueryUnitId(sid1, 9);
+    TaskId qid1 = new TaskId(sid1, 9);
+    TaskId qid2 = new TaskId(sid1, 10);
+    TaskId qid3 = new TaskId(sid1, 9);
     assertEquals(-1, qid1.compareTo(qid2));
     assertEquals(1, qid2.compareTo(qid1));
     assertEquals(0, qid3.compareTo(qid1));
@@ -131,12 +131,12 @@ public class TestTajoIds {
     ExecutionBlockId sub2 = TajoIdUtils.createExecutionBlockId(sub1.toString());
     assertEquals(sub1, sub2);
     
-    QueryUnitId u1 = QueryIdFactory.newQueryUnitId(sub1);
-    QueryUnitId u2 = new QueryUnitId(u1.getProto());
+    TaskId u1 = QueryIdFactory.newTaskId(sub1);
+    TaskId u2 = new TaskId(u1.getProto());
     assertEquals(u1, u2);
 
-    QueryUnitAttemptId attempt1 = new QueryUnitAttemptId(u1, 1);
-    QueryUnitAttemptId attempt2 = new QueryUnitAttemptId(attempt1.getProto());
+    TaskAttemptId attempt1 = new TaskAttemptId(u1, 1);
+    TaskAttemptId attempt2 = new TaskAttemptId(attempt1.getProto());
     assertEquals(attempt1, attempt2);
   }
 
@@ -151,12 +151,12 @@ public class TestTajoIds {
     ExecutionBlockId sub2 = TajoIdUtils.createExecutionBlockId(sub1.toString());
     assertEquals(sub1, sub2);
 
-    QueryUnitId u1 = QueryIdFactory.newQueryUnitId(sub1);
-    QueryUnitId u2 = new QueryUnitId(u1.getProto());
+    TaskId u1 = QueryIdFactory.newTaskId(sub1);
+    TaskId u2 = new TaskId(u1.getProto());
     assertEquals(u1, u2);
 
-    QueryUnitAttemptId attempt1 = new QueryUnitAttemptId(u1, 1);
-    QueryUnitAttemptId attempt2 = new QueryUnitAttemptId(attempt1.getProto());
+    TaskAttemptId attempt1 = new TaskAttemptId(u1, 1);
+    TaskAttemptId attempt2 = new TaskAttemptId(attempt1.getProto());
     assertEquals(attempt1, attempt2);
   }
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java b/tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java
index 21dd7d5..d187071 100644
--- a/tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java
+++ b/tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java
@@ -787,17 +787,17 @@ public class TestTajoClient {
     assertEquals(queryId.toString(), queryHistory.getQueryId());
     assertEquals(2, queryHistory.getSubQueryHistoriesCount());
 
-    List<SubQueryHistoryProto> queryUnitHistories =
+    List<SubQueryHistoryProto> taskHistories =
         new ArrayList<SubQueryHistoryProto>(queryHistory.getSubQueryHistoriesList());
-    Collections.sort(queryUnitHistories, new Comparator<SubQueryHistoryProto>() {
+    Collections.sort(taskHistories, new Comparator<SubQueryHistoryProto>() {
       @Override
       public int compare(SubQueryHistoryProto o1, SubQueryHistoryProto o2) {
         return o1.getExecutionBlockId().compareTo(o2.getExecutionBlockId());
       }
     });
-    assertEquals(5, queryUnitHistories.get(0).getTotalReadRows());
-    assertEquals(1, queryUnitHistories.get(0).getTotalWriteRows());
-    assertEquals(1, queryUnitHistories.get(1).getTotalReadRows());
-    assertEquals(1, queryUnitHistories.get(1).getTotalWriteRows());
+    assertEquals(5, taskHistories.get(0).getTotalReadRows());
+    assertEquals(1, taskHistories.get(0).getTotalWriteRows());
+    assertEquals(1, taskHistories.get(1).getTotalReadRows());
+    assertEquals(1, taskHistories.get(1).getTotalWriteRows());
   }
 }

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBNLJoinExec.java
----------------------------------------------------------------------
diff --git 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
index 6a6aafb..8dfe1bb 100644
--- 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
@@ -161,7 +161,7 @@ public class TestBNLJoinExec {
     FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testBNLCrossJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -198,7 +198,7 @@ public class TestBNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testBNLInnerJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(),
+        LocalTajoTestingUtility.newTaskAttemptId(),
         merged, workDir);
     ctx.setEnforcer(enforcer);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
index dc3c28d..c897461 100644
--- a/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestBSTIndexExec.java
@@ -166,7 +166,7 @@ public class TestBSTIndexExec {
     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", meta, tablePath, Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testEqual");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), new FileFragment[] { frags[0] }, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), new FileFragment[] { frags[0] }, workDir);
     Expr expr = analyzer.parse(QUERY);
     LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf), expr);
     LogicalNode rootNode = optimizer.optimize(plan);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestExternalSortExec.java
----------------------------------------------------------------------
diff --git 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
index c0bf6ce..9f40062 100644
--- 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
@@ -126,7 +126,7 @@ public class TestExternalSortExec {
         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);
+        LocalTajoTestingUtility.newTaskAttemptId(), new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
     LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf), expr);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestFullOuterHashJoinExec.java
----------------------------------------------------------------------
diff --git 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
index ecd1c23..06f31ab 100644
--- 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
@@ -277,7 +277,7 @@ public class TestFullOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuterHashJoinExec0");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -316,7 +316,7 @@ public class TestFullOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuter_HashJoinExec1");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -354,7 +354,7 @@ public class TestFullOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuterHashJoinExec2");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -393,7 +393,7 @@ public class TestFullOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestFullOuterHashJoinExec3");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged,
+        LocalTajoTestingUtility.newTaskAttemptId(), merged,
         workDir);
     ctx.setEnforcer(enforcer);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 a81979f..62a8034 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
@@ -326,7 +326,7 @@ public class TestFullOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin0");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -363,7 +363,7 @@ public class TestFullOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin1");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -400,7 +400,7 @@ public class TestFullOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin2");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -438,7 +438,7 @@ public class TestFullOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin3");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -479,7 +479,7 @@ public class TestFullOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin4");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -518,7 +518,7 @@ public class TestFullOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testFullOuterMergeJoin5");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 4fe6ff2..64da88b 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
@@ -160,7 +160,7 @@ public class TestHashAntiJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashAntiJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
     LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf), expr);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 55e87d4..0738316 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
@@ -161,7 +161,7 @@ public class TestHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashInnerJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -204,7 +204,7 @@ public class TestHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashInnerJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     ctx.getQueryContext().setLong(SessionVars.HASH_JOIN_SIZE_LIMIT.keyname(), 100l);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 a2f1155..4e218c5 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
@@ -165,7 +165,7 @@ public class TestHashSemiJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testHashSemiJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
     LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf), expr);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 0477771..67ed358 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
@@ -281,7 +281,7 @@ public class TestLeftOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuterHashJoinExec0");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -312,7 +312,7 @@ public class TestLeftOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_HashJoinExec1");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[1]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();
@@ -353,7 +353,7 @@ public class TestLeftOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_HashJoinExec2");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[2]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();
@@ -395,7 +395,7 @@ public class TestLeftOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_HashJoinExec3");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[3]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();
@@ -437,7 +437,7 @@ public class TestLeftOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_HashJoinExec4");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[4]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 36dd77e..8043aa0 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
@@ -266,7 +266,7 @@ public class TestLeftOuterNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuterNLJoinExec0");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context =  analyzer.parse(QUERIES[0]);
     LogicalNode plan = planner.createPlan(defaultContext, context).getRootBlock().getRoot();
@@ -308,7 +308,7 @@ public class TestLeftOuterNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_NLJoinExec1");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context =  analyzer.parse(QUERIES[1]);
     LogicalNode plan = planner.createPlan(defaultContext, context).getRootBlock().getRoot();
@@ -352,7 +352,7 @@ public class TestLeftOuterNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_NLJoinExec2");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context =  analyzer.parse(QUERIES[2]);
     LogicalNode plan = planner.createPlan(defaultContext, context).getRootBlock().getRoot();
@@ -397,7 +397,7 @@ public class TestLeftOuterNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_NLJoinExec3");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context =  analyzer.parse(QUERIES[3]);
     LogicalNode plan = planner.createPlan(defaultContext, context).getRootBlock().getRoot();
@@ -441,7 +441,7 @@ public class TestLeftOuterNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestLeftOuter_NLJoinExec4");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context =  analyzer.parse(QUERIES[4]);
     LogicalNode plan = planner.createPlan(defaultContext, context).getRootBlock().getRoot();

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 10d4d33..ef3f401 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
@@ -174,7 +174,7 @@ public class TestMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testMergeInnerJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 e976456..2be438f 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
@@ -155,7 +155,7 @@ public class TestNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testNLCrossJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
     LogicalNode plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf),
@@ -184,7 +184,7 @@ public class TestNLJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testNLInnerJoin");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr =  analyzer.parse(QUERIES[1]);
     LogicalNode plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf),

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 cce4ba7..6db76ae 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
@@ -250,7 +250,7 @@ public class TestPhysicalPlanner {
         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),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
@@ -281,7 +281,7 @@ public class TestPhysicalPlanner {
         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),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[16]);
@@ -310,7 +310,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testGroupByPlan");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(QUERIES[7]);
@@ -342,7 +342,7 @@ public class TestPhysicalPlanner {
     Path workDir = CommonTestingUtil.getTestDir(
         "target/test-data/testHashGroupByPlanWithALLField");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[15]);
@@ -371,7 +371,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testSortGroupByPlan");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[]{frags[0]}, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(QUERIES[7]);
@@ -434,7 +434,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     ctx.setOutputPath(new Path(workDir, "grouped1"));
@@ -485,7 +485,7 @@ public class TestPhysicalPlanner {
 
     TaskAttemptContext ctx = new TaskAttemptContext(
         queryContext,
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     ctx.setOutputPath(new Path(workDir, "maxOutput"));
@@ -531,7 +531,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlanWithRCFile");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     ctx.setOutputPath(new Path(workDir, "grouped2"));
@@ -572,7 +572,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     ctx.setOutputPath(new Path(workDir, "grouped3"));
@@ -599,7 +599,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(enforcer);
     ctx.setOutputPath(new Path(workDir, "grouped4"));
@@ -623,7 +623,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testStorePlan");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(enforcer);
     ctx.setOutputPath(new Path(workDir, "grouped5"));
@@ -637,7 +637,7 @@ public class TestPhysicalPlanner {
   public final void testPartitionedStorePlan() throws IOException, PlanningException {
     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
         Integer.MAX_VALUE);
-    QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
+    TaskAttemptId id = LocalTajoTestingUtility.newTaskAttemptId(masterPlan);
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf), id, new FileFragment[] { frags[0] },
         CommonTestingUtil.getTestDir("target/test-data/testPartitionedStorePlan"));
     ctx.setEnforcer(new Enforcer());
@@ -656,8 +656,8 @@ public class TestPhysicalPlanner {
     TableMeta outputMeta = CatalogUtil.newTableMeta(dataChannel.getStoreType());
 
     FileSystem fs = sm.getFileSystem();
-    QueryId queryId = id.getQueryUnitId().getExecutionBlockId().getQueryId();
-    ExecutionBlockId ebId = id.getQueryUnitId().getExecutionBlockId();
+    QueryId queryId = id.getTaskId().getExecutionBlockId().getQueryId();
+    ExecutionBlockId ebId = id.getTaskId().getExecutionBlockId();
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
     PhysicalExec exec = phyPlanner.createPlan(ctx, rootNode);
@@ -706,7 +706,7 @@ public class TestPhysicalPlanner {
     // Preparing working dir and input fragments
     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score_large", largeScore.getMeta(),
         new Path(largeScore.getPath()), Integer.MAX_VALUE);
-    QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
+    TaskAttemptId id = LocalTajoTestingUtility.newTaskAttemptId(masterPlan);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testPartitionedStorePlanWithMaxFileSize");
 
     // Setting session variables
@@ -770,7 +770,7 @@ public class TestPhysicalPlanner {
       throws IOException, PlanningException {
     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.score", score.getMeta(), new Path(score.getPath()),
         Integer.MAX_VALUE);
-    QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
+    TaskAttemptId id = LocalTajoTestingUtility.newTaskAttemptId(masterPlan);
 
     Path workDir = CommonTestingUtil.getTestDir(
         "target/test-data/testPartitionedStorePlanWithEmptyGroupingSet");
@@ -790,8 +790,8 @@ public class TestPhysicalPlanner {
     TableMeta outputMeta = CatalogUtil.newTableMeta(dataChannel.getStoreType());
 
     FileSystem fs = sm.getFileSystem();
-    QueryId queryId = id.getQueryUnitId().getExecutionBlockId().getQueryId();
-    ExecutionBlockId ebId = id.getQueryUnitId().getExecutionBlockId();
+    QueryId queryId = id.getTaskId().getExecutionBlockId().getQueryId();
+    ExecutionBlockId ebId = id.getTaskId().getExecutionBlockId();
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
     PhysicalExec exec = phyPlanner.createPlan(ctx, rootNode);
@@ -839,7 +839,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testAggregationFunction");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(QUERIES[8]);
@@ -870,7 +870,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testCountFunction");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(QUERIES[9]);
@@ -898,7 +898,7 @@ public class TestPhysicalPlanner {
         Integer.MAX_VALUE);
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testGroupByWithNullValue");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(QUERIES[11]);
@@ -923,7 +923,7 @@ public class TestPhysicalPlanner {
         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),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr  context = analyzer.parse(QUERIES[0]);
@@ -951,7 +951,7 @@ public class TestPhysicalPlanner {
   public final void testEvalExpr() throws IOException, PlanningException {
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testEvalExpr");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] { }, workDir);
     Expr expr = analyzer.parse(QUERIES[12]);
     LogicalPlan plan = planner.createPlan(defaultContext, expr);
@@ -988,7 +988,7 @@ public class TestPhysicalPlanner {
         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),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     Expr context = analyzer.parse(createIndexStmt[0]);
     LogicalPlan plan = planner.createPlan(defaultContext, context);
@@ -1016,7 +1016,7 @@ public class TestPhysicalPlanner {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testDuplicateEliminate");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(duplicateElimination[0]);
@@ -1050,7 +1050,7 @@ public class TestPhysicalPlanner {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testIndexedStoreExec");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(SORT_QUERY[0]);
@@ -1152,7 +1152,7 @@ public class TestPhysicalPlanner {
     Enforcer enforcer = new Enforcer();
     enforcer.enforceSortAlgorithm(sortNode.getPID(), SortAlgorithm.IN_MEMORY_SORT);
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     ctx.setEnforcer(enforcer);
 
@@ -1174,7 +1174,7 @@ public class TestPhysicalPlanner {
     enforcer = new Enforcer();
     enforcer.enforceSortAlgorithm(sortNode.getPID(), SortAlgorithm.MERGE_SORT);
     ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     ctx.setEnforcer(enforcer);
 
@@ -1202,7 +1202,7 @@ public class TestPhysicalPlanner {
     Enforcer enforcer = new Enforcer();
     enforcer.enforceHashAggregation(groupByNode.getPID());
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     ctx.setEnforcer(enforcer);
 
@@ -1224,7 +1224,7 @@ public class TestPhysicalPlanner {
     enforcer = new Enforcer();
     enforcer.enforceSortAggregation(groupByNode.getPID(), null);
     ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
+        LocalTajoTestingUtility.newTaskAttemptId(masterPlan),
         new FileFragment[] {frags[0]}, workDir);
     ctx.setEnforcer(enforcer);
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 3c78b12..a2b407b 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
@@ -141,7 +141,7 @@ public class TestProgressExternalSortExec {
         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);
+        LocalTajoTestingUtility.newTaskAttemptId(), new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
     LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf), expr);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 879ca21..e4ed595 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
@@ -241,7 +241,7 @@ public class TestRightOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestRightOuter_HashJoinExec0");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[0]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();
@@ -282,7 +282,7 @@ public class TestRightOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestRightOuter_HashJoinExec1");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[1]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();
@@ -323,7 +323,7 @@ public class TestRightOuterHashJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestRightOuter_HashJoinExec2");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(QUERIES[2]);
     LogicalNode plan = planner.createPlan(defaultContext, expr).getRootBlock().getRoot();

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 8bc00cc..112a341 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
@@ -325,7 +325,7 @@ public class TestRightOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin0");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -362,7 +362,7 @@ public class TestRightOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin1");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -398,7 +398,7 @@ public class TestRightOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin2");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -434,7 +434,7 @@ public class TestRightOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuter_MergeJoin3");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -472,7 +472,7 @@ public class TestRightOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuter_MergeJoin4");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);
@@ -509,7 +509,7 @@ public class TestRightOuterMergeJoinExec {
 
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/testRightOuterMergeJoin5");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
+        LocalTajoTestingUtility.newTaskAttemptId(), merged, workDir);
     ctx.setEnforcer(enforcer);
 
     PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/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 8a61cab..2e093c1 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
@@ -115,7 +115,7 @@ public class TestSortExec {
     Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestSortExec");
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
         LocalTajoTestingUtility
-        .newQueryUnitAttemptId(), new FileFragment[] { frags[0] }, workDir);
+        .newTaskAttemptId(), new FileFragment[] { frags[0] }, workDir);
     ctx.setEnforcer(new Enforcer());
     Expr context = analyzer.parse(QUERIES[0]);
     LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummyContext(conf), context);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
index cccbf2f..3dd1219 100644
--- a/tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
+++ b/tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
@@ -26,7 +26,7 @@ import org.apache.tajo.common.TajoDataTypes.Type;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.master.querymaster.Query;
 import org.apache.tajo.master.querymaster.QueryMasterTask;
-import org.apache.tajo.master.querymaster.QueryUnit;
+import org.apache.tajo.master.querymaster.Task;
 import org.apache.tajo.master.querymaster.SubQuery;
 import org.apache.tajo.storage.StorageConstants;
 import org.apache.tajo.util.KeyValueSet;
@@ -736,7 +736,7 @@ public class TestGroupByQuery extends QueryTestCaseBase {
       assertTrue(!subQueries.isEmpty());
       for (SubQuery subQuery: subQueries) {
         if (subQuery.getId().toStringNoPrefix().endsWith("_000001")) {
-          for (QueryUnit.IntermediateEntry eachInterm: subQuery.getHashShuffleIntermediateEntries()) {
+          for (Task.IntermediateEntry eachInterm: subQuery.getHashShuffleIntermediateEntries()) {
             partitionIds.add(eachInterm.getPartId());
           }
         }

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/master/TestRepartitioner.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/master/TestRepartitioner.java b/tajo-core/src/test/java/org/apache/tajo/master/TestRepartitioner.java
index 3c96770..66d74c4 100644
--- a/tajo-core/src/test/java/org/apache/tajo/master/TestRepartitioner.java
+++ b/tajo-core/src/test/java/org/apache/tajo/master/TestRepartitioner.java
@@ -25,10 +25,9 @@ import org.apache.tajo.LocalTajoTestingUtility;
 import org.apache.tajo.QueryId;
 import org.apache.tajo.TestTajoIds;
 import org.apache.tajo.ipc.TajoWorkerProtocol;
-import org.apache.tajo.master.querymaster.QueryUnit;
-import org.apache.tajo.master.querymaster.QueryUnit.IntermediateEntry;
+import org.apache.tajo.master.querymaster.Task;
+import org.apache.tajo.master.querymaster.Task.IntermediateEntry;
 import org.apache.tajo.master.querymaster.Repartitioner;
-import org.apache.tajo.plan.serder.PlanProto;
 import org.apache.tajo.util.Pair;
 import org.apache.tajo.util.TUtil;
 import org.apache.tajo.worker.FetchImpl;
@@ -61,7 +60,7 @@ public class TestRepartitioner {
     }
     for (int i = 0; i < 1000; i++) {
       int partitionId = i % numPartition;
-      IntermediateEntry entry = new IntermediateEntry(i, 0, partitionId, new QueryUnit.PullHost(hostName, port));
+      IntermediateEntry entry = new IntermediateEntry(i, 0, partitionId, new Task.PullHost(hostName, port));
       entry.setEbId(sid);
       entry.setVolume(10);
       intermediateEntries.get(partitionId).add(entry);
@@ -71,7 +70,7 @@ public class TestRepartitioner {
         new HashMap<Integer, Map<ExecutionBlockId, List<IntermediateEntry>>>();
 
     for (Map.Entry<Integer, List<IntermediateEntry>> eachEntry: intermediateEntries.entrySet()) {
-      FetchImpl fetch = new FetchImpl(new QueryUnit.PullHost(hostName, port), ShuffleType.HASH_SHUFFLE,
+      FetchImpl fetch = new FetchImpl(new Task.PullHost(hostName, port), ShuffleType.HASH_SHUFFLE,
           sid, eachEntry.getKey(), eachEntry.getValue());
 
       fetch.setName(sid.toString());
@@ -120,7 +119,7 @@ public class TestRepartitioner {
     ExecutionBlockId ebId = new ExecutionBlockId(LocalTajoTestingUtility.newQueryId(), 0);
     FetchImpl [] fetches = new FetchImpl[12];
     for (int i = 0; i < 12; i++) {
-      fetches[i] = new FetchImpl(new QueryUnit.PullHost("localhost", 10000 + i), HASH_SHUFFLE, ebId, i / 2);
+      fetches[i] = new FetchImpl(new Task.PullHost("localhost", 10000 + i), HASH_SHUFFLE, ebId, i / 2);
     }
 
     int [] VOLUMES = {100, 80, 70, 30, 10, 5};
@@ -185,7 +184,7 @@ public class TestRepartitioner {
         offset += pageLengths[j];
         expectedTotalLength += pageLengths[j];
       }
-      IntermediateEntry interm = new IntermediateEntry(i, -1, -1, new QueryUnit.PullHost("" + i, i));
+      IntermediateEntry interm = new IntermediateEntry(i, -1, -1, new Task.PullHost("" + i, i));
       interm.setPages(pages);
       interm.setVolume(offset);
       intermediateEntries.add(interm);
@@ -243,7 +242,7 @@ public class TestRepartitioner {
         offset += pageLengths[j];
         expectedTotalLength += pageLengths[j];
       }
-      IntermediateEntry interm = new IntermediateEntry(i, -1, 0, new QueryUnit.PullHost("" + i, i));
+      IntermediateEntry interm = new IntermediateEntry(i, -1, 0, new Task.PullHost("" + i, i));
       interm.setPages(pages);
       interm.setVolume(offset);
       intermediateEntries.add(interm);
@@ -372,7 +371,7 @@ public class TestRepartitioner {
       for (int j = 0; j < pageDatas.length; j++) {
         pages.add(new Pair(pageDatas[j][0], (int) (pageDatas[j][1])));
       }
-      IntermediateEntry entry = new IntermediateEntry(-1, -1, 1, new QueryUnit.PullHost("host" + i , 9000));
+      IntermediateEntry entry = new IntermediateEntry(-1, -1, 1, new Task.PullHost("host" + i , 9000));
       entry.setPages(pages);
 
       entries.add(entry);
@@ -422,7 +421,7 @@ public class TestRepartitioner {
     }
 
     long expectedTotalLength = 0;
-    QueryUnit.PullHost pullHost = new QueryUnit.PullHost("host", 0);
+    Task.PullHost pullHost = new Task.PullHost("host", 0);
 
     for (int i = 0; i < 20; i++) {
       List<Pair<Long, Integer>> pages = new ArrayList<Pair<Long, Integer>>();
@@ -481,7 +480,7 @@ public class TestRepartitioner {
   @Test
   public void testFetchImpl() {
     ExecutionBlockId ebId = new ExecutionBlockId(LocalTajoTestingUtility.newQueryId(), 0);
-    QueryUnit.PullHost pullHost = new QueryUnit.PullHost("localhost", 0);
+    Task.PullHost pullHost = new Task.PullHost("localhost", 0);
 
     FetchImpl expected = new FetchImpl(pullHost, SCATTERED_HASH_SHUFFLE, ebId, 1);
     FetchImpl fetch2 = new FetchImpl(pullHost, SCATTERED_HASH_SHUFFLE, ebId, 1);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestIntermediateEntry.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestIntermediateEntry.java b/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestIntermediateEntry.java
index 114b232..7698987 100644
--- a/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestIntermediateEntry.java
+++ b/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestIntermediateEntry.java
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertEquals;
 public class TestIntermediateEntry {
   @Test
   public void testPage() {
-    QueryUnit.IntermediateEntry interm = new QueryUnit.IntermediateEntry(-1, -1, 1, null);
+    Task.IntermediateEntry interm = new Task.IntermediateEntry(-1, -1, 1, null);
 
     List<Pair<Long, Integer>> pages = new ArrayList<Pair<Long, Integer>>();
     pages.add(new Pair(0L, 1441275));

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestQueryUnitStatusUpdate.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestQueryUnitStatusUpdate.java b/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestQueryUnitStatusUpdate.java
deleted file mode 100644
index d64e4c7..0000000
--- a/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestQueryUnitStatusUpdate.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.tajo.master.querymaster;
-
-import org.apache.tajo.IntegrationTest;
-import org.apache.tajo.QueryTestCaseBase;
-import org.apache.tajo.TajoConstants;
-import org.apache.tajo.catalog.CatalogUtil;
-import org.apache.tajo.catalog.statistics.TableStats;
-import org.apache.tajo.conf.TajoConf;
-import org.apache.tajo.worker.TajoWorker;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.sql.ResultSet;
-import java.util.*;
-
-import static org.apache.tajo.TajoConstants.DEFAULT_DATABASE_NAME;
-import static org.junit.Assert.*;
-
-@Category(IntegrationTest.class)
-public class TestQueryUnitStatusUpdate extends QueryTestCaseBase {
-
-  public TestQueryUnitStatusUpdate() {
-    super(TajoConstants.DEFAULT_DATABASE_NAME);
-  }
-
-  @BeforeClass
-  public static void setUp() throws Exception {
-    conf.set(TajoConf.ConfVars.$TEST_BROADCAST_JOIN_ENABLED.varname, "false");
-  }
-
-  @Test
-  public final void case1() throws Exception {
-    // select l_linenumber, count(1) as unique_key from lineitem group by l_linenumber;
-    ResultSet res = null;
-    try {
-      res = executeQuery();
-
-      // tpch/lineitem.tbl
-      long[] expectedNumRows = new long[]{5, 2, 2, 2};
-      long[] expectedNumBytes = new long[]{604, 18, 18, 8};
-      long[] expectedReadBytes = new long[]{604, 604, 18, 0};
-
-      assertStatus(2, expectedNumRows, expectedNumBytes, expectedReadBytes);
-    } finally {
-      cleanupQuery(res);
-    }
-  }
-
-  @Test
-  public final void case2() throws Exception {
-    // ExternalMergeSort
-    ResultSet res = null;
-    try {
-      res = executeQuery();
-
-      // tpch/lineitem.tbl
-      long[] expectedNumRows = new long[]{5, 2, 2, 2, 2, 2};
-      long[] expectedNumBytes = new long[]{604, 162, 162, 138, 138, 194};
-      long[] expectedReadBytes = new long[]{604, 604, 162, 0, 138, 0};
-
-      assertStatus(3, expectedNumRows, expectedNumBytes, expectedReadBytes);
-    } finally {
-      cleanupQuery(res);
-    }
-  }
-
-
-  @Test
-  public final void case3() throws Exception {
-    // Partition Scan
-    ResultSet res = null;
-    try {
-      createColumnPartitionedTable();
-
-      /*
-      |-eb_1404143727281_0002_000005
-         |-eb_1404143727281_0002_000004        (order by)
-            |-eb_1404143727281_0002_000003     (join)
-               |-eb_1404143727281_0002_000002  (scan)
-               |-eb_1404143727281_0002_000001  (scan, filter)
-       */
-      res = executeQuery();
-
-      String actualResult = resultSetToString(res);
-      System.out.println(actualResult);
-
-      // in/out * subquery(4)
-      long[] expectedNumRows = new long[]{2, 2, 5, 5, 7, 2, 2, 2};
-      long[] expectedNumBytes = new long[]{8, 34, 20, 75, 109, 34, 34, 18};
-      long[] expectedReadBytes = new long[]{8, 8, 20, 20, 109, 0, 34, 0};
-
-      assertStatus(4, expectedNumRows, expectedNumBytes, expectedReadBytes);
-    } finally {
-      cleanupQuery(res);
-    }
-  }
-
-  private void createColumnPartitionedTable() throws Exception {
-    String tableName = CatalogUtil.normalizeIdentifier("ColumnPartitionedTable");
-    ResultSet res = executeString(
-        "create table " + tableName + " (col1 int4, col2 int4) partition by column(key float8) ");
-    res.close();
-
-    assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName));
-    assertEquals(2, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getSchema().size());
-    assertEquals(3,
-        catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getLogicalSchema().size());
-
-    res = testBase.execute(
-        "insert overwrite into " + tableName + " select l_orderkey, l_partkey, l_quantity from lineitem");
-
-    res.close();
-  }
-
-  private void assertStatus(int numSubQueries,
-                            long[] expectedNumRows,
-                            long[] expectedNumBytes,
-                            long[] expectedReadBytes) throws Exception {
-      List<TajoWorker> tajoWorkers = testingCluster.getTajoWorkers();
-      Collection<QueryMasterTask> finishedTasks = null;
-      for (TajoWorker eachWorker: tajoWorkers) {
-        finishedTasks = eachWorker.getWorkerContext().getQueryMaster().getFinishedQueryMasterTasks();
-        if (finishedTasks != null && !finishedTasks.isEmpty()) {
-          break;
-        }
-      }
-
-      assertNotNull(finishedTasks);
-      assertTrue(!finishedTasks.isEmpty());
-
-      List<QueryMasterTask> finishedTaskList = new ArrayList<QueryMasterTask>(finishedTasks);
-
-      Collections.sort(finishedTaskList, new Comparator<QueryMasterTask>() {
-        @Override
-        public int compare(QueryMasterTask o1, QueryMasterTask o2) {
-          return o2.getQueryId().compareTo(o1.getQueryId());
-        }
-      });
-
-      Query query = finishedTaskList.get(0).getQuery();
-
-      assertNotNull(query);
-
-      List<SubQuery> subQueries = new ArrayList<SubQuery>(query.getSubQueries());
-      assertEquals(numSubQueries, subQueries.size());
-
-      Collections.sort(subQueries, new Comparator<SubQuery>() {
-        @Override
-        public int compare(SubQuery o1, SubQuery o2) {
-          return o1.getId().compareTo(o2.getId());
-        }
-      });
-
-      int index = 0;
-      for (SubQuery eachSubQuery: subQueries) {
-        TableStats inputStats = eachSubQuery.getInputStats();
-        TableStats resultStats = eachSubQuery.getResultStats();
-
-        assertNotNull(inputStats);
-        assertEquals(expectedNumRows[index], inputStats.getNumRows().longValue());
-        assertEquals(expectedNumBytes[index], inputStats.getNumBytes().longValue());
-        assertEquals(expectedReadBytes[index], inputStats.getReadBytes().longValue());
-
-        index++;
-
-        assertNotNull(resultStats);
-        assertEquals(expectedNumRows[index], resultStats.getNumRows().longValue());
-        assertEquals(expectedNumBytes[index], resultStats.getNumBytes().longValue());
-        assertEquals(expectedReadBytes[index], resultStats.getReadBytes().longValue());
-
-        index++;
-      }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestTaskStatusUpdate.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestTaskStatusUpdate.java b/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestTaskStatusUpdate.java
new file mode 100644
index 0000000..1c2a1a8
--- /dev/null
+++ b/tajo-core/src/test/java/org/apache/tajo/master/querymaster/TestTaskStatusUpdate.java
@@ -0,0 +1,194 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tajo.master.querymaster;
+
+import org.apache.tajo.IntegrationTest;
+import org.apache.tajo.QueryTestCaseBase;
+import org.apache.tajo.TajoConstants;
+import org.apache.tajo.catalog.CatalogUtil;
+import org.apache.tajo.catalog.statistics.TableStats;
+import org.apache.tajo.conf.TajoConf;
+import org.apache.tajo.worker.TajoWorker;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.sql.ResultSet;
+import java.util.*;
+
+import static org.apache.tajo.TajoConstants.DEFAULT_DATABASE_NAME;
+import static org.junit.Assert.*;
+
+@Category(IntegrationTest.class)
+public class TestTaskStatusUpdate extends QueryTestCaseBase {
+
+  public TestTaskStatusUpdate() {
+    super(TajoConstants.DEFAULT_DATABASE_NAME);
+  }
+
+  @BeforeClass
+  public static void setUp() throws Exception {
+    conf.set(TajoConf.ConfVars.$TEST_BROADCAST_JOIN_ENABLED.varname, "false");
+  }
+
+  @Test
+  public final void case1() throws Exception {
+    // select l_linenumber, count(1) as unique_key from lineitem group by l_linenumber;
+    ResultSet res = null;
+    try {
+      res = executeQuery();
+
+      // tpch/lineitem.tbl
+      long[] expectedNumRows = new long[]{5, 2, 2, 2};
+      long[] expectedNumBytes = new long[]{604, 18, 18, 8};
+      long[] expectedReadBytes = new long[]{604, 604, 18, 0};
+
+      assertStatus(2, expectedNumRows, expectedNumBytes, expectedReadBytes);
+    } finally {
+      cleanupQuery(res);
+    }
+  }
+
+  @Test
+  public final void case2() throws Exception {
+    // ExternalMergeSort
+    ResultSet res = null;
+    try {
+      res = executeQuery();
+
+      // tpch/lineitem.tbl
+      long[] expectedNumRows = new long[]{5, 2, 2, 2, 2, 2};
+      long[] expectedNumBytes = new long[]{604, 162, 162, 138, 138, 194};
+      long[] expectedReadBytes = new long[]{604, 604, 162, 0, 138, 0};
+
+      assertStatus(3, expectedNumRows, expectedNumBytes, expectedReadBytes);
+    } finally {
+      cleanupQuery(res);
+    }
+  }
+
+
+  @Test
+  public final void case3() throws Exception {
+    // Partition Scan
+    ResultSet res = null;
+    try {
+      createColumnPartitionedTable();
+
+      /*
+      |-eb_1404143727281_0002_000005
+         |-eb_1404143727281_0002_000004        (order by)
+            |-eb_1404143727281_0002_000003     (join)
+               |-eb_1404143727281_0002_000002  (scan)
+               |-eb_1404143727281_0002_000001  (scan, filter)
+       */
+      res = executeQuery();
+
+      String actualResult = resultSetToString(res);
+      System.out.println(actualResult);
+
+      // in/out * subquery(4)
+      long[] expectedNumRows = new long[]{2, 2, 5, 5, 7, 2, 2, 2};
+      long[] expectedNumBytes = new long[]{8, 34, 20, 75, 109, 34, 34, 18};
+      long[] expectedReadBytes = new long[]{8, 8, 20, 20, 109, 0, 34, 0};
+
+      assertStatus(4, expectedNumRows, expectedNumBytes, expectedReadBytes);
+    } finally {
+      cleanupQuery(res);
+    }
+  }
+
+  private void createColumnPartitionedTable() throws Exception {
+    String tableName = CatalogUtil.normalizeIdentifier("ColumnPartitionedTable");
+    ResultSet res = executeString(
+        "create table " + tableName + " (col1 int4, col2 int4) partition by column(key float8) ");
+    res.close();
+
+    assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName));
+    assertEquals(2, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getSchema().size());
+    assertEquals(3,
+        catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getLogicalSchema().size());
+
+    res = testBase.execute(
+        "insert overwrite into " + tableName + " select l_orderkey, l_partkey, l_quantity from lineitem");
+
+    res.close();
+  }
+
+  private void assertStatus(int numSubQueries,
+                            long[] expectedNumRows,
+                            long[] expectedNumBytes,
+                            long[] expectedReadBytes) throws Exception {
+      List<TajoWorker> tajoWorkers = testingCluster.getTajoWorkers();
+      Collection<QueryMasterTask> finishedTasks = null;
+      for (TajoWorker eachWorker: tajoWorkers) {
+        finishedTasks = eachWorker.getWorkerContext().getQueryMaster().getFinishedQueryMasterTasks();
+        if (finishedTasks != null && !finishedTasks.isEmpty()) {
+          break;
+        }
+      }
+
+      assertNotNull(finishedTasks);
+      assertTrue(!finishedTasks.isEmpty());
+
+      List<QueryMasterTask> finishedTaskList = new ArrayList<QueryMasterTask>(finishedTasks);
+
+      Collections.sort(finishedTaskList, new Comparator<QueryMasterTask>() {
+        @Override
+        public int compare(QueryMasterTask o1, QueryMasterTask o2) {
+          return o2.getQueryId().compareTo(o1.getQueryId());
+        }
+      });
+
+      Query query = finishedTaskList.get(0).getQuery();
+
+      assertNotNull(query);
+
+      List<SubQuery> subQueries = new ArrayList<SubQuery>(query.getSubQueries());
+      assertEquals(numSubQueries, subQueries.size());
+
+      Collections.sort(subQueries, new Comparator<SubQuery>() {
+        @Override
+        public int compare(SubQuery o1, SubQuery o2) {
+          return o1.getId().compareTo(o2.getId());
+        }
+      });
+
+      int index = 0;
+      for (SubQuery eachSubQuery: subQueries) {
+        TableStats inputStats = eachSubQuery.getInputStats();
+        TableStats resultStats = eachSubQuery.getResultStats();
+
+        assertNotNull(inputStats);
+        assertEquals(expectedNumRows[index], inputStats.getNumRows().longValue());
+        assertEquals(expectedNumBytes[index], inputStats.getNumBytes().longValue());
+        assertEquals(expectedReadBytes[index], inputStats.getReadBytes().longValue());
+
+        index++;
+
+        assertNotNull(resultStats);
+        assertEquals(expectedNumRows[index], resultStats.getNumRows().longValue());
+        assertEquals(expectedNumBytes[index], resultStats.getNumBytes().longValue());
+        assertEquals(expectedReadBytes[index], resultStats.getReadBytes().longValue());
+
+        index++;
+      }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/util/TestJSPUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/util/TestJSPUtil.java b/tajo-core/src/test/java/org/apache/tajo/util/TestJSPUtil.java
index 96aa5de..2e00138 100644
--- a/tajo-core/src/test/java/org/apache/tajo/util/TestJSPUtil.java
+++ b/tajo-core/src/test/java/org/apache/tajo/util/TestJSPUtil.java
@@ -20,10 +20,10 @@ package org.apache.tajo.util;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.tajo.ExecutionBlockId;
-import org.apache.tajo.QueryUnitId;
+import org.apache.tajo.TaskId;
 import org.apache.tajo.conf.TajoConf;
-import org.apache.tajo.master.event.QueryUnitAttemptScheduleEvent;
-import org.apache.tajo.master.querymaster.QueryUnit;
+import org.apache.tajo.master.event.TaskAttemptToSchedulerEvent;
+import org.apache.tajo.master.querymaster.Task;
 import org.junit.Test;
 
 import java.util.ArrayList;
@@ -34,52 +34,52 @@ import static org.junit.Assert.assertEquals;
 
 public class TestJSPUtil {
   @Test
-  public void testSortQueryUnit() throws Exception {
-    List<QueryUnit> queryUnits = new ArrayList<QueryUnit>();
+  public void testSortTask() throws Exception {
+    List<Task> tasks = new ArrayList<Task>();
 
     Configuration conf = new TajoConf();
 
-    QueryUnitAttemptScheduleEvent.QueryUnitAttemptScheduleContext scheduleContext =
-        new QueryUnitAttemptScheduleEvent.QueryUnitAttemptScheduleContext();
+    TaskAttemptToSchedulerEvent.TaskAttemptScheduleContext scheduleContext =
+        new TaskAttemptToSchedulerEvent.TaskAttemptScheduleContext();
 
     ExecutionBlockId ebId = TajoIdUtils.createExecutionBlockId("eb_000001_00001_00001");
 
     for (int i = 0; i < 10; i++) {
-      QueryUnitId id = new QueryUnitId(ebId, i);
-      QueryUnit queryUnit = new QueryUnit(conf, scheduleContext, id, true, null);
-      queryUnits.add(queryUnit);
+      TaskId id = new TaskId(ebId, i);
+      Task task = new Task(conf, scheduleContext, id, true, null);
+      tasks.add(task);
 
       int launchTime = i + 1;
       int runningTime = i + 1;
       if(i < 9) {
-        queryUnit.setLaunchTime(launchTime);
-        queryUnit.setFinishTime(launchTime + runningTime);
+        task.setLaunchTime(launchTime);
+        task.setFinishTime(launchTime + runningTime);
       }
     }
 
-    Collections.shuffle(queryUnits);
+    Collections.shuffle(tasks);
 
-    QueryUnit[] queryUnitArray = queryUnits.toArray(new QueryUnit[]{});
-    JSPUtil.sortQueryUnitArray(queryUnitArray, "id", "asc");
+    Task[] taskArray = tasks.toArray(new Task[]{});
+    JSPUtil.sortTaskArray(taskArray, "id", "asc");
     for (int i = 0; i < 10; i++) {
-      assertEquals(i, queryUnitArray[i].getId().getId());
+      assertEquals(i, taskArray[i].getId().getId());
     }
 
-    queryUnitArray = queryUnits.toArray(new QueryUnit[]{});
-    JSPUtil.sortQueryUnitArray(queryUnitArray, "id", "desc");
+    taskArray = tasks.toArray(new Task[]{});
+    JSPUtil.sortTaskArray(taskArray, "id", "desc");
     for (int i = 0; i < 10; i++) {
-      assertEquals(9 - i, queryUnitArray[i].getId().getId());
+      assertEquals(9 - i, taskArray[i].getId().getId());
     }
 
-    queryUnitArray = queryUnits.toArray(new QueryUnit[]{});
-    JSPUtil.sortQueryUnitArray(queryUnitArray, "runTime", "asc");
-    assertEquals(0, queryUnitArray[0].getId().getId());
-    assertEquals(9, queryUnitArray[9].getId().getId());
+    taskArray = tasks.toArray(new Task[]{});
+    JSPUtil.sortTaskArray(taskArray, "runTime", "asc");
+    assertEquals(0, taskArray[0].getId().getId());
+    assertEquals(9, taskArray[9].getId().getId());
 
-    queryUnitArray = queryUnits.toArray(new QueryUnit[]{});
-    JSPUtil.sortQueryUnitArray(queryUnitArray, "runTime", "desc");
-    assertEquals(8, queryUnitArray[0].getId().getId());
-    assertEquals(9, queryUnitArray[9].getId().getId());
+    taskArray = tasks.toArray(new Task[]{});
+    JSPUtil.sortTaskArray(taskArray, "runTime", "desc");
+    assertEquals(8, taskArray[0].getId().getId());
+    assertEquals(9, taskArray[9].getId().getId());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/util/history/TestHistoryWriterReader.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/util/history/TestHistoryWriterReader.java b/tajo-core/src/test/java/org/apache/tajo/util/history/TestHistoryWriterReader.java
index d5b737f..8d6a94d 100644
--- a/tajo-core/src/test/java/org/apache/tajo/util/history/TestHistoryWriterReader.java
+++ b/tajo-core/src/test/java/org/apache/tajo/util/history/TestHistoryWriterReader.java
@@ -30,7 +30,6 @@ import org.apache.tajo.conf.TajoConf;
 import org.apache.tajo.conf.TajoConf.ConfVars;
 import org.apache.tajo.master.querymaster.QueryInfo;
 import org.apache.tajo.util.TajoIdUtils;
-import org.apache.tajo.worker.TaskHistory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -134,13 +133,13 @@ public class TestHistoryWriterReader extends QueryTestCaseBase {
         subQueryHistory.setExecutionBlockId(ebId.toString());
         subQueryHistory.setStartTime(startTime + i);
 
-        List<QueryUnitHistory> queryUnitHistories = new ArrayList<QueryUnitHistory>();
+        List<TaskHistory> taskHistories = new ArrayList<TaskHistory>();
         for (int j = 0; j < 5; j++) {
-          QueryUnitHistory queryUnitHistory = new QueryUnitHistory();
-          queryUnitHistory.setId(QueryIdFactory.newQueryUnitAttemptId(QueryIdFactory.newQueryUnitId(ebId), 1).toString());
-          queryUnitHistories.add(queryUnitHistory);
+          TaskHistory taskHistory = new TaskHistory();
+          taskHistory.setId(QueryIdFactory.newTaskAttemptId(QueryIdFactory.newTaskId(ebId), 1).toString());
+          taskHistories.add(taskHistory);
         }
-        subQueryHistory.setQueryUnits(queryUnitHistories);
+        subQueryHistory.setTasks(taskHistories);
         subQueries.add(subQueryHistory);
       }
       queryHistory.setSubQueryHistories(subQueries);
@@ -175,16 +174,16 @@ public class TestHistoryWriterReader extends QueryTestCaseBase {
         assertEquals(ebId, subQueryHistory.getExecutionBlockId());
         assertEquals(startTime + i, subQueryHistory.getStartTime());
 
-        // QueryUnitHistory is stored in the other file.
-        assertNull(subQueryHistory.getQueryUnits());
+        // TaskHistory is stored in the other file.
+        assertNull(subQueryHistory.getTasks());
 
-        List<QueryUnitHistory> queryUnits = reader.getQueryUnitHistory(queryId.toString(), ebId);
-        assertNotNull(queryUnits);
-        assertEquals(5, queryUnits.size());
+        List<TaskHistory> tasks = reader.getTaskHistory(queryId.toString(), ebId);
+        assertNotNull(tasks);
+        assertEquals(5, tasks.size());
 
         for (int j = 0; j < 5; j++) {
-          QueryUnitHistory queryUnitHistory = queryUnits.get(j);
-          assertEquals(subQueries.get(i).getQueryUnits().get(j).getId(), queryUnitHistory.getId());
+          TaskHistory taskHistory = tasks.get(j);
+          assertEquals(subQueries.get(i).getTasks().get(j).getId(), taskHistory.getId());
         }
       }
     } finally {
@@ -210,13 +209,13 @@ public class TestHistoryWriterReader extends QueryTestCaseBase {
           .setNumBytes(100)
           .build();
       long startTime = System.currentTimeMillis() - 2000;
-      QueryUnitAttemptId id1 = TajoIdUtils.parseQueryUnitAttemptId("ta_1412326813565_0001_000001_000001_00");
-      TaskHistory taskHistory1 = new TaskHistory(
+      TaskAttemptId id1 = TajoIdUtils.parseTaskAttemptId("ta_1412326813565_0001_000001_000001_00");
+      org.apache.tajo.worker.TaskHistory taskHistory1 = new org.apache.tajo.worker.TaskHistory(
           id1, TaskAttemptState.TA_SUCCEEDED, 1.0f, startTime, System.currentTimeMillis(), tableStats);
       writer.appendHistory(taskHistory1);
 
-      QueryUnitAttemptId id2 = TajoIdUtils.parseQueryUnitAttemptId("ta_1412326813565_0001_000001_000002_00");
-      TaskHistory taskHistory2 = new TaskHistory(
+      TaskAttemptId id2 = TajoIdUtils.parseTaskAttemptId("ta_1412326813565_0001_000001_000002_00");
+      org.apache.tajo.worker.TaskHistory taskHistory2 = new org.apache.tajo.worker.TaskHistory(
           id2, TaskAttemptState.TA_SUCCEEDED, 1.0f, startTime, System.currentTimeMillis() - 500, tableStats);
       writer.appendHistory(taskHistory2);
 
@@ -232,14 +231,14 @@ public class TestHistoryWriterReader extends QueryTestCaseBase {
       assertTrue(fs.exists(taskParentPath));
 
       HistoryReader reader = new HistoryReader("127.0.0.1:28090", tajoConf);
-      TaskHistory foundTaskHistory = reader.getTaskHistory(id1.toString(), startTime);
+      org.apache.tajo.worker.TaskHistory foundTaskHistory = reader.getTaskHistory(id1.toString(), startTime);
       assertNotNull(foundTaskHistory);
-      assertEquals(id1, foundTaskHistory.getQueryUnitAttemptId());
+      assertEquals(id1, foundTaskHistory.getTaskAttemptId());
       assertEquals(taskHistory1, foundTaskHistory);
 
       foundTaskHistory = reader.getTaskHistory(id2.toString(), startTime);
       assertNotNull(foundTaskHistory);
-      assertEquals(id2, foundTaskHistory.getQueryUnitAttemptId());
+      assertEquals(id2, foundTaskHistory.getTaskAttemptId());
       assertEquals(taskHistory2, foundTaskHistory);
 
       foundTaskHistory = reader.getTaskHistory("ta_1412326813565_0001_000001_000003_00", startTime);

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/worker/TestHistory.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/worker/TestHistory.java b/tajo-core/src/test/java/org/apache/tajo/worker/TestHistory.java
index fa90b61..d320077 100644
--- a/tajo-core/src/test/java/org/apache/tajo/worker/TestHistory.java
+++ b/tajo-core/src/test/java/org/apache/tajo/worker/TestHistory.java
@@ -20,7 +20,7 @@ package org.apache.tajo.worker;
 
 import com.google.protobuf.ServiceException;
 import org.apache.hadoop.service.Service;
-import org.apache.tajo.QueryUnitAttemptId;
+import org.apache.tajo.TaskAttemptId;
 import org.apache.tajo.TajoProtos;
 import org.apache.tajo.TajoTestingCluster;
 import org.apache.tajo.TpchTestBase;
@@ -107,13 +107,13 @@ public class TestHistory {
     assertTrue(history.size() > 0);
     assertEquals(Service.STATE.STOPPED, history.getState());
 
-    Map.Entry<QueryUnitAttemptId, TaskHistory> entry =
+    Map.Entry<TaskAttemptId, TaskHistory> entry =
         history.getTaskHistoryMap().entrySet().iterator().next();
 
-    QueryUnitAttemptId queryUnitAttemptId = entry.getKey();
+    TaskAttemptId taskAttemptId = entry.getKey();
     TaskHistory taskHistory = entry.getValue();
 
     assertEquals(TajoProtos.TaskAttemptState.TA_SUCCEEDED, taskHistory.getState());
-    assertEquals(queryUnitAttemptId, taskHistory.getQueryUnitAttemptId());
+    assertEquals(taskAttemptId, taskHistory.getTaskAttemptId());
   }
 }

http://git-wip-us.apache.org/repos/asf/tajo/blob/5c852b79/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java b/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
index 5a93538..200ba31 100644
--- a/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
+++ b/tajo-core/src/test/java/org/apache/tajo/worker/TestRangeRetrieverHandler.java
@@ -148,7 +148,7 @@ public class TestRangeRetrieverHandler {
     FileFragment[] frags = FileStorageManager.splitNG(conf, "default.employee", employeeMeta, tableDir, Integer.MAX_VALUE);
 
     TaskAttemptContext ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(),
+        LocalTajoTestingUtility.newTaskAttemptId(),
         new FileFragment[] {frags[0]}, testDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(SORT_QUERY[0]);
@@ -272,7 +272,7 @@ public class TestRangeRetrieverHandler {
 
     TaskAttemptContext
         ctx = new TaskAttemptContext(new QueryContext(conf),
-        LocalTajoTestingUtility.newQueryUnitAttemptId(),
+        LocalTajoTestingUtility.newTaskAttemptId(),
         new FileFragment[] {frags[0]}, testDir);
     ctx.setEnforcer(new Enforcer());
     Expr expr = analyzer.parse(SORT_QUERY[1]);


Mime
View raw message