Github user bbende commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2336#discussion_r156508688
--- Diff:
nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-hadoop-record-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractPutHDFSRecord.java
---
@@ -444,11 +446,17 @@ protected void deleteQuietly(final FileSystem
fileSystem, final Path file) {
* @param remoteOwner the new owner for the file
* @param remoteGroup the new group for the file
*/
- protected void changeOwner(final FileSystem fileSystem, final Path
path, final String remoteOwner, final String remoteGroup) {
+ protected void changeOwner(final ProcessContext context, final
FileSystem fileSystem, final Path path, final String remoteOwner, final String
remoteGroup,final FlowFile flowFile) {
--- End diff --
Since changeOwner and createDirectory already had parameters for
remoteOwner and remoteGroup, can we just calculate those values in the
beginning of onTrigger somewhere and pass them in? You wouldn't have to pass
down the context and flow file then.
We should also get rid of the member variables for remoteOwner and
remoteGroup and the code in @OnSchedule that populates them since those won't
be used anymore.
---