You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hs...@apache.org on 2013/06/10 06:51:21 UTC
[2/4] git commit: Revert "TAJO-39 Remove the unused package
tajo.engine.plan.global and all files inside the directory."
Revert "TAJO-39 Remove the unused package tajo.engine.plan.global and all files inside the directory."
This reverts commit 64d581f81a6f541401a1d811008a1fe1051d5fc6.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/b6e65bf7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/b6e65bf7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/b6e65bf7
Branch: refs/heads/master
Commit: b6e65bf71f503009f282ead35edb3531e6300052
Parents: 64d581f
Author: Henry Saputra <hs...@apache.org>
Authored: Sun Jun 9 21:32:32 2013 -0700
Committer: Henry Saputra <hs...@apache.org>
Committed: Sun Jun 9 21:32:32 2013 -0700
----------------------------------------------------------------------
.../tajo/engine/plan/global/Annotation.java | 23 ++++
.../tajo/engine/plan/global/GenericTask.java | 123 +++++++++++++++++++
.../engine/plan/global/GenericTaskGraph.java | 39 ++++++
.../tajo-core-storage/mapred/.test_rcfile.crc | Bin 16 -> 0 bytes
tajo-core/tajo-core-storage/mapred/test_rcfile | Bin 858 -> 0 bytes
5 files changed, 185 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b6e65bf7/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/Annotation.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/Annotation.java b/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/Annotation.java
new file mode 100644
index 0000000..6e62474
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/Annotation.java
@@ -0,0 +1,23 @@
+/**
+ * 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 tajo.engine.plan.global;
+
+public abstract class Annotation {
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b6e65bf7/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTask.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTask.java b/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTask.java
new file mode 100644
index 0000000..ce848e4
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTask.java
@@ -0,0 +1,123 @@
+/**
+ * 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 tajo.engine.plan.global;
+
+import tajo.engine.planner.logical.ExprType;
+import tajo.engine.planner.logical.LogicalNode;
+import tajo.storage.Fragment;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class GenericTask {
+
+ private LogicalNode op;
+ private String tableName;
+ private List<Fragment> fragments;
+ private Set<GenericTask> prevTasks;
+ private Set<GenericTask> nextTasks;
+ private Annotation annotation;
+
+ public GenericTask() {
+ fragments = new ArrayList<Fragment>();
+ prevTasks = new HashSet<GenericTask>();
+ nextTasks = new HashSet<GenericTask>();
+ }
+
+ public GenericTask(LogicalNode op, Annotation annotation) {
+ this();
+ setOp(op);
+ setAnnotation(annotation);
+ }
+
+ public void setOp(LogicalNode op) {
+ this.op = op;
+ }
+
+ public void setAnnotation(Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public void addFragment(Fragment t) {
+ fragments.add(t);
+ }
+
+ public void addPrevTask(GenericTask t) {
+ prevTasks.add(t);
+ }
+
+ public void addNextTask(GenericTask t) {
+ nextTasks.add(t);
+ }
+
+ public void removePrevTask(GenericTask t) {
+ prevTasks.remove(t);
+ }
+
+ public void removeNextTask(GenericTask t) {
+ nextTasks.remove(t);
+ }
+
+ public ExprType getType() {
+ return this.op.getType();
+ }
+
+ public Set<GenericTask> getPrevTasks() {
+ return this.prevTasks;
+ }
+
+ public Set<GenericTask> getNextTasks() {
+ return this.nextTasks;
+ }
+
+ public LogicalNode getOp() {
+ return this.op;
+ }
+
+ public Annotation getAnnotation() {
+ return this.annotation;
+ }
+
+ public List<Fragment> getFragments() {
+ return this.fragments;
+ }
+
+ public String getTableName() {
+ return this.tableName;
+ }
+
+ public boolean hasFragments() {
+ return this.fragments.size() > 0;
+ }
+
+ @Override
+ public String toString() {
+ String str = new String(op.getType() + " " + tableName + " ");
+ for (Fragment t : fragments) {
+ str += t + " ";
+ }
+ return str;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b6e65bf7/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTaskGraph.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTaskGraph.java b/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTaskGraph.java
new file mode 100644
index 0000000..874dc54
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/main/java/tajo/engine/plan/global/GenericTaskGraph.java
@@ -0,0 +1,39 @@
+/**
+ * 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 tajo.engine.plan.global;
+
+public class GenericTaskGraph {
+ private GenericTask root;
+
+ public GenericTaskGraph() {
+
+ }
+
+ public GenericTaskGraph(GenericTask root) {
+ setRoot(root);
+ }
+
+ public void setRoot(GenericTask root) {
+ this.root = root;
+ }
+
+ public GenericTask getRoot() {
+ return root;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b6e65bf7/tajo-core/tajo-core-storage/mapred/.test_rcfile.crc
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-storage/mapred/.test_rcfile.crc b/tajo-core/tajo-core-storage/mapred/.test_rcfile.crc
deleted file mode 100644
index d2c6de8..0000000
Binary files a/tajo-core/tajo-core-storage/mapred/.test_rcfile.crc and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b6e65bf7/tajo-core/tajo-core-storage/mapred/test_rcfile
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-storage/mapred/test_rcfile b/tajo-core/tajo-core-storage/mapred/test_rcfile
deleted file mode 100644
index 6833481..0000000
Binary files a/tajo-core/tajo-core-storage/mapred/test_rcfile and /dev/null differ