diff options
Diffstat (limited to 'src/main/java/parallelai/spyglass/hbase')
-rw-r--r-- | src/main/java/parallelai/spyglass/hbase/HBaseScheme.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/parallelai/spyglass/hbase/HBaseScheme.java b/src/main/java/parallelai/spyglass/hbase/HBaseScheme.java index a7d36fd..3c64e52 100644 --- a/src/main/java/parallelai/spyglass/hbase/HBaseScheme.java +++ b/src/main/java/parallelai/spyglass/hbase/HBaseScheme.java @@ -238,12 +238,17 @@ public class HBaseScheme OutputCollector outputCollector = sinkCall.getOutput(); Tuple key = tupleEntry.selectTuple(keyField); ImmutableBytesWritable keyBytes = (ImmutableBytesWritable) key.getObject(0); - - if( useSalt ) { - keyBytes = HBaseSalter.addSaltPrefix(keyBytes); + + if (useSalt) { + keyBytes = HBaseSalter.addSaltPrefix(keyBytes); + } + + Put put; + if (this.timeStamp == 0L) { + put = new Put(keyBytes.get()); + } else { + put = new Put(keyBytes.get(), this.timeStamp); } - - Put put = new Put(keyBytes.get(), this.timeStamp); for (int i = 0; i < valueFields.length; i++) { Fields fieldSelector = valueFields[i]; |