Github user joan38 commented on the pull request:

    https://github.com/apache/spark/pull/11772#issuecomment-205322558
  
    > I don't think this is a great fix, since it's just catching a general 
exception (which could be triggered by more than just the case in question)
    
    I don't agree with this if we use the 2nd suggested version:
    ```scala
        val textFile = sc.textFile(metadataPath, 1)
        if (textFile.isEmpty()) throw new IllegalArgumentException(s"Empty 
metadata for path $path")
        val metadataStr = textFile.first()
    ```
    
    > it isn't changing the exception for other cases.
    
    Agreed
    
    > I think this is probably not worth changing, as the error for this case 
already suggests that something is empty, but is being treated as if it's not.
    
    Fair enough


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to