You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/03/14 01:00:59 UTC

[24/50] [abbrv] incubator-kylin git commit: fix compile issue

fix compile issue


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/0939359d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/0939359d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/0939359d

Branch: refs/heads/streaming-localdict
Commit: 0939359dcdfd384112d504d7838e32bbd295a663
Parents: e07c702
Author: qianhao.zhou <qi...@ebay.com>
Authored: Wed Mar 11 17:42:16 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Wed Mar 11 17:42:16 2015 +0800

----------------------------------------------------------------------
 .../kylin/storage/hbase/HBaseClientKVIterator.java       | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0939359d/storage/src/main/java/org/apache/kylin/storage/hbase/HBaseClientKVIterator.java
----------------------------------------------------------------------
diff --git a/storage/src/main/java/org/apache/kylin/storage/hbase/HBaseClientKVIterator.java b/storage/src/main/java/org/apache/kylin/storage/hbase/HBaseClientKVIterator.java
index 7bbe363..339612d 100644
--- a/storage/src/main/java/org/apache/kylin/storage/hbase/HBaseClientKVIterator.java
+++ b/storage/src/main/java/org/apache/kylin/storage/hbase/HBaseClientKVIterator.java
@@ -31,12 +31,13 @@ import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.kylin.invertedindex.model.IIDesc;
+import org.apache.kylin.invertedindex.model.KeyValuePair;
 
 /**
  * @author yangli9
  * 
  */
-public class HBaseClientKVIterator implements Iterable<Pair<ImmutableBytesWritable, ImmutableBytesWritable>>, Closeable {
+public class HBaseClientKVIterator implements Iterable<KeyValuePair>, Closeable {
 
     byte[] family;
     byte[] qualifier;
@@ -61,15 +62,15 @@ public class HBaseClientKVIterator implements Iterable<Pair<ImmutableBytesWritab
     }
 
     @Override
-    public Iterator<Pair<ImmutableBytesWritable, ImmutableBytesWritable>> iterator() {
+    public Iterator<KeyValuePair> iterator() {
         return new MyIterator();
     }
 
-    private class MyIterator implements Iterator<Pair<ImmutableBytesWritable, ImmutableBytesWritable>> {
+    private class MyIterator implements Iterator<KeyValuePair> {
 
         ImmutableBytesWritable key = new ImmutableBytesWritable();
         ImmutableBytesWritable value = new ImmutableBytesWritable();
-        Pair<ImmutableBytesWritable, ImmutableBytesWritable> pair = new Pair<ImmutableBytesWritable, ImmutableBytesWritable>(key, value);
+        KeyValuePair pair = new KeyValuePair(key, value);
 
         @Override
         public boolean hasNext() {
@@ -77,7 +78,7 @@ public class HBaseClientKVIterator implements Iterable<Pair<ImmutableBytesWritab
         }
 
         @Override
-        public Pair<ImmutableBytesWritable, ImmutableBytesWritable> next() {
+        public KeyValuePair next() {
             Result r = iterator.next();
             Cell c = r.getColumnLatestCell(IIDesc.HBASE_FAMILY_BYTES, IIDesc.HBASE_QUALIFIER_BYTES);
             key.set(c.getRowArray(), c.getRowOffset(), c.getRowLength());