FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJul 27, '11 at 11:23p
activeJul 27, '11 at 11:23p
posts1
users1
websitehive.apache.org

1 user in discussion

Sdong: 1 post

People

Translate

site design / logo © 2021 Grokbase