HADOOP-16074. WASB: Update container not found error code.
Contributed by Da Zhou.
This commit is contained in:
parent
9ace37b119
commit
ba9efe06fa
|
@ -70,7 +70,7 @@ import com.microsoft.azure.storage.RetryNoRetry;
|
|||
import com.microsoft.azure.storage.StorageCredentials;
|
||||
import com.microsoft.azure.storage.StorageCredentialsAccountAndKey;
|
||||
import com.microsoft.azure.storage.StorageCredentialsSharedAccessSignature;
|
||||
import com.microsoft.azure.storage.StorageErrorCode;
|
||||
import com.microsoft.azure.storage.StorageErrorCodeStrings;
|
||||
import com.microsoft.azure.storage.StorageException;
|
||||
import com.microsoft.azure.storage.Constants;
|
||||
import com.microsoft.azure.storage.StorageEvent;
|
||||
|
@ -1336,7 +1336,7 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
|
|||
container.downloadAttributes(getInstrumentedContext());
|
||||
currentKnownContainerState = ContainerState.Unknown;
|
||||
} catch (StorageException ex) {
|
||||
if (StorageErrorCode.RESOURCE_NOT_FOUND.toString()
|
||||
if (StorageErrorCodeStrings.CONTAINER_NOT_FOUND.toString()
|
||||
.equals(ex.getErrorCode())) {
|
||||
currentKnownContainerState = ContainerState.DoesntExist;
|
||||
} else {
|
||||
|
|
|
@ -119,9 +119,6 @@ public class ITestContainerChecks extends AbstractWasbTestWithTimeout {
|
|||
}
|
||||
assertFalse(container.exists());
|
||||
|
||||
// Create a container outside of the WASB FileSystem
|
||||
container.create();
|
||||
|
||||
// Write should succeed
|
||||
assertTrue(fs.createNewFile(new Path("/foo")));
|
||||
assertTrue(container.exists());
|
||||
|
@ -165,9 +162,6 @@ public class ITestContainerChecks extends AbstractWasbTestWithTimeout {
|
|||
assertFalse(fs.rename(foo, bar));
|
||||
assertFalse(container.exists());
|
||||
|
||||
// Create a container outside of the WASB FileSystem
|
||||
container.create();
|
||||
|
||||
// But a write should.
|
||||
assertTrue(fs.createNewFile(foo));
|
||||
assertTrue(container.exists());
|
||||
|
|
Loading…
Reference in New Issue