apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vro...@apache.org
Subject apex-malhar git commit: APEXMALHAR-2492 Correct usage of empty Slice in Malhar Library
Date Thu, 25 May 2017 05:29:34 GMT
Repository: apex-malhar
Updated Branches:
  refs/heads/master 1c902dfb2 -> 2493bcbf5


APEXMALHAR-2492 Correct usage of empty Slice in Malhar Library


Project: http://git-wip-us.apache.org/repos/asf/apex-malhar/repo
Commit: http://git-wip-us.apache.org/repos/asf/apex-malhar/commit/2493bcbf
Tree: http://git-wip-us.apache.org/repos/asf/apex-malhar/tree/2493bcbf
Diff: http://git-wip-us.apache.org/repos/asf/apex-malhar/diff/2493bcbf

Branch: refs/heads/master
Commit: 2493bcbf508fcc9570c6e5798217e7feb55ccb7e
Parents: 1c902df
Author: ajaygit158 <ajaygit158@gmail.com>
Authored: Wed May 17 11:25:33 2017 +0530
Committer: ajaygit158 <ajaygit158@gmail.com>
Committed: Thu May 25 01:22:11 2017 +0530

----------------------------------------------------------------------
 .../org/apache/apex/malhar/lib/dedup/BoundedDedupOperator.java    | 3 +--
 .../org/apache/apex/malhar/lib/dedup/TimeBasedDedupOperator.java  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/2493bcbf/library/src/main/java/org/apache/apex/malhar/lib/dedup/BoundedDedupOperator.java
----------------------------------------------------------------------
diff --git a/library/src/main/java/org/apache/apex/malhar/lib/dedup/BoundedDedupOperator.java
b/library/src/main/java/org/apache/apex/malhar/lib/dedup/BoundedDedupOperator.java
index e2a1297..0552532 100644
--- a/library/src/main/java/org/apache/apex/malhar/lib/dedup/BoundedDedupOperator.java
+++ b/library/src/main/java/org/apache/apex/malhar/lib/dedup/BoundedDedupOperator.java
@@ -156,8 +156,7 @@ public class BoundedDedupOperator extends AbstractDeduper<Object>
   protected void putManagedState(Object tuple)
   {
     Slice key = getKey(tuple);
-    ((ManagedTimeStateImpl)managedState).put(getBucketId(key), DEFAULT_CONSTANT_TIME,
-        key, new Slice(new byte[0]));
+    ((ManagedTimeStateImpl)managedState).put(getBucketId(key), DEFAULT_CONSTANT_TIME, key,
new Slice(null, 0, 0));
   }
 
   protected int getBucketId(Slice key)

http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/2493bcbf/library/src/main/java/org/apache/apex/malhar/lib/dedup/TimeBasedDedupOperator.java
----------------------------------------------------------------------
diff --git a/library/src/main/java/org/apache/apex/malhar/lib/dedup/TimeBasedDedupOperator.java
b/library/src/main/java/org/apache/apex/malhar/lib/dedup/TimeBasedDedupOperator.java
index 3b5f5e2..9f83441 100644
--- a/library/src/main/java/org/apache/apex/malhar/lib/dedup/TimeBasedDedupOperator.java
+++ b/library/src/main/java/org/apache/apex/malhar/lib/dedup/TimeBasedDedupOperator.java
@@ -186,7 +186,7 @@ public class TimeBasedDedupOperator extends AbstractDeduper<Object>
implements A
   @Override
   protected void putManagedState(Object tuple)
   {
-    ((ManagedTimeUnifiedStateImpl)managedState).put(getTime(tuple), getKey(tuple), new Slice(new
byte[0]));
+    ((ManagedTimeUnifiedStateImpl)managedState).put(getTime(tuple), getKey(tuple), new Slice(null,
0, 0));
   }
 
 


Mime
View raw message