Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

invalid wasb credentials taking 13-14 minutes to execute  #590

Description

@muskaan62

Which service(blob, file, queue, table) does this issue concern?

Blob/file

Which version of the SDK was used?

from 5.x this issue is happening. till 5.0.0 its working as expected

What problem was encountered?

The execution is taking 14 minutes to complete when give invalid access key

Have you found a mitigation/solution?

No i haven't found a solution, As i am using hadoop file system and the latest 11/12 version are not compatible with hadoop we cant use those.
Steps to reproduce

` 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();
    }
}`

Hadoop Dependency

<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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions