Windows Share + Nifi + HDFS – A Practical Guide

Windows Share + Nifi + HDFS – A Practical Guide

Recently I had a client ask about how would we go about connecting a windows share to Nifi to HDFS, or if it was even possible. This is how you build a working proof of concept to demo the capabilities!

You will need two Servers or Virtual machines. One for windows, one for Hadoop + Nifi. I personally elected to use these two

You then need to install nifi on the sandbox, I find this repo to be the easiest to follow. https://github.com/abajwa-hw/ambari-nifi-service

Be sure the servers can talk to each other directly, I personally used a bridged network connection in virtual box and looked up the IPs on my router's control panel.

Next you need to setup a windows share of some format. This can be combined with active directory but I personally just enabled guest accounts and made an account called Nifi_Test. These instructions were the basis of creating a windows sharehttps://emby.media/community/index.php?/topic/703-how-to-make-unc-folder-shares/ Keep in mind network user permissions may get funky and the example above will enforce a read only permission unless you do additional work.

Now you have mount the share into the hadoop machine using CIFs+Samba. The instructions I followed are herehttps://blog.zwiegnet.com/linux-server/mounting-windows-share-on-centos/

Finally we are able to setup nifi to read the mounted drive and post it to HDFS. The GetFile processor retrieves the files while the PutHDFS stores it.

To configure HDFS for the incoming data I ran the following commands on the sandbox: "su HDFS" ; “Hadoop dfs -mkdir /user/nifi” ; “Hadoop dfs -chmod 777 /user/nifi”

I elected to keep the source file for troubleshooting purposes so that every time the processor ran it would just stream the data in.

GetFile Configuration

The PutHDFS Configuration for sandbox

And finally run it and confirm it lands in HDFS!




Henry Sowell

GVP of Technology Solutions | Executive Leadership | AI, Data, Cloud, and Technology Strategy

8 年

Nice Chris!

回复

要查看或添加评论,请登录

Chris Gambino的更多文章

  • NiFi and Retrieval Augmented Generation

    NiFi and Retrieval Augmented Generation

    Phase 1 – “Basic Knowledge” We built a real time slackbot to help answer NiFi questions. To build and host this…

    1 条评论
  • Cloud First IoT with Syft

    Cloud First IoT with Syft

    Introduction Syft Technologies is a leading scientific equipment manufacturer specializing in chemical analysis. To…

  • A Crash Course for Amazon Natural Language Processing

    A Crash Course for Amazon Natural Language Processing

    Over the past few years we have seen a rise in cloud native “machine learning” models. These general use models are…

  • What I Learned from 2.75 Million Bike Rides

    What I Learned from 2.75 Million Bike Rides

    What do you think is the most popular bicycle spot is in San Francisco? I’ll give you a hint, over 129,000 people…

  • Moving Data to the Cloud - A Practical Guide

    Moving Data to the Cloud - A Practical Guide

    Moving data to the cloud is one of the cornerstones of any cloud migration. Having worked with both on-premise and…

    2 条评论
  • Automated Data Collection with NiFi

    Automated Data Collection with NiFi

    Introduction Manufacturing is a field that is undergoing a complete transformation in the era of faster and more…

    2 条评论
  • Create A Restful API for Nifi, Walmart Case Study

    Create A Restful API for Nifi, Walmart Case Study

    I was recently tinkering with the walmart rest-api. This is publicly available interface and can be used for a quick…

  • Parsing XML Logs With Nifi – Part 1 of 3

    Parsing XML Logs With Nifi – Part 1 of 3

    I have a plan to write a 3 part “intro” series as to how to handle your XML files. The subjects will be: Basic XML and…

    1 条评论
  • Integrating Nifi with Graylog

    Integrating Nifi with Graylog

    Graylog is gaining popularity as a log exploration tool. So this begs the question, how do you intelligently route your…

    1 条评论
  • Building a Smarter Home with Nifi and Spark

    Building a Smarter Home with Nifi and Spark

    I submitted an abstract for the hadoop world summit. Check it out and vote for it here Join us as we discuss what life…

    2 条评论

社区洞察

其他会员也浏览了