HBase
  1. HBase
  2. HBASE-5358

HBaseObjectWritable should be able to serialize/deserialize generic arrays

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.94.0
    • Fix Version/s: 0.92.1, 0.94.0
    • Component/s: Coprocessors, io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

      1. 5358-92.txt
        12 kB
        Ted Yu
      2. HBASE-5358_v3.patch
        14 kB
        Enis Soztutar

        Issue Links

          Activity

          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/
          -----------------------------------------------------------

          Review request for hbase.

          Summary
          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.
          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs


          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce
          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          Diff: https://reviews.apache.org/r/3811/diff

          Testing
          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4952
          -----------------------------------------------------------

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10881>

          Please move this to line 429.

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10882>

          getClassCode(Array.class) should be stored in a static variable.

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10883>

          What if componentType is another Array ?

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10884>

          Should we validate length ?

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10885>

          What does InSeq mean ?

          • Ted

          On 2012-02-09 01:38:18, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 01:38:18)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4952 ----------------------------------------------------------- src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10881 > Please move this to line 429. src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10882 > getClassCode(Array.class) should be stored in a static variable. src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10883 > What if componentType is another Array ? src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10884 > Should we validate length ? src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10885 > What does InSeq mean ? Ted On 2012-02-09 01:38:18, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 01:38:18) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4958
          -----------------------------------------------------------

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10897>

          Ignore this comment.
          I see the recursive call @ line 441.

          • Ted

          On 2012-02-09 01:38:18, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 01:38:18)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4958 ----------------------------------------------------------- src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10897 > Ignore this comment. I see the recursive call @ line 441. Ted On 2012-02-09 01:38:18, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 01:38:18) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4960
          -----------------------------------------------------------

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10901>

          We are changing what is on the line now when we serialize? All arrays now serialize their type ahead of array length? In our public API what arrays will this effect? Do you know? Does it require our upping the version on the Interface that uses HBaseObjectWritable?

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10902>

          Good

          • Michael

          On 2012-02-09 01:38:18, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 01:38:18)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4960 ----------------------------------------------------------- src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10901 > We are changing what is on the line now when we serialize? All arrays now serialize their type ahead of array length? In our public API what arrays will this effect? Do you know? Does it require our upping the version on the Interface that uses HBaseObjectWritable? src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10902 > Good Michael On 2012-02-09 01:38:18, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 01:38:18) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          On 2012-02-09 07:02:48, Michael Stack wrote:

          > src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java, line 446

          > <https://reviews.apache.org/r/3811/diff/2/?file=73392#file73392line446>

          >

          > We are changing what is on the line now when we serialize? All arrays now serialize their type ahead of array length? In our public API what arrays will this effect? Do you know? Does it require our upping the version on the Interface that uses HBaseObjectWritable?

          We are not changing the serialized bytes for the arrays that are already in CLASS_TO_CODE. This only affects the arrays that are not defined there. For them, when you serialize, the deserializer throws an erroneous ClassNotFoundException. So, I don't think wire compatibility will be affected.

          • enis

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4960
          -----------------------------------------------------------

          On 2012-02-09 01:38:18, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 01:38:18)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - On 2012-02-09 07:02:48, Michael Stack wrote: > src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java, line 446 > < https://reviews.apache.org/r/3811/diff/2/?file=73392#file73392line446 > > > We are changing what is on the line now when we serialize? All arrays now serialize their type ahead of array length? In our public API what arrays will this effect? Do you know? Does it require our upping the version on the Interface that uses HBaseObjectWritable? We are not changing the serialized bytes for the arrays that are already in CLASS_TO_CODE. This only affects the arrays that are not defined there. For them, when you serialize, the deserializer throws an erroneous ClassNotFoundException. So, I don't think wire compatibility will be affected. enis ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4960 ----------------------------------------------------------- On 2012-02-09 01:38:18, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 01:38:18) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          On 2012-02-09 02:16:29, Ted Yu wrote:

          > src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java, line 606

          > <https://reviews.apache.org/r/3811/diff/2/?file=73392#file73392line606>

          >

          > Should we validate length ?

          It is not validated in other array/list read operations. The allocation will fail anyway if the length is off, no?

          On 2012-02-09 02:16:29, Ted Yu wrote:

          > src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java, line 246

          > <https://reviews.apache.org/r/3811/diff/2/?file=73393#file73393line246>

          >

          > What does InSeq mean ?

          Oh, it comes from Seg<T> from Scala, where Array<T> and List<T> extends. I'll change the method name to testPolymorphismInSequences(), and add some comments, if you don't have any suggestion.

          On 2012-02-09 02:16:29, Ted Yu wrote:

          > src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java, line 445

          > <https://reviews.apache.org/r/3811/diff/2/?file=73392#file73392line445>

          >

          > What if componentType is another Array ?

          The test case for A[][] already covers for this i believe.

          • enis

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4952
          -----------------------------------------------------------

          On 2012-02-09 01:38:18, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 01:38:18)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - On 2012-02-09 02:16:29, Ted Yu wrote: > src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java, line 606 > < https://reviews.apache.org/r/3811/diff/2/?file=73392#file73392line606 > > > Should we validate length ? It is not validated in other array/list read operations. The allocation will fail anyway if the length is off, no? On 2012-02-09 02:16:29, Ted Yu wrote: > src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java, line 246 > < https://reviews.apache.org/r/3811/diff/2/?file=73393#file73393line246 > > > What does InSeq mean ? Oh, it comes from Seg<T> from Scala, where Array<T> and List<T> extends. I'll change the method name to testPolymorphismInSequences(), and add some comments, if you don't have any suggestion. On 2012-02-09 02:16:29, Ted Yu wrote: > src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java, line 445 > < https://reviews.apache.org/r/3811/diff/2/?file=73392#file73392line445 > > > What if componentType is another Array ? The test case for A[][] already covers for this i believe. enis ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4952 ----------------------------------------------------------- On 2012-02-09 01:38:18, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 01:38:18) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/
          -----------------------------------------------------------

          (Updated 2012-02-09 22:18:10.009110)

          Review request for hbase.

          Changes
          -------

          Incoprorated review comments, optimized the serialization of Arrays of know types, and added a few more test cases

          Summary
          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.
          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs (updated)


          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982
          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          Diff: https://reviews.apache.org/r/3811/diff

          Testing
          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 22:18:10.009110) Review request for hbase. Changes ------- Incoprorated review comments, optimized the serialization of Arrays of know types, and added a few more test cases Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs (updated) src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4995
          -----------------------------------------------------------

          Looks good.
          Please attach patch to JIRA so that Hadoop QA can run test suite.

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10992>

          code is no longer a byte.
          Please adjust javadoc accordingly.

          • Ted

          On 2012-02-09 22:18:10, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 22:18:10)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4995 ----------------------------------------------------------- Looks good. Please attach patch to JIRA so that Hadoop QA can run test suite. src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10992 > code is no longer a byte. Please adjust javadoc accordingly. Ted On 2012-02-09 22:18:10, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 22:18:10) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          Enis Soztutar added a comment -

          Attaching the latest version of the patch from review. Incorporates a trivial javadoc fix as suggested.

          Show
          Enis Soztutar added a comment - Attaching the latest version of the patch from review. Incorporates a trivial javadoc fix as suggested.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12514031/HBASE-5358_v3.patch
          against trunk revision .

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

          +1 tests included. The patch appears to include 11 new or modified tests.

          -1 javadoc. The javadoc tool appears to have generated -136 warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          -1 findbugs. The patch appears to introduce 156 new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed these unit tests:
          org.apache.hadoop.hbase.mapreduce.TestImportTsv
          org.apache.hadoop.hbase.mapred.TestTableMapReduce
          org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

          Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/932//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/932//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/932//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/12514031/HBASE-5358_v3.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 11 new or modified tests. -1 javadoc. The javadoc tool appears to have generated -136 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 156 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.mapreduce.TestImportTsv org.apache.hadoop.hbase.mapred.TestTableMapReduce org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/932//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/932//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/932//console This message is automatically generated.
          Hide
          Ted Yu added a comment -

          Test result looks good.

          Plan to integrate the patch tomorrow.

          Show
          Ted Yu added a comment - Test result looks good. Plan to integrate the patch tomorrow.
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3811/#review4999
          -----------------------------------------------------------

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          <https://reviews.apache.org/r/3811/#comment10996>

          Ok. Good.

          • Michael

          On 2012-02-09 22:18:10, enis wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3811/

          -----------------------------------------------------------

          (Updated 2012-02-09 22:18:10)

          Review request for hbase.

          Summary

          -------

          HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352).

          This addresses bug HBASE-5358.

          https://issues.apache.org/jira/browse/HBASE-5358

          Diffs

          -----

          src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982

          src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce

          Diff: https://reviews.apache.org/r/3811/diff

          Testing

          -------

          Thanks,

          enis

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/#review4999 ----------------------------------------------------------- src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java < https://reviews.apache.org/r/3811/#comment10996 > Ok. Good. Michael On 2012-02-09 22:18:10, enis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3811/ ----------------------------------------------------------- (Updated 2012-02-09 22:18:10) Review request for hbase. Summary ------- HBaseObjectWritable can encode Writable[]'s but, but cannot encode A[] where A extends Writable. This becomes an issue for example when adding a coprocessor method which takes A[] (see HBASE-5352 ). This addresses bug HBASE-5358 . https://issues.apache.org/jira/browse/HBASE-5358 Diffs ----- src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java 260f982 src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java 78513ce Diff: https://reviews.apache.org/r/3811/diff Testing ------- Thanks, enis
          Hide
          Ted Yu added a comment -

          Integrated to TRUNK.

          Thanks for the patch Enis.

          Thanks for the review Michael.

          Show
          Ted Yu added a comment - Integrated to TRUNK. Thanks for the patch Enis. Thanks for the review Michael.
          Hide
          Hudson added a comment -

          Integrated in HBase-TRUNK-security #104 (See https://builds.apache.org/job/HBase-TRUNK-security/104/)
          HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic arrays

          tedyu :
          Files :

          • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Show
          Hudson added a comment - Integrated in HBase-TRUNK-security #104 (See https://builds.apache.org/job/HBase-TRUNK-security/104/ ) HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic arrays tedyu : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Hide
          Hudson added a comment -

          Integrated in HBase-TRUNK #2656 (See https://builds.apache.org/job/HBase-TRUNK/2656/)
          HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic arrays

          tedyu :
          Files :

          • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Show
          Hudson added a comment - Integrated in HBase-TRUNK #2656 (See https://builds.apache.org/job/HBase-TRUNK/2656/ ) HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic arrays tedyu : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Hide
          Ted Yu added a comment -

          Patch for 0.92 branch.

          As Enis suggested, private class DummyType is introduced to align ordinals for classes across major releases.

          Show
          Ted Yu added a comment - Patch for 0.92 branch. As Enis suggested, private class DummyType is introduced to align ordinals for classes across major releases.
          Hide
          stack added a comment -

          This will do. +1

          Show
          stack added a comment - This will do. +1
          Hide
          Ted Yu added a comment -

          Integrated to 0.92.

          Thanks for the suggestion, Enis.

          Thanks for the review, Stack.

          Show
          Ted Yu added a comment - Integrated to 0.92. Thanks for the suggestion, Enis. Thanks for the review, Stack.
          Hide
          Hudson added a comment -

          Integrated in HBase-0.92 #315 (See https://builds.apache.org/job/HBase-0.92/315/)
          HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic
          arrays (Enis) (Revision 1297267)

          Result = SUCCESS
          tedyu :
          Files :

          • /hbase/branches/0.92/CHANGES.txt
          • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          • /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Show
          Hudson added a comment - Integrated in HBase-0.92 #315 (See https://builds.apache.org/job/HBase-0.92/315/ ) HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic arrays (Enis) (Revision 1297267) Result = SUCCESS tedyu : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Hide
          Hudson added a comment -

          Integrated in HBase-0.92-security #97 (See https://builds.apache.org/job/HBase-0.92-security/97/)
          HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic
          arrays (Enis) (Revision 1297267)

          Result = FAILURE
          tedyu :
          Files :

          • /hbase/branches/0.92/CHANGES.txt
          • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java
          • /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
          Show
          Hudson added a comment - Integrated in HBase-0.92-security #97 (See https://builds.apache.org/job/HBase-0.92-security/97/ ) HBASE-5358 HBaseObjectWritable should be able to serialize/deserialize generic arrays (Enis) (Revision 1297267) Result = FAILURE tedyu : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java

            People

            • Assignee:
              Enis Soztutar
              Reporter:
              Enis Soztutar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development