The Append method of filesystem in Hadoop

Source: Internet
Author: User

Today in the append operation times of filesystem with Hadoop 1.1.2 The following exception is available:

1  Org.apache.hadoop.ipc.RemoteException:java.io.IOException:Append is not supported. Please see the dfs.support.append configuration parameter.

Google a bit, found that the Hadoop 1.x version does not support filesystem append operation, the official Hadoop 1.1.2 Release Notes are as follows:

      • HADOOP-8230. Major improvement reported by ELI2 and fixed by Eli
        Enable Sync by default and disable append
        Append is not supported in Hadoop 1.x. Upgrade to 2.x if you need append. If you are enabled dfs.support.append for HBase, you ' re OK, as durable sync (why HBase required dfs.support.append) are now ENA Bled by default. If you really need the previous functionality, to turn on the Append functionality set the flag "Dfs.support.broken.append "To true.

The above explanation clearly mentions that if you need to use the append operation, you need to upgrade to the Hadoop 2.x version. And you need to include the following configuration in the Conf hdfs.site.xml file:

 <  property  >  2  <  name  >  dfs.support.append</ name      >  3  <  value  >  true</ value  >  4   Property  >   

The Hadoop API also provides settings to support the content append, the code is as follows:

1 New Configuration (); 2 true);

However, appending content to an existing file is an appropriate operation for the following reasons:

"Raghava Mail reply:" In Short, appendsinchHDFS is extremely experimental anddangerous. Most would advise toLeave this disabled. Your best option for "Append"Like behavior are toRewrite the file with Newcontent being added at theEnd. Append support was briefly introduced and  ThenRemoved asa number ofIssues came up. I believe theOpen(parent) JIRA issue tracking this is:http://issues.apache.org/jira/browse/hdfs-265

If you want to delve into its reasons, you can refer to the website: http://issues.apache.org/jira/browse/HDFS-265

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.