chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r921614 - in /hadoop/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/ChunkImpl.java
Date Wed, 10 Mar 2010 23:00:06 GMT
Author: asrabkin
Date: Wed Mar 10 23:00:06 2010
New Revision: 921614

URL: http://svn.apache.org/viewvc?rev=921614&view=rev
Log:
CHUKWA-463. Fix pattern match for tags. Contributed by Guillermo Perez.

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=921614&r1=921613&r2=921614&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Wed Mar 10 23:00:06 2010
@@ -62,6 +62,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHUKWA-463. Fix pattern match for tags. (Guillermo Perez via asrabkin)
+    
     CHUKWA-464. Fix spelling of processClusterDirectory. (Guillermo Perez via asrabkin)
 
     CHUKWA-456. Fixed failing unit test. (Eric Yang)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java?rev=921614&r1=921613&r2=921614&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/ChunkImpl.java Wed Mar 10 23:00:06
2010
@@ -184,7 +184,7 @@ public class ChunkImpl implements org.ap
    * @see org.apache.hadoop.chukwa.Chunk#getTag(java.lang.String)
    */
   public String getTag(String tagName) {
-    Pattern tagPattern = Pattern.compile(".*"+tagName+"=\"(.*?)\".*");
+    Pattern tagPattern = Pattern.compile("\\b"+tagName+"=\"(.*?)\"\\b");
     if (tags != null) {
       Matcher matcher = tagPattern.matcher(tags);
       if (matcher.matches()) {



Mime
View raw message