Description
Describe the bug
invalid wasb credentials taking 13-14 minutes to execute. from 5.x this issue is happening. till 5.0.0 its working as expected
Exception or Stack Trace
Getting correct error but it is taking time
To Reproduce
Steps to reproduce the behavior:
Code Snippet
public static void main(String[] args) {
// Replace with your Azure Storage account name and key
String accountName = "";
String accountKey = "";
// Replace with the path you want to access
String wasbPath = "";
Configuration conf = new Configuration();
// Set the configuration for Azure Blob Storage
conf.set("fs.azure", "org.apache.hadoop.fs.azure.NativeAzureFileSystem");
conf.set("fs.azure.account.key." + accountName + ".blob.core.windows.net", accountKey);
long startTime = 0;
try {
startTime = System.currentTimeMillis();
// Get the FileSystem object
FileSystem fs = FileSystem.get(new URI(wasbPath), conf);
// Create a Path object for the file
Path path = new Path(wasbPath);
// Check if the file exists
if (fs.exists(path)) {
// Read the file
BufferedReader br = new BufferedReader(new InputStreamReader(fs.open(path)));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
br.close();
} else {
System.out.println("File does not exist");
}
// Close the FileSystem object
fs.close();
} catch (Exception e) {
long endTime = System.currentTimeMillis();
long executionTimeInMillis = endTime - startTime;
double executionTimeInMinutes = executionTimeInMillis / (1000.0 * 60.0);
System.out.println("Execution time: " + executionTimeInMinutes + " minutes");
e.printStackTrace();
}
}``
Expected behavior
It should fail immediately
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
- OS: [e.g. iOS]
- IDE: [e.g. IntelliJ]
- Library/Libraries:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-azure</artifactId>
<version>3.2.2</version>
<exclusions>
<exclusion>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
</exclusion>
</exclusions>
</dependency>
Storage dependency
com.microsoft.azure azure-storage 5.1.0
- Java version: 11
If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError
, NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:
- verbose dependency tree (
mvn dependency:tree -Dverbose
) - exception message, full stack trace, and any available logs
Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added