SlideShare a Scribd company logo
1 of 14
HDFS Connector
HDFS Connector
 The Anypoint Connector for the Hadoop Distributed File System (HDFS) uses as a
bi-directional gateway between Mule applications and your Apache Hadoop
instance.
PRUDHVI
Compatibility
PRUDHVI
Application/Service Version
Mule Runtime 3.6 or higher
Apache Hadoop 2.6.0 or higher
Configuring a Global Element
 To use the HDFS connector in your Mule application, you must configure a global
HDFS element that can be used by all the HDFS connectors in the application
PRUDHVI
XML
PRUDHVI
<mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns:hdfs="http://www.mulesoft.org/schema/mule/hdfs"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.mulesoft.org/schema/mule/core"
version="EE-3.6.1"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/hdfs
http://www.mulesoft.org/schema/mule/hdfs/current/mule-hdfs.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/xml
http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd">
These steps to configure a HDFS
connector in your application
 Create a global HDFS configuration outside and above your flows, using the
following global configuration code.
 <!-- Simple configuration -->
<hdfs:config nameNodeUri="${mule.HDFS.nameNodeUri}"
username="${mule.HDFS.username}"/>
PRUDHVI
Using the Connector
 HDFS connector is an operation-based connector, which means that when you add the connector to
your flow, you need to configure a specific operation for the connector to perform. The HDFS connector
currently supports the following list of operations:
 Operation
1. Append to File
2. Copy from Local File
3. Copy to Local File
4. Delete Directories
5. Delete File
6. Get Path Meta Data
7. Glob Status
8. List Status
9. Make Directories
10. Read from Path
11. Rename
12. Set Owner
13. Set Permission
14. Write to PathPRUDHVI
Example
PRUDHVI
1.Drag an HTTP connector into the canvas, then select it to open the properties editor console.
2.Add a new HTTP Listener Configuration global element:
3.Configure the following HTTP parameters:
4.Add a Logger scope to print the name of the file that needs to be created in the Mule Console. Configure the
Logger according to the table below.
5.Add a Set Payload transformer to set the message input as payload, configuring it according to the table
below.
6.Drag the HDFS connector onto the canvas, and select it to open the properties editor console.
7.Click the plus sign next to the Connector Configuration field to add a new global connector configuration.
8.Configure the global element according to the table below.
PRUDHVI
PRUDHVI
Back in the properties editor of the HDFS connector in your application, configure the remaining parameters
according to the table below.
Run the project as a Mule Application (right-click the project name and clickRun As > Mule Application).
From a browser, navigate to http://localhost:8090/path=filecreate
PRUDHVI
FLOW:
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns:hdfs="http://www.mulesoft.org/schema/mule/hdfs"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.mulesoft.org/schema/mule/core"
version="EE-3.6.1" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/hdfs http://www.mulesoft.org/schema/mule/hdfs/current/mule-
hdfs.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-
xml.xsd
http://www.mulesoft.org/schema/mule/ee/tracking
http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<hdfs:config name="hdfs-conf" nameNodeUri="<Name node URI>" username="<FileSystemPRUDHVI
<http:listener-config
name="HTTP_Listener_Configuration" host="localhost" port="8090" basePath="filecreate"
doc:name="HTTP Listener Configuration"/>
<http:connector name="HTTP_HTTPS"
cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0"
receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0"
doc:name="HTTP-HTTPS"/>
<flow name="Create_File_Flow"
doc:name="Create_File_Flow">
<http:listener config-
ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<logger message="Creating file:
#[message.inboundProperties['http.query.params'].path] with message:
#[message.inboundProperties['http.query.params'].msg]" level="INFO" doc:name="Write to Path
Log"/>
<set-payload
value="#[message.inboundProperties['http.query.params'].msg]" doc:name="Set the message input
as payload"/>
<hdfs:write config-ref="hdfs-conf"
path="#[message.inboundProperties['http.query.params'].path]" doc:name="Write to Path"/>
</flow>
</mule>PRUDHVI
Thank you
PRUDHVI

More Related Content

What's hot

Cake fest 2012 create a restful api
Cake fest 2012 create a restful apiCake fest 2012 create a restful api
Cake fest 2012 create a restful api
ceeram
 
HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
ponduse
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
wanangwa234
 

What's hot (20)

Apache ppt
Apache pptApache ppt
Apache ppt
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
slides (PPT)
slides (PPT)slides (PPT)
slides (PPT)
 
Cake fest 2012 create a restful api
Cake fest 2012 create a restful apiCake fest 2012 create a restful api
Cake fest 2012 create a restful api
 
Creating debian package in mule apps 1
Creating debian package in mule apps 1Creating debian package in mule apps 1
Creating debian package in mule apps 1
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
 
126 Golconde
126 Golconde126 Golconde
126 Golconde
 
