DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Building Data Pipelines: Here's What Palantir Foundry Did That Surprised Me.
  • Setting Up a Data Catalog With Azure Purview and Collibra: What Three Attempts Taught Me
  • Hadoop on AmpereOne Reference Architecture
  • From 13,000 to 20,000+ Endpoints: Architecting Forensics for the Remote Workforce

Trending

  • The Real Cost of Change in Software Development
  • AI Agents and Frontier Models: Insights From The Neuron
  • Giving AI Agents Safe Access to Legacy Systems: Introducing legacy2mcp
  • Evals in CI: How to Catch Agent Regressions Before Production Does

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Coding
  3. Tools
  4. Migrate HDFS Data to Azure

Migrate HDFS Data to Azure

A developer and Hadoop expert runs through the processes he and his team used to transfer their data over network with TLS encryption when switching to Azure.

By 
Radhika Mekala
·
Apr. 23, 21 · Analysis
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
8.6K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

During the middle of last year, my team decided to move our Hadoop workloads to Azure, including our data and applications. This article provides some of the best practices we used in migrating on-premises HDFS data to Azure HDInsight. Mentioned below are two approaches that we adopted to transfer the data over network with TLS encryption.

Method 1

The ExpressRoute Azure service uses a private connection between Azure and on-premise data centers (ExpressRoute offers higher security, reliability, and speeds with lower latencies than typical connections over the Internet). We took advantage of Data Factory's native data copy functionality using the integration runtime to migrate the data. Data Factory's self-hosted integration runtime (SHIR) should be installed on a pool of Windows VMs on an Azure virtual network. The VMs can be scaled out to multiple VMs to fully utilize network and storage IOPS or bandwidth.


This approach is recommended when there is a need to migrate huge amounts of data (i.e. data volume > 50 GB) for legacy applications.

Method 2

Transfer your data to Azure storage over a regular internet connection using any one of several tools, such as: AzCopy, Azure PowerShell, and Azure CLI.

This approach is used to copy smaller volumes of data (i.e. 2-5 GB or less), or, for ad-hoc purposes, PoC environment data, or to transfer data to Azure that does not involve any transformations.

Example 1: 

Shell
 




x


 
1
azcopy copy  '<local-directory-path>' 'https://<storage-account-name>.file.core.windows.net/<file-share-name>' --recursive


The above azcopy command copies an entire directory (recursively) using azcopy and all the underlying files in that directory to an Azure container. The result is a directory in the Azure container by the same name.

Example 2:

Shell
 




xxxxxxxxxx
1


 
1
az storage fs file upload -s "C:\myFolder\upld.txt " -p    testdir/upld.txt  -f testcont --account-name teststorgeaccount  --auth-mode login


The above az cli command uploads a file named upld.txt from the local file system to a directory testdir in an Azure container named testcon under the storage account teststorgeaccount.

Example 3:

PowerShell
 




xxxxxxxxxx
1
11


 
1
$contxt = New-AzStorageContext -StorageAccountName '<storage-account-name>' -StorageAccountKey '<storage-account-key>'
2

          
3
$localSrcFile =  "upld.txt"
4

          
5
$containerName = "testcont"
6

          
7
$dirname = "testdir/"
8

          
9
$destPath = $dirname + (Get-Item $localSrcFile).Name
10

          
11
New-AzDataLakeGen2Item -Context $contxt -FileSystem $containerName -Path $destPath -Source $localSrcFile -Force


The above set of PowerShell commands uploads a file named upld.txt from the local file system to a   directory called testdir in the Azure container named testconr.

Data (computing) azure hadoop File system

Opinions expressed by DZone contributors are their own.

Related

  • Building Data Pipelines: Here's What Palantir Foundry Did That Surprised Me.
  • Setting Up a Data Catalog With Azure Purview and Collibra: What Three Attempts Taught Me
  • Hadoop on AmpereOne Reference Architecture
  • From 13,000 to 20,000+ Endpoints: Architecting Forensics for the Remote Workforce

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook