hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject hive git commit: HIVE-16712 : StringBuffer v.s. StringBuilder (Beluga Behr via Ashutosh Chauhan)
Date Tue, 23 May 2017 20:33:24 GMT
Repository: hive
Updated Branches:
  refs/heads/master 6430064f7 -> f66820c1b


HIVE-16712 : StringBuffer v.s. StringBuilder (Beluga Behr via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <hashutosh@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f66820c1
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f66820c1
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f66820c1

Branch: refs/heads/master
Commit: f66820c1b88a526f6076bd80deb314eff146e386
Parents: 6430064
Author: BELUGA BEHR <dam6923@gmail.com>
Authored: Tue May 23 13:32:38 2017 -0700
Committer: Ashutosh Chauhan <hashutosh@apache.org>
Committed: Tue May 23 13:32:38 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hive/common/jsonexplain/DagJsonParserUtils.java   | 2 +-
 .../java/org/apache/hadoop/hive/common/jsonexplain/Op.java   | 6 +++---
 .../hcatalog/streaming/mutate/worker/GroupingValidator.java  | 4 ++--
 .../org/apache/hive/hcatalog/streaming/TestStreaming.java    | 8 ++++----
 hplsql/src/main/java/org/apache/hive/hplsql/Utils.java       | 2 +-
 .../ql/security/DummyHiveMetastoreAuthorizationProvider.java | 2 +-
 .../org/apache/hadoop/hive/llap/LlapRowRecordReader.java     | 4 ++--
 llap-common/src/java/org/apache/hadoop/hive/llap/Schema.java | 2 +-
 .../hadoop/hive/llap/shufflehandler/ShuffleHandler.java      | 2 +-
 .../org/apache/hadoop/hive/metastore/RetryingHMSHandler.java | 2 +-
 .../hadoop/hive/metastore/hbase/HBaseFilterPlanUtil.java     | 2 +-
 .../org/apache/hadoop/hive/metastore/hbase/HBaseUtils.java   | 8 ++++----
 .../vector/mapjoin/fast/VectorMapJoinFastValueStore.java     | 2 +-
 .../org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java    | 2 +-
 .../java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java   | 2 +-
 .../exec/vector/expressions/TestVectorStringExpressions.java | 6 +++---
 .../binarysortable/fast/BinarySortableDeserializeRead.java   | 2 +-
 .../hive/serde2/lazy/fast/LazySimpleDeserializeRead.java     | 2 +-
 .../serde2/lazybinary/fast/LazyBinaryDeserializeRead.java    | 2 +-
 19 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/common/src/java/org/apache/hadoop/hive/common/jsonexplain/DagJsonParserUtils.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/common/jsonexplain/DagJsonParserUtils.java
b/common/src/java/org/apache/hadoop/hive/common/jsonexplain/DagJsonParserUtils.java
index a518ac1..8ea25d5 100644
--- a/common/src/java/org/apache/hadoop/hive/common/jsonexplain/DagJsonParserUtils.java
+++ b/common/src/java/org/apache/hadoop/hive/common/jsonexplain/DagJsonParserUtils.java
@@ -38,7 +38,7 @@ public class DagJsonParserUtils {
   }
 
   public static String attrsToString(Map<String, String> attrs) {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     boolean first = true;
     for (Entry<String, String> entry : attrs.entrySet()) {
       if (first) {

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/common/src/java/org/apache/hadoop/hive/common/jsonexplain/Op.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/common/jsonexplain/Op.java b/common/src/java/org/apache/hadoop/hive/common/jsonexplain/Op.java
index 2b853ef..39c44f1 100644
--- a/common/src/java/org/apache/hadoop/hive/common/jsonexplain/Op.java
+++ b/common/src/java/org/apache/hadoop/hive/common/jsonexplain/Op.java
@@ -170,7 +170,7 @@ public final class Op {
         }
       }
       this.attrs.remove("keys:");
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       JSONArray conditionMap = opObject.getJSONArray("condition map:");
       for (int index = 0; index < conditionMap.length(); index++) {
         JSONObject cond = conditionMap.getJSONObject(index);
@@ -250,7 +250,7 @@ public final class Op {
       }
       // update the attrs
       this.attrs.remove("keys:");
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       JSONArray conditionMap = opObject.getJSONArray("condition map:");
       for (int index = 0; index < conditionMap.length(); index++) {
         JSONObject cond = conditionMap.getJSONObject(index);
@@ -273,7 +273,7 @@ public final class Op {
   }
 
   private String getNameWithOpIdStats() {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     sb.append(DagJsonParserUtils.renameReduceOutputOperator(name, vertex));
     if (operatorId != null) {
       sb.append(" [" + operatorId + "]");

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/GroupingValidator.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/GroupingValidator.java
b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/GroupingValidator.java
index 18754f2..f28b8ff 100644
--- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/GroupingValidator.java
+++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/worker/GroupingValidator.java
@@ -31,14 +31,14 @@ import java.util.Set;
 class GroupingValidator {
 
   private final Map<String, Set<Integer>> visited;
-  private final StringBuffer partitionKeyBuilder;
+  private final StringBuilder partitionKeyBuilder;
   private long groups;
   private String lastPartitionKey;
   private int lastBucketId = -1;
 
   GroupingValidator() {
     visited = new HashMap<String, Set<Integer>>();
-    partitionKeyBuilder = new StringBuffer(64);
+    partitionKeyBuilder = new StringBuilder(64);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
----------------------------------------------------------------------
diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
index 097de9b..5e8fe62 100644
--- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
+++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/TestStreaming.java
@@ -1952,7 +1952,7 @@ public class TestStreaming {
   }
 
   private static String getTableColumnsStr(String[] colNames, String[] colTypes) {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     for (int i=0; i < colNames.length; ++i) {
       sb.append(colNames[i] + " " + colTypes[i]);
       if (i<colNames.length-1) {
@@ -1967,7 +1967,7 @@ public class TestStreaming {
     if (partNames==null || partNames.length==0) {
       return "";
     }
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     for (int i=0; i < partNames.length; ++i) {
       sb.append(partNames[i] + " string");
       if (i < partNames.length-1) {
@@ -1979,7 +1979,7 @@ public class TestStreaming {
 
   // converts partNames,partVals into "partName1=val1, partName2=val2"
   private static String getPartsSpec(String[] partNames, List<String> partVals) {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     for (int i=0; i < partVals.size(); ++i) {
       sb.append(partNames[i] + " = '" + partVals.get(i) + "'");
       if(i < partVals.size()-1) {
@@ -1992,7 +1992,7 @@ public class TestStreaming {
   private static String join(String[] values, String delimiter) {
     if(values==null)
       return null;
-    StringBuffer strbuf = new StringBuffer();
+    StringBuilder strbuf = new StringBuilder();
 
     boolean first = true;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/hplsql/src/main/java/org/apache/hive/hplsql/Utils.java
----------------------------------------------------------------------
diff --git a/hplsql/src/main/java/org/apache/hive/hplsql/Utils.java b/hplsql/src/main/java/org/apache/hive/hplsql/Utils.java
index a768b00..d261df1 100644
--- a/hplsql/src/main/java/org/apache/hive/hplsql/Utils.java
+++ b/hplsql/src/main/java/org/apache/hive/hplsql/Utils.java
@@ -32,7 +32,7 @@ public class Utils {
 	  }
 	  
 	  int len = s.length();
-	  StringBuffer s2 = new StringBuffer(len);	  
+	  StringBuilder s2 = new StringBuilder(len);	  
 	  
 	  for (int i = 0; i < len; i++) {
 		char ch = s.charAt(i);

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/DummyHiveMetastoreAuthorizationProvider.java
----------------------------------------------------------------------
diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/DummyHiveMetastoreAuthorizationProvider.java
b/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/DummyHiveMetastoreAuthorizationProvider.java
index 346abd6..93637d4 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/DummyHiveMetastoreAuthorizationProvider.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/DummyHiveMetastoreAuthorizationProvider.java
@@ -187,7 +187,7 @@ public class DummyHiveMetastoreAuthorizationProvider implements HiveMetastoreAut
   }
 
   private String debugPrivPrint(Privilege[] privileges) {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     sb.append("Privileges{");
     if (privileges != null){
     for (Privilege p : privileges){

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/llap-client/src/java/org/apache/hadoop/hive/llap/LlapRowRecordReader.java
----------------------------------------------------------------------
diff --git a/llap-client/src/java/org/apache/hadoop/hive/llap/LlapRowRecordReader.java b/llap-client/src/java/org/apache/hadoop/hive/llap/LlapRowRecordReader.java
index c50d226..7e38356 100644
--- a/llap-client/src/java/org/apache/hadoop/hive/llap/LlapRowRecordReader.java
+++ b/llap-client/src/java/org/apache/hadoop/hive/llap/LlapRowRecordReader.java
@@ -233,8 +233,8 @@ public class LlapRowRecordReader implements RecordReader<NullWritable,
Row> {
 
   protected AbstractSerDe initSerDe(Configuration conf) throws SerDeException {
     Properties props = new Properties();
-    StringBuffer columnsBuffer = new StringBuffer();
-    StringBuffer typesBuffer = new StringBuffer();
+    StringBuilder columnsBuffer = new StringBuilder();
+    StringBuilder typesBuffer = new StringBuilder();
     boolean isFirst = true;
     for (FieldDesc colDesc : schema.getColumns()) {
       if (!isFirst) {

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/llap-common/src/java/org/apache/hadoop/hive/llap/Schema.java
----------------------------------------------------------------------
diff --git a/llap-common/src/java/org/apache/hadoop/hive/llap/Schema.java b/llap-common/src/java/org/apache/hadoop/hive/llap/Schema.java
index c1bf4ea..08cc54d 100644
--- a/llap-common/src/java/org/apache/hadoop/hive/llap/Schema.java
+++ b/llap-common/src/java/org/apache/hadoop/hive/llap/Schema.java
@@ -43,7 +43,7 @@ public class Schema implements Writable {
 
   @Override
   public String toString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     boolean first = true;
     for (FieldDesc colDesc : getColumns()) {
       if (!first) {

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java
b/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java
index e90f0df..f34b385 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java
@@ -813,7 +813,7 @@ public class ShuffleHandler implements AttemptRegistrationListener {
     }
 
     private String getErrorMessage(Throwable t) {
-      StringBuffer sb = new StringBuffer(t.getMessage());
+      StringBuilder sb = new StringBuilder(t.getMessage());
       while (t.getCause() != null) {
         sb.append(t.getCause().getMessage());
         t = t.getCause();

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
index b1c8e39..a08c5bd 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
@@ -109,7 +109,7 @@ public class RetryingHMSHandler implements InvocationHandler {
       error = false;
       return result.result;
     } finally {
-      StringBuffer additionalInfo = new StringBuffer();
+      StringBuilder additionalInfo = new StringBuilder();
       additionalInfo.append("threadId=").append(threadId).append(" retryCount=").append(retryCount)
         .append(" error=").append(error);
       perfLogger.PerfLogEnd(CLASS_NAME, method.getName(), additionalInfo.toString());

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseFilterPlanUtil.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseFilterPlanUtil.java
b/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseFilterPlanUtil.java
index 9762309..3c03846 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseFilterPlanUtil.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseFilterPlanUtil.java
@@ -473,7 +473,7 @@ class HBaseFilterPlanUtil {
 
     @Override
     public String toString() {
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       sb.append("ScanPlan:\n");
       for (Map.Entry<String, ScanMarkerPair> entry : markers.entrySet()) {
         sb.append("key=" + entry.getKey() + "[startMarker=" + entry.getValue().startMarker

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseUtils.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseUtils.java b/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseUtils.java
index 7dfa38f..64082e8 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseUtils.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseUtils.java
@@ -956,9 +956,9 @@ public class HBaseUtils {
 
   private static List<String> desierliazeDbNameTableNameFromPartitionKey(byte[] key,
                                                                          Configuration conf)
{
-    StringBuffer names = new StringBuffer();
+    StringBuilder names = new StringBuilder();
     names.append("dbName,tableName,");
-    StringBuffer types = new StringBuffer();
+    StringBuilder types = new StringBuilder();
     types.append("string,string,");
     BinarySortableSerDe serDe = new BinarySortableSerDe();
     Properties props = new Properties();
@@ -990,9 +990,9 @@ public class HBaseUtils {
   // Deserialize a partition key and return _only_ the partition values.
   private static List<String> deserializePartitionKey(List<FieldSchema> partitions,
byte[] key,
       Configuration conf) {
-    StringBuffer names = new StringBuffer();
+    StringBuilder names = new StringBuilder();
     names.append("dbName,tableName,");
-    StringBuffer types = new StringBuffer();
+    StringBuilder types = new StringBuilder();
     types.append("string,string,");
     for (int i=0;i<partitions.size();i++) {
       names.append(partitions.get(i).getName());

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastValueStore.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastValueStore.java
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastValueStore.java
index 3cd06e8..ff6dcd1 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastValueStore.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastValueStore.java
@@ -165,7 +165,7 @@ public class VectorMapJoinFastValueStore implements MemoryEstimate {
      */
     @Override
     public String getDetailedHashMapResultPositionString() {
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
 
       sb.append("Read index ");
       sb.append(readIndex);

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 35fc68a..d68f832 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -10938,7 +10938,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
       ASTNode astNode = (ASTNode) queue.poll();
       if (astNode.getToken().getType() == HiveParser.TOK_TABREF) {
         int aliasIndex = 0;
-        StringBuffer additionalTabInfo = new StringBuffer();
+        StringBuilder additionalTabInfo = new StringBuilder();
         for (int index = 1; index < astNode.getChildCount(); index++) {
           ASTNode ct = (ASTNode) astNode.getChild(index);
           if (ct.getToken().getType() == HiveParser.TOK_TABLEBUCKETSAMPLE

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
index 3daa83f..04686f7 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/TableScanDesc.java
@@ -148,7 +148,7 @@ public class TableScanDesc extends AbstractOperatorDesc {
 
   @Explain(explainLevels = { Level.USER })
   public String getTbl() {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     sb.append(this.tableMetadata.getCompleteName());
     sb.append("," + alias);
     if (isAcidTable()) {

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorStringExpressions.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorStringExpressions.java
b/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorStringExpressions.java
index d97152f..aa60878 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorStringExpressions.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorStringExpressions.java
@@ -4344,14 +4344,14 @@ public class TestVectorStringExpressions {
       return value.toLowerCase();
     }
     case 8: {
-      StringBuffer sb = new StringBuffer(8);
+      StringBuilder sb = new StringBuilder();
       for (int i = 0; i < control.nextInt(12); i++) {
         sb.append((char) ('a' + control.nextInt(26)));
       }
       return sb.toString();
     }
     case 9: {
-      StringBuffer sb = new StringBuffer(8);
+      StringBuilder sb = new StringBuilder();
       for (int i = 0; i < control.nextInt(12); i++) {
         sb.append((char) ('A' + control.nextInt(26)));
       }
@@ -4361,7 +4361,7 @@ public class TestVectorStringExpressions {
   }
 
   private String generateCandidate(Random control, String pattern) {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     final StringTokenizer tokens = new StringTokenizer(pattern, "%");
     final boolean leftAnchor = pattern.startsWith("%");
     final boolean rightAnchor = pattern.endsWith("%");

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/fast/BinarySortableDeserializeRead.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/fast/BinarySortableDeserializeRead.java
b/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/fast/BinarySortableDeserializeRead.java
index d9160d7..b5ac842 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/fast/BinarySortableDeserializeRead.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/fast/BinarySortableDeserializeRead.java
@@ -175,7 +175,7 @@ public final class BinarySortableDeserializeRead extends DeserializeRead
{
    * Get detailed read position information to help diagnose exceptions.
    */
   public String getDetailedReadPositionString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder(64);
 
     sb.append("Reading inputByteBuffer of length ");
     sb.append(inputByteBuffer.getEnd());

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java
b/serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java
index 64e316b..9b3f3d0 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/lazy/fast/LazySimpleDeserializeRead.java
@@ -360,7 +360,7 @@ public final class LazySimpleDeserializeRead extends DeserializeRead {
    * Get detailed read position information to help diagnose exceptions.
    */
   public String getDetailedReadPositionString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder(64);
 
     sb.append("Reading byte[] of length ");
     sb.append(bytes.length);

http://git-wip-us.apache.org/repos/asf/hive/blob/f66820c1/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/fast/LazyBinaryDeserializeRead.java
----------------------------------------------------------------------
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/fast/LazyBinaryDeserializeRead.java
b/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/fast/LazyBinaryDeserializeRead.java
index 8e0a499..c0c4d91 100644
--- a/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/fast/LazyBinaryDeserializeRead.java
+++ b/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/fast/LazyBinaryDeserializeRead.java
@@ -173,7 +173,7 @@ public final class LazyBinaryDeserializeRead extends DeserializeRead {
    * Get detailed read position information to help diagnose exceptions.
    */
   public String getDetailedReadPositionString() {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder(64);
 
     sb.append("Reading byte[] of length ");
     sb.append(bytes.length);


Mime
View raw message