hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1611413 - /hadoop/common/branches/MR-2841/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java
Date Thu, 17 Jul 2014 17:45:01 GMT
Author: todd
Date: Thu Jul 17 17:44:55 2014
New Revision: 1611413

URL: http://svn.apache.org/r1611413
Log:
Import initial code for MAPREDUCE-2841 (native output collector)

Contributed by:
  Binglin Chang
  Yang Dong
  Sean Zhong
  Manu Zhang
  Zhongliang Zhu
  Vincent Wang
  Yan Dong
  Cheng Lian
  Xusen Yin
  Fangqin Dai
  Jiang Weihua
  Gansha Wu
  Avik Dey

Modified:
    hadoop/common/branches/MR-2841/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java

Modified: hadoop/common/branches/MR-2841/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-2841/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java?rev=1611413&r1=1611412&r2=1611413&view=diff
==============================================================================
--- hadoop/common/branches/MR-2841/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java
(original)
+++ hadoop/common/branches/MR-2841/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java
Thu Jul 17 17:44:55 2014
@@ -226,6 +226,10 @@ public class Text extends BinaryComparab
     this.length = len;
   }
 
+  public void setLength(int len) {
+    this.length = len;
+  }
+
   /**
    * Append a range of bytes to the end of the given text
    * @param utf8 the data to copy from
@@ -260,7 +264,7 @@ public class Text extends BinaryComparab
    * @param len the number of bytes we need
    * @param keepData should the old data be kept
    */
-  private void setCapacity(int len, boolean keepData) {
+  public void setCapacity(int len, boolean keepData) {
     if (bytes == null || bytes.length < len) {
       if (bytes != null && keepData) {
         bytes = Arrays.copyOf(bytes, Math.max(len,length << 1));



Mime
View raw message