crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject [1/2] git commit: CRUNCH-426 Make HBaseSourceTarget constructor to binary-compatible with 0.8.2.
Date Mon, 23 Jun 2014 21:36:53 GMT
Repository: crunch
Updated Branches:
  refs/heads/apache-crunch-0.8 a951068bc -> 31c7b6d8a


CRUNCH-426 Make HBaseSourceTarget constructor to binary-compatible with 0.8.2.

Signed-off-by: Josh Wills <jwills@apache.org>


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

Branch: refs/heads/apache-crunch-0.8
Commit: f695ef78a69c69d10e6e0e32c31d2615225a4da7
Parents: a951068
Author: Allan Shoup <allan.shoup@cerner.com>
Authored: Mon Jun 23 15:22:14 2014 -0500
Committer: Josh Wills <jwills@apache.org>
Committed: Mon Jun 23 14:15:36 2014 -0700

----------------------------------------------------------------------
 .../org/apache/crunch/io/hbase/HBaseSourceTarget.java   | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/crunch/blob/f695ef78/crunch-hbase/src/main/java/org/apache/crunch/io/hbase/HBaseSourceTarget.java
----------------------------------------------------------------------
diff --git a/crunch-hbase/src/main/java/org/apache/crunch/io/hbase/HBaseSourceTarget.java
b/crunch-hbase/src/main/java/org/apache/crunch/io/hbase/HBaseSourceTarget.java
index 6ed3b42..45afb18 100644
--- a/crunch-hbase/src/main/java/org/apache/crunch/io/hbase/HBaseSourceTarget.java
+++ b/crunch-hbase/src/main/java/org/apache/crunch/io/hbase/HBaseSourceTarget.java
@@ -53,6 +53,8 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.util.StringUtils;
 
+import com.google.common.collect.ObjectArrays;
+
 public class HBaseSourceTarget extends HBaseTarget implements
     ReadableSourceTarget<Pair<ImmutableBytesWritable, Result>>,
     TableSource<ImmutableBytesWritable, Result> {
@@ -66,7 +68,15 @@ public class HBaseSourceTarget extends HBaseTarget implements
   protected String scansAsString;
   private FormatBundle<MultiTableInputFormat> inputBundle;
   
-  public HBaseSourceTarget(String table, Scan... scans) {
+  public HBaseSourceTarget(String table, Scan scan) {
+    this(table, new Scan[] { scan });
+  }
+  
+  public HBaseSourceTarget(String table, Scan scan, Scan... additionalScans) {
+    this(table, ObjectArrays.concat(scan, additionalScans));
+  }
+  
+  private HBaseSourceTarget(String table, Scan[] scans) {
     super(table);
     this.scans = scans;
 


Mime
View raw message