[ 
https://issues.apache.org/jira/browse/HADOOP-17921?focusedWorklogId=653044&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-653044
 ]

ASF GitHub Bot logged work on HADOOP-17921:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Sep/21 15:25
            Start Date: 20/Sep/21 15:25
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on pull request #3463:
URL: https://github.com/apache/hadoop/pull/3463#issuecomment-923030940


   >     1. Is the current behaviour actually causing a problem?
   > 
   >     2. Have you looked at all the implementations of fs.getXAttrs() and 
verified that they always throw UnsupportedOperationException if unsupported.
   > 
   > 
   > I can see from a purism perspective this is the correct thing to do. But I 
worry that changing it now will break things.
   > 
   > After all, if an IOE is raised here for some reason (network, auth etc) 
distcp will go on to fail shortly afterwards
   
   Thanks for the review @steveloughran !!
   
   1) Yes, experienced recently this exception:
   
   021-08-02 10:05:17,150 ERROR org.apache.hadoop.tools.DistCp: 
[Thread-1973153]: XAttrs not supported on at least one file system: 
   org.apache.hadoop.tools.CopyListing$XAttrsNotSupportedException: XAttrs not 
supported for file system: hdfs://someNN_host.tests.cloudera.com:8020
        at 
org.apache.hadoop.tools.util.DistCpUtils.checkFileSystemXAttrSupport(DistCpUtils.java:513)
 ~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at 
org.apache.hadoop.tools.CopyListing.validateFinalListing(CopyListing.java:202) 
~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at 
org.apache.hadoop.tools.CopyListing.buildListing(CopyListing.java:93) 
~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at 
org.apache.hadoop.tools.DistCp.createInputFileListing(DistCp.java:379) 
~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at org.apache.hadoop.tools.DistCp.prepareFileListing(DistCp.java:96) 
~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at org.apache.hadoop.tools.DistCp.createAndSubmitJob(DistCp.java:216) 
~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at org.apache.hadoop.tools.DistCp.execute(DistCp.java:193) 
~[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
        at org.apache.hadoop.tools.DistCp.run(DistCp.java:155) 
[hadoop-distcp-3.1.1.7.1.7.0-392.jar:?]
   
   
   Didn't expect this call to fail for hdfs. And the only reason I could think 
of is the improper exception handling. It could probably be an intermittent 
network issue or so in this case.
   
   
   2) The default behavior in FileSystem.java is to throw 
UnsupportedOperationException. Couldn't notice any override where it is 
silently ignored.
   
   /**
      * Get all of the xattr name/value pairs for a file or directory.
      * Only those xattrs which the logged-in user has permissions to view
      * are returned.
      * <p>
      * Refer to the HDFS extended attributes user documentation for details.
      *
      * @param path Path to get extended attributes
      * @return Map describing the XAttrs of the file or directory
      * @throws IOException IO failure
      * @throws UnsupportedOperationException if the operation is unsupported
      *         (default outcome).
      */
     public Map<String, byte[]> getXAttrs(Path path) throws IOException {
       throw new UnsupportedOperationException(getClass().getSimpleName()
           + " doesn't support getXAttrs");
     }
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 653044)
    Time Spent: 0.5h  (was: 20m)

> DistCp derives if XAttr is supported wrongly
> --------------------------------------------
>
>                 Key: HADOOP-17921
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17921
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Pravin Sinha
>            Assignee: Pravin Sinha
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {color:#0033b3}public static void 
> {color}{color:#00627a}checkFileSystemXAttrSupport{color}({color:#000000}FileSystem
>  {color}fs)
>  {color:#0033b3}throws {color}{color:#000000}XAttrsNotSupportedException 
> {color}{
>  {color:#0033b3}try {color}{
>  fs.getXAttrs({color:#0033b3}new 
> {color}Path({color:#000000}Path{color}.{color:#871094}SEPARATOR{color}));
>  } {color:#0033b3}catch {color}({color:#000000}Exception {color}e) {
>  {color:#0033b3}throw new 
> {color}XAttrsNotSupportedException({color:#067d17}"XAttrs not supported for 
> file system: "
> {color} + fs.getUri());
>  }
> }
> IOExecption will also be treated as if Xattr is not supported, which would be 
> wrong.
>  



--
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