You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2016/01/11 22:33:41 UTC
[1/2] hive git commit: HIVE-12768 : Thread safety: binary sortable
serde decimal deserialization (Vikram Dixit K, reviewed by Gunther Hagleitner,
Sergey Shelukhin)
Repository: hive
Updated Branches:
refs/heads/branch-2.0 b277f8ae7 -> 06f8d74f7
refs/heads/master 361d72d96 -> 91d0c8347
HIVE-12768 : Thread safety: binary sortable serde decimal deserialization (Vikram Dixit K, reviewed by Gunther Hagleitner, Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/91d0c834
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/91d0c834
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/91d0c834
Branch: refs/heads/master
Commit: 91d0c83477df98e968ee18946bd6081cdbc1b8df
Parents: 361d72d
Author: Sergey Shelukhin <se...@apache.org>
Authored: Mon Jan 11 13:33:06 2016 -0800
Committer: Sergey Shelukhin <se...@apache.org>
Committed: Mon Jan 11 13:33:06 2016 -0800
----------------------------------------------------------------------
.../hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/91d0c834/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java b/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
index 2796011..144ea5a 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
@@ -131,7 +131,6 @@ public class BinarySortableSerDe extends AbstractSerDe {
boolean[] columnSortOrderIsDesc;
- private static byte[] decimalBuffer = null;
public static Charset decimalCharSet = Charset.forName("US-ASCII");
@Override
@@ -426,9 +425,7 @@ public class BinarySortableSerDe extends AbstractSerDe {
length++;
} while (true);
- if(decimalBuffer == null || decimalBuffer.length < length) {
- decimalBuffer = new byte[length];
- }
+ final byte[] decimalBuffer = new byte[length];
buffer.seek(start);
for (int i = 0; i < length; ++i) {
[2/2] hive git commit: HIVE-12768 : Thread safety: binary sortable
serde decimal deserialization (Vikram Dixit K, reviewed by Gunther Hagleitner,
Sergey Shelukhin)
Posted by se...@apache.org.
HIVE-12768 : Thread safety: binary sortable serde decimal deserialization (Vikram Dixit K, reviewed by Gunther Hagleitner, Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/06f8d74f
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/06f8d74f
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/06f8d74f
Branch: refs/heads/branch-2.0
Commit: 06f8d74f7886a1724b5daaecf03bc49b8c4b1080
Parents: b277f8a
Author: Sergey Shelukhin <se...@apache.org>
Authored: Mon Jan 11 13:33:06 2016 -0800
Committer: Sergey Shelukhin <se...@apache.org>
Committed: Mon Jan 11 13:33:29 2016 -0800
----------------------------------------------------------------------
.../hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/06f8d74f/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java b/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
index 2796011..144ea5a 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
@@ -131,7 +131,6 @@ public class BinarySortableSerDe extends AbstractSerDe {
boolean[] columnSortOrderIsDesc;
- private static byte[] decimalBuffer = null;
public static Charset decimalCharSet = Charset.forName("US-ASCII");
@Override
@@ -426,9 +425,7 @@ public class BinarySortableSerDe extends AbstractSerDe {
length++;
} while (true);
- if(decimalBuffer == null || decimalBuffer.length < length) {
- decimalBuffer = new byte[length];
- }
+ final byte[] decimalBuffer = new byte[length];
buffer.seek(start);
for (int i = 0; i < length; ++i) {