You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sd...@apache.org on 2011/07/28 01:23:12 UTC
svn commit: r1151664 -
/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
Author: sdong
Date: Wed Jul 27 23:23:12 2011
New Revision: 1151664
URL: http://svn.apache.org/viewvc?rev=1151664&view=rev
Log:
HIVE-2309. Incorrect regular expression for extracting task id from filename (Paul Yang via Siying Dong)
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java?rev=1151664&r1=1151663&r2=1151664&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java Wed Jul 27 23:23:12 2011
@@ -1109,9 +1109,10 @@ public final class Utilities {
/**
* The first group will contain the task id. The second group is the optional extension. The file
* name looks like: "0_0" or "0_0.gz". There may be a leading prefix (tmp_). Since getTaskId() can
- * return an integer only - this should match a pure integer as well
+ * return an integer only - this should match a pure integer as well. {1,3} is used to limit
+ * matching for attempts #'s 0-999.
*/
- private static Pattern fileNameTaskIdRegex = Pattern.compile("^.*?([0-9]+)(_[0-9])?(\\..*)?$");
+ private static Pattern fileNameTaskIdRegex = Pattern.compile("^.*?([0-9]+)(_[0-9]{1,3})?(\\..*)?$");
/**
* Get the task id from the filename. It is assumed that the filename is derived from the output