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
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Automate Azure Databricks Unity Catalog Permissions at the Schema Level
  • How to Enable Azure Databricks Lakehouse Monitoring Through Scripts
  • How to Identify Bottlenecks and Increase Copy Activity Throughput in Azure Data Factory
  • 12 Expert Tips for Secure Cloud Deployments

Trending

  • Is Agile Right for Every Project? When To Use It and When To Avoid It
  • Memory Leak Due to Time-Taking finalize() Method
  • AWS to Azure Migration: A Cloudy Journey of Challenges and Triumphs
  • Unlocking AI Coding Assistants: Generate Unit Tests
  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 user avatar
Radhika Mekala
·
Apr. 23, 21 · Analysis
Likes (3)
Comment
Save
Tweet
Share
8.0K Views

Join the DZone community and get the full member experience.

Join For Free

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

  • Automate Azure Databricks Unity Catalog Permissions at the Schema Level
  • How to Enable Azure Databricks Lakehouse Monitoring Through Scripts
  • How to Identify Bottlenecks and Increase Copy Activity Throughput in Azure Data Factory
  • 12 Expert Tips for Secure Cloud Deployments

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!