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

Sean Busbey commented on HBASE-20594:
-------------------------------------

{code}
    public TableDescriptorDelta(Set<byte[]> added, Set<byte[]> deleted, 
Set<byte[]> modified) {
      columnsAdded = ImmutableSet.copyOf(added);
      columnsDeleted = ImmutableSet.copyOf(deleted);
      columnsModified = ImmutableSet.copyOf(modified);
    }

{code}

We control when these passed sets were created. Rather than use guava here and 
make a copy, we should use {{Collections.unmodifyableSet}} and have javadocs 
that say the caller must not modify the passed set because we're keeping a view.

> provide utility to compare old and new descriptors
> --------------------------------------------------
>
>                 Key: HBASE-20594
>                 URL: https://issues.apache.org/jira/browse/HBASE-20594
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>            Priority: Major
>         Attachments: HBASE-20594.patch, HBASE-20594.v2.patch, 
> HBASE-20594.v3.patch, HBASE-20594.v4.patch, HBASE-20594.v5.patch, 
> HBASE-20594.v6.patch
>
>
> HBASE-20567 gives us hooks that give both the old and new descriptor in 
> pre/postModify* events, but comparing them is still cumbersome. We should 
> provide users some kind of utility for this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to