upload files from local computer to sandbox

to create new topics or reply. | New User Registration

This topic contains 1 reply, has 2 voices, and was last updated by  Dave 1 year, 9 months ago.

  • Creator
    Topic
  • #38709

    Matt Workman
    Participant

    Hi, I am new to Hadoop and HDP so please forgive my basic question. I am trying to load a text file from my local computer to the HDP 1.3 Sandbox VM. I am trying to use PIG to do this. Here is the command:

    fs -copyFromLocal file://c:\temp\REST_Log.txt hdfs://sandbox:8020/user/hue/

    The error I am getting is here:

    copyFromLocal: Can not create a Path from an empty string

    So my question is how can I format my command to make this work? Is PIG the right thing to use to do this? Is there some other way I can accomplish this?

    My end goal is to create a script that will pull CSV files from a network path and load them into HDFS on my sandbox.

    Thanks for your help and time!!

    Matt

Viewing 1 replies (of 1 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #38906

    Dave
    Moderator

    Hi Matt,

    CopyFromLocal is not going to work here as this is direct from the FileSystem. You would need to write a java programme which calls HDFS so you can run this locally (along with having the JAR files locally)
    You’re easiest way would be to write a pig script as you have done which loads the files from a directory and sftp the files from your local desktop to there.

    I hope this makes sense,

    Thanks

    Dave

    Collapse
Viewing 1 replies (of 1 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.