crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject git commit: CRUNCH-426 Make HBaseSourceTarget constructor to binary-compatible with 0.8.2.
Date Mon, 23 Jun 2014 21:15:10 GMT
Repository: crunch
Updated Branches:
  refs/heads/master a8a8a9b86 -> c70f2cc39


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/c70f2cc3
Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/c70f2cc3
Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/c70f2cc3

Branch: refs/heads/master
Commit: c70f2cc39669db35be05556d09e8e7d08534705c
Parents: a8a8a9b
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:12:20 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/c70f2cc3/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 8601eb0..b5d7448 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
@@ -55,6 +55,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> {
@@ -68,7 +70,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