You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Geoffrey Jacoby (Jira)" <ji...@apache.org> on 2021/11/10 13:30:00 UTC

[jira] [Updated] (PHOENIX-6227) Option for DDL changes to export to external schema repository

     [ https://issues.apache.org/jira/browse/PHOENIX-6227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoffrey Jacoby updated PHOENIX-6227:
-------------------------------------
    Release Note: 
External_Schema_Id is now added to SYSTEM.CATALOG. When CHANGE_DETECTION_ENABLED = true, CREATE and ALTER statements to a table or view cause a call to an external schema registry is made to save a string representation of the schema to be made. The schema registry returns a schema id which is saved in the new SYSTEM.CATALOG field. 

When change detection is enabled, the WAL is now annotated with the external schema id, rather than the tuple of tenant id / schema name / logical table name / last DDL timestamp it was previously.

The implementation to generate the string representation can be set via the Configuration property org.apache.phoenix.export.schemawriter.impl . By default it is a String representation of the PTable protobuf. 

The implementation of the call to the schema repository can be set via the Configuration property org.apache.phoenix.export.schemaregistry.impl . By default it is an in-memory data structure unsuitable for production use. In production it is intended to be used with a standalone schema registry service. 

  was:
External_Schema_Id is now added to SYSTEM.CATALOG. When CHANGE_DETECTION_ENABLED = true, CREATE and ALTER statements to a table or view cause a call to an external schema registry is made to save a string representation of the schema to be made. 

When change detection is enabled, the WAL is now annotated with the external schema id, rather than the tuple of tenant id / schema name / logical table name / last DDL timestamp it was previously.

The implementation to generate the string representation can be set via the Configuration property org.apache.phoenix.export.schemawriter.impl . By default it is a String representation of the PTable protobuf. 

The implementation of the call to the schema repository can be set via the Configuration property org.apache.phoenix.export.schemaregistry.impl . By default it is an in-memory data structure unsuitable for production use. In production it is intended to be used with a standalone schema registry service. 


> Option for DDL changes to export to external schema repository
> --------------------------------------------------------------
>
>                 Key: PHOENIX-6227
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6227
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>            Priority: Major
>             Fix For: 4.17.0, 5.2.0
>
>
> When a user creates or drops a table or view, or adds/removes a column from one, there should be the option for Phoenix to notify an external schema repository. This should be a configurable plugin so that core Phoenix is not coupled to any particular repository implementation. 
> This will also store a schema id generated by the external schema registry in a new field in System.Catalog so that a future JIRA can switch to using the schema id in change detection WAL annotations. Because of this this JIRA will not be able to be backported to 5.1.x or 4.16.x



--
This message was sent by Atlassian Jira
(v8.20.1#820001)