Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
04dc25e
Rebase to trunk branch
bhattmanish98 Jan 30, 2025
fdab599
Fixed checkstyle and spotbugs
bhattmanish98 Jan 3, 2025
62392ea
Java Doc added to the methods
bhattmanish98 Jan 3, 2025
c3eec1a
Tests cases for rename delete
bhattmanish98 Jan 6, 2025
5c8ad00
Changes as per comments given
bhattmanish98 Jan 8, 2025
2e56bfd
Changes as per comments given
bhattmanish98 Jan 8, 2025
3b84604
Resolved checkstyle
bhattmanish98 Jan 9, 2025
000a42c
Resolved checkstyle
bhattmanish98 Jan 9, 2025
54c2fe9
Changes made as per comments
bhattmanish98 Jan 17, 2025
fe0e594
CreateNonRecursive changes + Java doc for Test cases
bhattmanish98 Jan 28, 2025
a1ba19d
Fixed codestyle and bugspot errors
bhattmanish98 Jan 28, 2025
f86c369
Changes as per comments given
bhattmanish98 Jan 29, 2025
d4c8ec0
Tested code and changes as per comments
bhattmanish98 Jan 29, 2025
f06f92a
Flow for create non recursive revisted
bhattmanish98 Jan 30, 2025
6f6b759
Rebase trunk
bhattmanish98 Jan 30, 2025
bcbc72d
Merge trunk and conflicts resolved
bhattmanish98 Jan 30, 2025
bba177b
Rename Delete in Blob endpoint
bhattmanish98 Jan 2, 2025
44a6d7f
Tests cases for rename delete
bhattmanish98 Jan 6, 2025
9dc9a11
Changes as per comments given
bhattmanish98 Jan 8, 2025
2c39f84
Resolved checkstyle
bhattmanish98 Jan 9, 2025
a75744c
Resolved checkstyle
bhattmanish98 Jan 9, 2025
c92e00a
Changes as per comments given
bhattmanish98 Jan 29, 2025
fd8957f
Reverted unrelated changes
bhattmanish98 Jan 30, 2025
aeb8519
Reverted unrelated changes
bhattmanish98 Jan 30, 2025
2166246
Test fixes
bhattmanish98 Jan 30, 2025
52069e1
Codestyle fix + test cases for create non recursion
bhattmanish98 Jan 30, 2025
da502bf
Removed namespace from rename delete path
bhattmanish98 Jan 31, 2025
ba9b025
Revert refactoring
bhattmanish98 Jan 31, 2025
dc6cf6f
Reverted unused files changes
bhattmanish98 Jan 31, 2025
689b653
Reverted unused files changes
bhattmanish98 Jan 31, 2025
dc7932b
Used assumeBlobServiceType instead of assumeNonHnsAccountBlobEndpoint
bhattmanish98 Jan 31, 2025
e3f257a
Removed namespaceEnabled from deletePath arguments
bhattmanish98 Jan 31, 2025
cc85e80
Import Fix and removed few unwanted changes
bhattmanish98 Jan 31, 2025
a4e97cb
revert import
bhattmanish98 Jan 31, 2025
f3acefb
import ordering fix
bhattmanish98 Jan 31, 2025
f00f5c9
Fixed testRenameDirectoryAsExistingFile
bhattmanish98 Feb 1, 2025
621d690
Changes for failed test cases
bhattmanish98 Feb 1, 2025
fff7ffc
Fixed codestyle
bhattmanish98 Feb 2, 2025
0739fd2
Test case fixes
bhattmanish98 Feb 2, 2025
aedf9e8
Lease test fixes
bhattmanish98 Feb 3, 2025
5765c5a
Fixes for test cases
bhattmanish98 Feb 3, 2025
8a4c1cf
Codestyle fixes
bhattmanish98 Feb 3, 2025
d2c8baf
comments on if else condition
bhattmanish98 Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private AbfsClient(final URL baseUrl,

if (encryptionContextProvider != null) {
this.encryptionContextProvider = encryptionContextProvider;
xMsVersion = ApiVersion.APR_10_2021; // will be default once server change deployed
xMsVersion = ApiVersion.AUG_03_2023; // will be default once server change deployed
encryptionType = EncryptionType.ENCRYPTION_CONTEXT;
} else if (abfsConfiguration.getEncodedClientProvidedEncryptionKey() != null) {
clientProvidedEncryptionKey =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@
import org.apache.hadoop.test.LambdaTestUtils;
import org.apache.hadoop.util.Lists;

import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.BLOCK_LIST_END_TAG;
import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.BLOCK_LIST_START_TAG;
import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.CPK_IN_NON_HNS_ACCOUNT_ERROR_MESSAGE;
import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.XML_VERSION;
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.FS_AZURE_ENCRYPTION_CONTEXT_PROVIDER_TYPE;
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.FS_AZURE_ENCRYPTION_ENCODED_CLIENT_PROVIDED_KEY;
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.FS_AZURE_ENCRYPTION_ENCODED_CLIENT_PROVIDED_KEY_SHA;
Expand All @@ -77,6 +74,7 @@
import static org.apache.hadoop.fs.azurebfs.constants.TestConfigurationKeys.ENCRYPTION_KEY_LEN;
import static org.apache.hadoop.fs.azurebfs.constants.TestConfigurationKeys.FS_AZURE_TEST_NAMESPACE_ENABLED_ACCOUNT;
import static org.apache.hadoop.fs.azurebfs.contracts.services.AppendRequestParameters.Mode.APPEND_MODE;
import static org.apache.hadoop.fs.azurebfs.services.AbfsBlobClient.generateBlockListXml;
import static org.apache.hadoop.fs.azurebfs.utils.AclTestHelpers.aclEntry;
import static org.apache.hadoop.fs.azurebfs.utils.EncryptionType.ENCRYPTION_CONTEXT;
import static org.apache.hadoop.fs.azurebfs.utils.EncryptionType.GLOBAL_KEY;
Expand Down Expand Up @@ -191,12 +189,6 @@ public void testCustomEncryptionCombinations() throws Exception {
}
}

protected static String generateBlockListXml() {
return XML_VERSION
+ BLOCK_LIST_START_TAG
+ BLOCK_LIST_END_TAG;
}

private void validateCpkResponseHeadersForCombination(final AzureBlobFileSystem fs)
throws Exception {
Path testPath = path("/testFile");
Expand Down Expand Up @@ -328,7 +320,7 @@ private AbfsRestOperation callOperation(AzureBlobFileSystem fs,
return ingressClient.flush(path, 3, false, false, null,
null, encryptionAdapter, getTestTracingContext(fs, false));
} else {
byte[] buffer = generateBlockListXml().getBytes(StandardCharsets.UTF_8);
byte[] buffer = generateBlockListXml(new ArrayList<>()).getBytes(StandardCharsets.UTF_8);
return ingressClient.flush(buffer, path, false, null,
null, null, encryptionAdapter, getTestTracingContext(fs, false));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ public void testWriteAfterBreakLease() throws Exception {
fs.registerListener(null);
LambdaTestUtils.intercept(IOException.class, client instanceof AbfsBlobClient
? ERR_LEASE_EXPIRED_BLOB : ERR_LEASE_EXPIRED, () -> {
out.write(1);
out.hsync();
out.write(2);
out.close();
return "Expected exception on write after lease break but got " + out;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
*/
package org.apache.hadoop.fs.azurebfs;

import java.io.IOException;

import org.junit.Assume;
import org.junit.Test;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AbfsRestOperationException;
import org.apache.hadoop.fs.azurebfs.services.AbfsClient;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.azurebfs.services.AuthType;

import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.AZURE_CREATE_REMOTE_FILESYSTEM_DURING_INITIALIZATION;
Expand All @@ -47,16 +48,12 @@ public void testWithWrongSharedKey() throws Exception {
String secret = "XjUjsGherkDpljuyThd7RpljhR6uhsFjhlxRpmhgD12lnj7lhfRn8kgPt5"
+ "+MJHS7UJNDER+jn6KP6Jnm2ONQlm==";
config.set(configkKey, secret);

AbfsClient abfsClient = this.getFileSystem(config).getAbfsClient();
intercept(AbfsRestOperationException.class,
intercept(IOException.class,
"\"Server failed to authenticate the request. Make sure the value of "
+ "Authorization header is formed correctly including the "
+ "signature.\", 403",
() -> {
abfsClient
.getAclStatus("/", getTestTracingContext(getFileSystem(), false));
FileSystem.newInstance(config);
});
}

}