[ https://issues.apache.org/jira/browse/HDFS-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14115208#comment-14115208 ]
Steve Loughran commented on HDFS-6843: -------------------------------------- Andrew ... its what, 5-10 lines? If we don't do it, then the spec dates to the point of unusability, and 18 months from now someone else -maybe even you- is going to have to do what I did, go through every method, look at what HDFS does, look at the other uses, write tests to see which diverge, fix. Or worse: someone else is going to implement the interface, wrongly. bq. The spec explicitly says that it can be incomplete or incorrect more an observation on the current state...I didn't want to get it worse. What is being proposed here is an extension to the existing interfaces, *the specification is changing*, and I'd like that to be reflected in the documentation. So that we can set a precedent: change the specification of the interfaces and you get to update the documentation and contract tests to go with the change, rather than just add a few javadocs around the place. > Create FSDataInputStream & FSDataOutputStream isEncrypted() method > ------------------------------------------------------------------ > > Key: HDFS-6843 > URL: https://issues.apache.org/jira/browse/HDFS-6843 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode, security > Affects Versions: 3.0.0 > Reporter: Charles Lamb > Assignee: Charles Lamb > Attachments: HDFS-6843.001.patch, HDFS-6843.002.patch > > > FileStatus should have a 'boolean isEncrypted()' method. (it was in the > context of discussing with AndreW about FileStatus being a Writable). > Having this method would allow MR JobSubmitter do the following: > ----- > BOOLEAN intermediateEncryption = false > IF jobconf.contains("mr.intermidate.encryption") THEN > intermediateEncryption = jobConf.getBoolean("mr.intermidate.encryption") > ELSE > IF (I/O)Format INSTANCEOF File(I/O)Format THEN > intermediateEncryption = ANY File(I/O)Format HAS a Path with status > isEncrypted()==TRUE > FI > jobConf.setBoolean("mr.intermidate.encryption", intermediateEncryption) > FI -- This message was sent by Atlassian JIRA (v6.2#6252)