[ 
https://issues.apache.org/jira/browse/HBASE-9980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13829183#comment-13829183
 ] 

Andrew Purtell edited comment on HBASE-9980 at 11/21/13 6:23 PM:
-----------------------------------------------------------------

bq. we can only just hardcode the most important ones, that would also make 
their creation a bit easier

Right, some of the initial set of generators will likely be stubs that use the 
null-ary constructor. I would like to automate the coverage test: We use for 
(Class<?>c : HObjectWritable.CODE_TO_CLASS.values()) { if 
(c.isAssignableFrom(Writable.class)) { ... } } to discover the list of 
interesting objects, and check that we have them covered in the gold file. If 
generating, we check that we have generators for all. Thinking to use an 
annotation on generators so the list of them can be collected at runtime. Then 
fill in the generators for the interesting types.


was (Author: apurtell):
bq. we can only just hardcode the most important ones, that would also make 
their creation a bit easier

Right, some of the initial set of generators will likely be stubs that use the 
null-ary constructor. I would like to automate the coverage test: We use 
HObjectWritable.CODE_TO_CLASS.values() to discover the list of interesting 
objects, and check that we have them covered in the gold file. If generating, 
we check that we have generators for all. Thinking to use an annotation on 
generators so the list of them can be collected at runtime. 

> [0.94] Wire compatibility test for 0.94
> ---------------------------------------
>
>                 Key: HBASE-9980
>                 URL: https://issues.apache.org/jira/browse/HBASE-9980
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.13
>            Reporter: Lars Hofhansl
>            Assignee: Andrew Purtell
>
> See HBASE-9834.
> We should have a test that:
> # generates a file with all kinds of objects serialized into it. Save that 
> file as part of the HBase tests
> # a test can then read the objects back from that file
> # a test can regenerate that file
> If both tests pass we can be reasonably sure that neither readFields nor 
> write was changed in an incompatible way.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to