You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by dd...@apache.org on 2008/03/24 11:02:54 UTC

svn commit: r640362 - in /hadoop/core/trunk: CHANGES.txt src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java

Author: ddas
Date: Mon Mar 24 03:02:51 2008
New Revision: 640362

URL: http://svn.apache.org/viewvc?rev=640362&view=rev
Log:
HADOOP-3040. If the input line starts with the separator char, the key is set as empty. Contributed by Amareshwari Sriramadasu.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=640362&r1=640361&r2=640362&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Mar 24 03:02:51 2008
@@ -346,6 +346,9 @@
     HADOOP-3066. Should not require superuser privilege to query if hdfs is in
     safe mode (jimk)
 
+    HADOOP-3040. If the input line starts with the separator char, the key
+    is set as empty. (Amareshwari Sriramadasu via ddas) 
+
 Release 0.16.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java?rev=640362&r1=640361&r2=640362&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java (original)
+++ hadoop/core/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java Mon Mar 24 03:02:51 2008
@@ -74,7 +74,7 @@
    */
   private static int findNthByte(byte [] utf, int start, int length, byte b, int n) {
     int pos = -1;
-    int nextStart = start + 1;
+    int nextStart = start;
     for (int i = 0; i < n; i++) {
       pos = findByte(utf, nextStart, length, b);
       if (pos < 0) {