Author: navis
Date: Mon Sep  9 07:38:36 2013
New Revision: 1520979

URL: http://svn.apache.org/r1520979
Log:
HIVE-5071 : Address thread safety issues with HiveHistoryUtil (Teddy Choi 
reviewed by Edward Capriolo committed by Navis)

Modified:
    
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistoryUtil.java

Modified: 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistoryUtil.java
URL: 
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistoryUtil.java?rev=1520979&r1=1520978&r2=1520979&view=diff
==============================================================================
--- 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistoryUtil.java 
(original)
+++ 
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistoryUtil.java 
Mon Sep  9 07:38:36 2013
@@ -70,9 +70,6 @@ public class HiveHistoryUtil {
  private static final Pattern pattern = Pattern.compile(KEY + "=" + "\""
      + VALUE + "\"");
 
- // temp buffer for parsed dataa
- private static Map<String, String> parseBuffer = new HashMap<String, 
String>();
-
  /**
   * Parse a single line of history.
   *
@@ -81,6 +78,8 @@ public class HiveHistoryUtil {
   * @throws IOException
   */
  private static void parseLine(String line, Listener l) throws IOException {
+   Map<String, String> parseBuffer = new HashMap<String, String>();
+   
    // extract the record type
    int idx = line.indexOf(' ');
    String recType = line.substring(0, idx);
@@ -96,8 +95,5 @@ public class HiveHistoryUtil {
    }
 
    l.handle(RecordTypes.valueOf(recType), parseBuffer);
-
-   parseBuffer.clear();
  }
-
 }


Reply via email to