Skip to content

Azure offloader - #2615

Closed
david-streamlio wants to merge 17 commits into
apache:masterfrom
david-streamlio:azure-offloader
Closed

david-streamlio wants to merge 17 commits into
apache:masterfrom
david-streamlio:azure-offloader

Conversation

@david-streamlio

Copy link
Copy Markdown
Contributor

Motivation

Added Azure offloader for Pulsar Tiered Storage

Modifications

Refactored the tiered storage configuration tree to make it easier to add other JCloud Storage Providers in the future

Result

Users will be able to use their Azure Storage accounts for tiered storage of Pulsar data.

@jiazhai

jiazhai commented Sep 20, 2018 •

Copy link
Copy Markdown
Member

@david-streamlio , Thanks for the work.
There may be my typo for "jcloud", of Since this PR brings in some refine work, If possible, Would you please also help change "jcloud" to "jclouds" in the file path and code?

@sijie

sijie commented Sep 21, 2018

Copy link
Copy Markdown
Member

If possible, Would you please also help change "jcloud" to "jclouds" in the file path and code?

@jiazhai probably we can deal with this rename in a separate PR?

@sijie sijie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good. @jiazhai can you take a look at this?

@david-streamlio

Copy link
Copy Markdown
Contributor Author

I am in the process of updating the unit tests, as NONE of them actually used the constructor method that will be used in production. I thought this would be a say change, but it turns out to be causing issues with the Mocks that wrap the Blobstore we are writing too.

BlobStore spiedBlobStore = mock(BlobStore.class, delegatesTo(blobStore));

it appears these mocks don't get invoked, resulting in test failures

@sijie

sijie commented Sep 21, 2018

Copy link
Copy Markdown
Member

@sijie sijie added type/feature The PR added a new feature or issue requested a new feature area/config area/tieredstorage labels Sep 21, 2018
@sijie sijie added this to the 2.3.0 milestone Sep 21, 2018
@david-streamlio

Copy link
Copy Markdown
Contributor Author

@sijie Yes, I will update that document as well.

@david-streamlio

Copy link
Copy Markdown
Contributor Author

@sijie

sijie commented Sep 22, 2018

Copy link
Copy Markdown
Member

if (blobStore != null &&
(!Boolean.parseBoolean(System.getProperty("testRealGCS", "false")) &&
!Boolean.parseBoolean(System.getProperty("testRealGCS", "false")))) {
(Boolean.parseBoolean(System.getProperty("testRealAWS", "false")) ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems not right, for real test, we should not call delete container.

@jiazhai

jiazhai commented Sep 25, 2018

Copy link
Copy Markdown
Member

retest this please

@@ -0,0 +1,60 @@
package org.apache.bookkeeper.mledger.offload.jclouds.provider.factory;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license header is missing.

@jiazhai

jiazhai commented Sep 25, 2018

Copy link
Copy Markdown
Member

@david-streamlio , Please fix the ut and header issues, Thanks.

(Boolean.parseBoolean(System.getProperty("testRealAWS", "false")) ||
Boolean.parseBoolean(System.getProperty("testRealGCS", "false")) ||
Boolean.parseBoolean(System.getProperty("testRealAzure", "false")))) {
(!Boolean.parseBoolean(System.getProperty("testRealAWS", "false")) ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"||" should be "&&" ?

@jiazhai

jiazhai commented Sep 27, 2018

Copy link
Copy Markdown
Member

rerun java8 tests

@jiazhai

jiazhai commented Sep 28, 2018

Copy link
Copy Markdown
Member

retest this please

@david-streamlio

Copy link
Copy Markdown
Contributor Author

What is the expected behavior? So I can confirm the tests are correct.

@jiazhai

jiazhai commented Sep 29, 2018

Copy link
Copy Markdown
Member

rerun java8 tests

1 similar comment
@jiazhai

jiazhai commented Sep 29, 2018

Copy link
Copy Markdown
Member

rerun java8 tests

@jiazhai

jiazhai commented Sep 30, 2018 •

Copy link
Copy Markdown
Member

rerun java8 tests
for: org.apache.pulsar.broker.service.BatchMessageTest.testOutOfOrderAcksForBatchMessage

@jiazhai

jiazhai commented Oct 1, 2018 •

Copy link
Copy Markdown
Member

rerun java8 tests

for org.apache.pulsar.broker.service.v1.V1_ReplicatorTest.testCloseReplicatorStartProducer

@ivankelly ivankelly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is mixing too many things. There's a big refactor, an azure offloader and a glacier offloader. Please break these into separate PRs.

@david-streamlio

Copy link
Copy Markdown
Contributor Author

I am open to suggestions on how to split these up, but these changes are tightly coupled. I could remove the Glacier offloader, but that would be just one class.

The refactor moved all of the logic for getting the credentials out of a single class with multiple if/the/else if/else if constructs and into a factory.

Then I refactored the S3, and GCS to use the new factory methods, and added Azure.

@ivankelly

Copy link
Copy Markdown
Contributor

To restate what I said on other channels, the refactor should be broken out and submitted before the new code, as reviewing a refactor requires a different thought process to reviewing new code. It would be good if the new offloaders could each be in their own PRs so that each PR can be focussed on a single thing.

@merlimat merlimat modified the milestones: 2.3.0, 2.4.0 Feb 14, 2019
@sijie sijie removed this from the 2.4.0 milestone Jun 9, 2019
@david-streamlio

Copy link
Copy Markdown
Contributor Author

Following up on @ivankelly 's comment. I can submit a PR for the refactoring as it pertains to the AWS S3 offloader first, and then submit a different one for the Azure offloader once the first one is approved. Will that be the best path forward @sijie ?

@sijie

sijie commented Feb 10, 2020

Copy link
Copy Markdown
Member

@david-streamlio let's get #2865 merged first. then you can rebase this pull request on #2865

@sijie

sijie commented Jan 11, 2021

Copy link
Copy Markdown
Member

Close this pull request as Azure Offloader has been merged.

@sijie sijie closed this Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config area/tieredstorage type/feature The PR added a new feature or issue requested a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants