Skip to content
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

[ZEPPELIN-2950] Support Ceph as a notebook storage #2598

Closed
wants to merge 1 commit into from

Conversation

kjmrknsn
Copy link
Contributor

@kjmrknsn kjmrknsn commented Sep 25, 2017

What is this PR for?

Make Zeppelin support Ceph as a notebook storage.

Ceph has APIs which are compatible with AWS S3 APIs. However, it supports only AWS Signature V2 and GetObject requests of aws-sdk-java use V4 by default: aws/aws-sdk-java#372

According to aws/aws-sdk-java#372 (comment) , the Zeppelin configuration of zeppelin.notebook.s3.signerOverride is added to make the signerOverride field of a ClientConfiguration instance configurable.

What type of PR is it?

[Improvement]

Todos

What is the Jira issue?

How should this be tested?

Tested manually.

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@kjmrknsn kjmrknsn changed the title Support Ceph as a notebook storage [ZEPPELIN-2950] Support Ceph as a notebook storage Sep 26, 2017
} else {
this.s3client = new AmazonS3EncryptionClient(credentialsProvider, emp);
}
this.s3client = new AmazonS3EncryptionClient(credentialsProvider, emp, cliConf, cryptoConf);
Copy link
Contributor Author

@kjmrknsn kjmrknsn Sep 26, 2017

Choose a reason for hiding this comment

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

The if branch is removed for the simplicity but the internal process of each branch is not changed because new CryptoConfiguration() is called in the new AmazonS3EncryptionClient(credentialsProvider, emp) constructor eventually.

}
else if (conf.getS3EncryptionMaterialsProviderClass() != null) {
// use a custom encryption materials provider class
EncryptionMaterialsProvider emp = createCustomProvider(conf);
this.s3client = new AmazonS3EncryptionClient(credentialsProvider, emp);
this.s3client = new AmazonS3EncryptionClient(credentialsProvider, emp, cliConf, cryptoConf);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cryptoConf is passed to the new AmazonS3EncryptionClient constructor besides cliConf because there's no constructor definition of new AmazonS3EncryptionClient(credentialsProvider, emp, cliConf).

However, its internal process is not changed because new CryptoConfiguration() is called in the new AmazonS3EncryptionClient(credentialsProvider, emp) constructor eventually.

}

return config;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The process of creating ClientConfiguration is made separated from the S3NotebookRepo constructor for making the future modification of this process easier than defining it in the S3NotebookRepo constructor.

@Leemoonsoo
Copy link
Member

@kjmrknsn
Copy link
Contributor Author

@Leemoonsoo Thanks for your review. I added the property of ZEPPELIN_NOTEBOOK_S3_SIGNEROVERRIDE to configuration.md: https://github.com/apache/zeppelin/pull/2598/files#diff-d86fb0bb17c918e22cb888ebfe0ff1cc

(Commits were squashed.)

@Leemoonsoo
Copy link
Member

CI failure looks unrelated to this.

LGTM and merge to master if no further review.
Thanks again @kjmrknsn for the contribution.

@asfgit asfgit closed this in 791619d Oct 14, 2017
@kjmrknsn kjmrknsn deleted the feature/ceph-support branch October 15, 2017 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants