[ 
https://issues.apache.org/jira/browse/HADOOP-3944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623806#action_12623806
 ] 

Chris Douglas commented on HADOOP-3944:
---------------------------------------

Anyone using the join package needs to know how to get data out of a 
TupleWritable, so generating the javadoc is pretty important. Most of the 
\*Written methods were kept package-private to discourage users from using 
TupleWritable instead of writing their own composite Writable, which can be 
much more efficiently encoded than it is. Further, TupleWritable itself is not 
only an affront to efficiency, but also type safety when used casually. By 
construction, the join framework should be reasonably responsible about its 
types, but there are many opportunities to misuse this.

I prefer the current arrangement, where the type generated by this framework is 
documented but not fully available to end-users. Some documentation on 
TupleWritable describing the intent would make it less confusing, though.

> TupleWritable listed as public class but cannot be used without methods 
> private to the package
> ----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-3944
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3944
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 0.17.1
>            Reporter: Michael Andrews
>            Priority: Minor
>
> Reading the hadoop-core javadocs, it appears as though TupleWritable can be 
> used outside of the
> org.apache.hadoop.mapred.join.* package.  A user can import TupleWritable but 
> cannot use it correctly without the setWritten, and clearWritten methods 
> being public.   It seems as the though the intent was to make TupleWritable 
> hidden from the user as it is dependent on CompositeRecordReader.  As a 
> possible solution, classes within a package can be made invisible to the user 
> by omitting 'public' from the class definition.  In the case of 
> TupleWritable, this removes the javadoc link from other classes in 
> mapred.join and it's not clear if these classes should be hidden from the 
> user.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to