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:16:23 UTC

[phoenix] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new d9d30b1  PHOENIX-5120; use readFully instead of read.
d9d30b1 is described below

commit d9d30b15a8d944f7fce275dbfb8ee72e9cb51b52
Author: Lars Hofhansl <la...@apache.org>
AuthorDate: Tue Feb 5 00:16:50 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 aacea23..d3fd3bc 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 a54bb44..700991f 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
@@ -118,7 +118,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();
@@ -127,7 +127,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;