-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIP 76: Streaming Offload(Part I) #9096
Conversation
@Renkai I have assigned PIP-76 to this PIP and copied the content to the wiki page. https://github.com/apache/pulsar/wiki/PIP-76%3A-Streaming-Offload Feel free to send the PIP to the dev@pulsar.apache.org mailing list. |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comment, please check. And we have migrated to a new code generation lib at #9046, please rebase to the master branch and resolve the conflicts.
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/TieredStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/TieredStorageConfiguration.java
Show resolved
Hide resolved
...d/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/StreamingOffloadIndexBlock.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/bookkeeper/mledger/offload/jcloud/StreamingOffloadIndexBlockBuilder.java
Outdated
Show resolved
Hide resolved
...age/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/OffloadIndexEntry.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
Outdated
Show resolved
Hide resolved
...d/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/StreamingOffloadIndexBlock.java
Outdated
Show resolved
Hide resolved
...a/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreManagedLedgerOffloaderBase.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
...d/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/StreamingOffloadIndexBlock.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Show resolved
Hide resolved
.../java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreManagedLedgerOffloader.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreManagedLedgerOffloader.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreManagedLedgerOffloader.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Renkai overall the change looks good to me. Left a couple of comments for clarifications.
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
Outdated
Show resolved
Hide resolved
...a/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreManagedLedgerOffloaderBase.java
Show resolved
Hide resolved
...rg/apache/bookkeeper/mledger/offload/jcloud/impl/StreamingBlobStoreBackedReadHandleImpl.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Show resolved
Hide resolved
@sijie PTAL, again |
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloader.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreManagedLedgerOffloader.java
Outdated
Show resolved
Hide resolved
...d/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BufferedOffloadStream.java
Outdated
Show resolved
Hide resolved
...rg/apache/bookkeeper/mledger/offload/jcloud/impl/StreamingBlobStoreBackedReadHandleImpl.java
Outdated
Show resolved
Hide resolved
...rg/apache/bookkeeper/mledger/offload/jcloud/impl/StreamingBlobStoreBackedReadHandleImpl.java
Outdated
Show resolved
Hide resolved
return; | ||
} | ||
|
||
for (GroupedReader groupedReader : groupedReaders) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please double confirm the groupedReaders
are sorted by ledger Id, entry id, Otherwise, this will bread the entry read in order guarantee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double confirm code added
Signed-off-by: Renkai <gaelookair@gmail.com>
Signed-off-by: Renkai <gaelookair@gmail.com>
Signed-off-by: Renkai <gaelookair@gmail.com>
Signed-off-by: Renkai <gaelookair@gmail.com>
/pulsarbot run-failure-checks |
Signed-off-by: Renkai <gaelookair@gmail.com>
Signed-off-by: Renkai <gaelookair@gmail.com>
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks better now, just left some minor comments.
@Override | ||
public CompletableFuture<LedgerInfo> getLedgerInfo(long ledgerId) { | ||
CompletableFuture<LedgerInfo> result = new CompletableFuture<>(); | ||
final LedgerInfo ledgerInfo = ledgers.get(ledgerId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please consider returns a copy of LedgerInfo to void be modified from external?
...ain/java/org/apache/bookkeeper/mledger/offload/jcloud/StreamingOffloadIndexBlockBuilder.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/StreamingOffloadIndexBlockImpl.java
Outdated
Show resolved
Hide resolved
/** | ||
* The data block header in code storage for each data block. | ||
*/ | ||
public class StreamingDataBlockHeaderImpl implements DataBlockHeader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked this comment @Renkai?
/pulsarbot run-failure-checks |
Signed-off-by: Renkai <gaelookair@gmail.com>
Signed-off-by: Renkai <gaelookair@gmail.com>
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
3 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
This PR contains the new interface and implementation of the offloader in the below PIP
Unit test is still in progress
PIP 76: https://github.com/apache/pulsar/wiki/PIP-76:-Streaming-Offload