Jason918 opened a new pull request, #17711:
URL: https://github.com/apache/pulsar/pull/17711

   
   Master Issue: https://github.com/apache/pulsar/issues/16153
   
   ### Motivation
   
   The main purpose of this part is to support shadow topic creation.
   
   Note:  
   1. A topic must defined as shadow topic at creation, or else it will create 
its own ledgers. So this PR uses topic property(key="PULSAR.SHADOW_SOURCE", 
value="$SourceTopic") to identify the topic is topic.
   2. shadow topic can't change to non-shadow or change its shadow source in 
its whole life time. You must delete it first and recreate.
   3. Deleting an shadow topic is just like deleting normal topic.
   
   
   ### Modifications
   
   Key changes:
   1. Read topic properties from storage before loading a topic, see 
`checkOwnershipAndCreatePersistentTopic`
   2. Add admin interface and cli for `createShadowTopic` and `getShadowSource`
   3. Add `ShadowManagedLedgerImpl`, but it's not implemented yet. It's quite 
complicated and it will be implemented in the following PRs.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   
   This change added tests and can be verified as follows:
     - ShadowTopicTest
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [x] **The admin CLI options**
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [ ] `doc-not-needed` 
   (Please explain why)
   
   - [x] `doc` 
   Java doc added in 
`pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java`
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to