Apache web server
Apache web serverApache web server
Apache web server
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
PHP MySQL Training : Module 3
PHP MySQL Training : Module 3PHP MySQL Training : Module 3
PHP MySQL Training : Module 3
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 
PHP MySQL Training : Module 2
PHP MySQL Training : Module 2PHP MySQL Training : Module 2
PHP MySQL Training : Module 2
 
Mule batch
Mule batchMule batch
Mule batch
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
RESTful Web Development with CakePHP
RESTful Web Development with CakePHPRESTful Web Development with CakePHP
RESTful Web Development with CakePHP
 
Session 09 - Flume
Session 09 - FlumeSession 09 - Flume
Session 09 - Flume
 
Introduction server Construction
Introduction server ConstructionIntroduction server Construction
Introduction server Construction
 
HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
 
The requested URL could not be retrieved
The requested URL could not be retrievedThe requested URL could not be retrieved
The requested URL could not be retrieved
 

Similar to Hdfs connector

APACHE
APACHEAPACHE
APACHE
ARJUN
 
Chapter5_PlatformUsersGuide
Chapter5_PlatformUsersGuideChapter5_PlatformUsersGuide
Chapter5_PlatformUsersGuide
James D. Howes
 

Similar to Hdfs connector (20)

KNOX-HTTPFS-ONEFS-WP
KNOX-HTTPFS-ONEFS-WPKNOX-HTTPFS-ONEFS-WP
KNOX-HTTPFS-ONEFS-WP
 
Mule cloudhub
Mule cloudhubMule cloudhub
Mule cloudhub
 
Cloud hub application
Cloud hub applicationCloud hub application
Cloud hub application
 
Mule cloudhub application
Mule cloudhub applicationMule cloudhub application
Mule cloudhub application
 
Cloudhub application
Cloudhub applicationCloudhub application
Cloudhub application
 
Upgrading hadoop
Upgrading hadoopUpgrading hadoop
Upgrading hadoop
 
Cloud hub
Cloud hubCloud hub
Cloud hub
 
Mule developing a cloud hub application
Mule developing a cloud hub applicationMule developing a cloud hub application
Mule developing a cloud hub application
 
APACHE
APACHEAPACHE
APACHE
 
Esm event datatransfertool
Esm event datatransfertoolEsm event datatransfertool
Esm event datatransfertool
 
Event Data Transfer Tool 1.2 User's Guide
Event Data Transfer Tool 1.2 User's GuideEvent Data Transfer Tool 1.2 User's Guide
Event Data Transfer Tool 1.2 User's Guide
 
Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
Hudson_WhitePaper
Hudson_WhitePaperHudson_WhitePaper
Hudson_WhitePaper
 
Drupal 7 Web Services Crash Course
Drupal 7 Web Services Crash CourseDrupal 7 Web Services Crash Course
Drupal 7 Web Services Crash Course
 
sveltekit-en.pdf
sveltekit-en.pdfsveltekit-en.pdf
sveltekit-en.pdf
 
R server and spark
R server and sparkR server and spark
R server and spark
 
Chapter5_PlatformUsersGuide
Chapter5_PlatformUsersGuideChapter5_PlatformUsersGuide
Chapter5_PlatformUsersGuide
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
Bigdata
BigdataBigdata
Bigdata
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 

More from prudhvivreddy

More from prudhvivreddy (20)

About Mule execution units
About Mule execution unitsAbout Mule execution units
About Mule execution units
 
Working with components
Working with componentsWorking with components
Working with components
 
About mule transformers
About mule transformersAbout mule transformers
About mule transformers
 
About jms
About jmsAbout jms
About jms
 
Webservices
WebservicesWebservices
Webservices
 
Generating the mule flow as html document
Generating the mule flow as html documentGenerating the mule flow as html document
Generating the mule flow as html document
 
Sftp connector
Sftp connectorSftp connector
Sftp connector
 
Imap connector
Imap connectorImap connector
Imap connector
 
Ftp connector
Ftp connectorFtp connector
Ftp connector
 
Ajax connector
Ajax connectorAjax connector
Ajax connector
 
Basic example using vm component
Basic example using vm componentBasic example using vm component
Basic example using vm component
 
Basic example using until successful component
Basic example using until successful componentBasic example using until successful component
Basic example using until successful component
 
Basic example using message properties component
Basic example using message properties componentBasic example using message properties component
Basic example using message properties component
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 
Basic example using database component
Basic example using database componentBasic example using database component
Basic example using database component
 
Basic example using choice component
Basic example using choice componentBasic example using choice component
Basic example using choice component
 
Basic example using file connector in anypoint studio
Basic example using file connector in anypoint studioBasic example using file connector in anypoint studio
Basic example using file connector in anypoint studio
 
Basic example using quartz component in anypoint studio
Basic example using quartz component in anypoint studioBasic example using quartz component in anypoint studio
Basic example using quartz component in anypoint studio
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 
Salesforce connector Example
Salesforce connector ExampleSalesforce connector Example
Salesforce connector Example
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Hdfs connector