Yiqun Lin created HDDS-3058:
-------------------------------

             Summary: OzoneFileSystem should override unsupported set type 
FileSystem API
                 Key: HDDS-3058
                 URL: https://issues.apache.org/jira/browse/HDDS-3058
             Project: Hadoop Distributed Data Store
          Issue Type: Improvement
          Components: Ozone Filesystem
    Affects Versions: 0.4.1
            Reporter: Yiqun Lin
            Assignee: Yiqun Lin


Currently, OzoneFileSystem only implements some common useful FileSystem APIs 
and most of other API are not supported and inherited from parent class 
FileSystem by default. However, FileSystem do nothing in some set type method, 
like setReplication, setOwner. 

{code}
 public void setVerifyChecksum(boolean verifyChecksum) {
    //doesn't do anything
  }

  public void setWriteChecksum(boolean writeChecksum) {
    //doesn't do anything
  }

  public boolean setReplication(Path src, short replication)
    throws IOException {
    return true;
  }

  public void setPermission(Path p, FsPermission permission
      ) throws IOException {
  }

  public void setOwner(Path p, String username, String groupname
      ) throws IOException {
  }

  public void setTimes(Path p, long mtime, long atime
      ) throws IOException {
  }
{code}

This set type functions depend on the sub-filesystem implementation. We need to 
to throw unsupported exception if sub-filesystem cannot support this. 
Otherwise, it will make users confused to use hadoop fs -setrep command or call 
setReplication api. Users will not see any exception but the command can 
execute fine. This is happened when I tested for the OzoneFileSystem via hadoop 
fs command way.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to