tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject git commit: TAJO-1042: Implement block iteration interfaces for executors and scanners.
Date Wed, 01 Oct 2014 03:28:25 GMT
Repository: tajo
Updated Branches:
  refs/heads/block_iteration 38eb0255f -> 7ef2784b3


TAJO-1042: Implement block iteration interfaces for executors and scanners.


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

Branch: refs/heads/block_iteration
Commit: 7ef2784b3c3e2773cb625388000f80664ad0090e
Parents: 38eb025
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Sat Sep 27 00:03:40 2014 -0700
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Sat Sep 27 00:03:40 2014 -0700

----------------------------------------------------------------------
 .../tajo/engine/planner/physical/MemTableScanner.java       | 7 +++++++
 .../apache/tajo/engine/planner/physical/PairWiseMerger.java | 7 +++++++
 .../apache/tajo/engine/planner/physical/PhysicalExec.java   | 7 +++++++
 .../org/apache/tajo/engine/utils/TupleCacheScanner.java     | 7 +++++++
 .../src/main/java/org/apache/tajo/storage/FileScanner.java  | 7 +++++++
 .../src/main/java/org/apache/tajo/storage/MergeScanner.java | 7 +++++++
 .../src/main/java/org/apache/tajo/storage/Scanner.java      | 9 +++++++++
 .../main/java/org/apache/tajo/storage/v2/FileScannerV2.java | 7 +++++++
 8 files changed, 58 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/MemTableScanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/MemTableScanner.java
b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/MemTableScanner.java
index 7bd6a70..a2dc87e 100644
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/MemTableScanner.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/MemTableScanner.java
@@ -23,9 +23,11 @@ import org.apache.tajo.annotation.NotNull;
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.statistics.TableStats;
+import org.apache.tajo.exception.UnimplementedException;
 import org.apache.tajo.storage.Scanner;
 import org.apache.tajo.storage.Tuple;
 import org.apache.tajo.storage.VTuple;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.IOException;
 import java.util.Collection;
@@ -74,6 +76,11 @@ class MemTableScanner implements Scanner {
   }
 
   @Override
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
+  @Override
   public void reset() throws IOException {
     init();
   }

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PairWiseMerger.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PairWiseMerger.java
b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PairWiseMerger.java
index 2ac8662..f801b35 100644
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PairWiseMerger.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PairWiseMerger.java
@@ -24,9 +24,11 @@ import org.apache.hadoop.io.IOUtils;
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.statistics.TableStats;
+import org.apache.tajo.exception.UnimplementedException;
 import org.apache.tajo.storage.Scanner;
 import org.apache.tajo.storage.Tuple;
 import org.apache.tajo.storage.VTuple;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.IOException;
 import java.util.Comparator;
