Updated Branches:
  refs/heads/master e3b9f520b -> 37a71a3c0

Fix regex in BytesByIP examples for the anonymized IP addresses


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/37a71a3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/37a71a3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/37a71a3c

Branch: refs/heads/master
Commit: 37a71a3c05f390a6318fba1c6b64f9c601f9f6f8
Parents: e3b9f52
Author: Josh Wills <[email protected]>
Authored: Fri Nov 2 19:43:18 2012 -0700
Committer: Josh Wills <[email protected]>
Committed: Fri Nov 2 19:43:18 2012 -0700

----------------------------------------------------------------------
 .../apache/crunch/examples/AverageBytesByIP.java   |    2 +-
 .../org/apache/crunch/examples/TotalBytesByIP.java |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/37a71a3c/crunch-examples/src/main/java/org/apache/crunch/examples/AverageBytesByIP.java
----------------------------------------------------------------------
diff --git 
a/crunch-examples/src/main/java/org/apache/crunch/examples/AverageBytesByIP.java
 
b/crunch-examples/src/main/java/org/apache/crunch/examples/AverageBytesByIP.java
index d6c2a86..8abbb73 100644
--- 
a/crunch-examples/src/main/java/org/apache/crunch/examples/AverageBytesByIP.java
+++ 
b/crunch-examples/src/main/java/org/apache/crunch/examples/AverageBytesByIP.java
@@ -45,7 +45,7 @@ public class AverageBytesByIP extends Configured implements 
Tool, Serializable {
     CORRUPT_SIZE
   }
 
-  static final String logRegex = "^([\\d.]+) (\\S+) (\\S+) 
\\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\d+) \"([^\"]+)\" 
\"([^\"]+)\"";
+  static final String logRegex = "^([\\w.]+) (\\S+) (\\S+) 
\\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\d+) \"([^\"]+)\" 
\"([^\"]+)\"";
 
   public int run(String[] args) throws Exception {
     if (args.length != 2) {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/37a71a3c/crunch-examples/src/main/java/org/apache/crunch/examples/TotalBytesByIP.java
----------------------------------------------------------------------
diff --git 
a/crunch-examples/src/main/java/org/apache/crunch/examples/TotalBytesByIP.java 
b/crunch-examples/src/main/java/org/apache/crunch/examples/TotalBytesByIP.java
index f1367e0..44776ea 100644
--- 
a/crunch-examples/src/main/java/org/apache/crunch/examples/TotalBytesByIP.java
+++ 
b/crunch-examples/src/main/java/org/apache/crunch/examples/TotalBytesByIP.java
@@ -44,7 +44,7 @@ public class TotalBytesByIP extends Configured implements 
Tool, Serializable {
     CORRUPT_SIZE
   }
 
-  static final String logRegex = "^([\\d.]+) (\\S+) (\\S+) 
\\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\d+) \"([^\"]+)\" 
\"([^\"]+)\"";
+  static final String logRegex = "^([\\w.]+) (\\S+) (\\S+) 
\\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\d+) \"([^\"]+)\" 
\"([^\"]+)\"";
 
   public int run(String[] args) throws Exception {
     if (args.length != 2) {

Reply via email to