Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-411

parameter dfs.replication is not reflected when put file into hadoop with fuse-dfs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • os:centos5.2
      cpu:amd64
      hadoop0.19.0

    Description

      the $HADOOP_CONF_DIR is exist in the $CLASSPATH
      and the dfs.replication is set to 3 with the following in hadoop-site.xml
      <property>
      <name>dfs.replication</name>
      <value>1</value>
      </property>

      The file's replication is 3 when it be put into hadoop.

      I think the reason is :
      there is a hardcoding in the src\contrib\fuse-dfs\src\fuse_dfs.c 

      line 1337
      if ((fh->hdfsFH = (hdfsFile)hdfsOpenFile(fh->fs, path, flags, 0, 3, 0)) == NULL) {
      line 1591
      if ((file = (hdfsFile)hdfsOpenFile(userFS, path, flags, 0, 3, 0)) == NULL) {

      the fifth parameter is a hardcoding when call the function of hdfsOpenFile.

      It is should set to 0. It is as follows.
      line 1337
      if ((fh->hdfsFH = (hdfsFile)hdfsOpenFile(fh->fs, path, flags, 0, 0, 0)) == NULL) {
      line 1591
      if ((file = (hdfsFile)hdfsOpenFile(userFS, path, flags, 0, 0, 0)) == NULL) {

      Attachments

        1. HADOOP-4877.txt.trunk
          1 kB
          Craig Macdonald
        2. HADOOP-4877.txt.0.19
          0.8 kB
          weimin zhu

        Activity

          People

            Unassigned Unassigned
            chinashuimin weimin zhu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: