[
https://issues.apache.org/jira/browse/HBASE-2894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899090#action_12899090
]
ryan rawson commented on HBASE-2894:
------------------------------------
Right now the 'puts' is used in a bunch of other packages. We can do getPuts()
but that would also have to be public.
As for the protected - should that be public instead? Using protected instead
of private is generally considered good form and we have been bit by things
being overly private in HBase before.
> MultiPut exposes public fields
> ------------------------------
>
> Key: HBASE-2894
> URL: https://issues.apache.org/jira/browse/HBASE-2894
> Project: HBase
> Issue Type: Bug
> Components: client
> Affects Versions: 0.89.20100621
> Reporter: Benoit Sigoure
> Assignee: ryan rawson
> Priority: Blocker
>
> {code:title=MultiPut.java}
> public class MultiPut implements Writable {
> public HServerAddress address; // client code ONLY
>
>
> // map of regions to lists of puts for that region.
>
> public Map<byte[], List<Put> > puts = new TreeMap<byte[],
> List<Put>>(Bytes.BYTES_COMPARATOR);
> [...]
> {code}
> I don't see any reason for those fields to be public. Let's make sure this
> doesn't leak to a stable release, otherwise it becomes part of the API.
> Fixing this issue may be pointless if this ever happens: http://su.pr/1SG7fB
> _edit:_ Similarly, {{MultiPutResponse}} has two fields that are
> {{protected}}, but need not to be:
> {code:title=MultiPutResponse.java}
> public class MultiPutResponse implements Writable {
>
> protected MultiPut request; // used in client code ONLY
>
> protected Map<byte[], Integer> answers = new TreeMap<byte[],
> Integer>(Bytes.BYTES_COMPARATOR);
> [...]
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.