Make AzureProperties w/ shared-key creds serializable#10045
Merged
Conversation
Contributor
|
@snazy could you add a test please? |
|
any eta on when this would be merged? |
e4e3fed to
72fd23e
Compare
nastra
reviewed
Jun 25, 2024
| }) | ||
| .doesNotThrowAnyException(); | ||
|
|
||
| byte[] serialized = out.toByteArray(); |
Contributor
There was a problem hiding this comment.
it would be good to actually create an instance of AzureProperties and verify that this matches props. Additionally, you can use
Contributor
There was a problem hiding this comment.
something like
AzureProperties props =
new AzureProperties(
ImmutableMap.<String, String>builder()
.put(ADLS_SAS_TOKEN_PREFIX + "foo", "bar")
.put(ADLS_CONNECTION_STRING_PREFIX + "foo", "bar")
.put(ADLS_READ_BLOCK_SIZE, "42")
.put(ADLS_WRITE_BLOCK_SIZE, "42")
.put(ADLS_SHARED_KEY_ACCOUNT_NAME, "me")
.put(ADLS_SHARED_KEY_ACCOUNT_KEY, "secret")
.build());
AzureProperties serdedProps = TestHelpers.roundTripSerialize(props);
assertThat(serdedProps.adlsReadBlockSize()).isEqualTo(props.adlsReadBlockSize());
assertThat(serdedProps.adlsWriteBlockSize()).isEqualTo(props.adlsWriteBlockSize());
assertThat(serdedProps.adlsSasTokens()).isEqualTo(props.adlsSasTokens());
assertThat(serdedProps.namedKeyCreds()).isEqualTo(props.namedKeyCreds());
assertThat(serdedProps.adlsConnectionStrings()).isEqualTo(props.adlsConnectionStrings());
22629aa to
c069f11
Compare
As `StorageSharedKeyCredential` is not serializable, shared key auth doesn't work with Spark.
c069f11 to
99c1d2f
Compare
nastra
approved these changes
Jun 26, 2024
jasonf20
pushed a commit
to jasonf20/iceberg
that referenced
this pull request
Aug 4, 2024
…10045) As `StorageSharedKeyCredential` is not serializable, shared key auth doesn't work with Spark.
zachdisc
pushed a commit
to zachdisc/iceberg
that referenced
this pull request
Dec 23, 2024
…10045) As `StorageSharedKeyCredential` is not serializable, shared key auth doesn't work with Spark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As
StorageSharedKeyCredentialis not serializable, shared key auth doesn't work with Spark.