You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Duo Zhang <zh...@apache.org> on 2024/07/13 14:24:09 UTC
[DISCUSS] About the add methods in WALEdit
I filed HBASE-28719 to change the internal type of WALEdit to
ExtendedCell but still keep the public methods to accept Cell since it
is marked as IA.LimitedPrivate for coprocessor and replication.
In the javadoc of WALEdit, we said that the class is read only for
coprocessor and customized replication, and mark all the add methods
IA.Private. But in HRegion's implementation, we do call the
coprocessor methods with an empty WALEdit, and then collect the cells
in this WALEdit for adding them to the WALEdit we actually write out
later.
So I wonder whether the javadoc reflects the real usage here...
Do we have any real usage which adds cells to WALEdit? If so, I think
we should redesign the visibility of these methods a bit.
Feedbacks are welcome.
Thanks.
Re: [DISCUSS] About the add methods in WALEdit
Posted by "张铎(Duo Zhang)" <pa...@gmail.com>.
OK, so we need to keep the add methods for WAL public, remove the
IA.Private annotation on these methods and change the javadoc.
Let me file an issue to do this change first.
Thanks.
Istvan Toth <st...@cloudera.com.invalid> 于2024年7月15日周一 19:23写道:
>
> Yes, Phoenix does call WalEdit.add() in
>
> org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(ObserverContext<RegionCoprocessorEnvironment>,
> MiniBatchOperationInProgress<Mutation>)
>
> On Sat, Jul 13, 2024 at 4:24 PM Duo Zhang <zh...@apache.org> wrote:
>
> > I filed HBASE-28719 to change the internal type of WALEdit to
> > ExtendedCell but still keep the public methods to accept Cell since it
> > is marked as IA.LimitedPrivate for coprocessor and replication.
> >
> > In the javadoc of WALEdit, we said that the class is read only for
> > coprocessor and customized replication, and mark all the add methods
> > IA.Private. But in HRegion's implementation, we do call the
> > coprocessor methods with an empty WALEdit, and then collect the cells
> > in this WALEdit for adding them to the WALEdit we actually write out
> > later.
> >
> > So I wonder whether the javadoc reflects the real usage here...
> >
> > Do we have any real usage which adds cells to WALEdit? If so, I think
> > we should redesign the visibility of these methods a bit.
> >
> > Feedbacks are welcome.
> >
> > Thanks.
> >
>
>
> --
> *István Tóth* | Sr. Staff Software Engineer
> *Email*: stoty@cloudera.com
> cloudera.com <https://www.cloudera.com>
> [image: Cloudera] <https://www.cloudera.com/>
> [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> on LinkedIn] <https://www.linkedin.com/company/cloudera>
> ------------------------------
> ------------------------------
Re: [DISCUSS] About the add methods in WALEdit
Posted by "张铎(Duo Zhang)" <pa...@gmail.com>.
OK, so we need to keep the add methods for WAL public, remove the
IA.Private annotation on these methods and change the javadoc.
Let me file an issue to do this change first.
Thanks.
Istvan Toth <st...@cloudera.com.invalid> 于2024年7月15日周一 19:23写道:
>
> Yes, Phoenix does call WalEdit.add() in
>
> org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(ObserverContext<RegionCoprocessorEnvironment>,
> MiniBatchOperationInProgress<Mutation>)
>
> On Sat, Jul 13, 2024 at 4:24 PM Duo Zhang <zh...@apache.org> wrote:
>
> > I filed HBASE-28719 to change the internal type of WALEdit to
> > ExtendedCell but still keep the public methods to accept Cell since it
> > is marked as IA.LimitedPrivate for coprocessor and replication.
> >
> > In the javadoc of WALEdit, we said that the class is read only for
> > coprocessor and customized replication, and mark all the add methods
> > IA.Private. But in HRegion's implementation, we do call the
> > coprocessor methods with an empty WALEdit, and then collect the cells
> > in this WALEdit for adding them to the WALEdit we actually write out
> > later.
> >
> > So I wonder whether the javadoc reflects the real usage here...
> >
> > Do we have any real usage which adds cells to WALEdit? If so, I think
> > we should redesign the visibility of these methods a bit.
> >
> > Feedbacks are welcome.
> >
> > Thanks.
> >
>
>
> --
> *István Tóth* | Sr. Staff Software Engineer
> *Email*: stoty@cloudera.com
> cloudera.com <https://www.cloudera.com>
> [image: Cloudera] <https://www.cloudera.com/>
> [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
> Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
> on LinkedIn] <https://www.linkedin.com/company/cloudera>
> ------------------------------
> ------------------------------
Re: [DISCUSS] About the add methods in WALEdit
Posted by Istvan Toth <st...@cloudera.com.INVALID>.
Yes, Phoenix does call WalEdit.add() in
org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(ObserverContext<RegionCoprocessorEnvironment>,
MiniBatchOperationInProgress<Mutation>)
On Sat, Jul 13, 2024 at 4:24 PM Duo Zhang <zh...@apache.org> wrote:
> I filed HBASE-28719 to change the internal type of WALEdit to
> ExtendedCell but still keep the public methods to accept Cell since it
> is marked as IA.LimitedPrivate for coprocessor and replication.
>
> In the javadoc of WALEdit, we said that the class is read only for
> coprocessor and customized replication, and mark all the add methods
> IA.Private. But in HRegion's implementation, we do call the
> coprocessor methods with an empty WALEdit, and then collect the cells
> in this WALEdit for adding them to the WALEdit we actually write out
> later.
>
> So I wonder whether the javadoc reflects the real usage here...
>
> Do we have any real usage which adds cells to WALEdit? If so, I think
> we should redesign the visibility of these methods a bit.
>
> Feedbacks are welcome.
>
> Thanks.
>
--
*István Tóth* | Sr. Staff Software Engineer
*Email*: stoty@cloudera.com
cloudera.com <https://www.cloudera.com>
[image: Cloudera] <https://www.cloudera.com/>
[image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
on LinkedIn] <https://www.linkedin.com/company/cloudera>
------------------------------
------------------------------
Re: [DISCUSS] About the add methods in WALEdit
Posted by Istvan Toth <st...@cloudera.com.INVALID>.
Yes, Phoenix does call WalEdit.add() in
org.apache.phoenix.hbase.index.Indexer.preBatchMutateWithExceptions(ObserverContext<RegionCoprocessorEnvironment>,
MiniBatchOperationInProgress<Mutation>)
On Sat, Jul 13, 2024 at 4:24 PM Duo Zhang <zh...@apache.org> wrote:
> I filed HBASE-28719 to change the internal type of WALEdit to
> ExtendedCell but still keep the public methods to accept Cell since it
> is marked as IA.LimitedPrivate for coprocessor and replication.
>
> In the javadoc of WALEdit, we said that the class is read only for
> coprocessor and customized replication, and mark all the add methods
> IA.Private. But in HRegion's implementation, we do call the
> coprocessor methods with an empty WALEdit, and then collect the cells
> in this WALEdit for adding them to the WALEdit we actually write out
> later.
>
> So I wonder whether the javadoc reflects the real usage here...
>
> Do we have any real usage which adds cells to WALEdit? If so, I think
> we should redesign the visibility of these methods a bit.
>
> Feedbacks are welcome.
>
> Thanks.
>
--
*István Tóth* | Sr. Staff Software Engineer
*Email*: stoty@cloudera.com
cloudera.com <https://www.cloudera.com>
[image: Cloudera] <https://www.cloudera.com/>
[image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
on LinkedIn] <https://www.linkedin.com/company/cloudera>
------------------------------
------------------------------