@@ -159,6 +161,11 @@ class PairWiseMerger implements Scanner {
   }
 
   @Override
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
+  @Override
   public void reset() throws IOException {
     if (state == State.INITED) {
       leftScan.reset();

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
index 31cfc4d..859c053 100644
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/PhysicalExec.java
@@ -25,7 +25,10 @@ import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.SchemaObject;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.engine.codegen.CompilationError;
+import org.apache.tajo.exception.UnimplementedException;
+import org.apache.tajo.exception.UnsupportedException;
 import org.apache.tajo.storage.Tuple;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 import org.apache.tajo.worker.TaskAttemptContext;
 
 import java.io.IOException;
@@ -60,6 +63,10 @@ public abstract class PhysicalExec implements SchemaObject {
 
   public abstract Tuple next() throws IOException;
 
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
   public abstract void rescan() throws IOException;
 
   public abstract void close() throws IOException;

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-core/src/main/java/org/apache/tajo/engine/utils/TupleCacheScanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/utils/TupleCacheScanner.java b/tajo-core/src/main/java/org/apache/tajo/engine/utils/TupleCacheScanner.java
index 743d70c..10b3a22 100644
--- a/tajo-core/src/main/java/org/apache/tajo/engine/utils/TupleCacheScanner.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/utils/TupleCacheScanner.java
@@ -21,8 +21,10 @@ package org.apache.tajo.engine.utils;
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.statistics.TableStats;
+import org.apache.tajo.exception.UnimplementedException;
 import org.apache.tajo.storage.Scanner;
 import org.apache.tajo.storage.Tuple;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.IOException;
 import java.util.Iterator;
@@ -63,6 +65,11 @@ public class TupleCacheScanner implements Scanner {
   }
 
   @Override
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
+  @Override
   public void reset() throws IOException {
     init();
   }

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java b/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
index f15c4c9..6aa59e6 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/FileScanner.java
@@ -29,7 +29,9 @@ import org.apache.tajo.catalog.TableMeta;
 import org.apache.tajo.catalog.statistics.ColumnStats;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.conf.TajoConf;
+import org.apache.tajo.exception.UnimplementedException;
 import org.apache.tajo.storage.fragment.FileFragment;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.IOException;
 
@@ -81,6 +83,11 @@ public abstract class FileScanner implements Scanner {
   }
 
   @Override
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
+  @Override
   public void setTarget(Column[] targets) {
     if (inited) {
       throw new IllegalStateException("Should be called before init()");

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-storage/src/main/java/org/apache/tajo/storage/MergeScanner.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/MergeScanner.java b/tajo-storage/src/main/java/org/apache/tajo/storage/MergeScanner.java
index 8917f21..890455a 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/MergeScanner.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/MergeScanner.java
@@ -26,7 +26,9 @@ import org.apache.tajo.catalog.TableMeta;
 import org.apache.tajo.catalog.statistics.ColumnStats;
 import org.apache.tajo.catalog.statistics.TableStats;
 import org.apache.tajo.conf.TajoConf;
+import org.apache.tajo.exception.UnimplementedException;
 import org.apache.tajo.storage.fragment.FileFragment;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.IOException;
 import java.util.Iterator;
@@ -114,6 +116,11 @@ public class MergeScanner implements Scanner {
   }
 
   @Override
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
+  @Override
   public void reset() throws IOException {
     this.iterator = fragments.iterator();
     this.currentScanner = getNextScanner();

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-storage/src/main/java/org/apache/tajo/storage/Scanner.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/Scanner.java b/tajo-storage/src/main/java/org/apache/tajo/storage/Scanner.java
index 16c4faa..f532e0e 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/Scanner.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/Scanner.java
@@ -21,6 +21,8 @@ package org.apache.tajo.storage;
 import org.apache.tajo.catalog.Column;
 import org.apache.tajo.catalog.SchemaObject;
 import org.apache.tajo.catalog.statistics.TableStats;
+import org.apache.tajo.exception.UnimplementedException;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.Closeable;
 import java.io.IOException;
@@ -41,6 +43,13 @@ public interface Scanner extends SchemaObject, Closeable {
    * @throws IOException if internal I/O error occurs during next method
    */
   Tuple next() throws IOException;
+
+  /**
+   *
+   * @param rowBlock
+   * @return
+   */
+  boolean nextFetch(OffHeapRowBlock rowBlock);
   
   /**
    * Reset the cursor. After executed, the scanner 

http://git-wip-us.apache.org/repos/asf/tajo/blob/7ef2784b/tajo-storage/src/main/java/org/apache/tajo/storage/v2/FileScannerV2.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/v2/FileScannerV2.java b/tajo-storage/src/main/java/org/apache/tajo/storage/v2/FileScannerV2.java
index da7084c..ebbe2f4 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/v2/FileScannerV2.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/v2/FileScannerV2.java
@@ -28,9 +28,11 @@ import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.catalog.TableMeta;
 import org.apache.tajo.catalog.statistics.ColumnStats;
 import org.apache.tajo.catalog.statistics.TableStats;
+import org.apache.tajo.exception.UnimplementedException;
 import org.apache.tajo.storage.Scanner;
 import org.apache.tajo.storage.Tuple;
 import org.apache.tajo.storage.fragment.FileFragment;
+import org.apache.tajo.tuple.offheap.OffHeapRowBlock;
 
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -223,6 +225,11 @@ public abstract class FileScannerV2 implements Scanner {
   }
 
   @Override
+  public boolean nextFetch(OffHeapRowBlock rowBlock) {
+    throw new UnimplementedException("nextFetch(OffHeapRowBlock) is not implemented");
+  }
+
+  @Override
   public float getProgress() {
     return progress;
   }


Mime
View raw message