chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1336479 - in /incubator/chukwa/trunk: CHANGES.txt src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
Date Thu, 10 May 2012 04:24:08 GMT
Author: eyang
Date: Thu May 10 04:24:08 2012
New Revision: 1336479

URL: http://svn.apache.org/viewvc?rev=1336479&view=rev
Log:
CHUKWA-641. Fix stack trace for dumpChunk command when invalid regular expression is specified.
(Eric Spishak via Eric Yang)

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1336479&r1=1336478&r2=1336479&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Thu May 10 04:24:08 2012
@@ -12,6 +12,8 @@ Trunk (unreleased changes)
 
   BUGS
 
+    CHUKWA-641. Fix stack trace for dumpChunk command when invalid regular expression is
specified. (Eric Spishak via Eric Yang)
+
     CHUKWA-640. Use timer thread to schedule adatpor registration. (Abhijit Dhar via Eric
Yang)
 
     CHUKWA-636. Updated dependency to HBase 0.92.0. (Eric Yang)

Modified: incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java?rev=1336479&r1=1336478&r2=1336479&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java (original)
+++ incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java Thu
May 10 04:24:08 2012
@@ -81,11 +81,16 @@ public class DumpChunks {
       nosort = true;
     }
     
-    Filter patterns;
+    Filter patterns = null;
     if(args[filterArg].toLowerCase().equals("all"))
       patterns = Filter.ALL;
     else
-      patterns = new Filter(args[filterArg]);
+      try {
+        patterns = new Filter(args[filterArg]);
+      } catch (PatternSyntaxException pse) {
+        System.err.println("Error parsing \"tags\" regular expression: " + pse.getMessage());
+        System.exit(-1);
+      }
 
     System.err.println("Patterns:" + patterns);
     ArrayList<Path> filesToSearch = new ArrayList<Path>();



Mime
View raw message