hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fengdong Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4956) DistributedFileSystem does not handle CreateFlag.APPEND in create call
Date Thu, 04 Jul 2013 02:09:20 GMT

    [ https://issues.apache.org/jira/browse/HDFS-4956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13699710#comment-13699710
] 

Fengdong Yu commented on HDFS-4956:
-----------------------------------

{code}
  @Override
  public HdfsDataOutputStream create(Path f, FsPermission permission,
      boolean overwrite, int bufferSize, short replication, long blockSize,
      Progressable progress) throws IOException {
    return this.create(f, permission,
        overwrite ? EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE)
            : EnumSet.of(CreateFlag.CREATE), bufferSize, replication,
        blockSize, progress, null);
  }
{code}


yes, It seems only fix in DistributedFileSystem and DFSClient, because FSNamesystem has been
considered it.

startFileInternal
{code}
    boolean overwrite = flag.contains(CreateFlag.OVERWRITE);
    boolean append = flag.contains(CreateFlag.APPEND);
    if (isPermissionEnabled) {
      if (append || (overwrite && myFile != null)) {
        checkPathAccess(pc, src, FsAction.WRITE);
      } else {
        checkAncestorAccess(pc, src, FsAction.WRITE);
      }
    }

    if (!createParent) {
      verifyParentDir(src);
    }

    try {
      blockManager.verifyReplication(src, replication, clientMachine);
      boolean create = flag.contains(CreateFlag.CREATE);
{code}
                
> DistributedFileSystem does not handle CreateFlag.APPEND in create call
> ----------------------------------------------------------------------
>
>                 Key: HDFS-4956
>                 URL: https://issues.apache.org/jira/browse/HDFS-4956
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Suresh Srinivas
>
> Currently DistributedFileSystem does not handle CreateFlag.APPEND in the implementation
of FileSystem#create() method. It only support OVERWRITE & CREATE or just CREATE.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message