Skip to content

Commit 72bce77

Browse files
committed
find cpk
1 parent 944eaca commit 72bce77

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemBackCompat.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import org.apache.hadoop.fs.FileStatus;
3030
import org.apache.hadoop.fs.Path;
3131

32+
import java.util.UUID;
33+
3234
/**
3335
* Test AzureBlobFileSystem back compatibility with WASB.
3436
*/
@@ -50,13 +52,17 @@ public void testBlobBackCompat() throws Exception {
5052
CloudBlobContainer container = blobClient.getContainerReference(this.getFileSystemName());
5153
container.createIfNotExists();
5254

53-
CloudBlockBlob blockBlob = container.getBlockBlobReference("test/10/10/10");
55+
String testPath = "test" + UUID.randomUUID();
56+
CloudBlockBlob blockBlob = container
57+
.getBlockBlobReference(testPath + "/10/10/10");
5458
blockBlob.uploadText("");
5559

56-
blockBlob = container.getBlockBlobReference("test/10/123/3/2/1/3");
60+
blockBlob = container.getBlockBlobReference(testPath + "/10/123/3/2/1/3");
5761
blockBlob.uploadText("");
5862

59-
FileStatus[] fileStatuses = fs.listStatus(new Path("/test/10/"));
63+
System.out.println(new Path(String.format("%s/10/", testPath)));
64+
FileStatus[] fileStatuses = fs
65+
.listStatus(new Path(String.format("/%s/10/", testPath)));
6066
assertEquals(2, fileStatuses.length);
6167
assertEquals("10", fileStatuses[0].getPath().getName());
6268
assertTrue(fileStatuses[0].isDirectory());

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemRenameUnicode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ public ITestAzureBlobFileSystemRenameUnicode() throws Exception {
7676
@Test
7777
public void testRenameFileUsingUnicode() throws Exception {
7878
final AzureBlobFileSystem fs = getFileSystem();
79-
Path folderPath1 = new Path(srcDir);
79+
Path folderPath1 = path(srcDir);
8080
assertMkdirs(fs, folderPath1);
8181
assertIsDirectory(fs, folderPath1);
8282
Path filePath = new Path(folderPath1 + "/" + filename);
8383
touch(filePath);
8484
assertIsFile(fs, filePath);
8585

86-
Path folderPath2 = new Path(destDir);
86+
Path folderPath2 = path(destDir);
8787
assertRenameOutcome(fs, folderPath1, folderPath2, true);
8888
assertPathDoesNotExist(fs, "renamed", folderPath1);
8989
assertIsDirectory(fs, folderPath2);

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestCustomerProvidedKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public ITestCustomerProvidedKey() throws Exception {
106106
@Test
107107
public void testReadWithCPK() throws Exception {
108108
final AzureBlobFileSystem fs = getAbfs(true);
109-
String fileName = path("/" + methodName.getMethodName()).toString();
109+
String fileName = "/" + methodName.getMethodName();
110110
createFileAndGetContent(fs, fileName, FILE_SIZE);
111111

112112
AbfsClient abfsClient = fs.getAbfsClient();

0 commit comments

Comments
 (0)