In ADF using HDFS linked service my copy file activity throws the following error

Ács Dániel 25 Reputation points
2024-03-28T10:07:15.1766667+00:00

Hi,

I have an issue using ADF with HDFS linked service.

I created a HDFS connection then a copy acitivity from HDFS to Azure Data Lake gen2. The source is a CSV file and the copy format is binary. When I run the pipeline I get the following error:

Operation on target Copy_cf8 failed: ErrorCode=UserErrorFailedFileOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The file operation is failed, upload file failed at path: 'FOLDER1/hdfs/TEST_DATA0.csv'.,Source=Microsoft.DataTransfer.Common,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read a 'Hdfs' file. File path: 'PATH/TO_THE_FOLDER/TEST_DATA0.csv'. Response details: '{}'.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentNullException,Message=Value cannot be null.

Parameter name: uriString,Source=System,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read a 'Hdfs' file. File path: 'PATH/TO_THE_FOLDER/TEST_DATA0.csv'. Response details: '{}'.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentNullException,Message=Value cannot be null.

Parameter name: uriString,Source=System,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read a 'Hdfs' file. File path: 'PATH/TO_THE_FOLDER/TEST_DATA0.csv'. Response details: '{}'.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentNullException,Message=Value cannot be null.

Parameter name: uriString,Source=System,'

Thanks in advance,

Daniel

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,343 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,129 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,370 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,545 questions
{count} vote

Accepted answer
  1. phemanth 5,735 Reputation points Microsoft Vendor
    2024-04-15T17:09:42.9266667+00:00

    @Ács Dániel Welcome to Microsoft Q&A platform and thanks for posting your question.

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others "I'll repost your solution in case you'd like to accept the answer.

    Ask: I have an issue using ADF with HDFS linked service.

    I created a HDFS connection then a copy acitivity from HDFS to Azure Data Lake gen2. The source is a CSV file and the copy format is binary. When I run the pipeline I get the following error:

    Operation on target Copy_cf8 failed: ErrorCode=UserErrorFailedFileOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The file operation is failed, upload file failed at path: 'FOLDER1/hdfs/TEST_DATA0.csv'.,Source=Microsoft.DataTransfer.Common,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read a 'Hdfs' file. File path: 'PATH/TO_THE_FOLDER/TEST_DATA0.csv'. Response details: '{}'.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentNullException,Message=Value cannot be null.

    Parameter name: uriString,Source=System,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read a 'Hdfs' file. File path: 'PATH/TO_THE_FOLDER/TEST_DATA0.csv'. Response details: '{}'.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentNullException,Message=Value cannot be null.

    Parameter name: uriString,Source=System,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to read a 'Hdfs' file. File path: 'PATH/TO_THE_FOLDER/TEST_DATA0.csv'. Response details: '{}'.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.ArgumentNullException,Message=Value cannot be null.

    Parameter name: uriString,Source=System,'

    Solution: Hello, I just wanted to say thank you for your effort, we have successfully solved the problem with the following fix:

    {
    
    "name": "hdfs_connection_service",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "annotations": [],
        "type": "Hdfs",
        "typeProperties": {
            "url": "https://hdfsnode.domain.com:14000/webhdfs/v1/",
            "authenticationType": "Windows",
            "userName": "user@corp.domain.com",
            "encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiJmYjJjODk3Yi03NDNlLTQ0NzAtOGFiNy1iYTg0ZTk1MzBmZmEiLCJWZXJzaW9uIjoiMi4wIiw"
            "avoidRedirect": "true"  #<-This line here fixed our problem
        },
        "connectVia": {
            "referenceName": "shir",
            "type": "IntegrationRuntimeReference"
        }
    }
    }
    

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ács Dániel 25 Reputation points
    2024-04-15T13:32:07.8033333+00:00

    @phemanth

    Hello, I just wanted to say thank you for your effort, we have successfully solved the problem with the following fix:

    {

    "name": "hdfs_connection_service",
    
    "type": "Microsoft.DataFactory/factories/linkedservices",
    
    "properties": {
    
        "annotations": [],
    
        "type": "Hdfs",
    
        "typeProperties": {
    
            "url": "https://hdfsnode.domain.com:14000/webhdfs/v1/",
    
            "authenticationType": "Windows",
    
            "userName": "user@corp.domain.com",
    
            "encryptedCredential": "eyJDcmVkZW50aWFsSWQiOiJmYjJjODk3Yi03NDNlLTQ0NzAtOGFiNy1iYTg0ZTk1MzBmZmEiLCJWZXJzaW9uIjoiMi4wIiw"
    
            "avoidRedirect": "true"  #<-This line here fixed our problem
    
        },
    
        "connectVia": {
    
            "referenceName": "shir",
    
            "type": "IntegrationRuntimeReference"
    
        }
    
    }
    

    }

    Best Regards,

    Daniel