You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by la...@apache.org on 2019/02/05 08:15:21 UTC

[phoenix] branch 4.x-HBase-1.2 updated: PHOENIX-5120; use readFully instead of read.

This is an automated email from the ASF dual-hosted git repository.

larsh pushed a commit to branch 4.x-HBase-1.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.2 by this push:
     new 73c5b67  PHOENIX-5120; use readFully instead of read.
73c5b67 is described below

commit 73c5b67659fb9813cb66ced586263dc8eab5b361
Author: Lars Hofhansl <la...@apache.org>
AuthorDate: Tue Feb 5 00:15:48 2019 -0800

    PHOENIX-5120; use readFully instead of read.
---
 .../src/main/java/org/apache/phoenix/execute/SortMergeJoinPlan.java   | 2 +-
 .../src/main/java/org/apache/phoenix/iterate/BufferedSortedQueue.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/phoenix-core/src/main/java/org/apache/phoenix/execute/SortMergeJoinPlan.java b/phoenix-core/src/main/java/org/apache/phoenix/execute/SortMergeJoinPlan.java
index 55bba11..0e7807e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/SortMergeJoinPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/SortMergeJoinPlan.java
@@ -704,7 +704,7 @@ public class SortMergeJoinPlan implements QueryPlan {
                     return null;
                 
                 byte[] b = new byte[length];
-                in.read(b);
+                in.readFully(b);
                 Result result = ResultUtil.toResult(new ImmutableBytesWritable(b));
                 return new ResultTuple(result);
             }
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BufferedSortedQueue.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BufferedSortedQueue.java
index 36e23dd..c1ef667 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BufferedSortedQueue.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BufferedSortedQueue.java
@@ -117,7 +117,7 @@ public class BufferedSortedQueue extends BufferedQueue<ResultEntry> {
                 return null;
 
             byte[] rb = new byte[length];
-            is.read(rb);
+            is.readFully(rb);
             Result result = ResultUtil.toResult(new ImmutableBytesWritable(rb));
             ResultTuple rt = new ResultTuple(result);
             int sortKeySize = is.readInt();
@@ -126,7 +126,7 @@ public class BufferedSortedQueue extends BufferedQueue<ResultEntry> {
                 int contentLength = is.readInt();
                 if (contentLength > 0) {
                     byte[] sortKeyContent = new byte[contentLength];
-                    is.read(sortKeyContent);
+                    is.readFully(sortKeyContent);
                     sortKeys[i] = new ImmutableBytesWritable(sortKeyContent);
                 } else {
                     sortKeys[i] = null;