Scenario: Sqoop import/export command fails for usernames greater than 20 characters in Azure HDInsight ESP clusters

This article describes a known issue and workaround when using Azure HDInsight ESP (Enterprise Security Pack) enabled clusters using ADLS Gen2 (ABFS) storage account.


When you run sqoop import/export command, it fails with the error for some users:

ERROR tool.ImportTool: Import failed:
The ownership on the staging directory /user/yourlongdomainuserna/.staging isn't as expected. 
It is owned by yourlongdomainusername.
The directory must be owned by the submitter yourlongdomainuserna or yourlongdomainuserna@AADDS.CONTOSO.COM

In the example, /user/yourlongdomainuserna/.staging displays the truncated 20 character username for the username yourlongdomainusername.


The length of the username exceeds 20 characters in length.

Refer to How objects and credentials are synchronized in an Azure Active Directory Domain Services managed domain for further details.


Use a username less than or equals to 20 characters.

Next steps

If you didn't see your problem or are unable to solve your issue, visit one of the following channels for more support:

  • Get answers from Azure experts through Azure Community Support.

  • Connect with @AzureSupport - the official Microsoft Azure account for improving customer experience. Connecting the Azure community to the right resources: answers, support, and experts.

  • If you need more help, you can submit a support request from the Azure portal. Select Support from the menu bar or open the Help + support hub. For more detailed information, review How to create an Azure support request. Access to Subscription Management and billing support is included with your Microsoft Azure subscription, and Technical Support is provided through one of the Azure Support Plans.