Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.16.1
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      As said in javadoc, Text.getBytes() returns "raw bytes", but nothing said that it returns internal array which length can be greater than Text.getLength().

      Maybe to provide toArray method, which will create new array of actual data?

      1. HADOOP-3119.patch
        0.5 kB
        Tim Nelson
      2. HADOOP-3119.patch
        0.5 kB
        Tim Nelson

        Activity

        Hide
        Arun C Murthy added a comment -

        Will updating the javadoc to say:

        /**
         * Returns the raw bytes; however, only data upto {@link #getLength()} is valid.
         */
        public byte[] getBytes() {
          // ...
        }
        

        work?

        Show
        Arun C Murthy added a comment - Will updating the javadoc to say: /** * Returns the raw bytes; however, only data upto {@link #getLength()} is valid. */ public byte[] getBytes() { // ... } work?
        Hide
        Andrew Gudkov added a comment -

        ok

        Show
        Andrew Gudkov added a comment - ok
        Hide
        Tim Nelson added a comment -

        Simple clarification of what this function returns

        Show
        Tim Nelson added a comment - Simple clarification of what this function returns
        Hide
        Mahadev konar added a comment -

        you might want to fix the spelling mistake

        retuns -> returns .

        Show
        Mahadev konar added a comment - you might want to fix the spelling mistake retuns -> returns .
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12381233/HADOOP-3119.patch
        against trunk revision 645773.

        @author +1. The patch does not contain any @author tags.

        tests included -1. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        javadoc +1. The javadoc tool did not generate any warning messages.

        javac +1. The applied patch does not generate any new javac compiler warnings.

        release audit +1. The applied patch does not generate any new release audit warnings.

        findbugs +1. The patch does not introduce any new Findbugs warnings.

        core tests +1. The patch passed core unit tests.

        contrib tests +1. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12381233/HADOOP-3119.patch against trunk revision 645773. @author +1. The patch does not contain any @author tags. tests included -1. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2358/console This message is automatically generated.
        Hide
        Tim Nelson added a comment -

        haha, typo fixed. Obviously there are no new or modified tests.

        Show
        Tim Nelson added a comment - haha, typo fixed. Obviously there are no new or modified tests.
        Hide
        Chris Douglas added a comment -

        I just committed this. Thanks Tim

        Show
        Chris Douglas added a comment - I just committed this. Thanks Tim
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-trunk #483 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/483/ )

          People

          • Assignee:
            Tim Nelson
            Reporter:
            Andrew Gudkov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development