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

Viraj Jasani commented on PHOENIX-7514:
---------------------------------------

If CDC was just table level property, this might have been better. Since CDC 
itself is a virtual table with its own PTable type, probably "CREATE CDC" or 
"ENABLE CDC" might be better. WDYT?

> CDC grammar for enabling or disabling Stream
> --------------------------------------------
>
>                 Key: PHOENIX-7514
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7514
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Viraj Jasani
>            Priority: Major
>
> So far, we use "CREATE CDC" and "DROP CDC" grammar to create and drop 
> multiple CDC objects for the given table. However, we should allow creating 
> only single CDC object for the given table because the CDC object internally 
> creates CDC Index for the given table. As this index is built on 
> PARTITION_ID() and PHOENIX_ROW_TIMESTAMP(), having multiple similar index can 
> be overkill for the CDC purpose. Once the CDC Stream is created, CDC consumer 
> can define start and end timestamp that they are interested in.
> In order to hide the details of CDC object from the user, we should define 
> grammar such that it allows building CDC Index only once per table. Once the 
> CDC object and index is created, we should not allow creating more CDC 
> objects for the given table.
> Proposed new grammar to enable the CDC stream on the given table:
> {code:java}
> ENABLE CDC ON <table-name>{code}
> Proposed new grammar to disable the CDC stream on the given table:
> {code:java}
> DISABLE CDC ON <table-name>{code}
> As we no longer need to provide CDC object name with the grammar, client 
> inherently creates CDC object name as 
> _phoenix-cdc-stream-<tablename>-<timestamp>_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to