greyp9 commented on a change in pull request #5409:
URL: https://github.com/apache/nifi/pull/5409#discussion_r716947901



##########
File path: 
nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java
##########
@@ -228,6 +232,20 @@ protected void preProcessConfiguration(final Configuration 
config, final Process
         FsPermission.setUMask(config, new FsPermission(dfsUmask));
     }
 
+    @Override
+    protected void preProcessFileSystem(final FileSystem fileSystem, final 
ProcessContext context) throws IOException {
+        if (fileSystem instanceof DistributedFileSystem) {
+            final Path dirPath = new 
Path(context.getProperty(DIRECTORY).getValue());

Review comment:
       Changed the logic to throw on detection of this situation, as otherwise 
the file is written to HDFS with less restrictive permissions than are intended.




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


Reply via email to