Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8983345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:49:09+00:00 2026-06-15T20:49:09+00:00

I have an application to transfer data from remote systems to HDFS using map

  • 0

I have an application to transfer data from remote systems to HDFS using map reduce . I however am lost when I have to deal with isues like network failure .. That is , when a connection from remote data source is lost and data is no longer accessible to my mapreduce application. I can always restart the job but when data is huge then restarting is an expensive option . I know the mapreduce would create temp folder but will it put data there ? Can I read that data out and then Can I somehow start reading the rest of the data ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:49:10+00:00Added an answer on June 15, 2026 at 8:49 pm

    A mapreduce job can write arbitrary files, not only the ones managed by Hadoop.

    Configuration conf = new Configuration();
    FileSystem fs = FileSystem.get(conf);
    out = fs.create(new Path(fileName));
    

    using this code you create arbitrary files which work like normal files in the local filesystem. Then, you manage connection exceptions such that when a source is unaccessible you nicely close the file and record somewhere (e.g. in HDFS itself) that happened an interruption and at which point.
    In the case of FTP, you could write just the list of file paths and folders. When a job finish to download a file, write its path on the downloaded list, and when an entire folder is downloaded write the folder path, so in case of resume you will not have to traverse a directory content to check that all files were downloaded.

    At the program startup, on the other hand, it will check this file to decide whether the previous attempt failed and, in case, where to start the download.

    In general, Hadoop will kill your program if it’s not writing/reading anything for a timeout. Your application can tell it to wait but in general is not good to have an idle job, so it’s better to end the job nicely instead that waiting for the network to work again.

    You can also create your own filewriter, this way:

    conf.setOutputFormat(MyOwnOutputFormat.class);
    

    your filewriter could save its own temporary files in the format you prefer, so if the application crashes you know how files are saved.
    HDFS saves files with chunks of 64MB by default, and when a job fails you may not even have a temporary file unless you use your own writer.

    This is a generic solution, it depends on which is the source of data (ftp, samba, http…) and its support to download resumes.

    EDIT: in case of FTP, you could just use csync to syncronize a FTP server with your local filesystem, and hdfs-fuse to mount a HDFS filesystem. It works when you have many small files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an application which gets the data from a MS SQL database residing
I am using Named Pipes to transfer data from a client (C++) to a
I am writing a data transfer application using a servlet and would like to
I have been checking on the site for a way to transfer data from
I have a Flex application that needs to grab reporting data from a JasperReports
Iam beginner to windows services , i have a console application to transfer files
I have application with needs to have access to some sensitive data(in this case
I have the calendar.ics file. I have to read that file from my application
I have a XULRunner application that needs to copy image data to the clipboard.
I'm writing a network file transfer application. Using Lazy ByteString as a intermediate import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.