You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Andre <an...@fucs.org> on 2017/02/05 12:06:36 UTC

PutFile,PutHDFS handle similar properties differently

devs,

I was working on NIFI-940 when I noticed that PutFile and PutHDFS, while
similar in nature have different ways of handling some of its common
properties, more precisely, permissions (there may be others).

While PutHDFS validates permissions via custom validators[1], PutFile will
only validate permissions within onTrigger and if invalid permissions are
configured, will just log an event.[1]

I suppose that changing this behavior would break compatibility and will
have to wait for a major release, but would others agree this issue should
be addressed?

Cheers


[1]
https://github.com/apache/nifi/blob/7f5eabd603bfc326dadc35590bbe69304e8c90fa/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java#L145

[2]
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java#L263

Re: PutFile,PutHDFS handle similar properties differently

Posted by Michael Moser <mo...@gmail.com>.
It appears that PutFile "Permissions" supports expression language which
makes static validation harder, whereas PutHDFS "Permissions umask" does
not support expression language.  I would prefer the PutFile approach.
Making more properties support expression language seems reasonable.  I
think this has been done in the past without breaking compatibility, though
I guess that's case by case.

-- Mike


On Tue, Feb 7, 2017 at 3:08 PM, Aldrin Piri <al...@gmail.com> wrote:

> Consistency where possible across extensions is definitely a welcomed
> improvement, but as you suggest would need to wait for a major release or
> until we have made some inroads with versioned components and/or an
> extension registry.
>
> Would you like to capture your thoughts and maybe place 2.0.0 as a fix
> version on an issue?
>
> On Sun, Feb 5, 2017 at 7:06 AM, Andre <an...@fucs.org> wrote:
>
> > devs,
> >
> > I was working on NIFI-940 when I noticed that PutFile and PutHDFS, while
> > similar in nature have different ways of handling some of its common
> > properties, more precisely, permissions (there may be others).
> >
> > While PutHDFS validates permissions via custom validators[1], PutFile
> will
> > only validate permissions within onTrigger and if invalid permissions are
> > configured, will just log an event.[1]
> >
> > I suppose that changing this behavior would break compatibility and will
> > have to wait for a major release, but would others agree this issue
> should
> > be addressed?
> >
> > Cheers
> >
> >
> > [1]
> > https://github.com/apache/nifi/blob/7f5eabd603bfc326dadc35590bbe69
> > 304e8c90fa/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-
> > processors/src/main/java/org/apache/nifi/processors/hadoop/
> > PutHDFS.java#L145
> >
> > [2]
> > https://github.com/apache/nifi/blob/master/nifi-nar-
> > bundles/nifi-standard-bundle/nifi-standard-processors/src/
> > main/java/org/apache/nifi/processors/standard/PutFile.java#L263
> >
>

Re: PutFile,PutHDFS handle similar properties differently

Posted by Aldrin Piri <al...@gmail.com>.
Consistency where possible across extensions is definitely a welcomed
improvement, but as you suggest would need to wait for a major release or
until we have made some inroads with versioned components and/or an
extension registry.

Would you like to capture your thoughts and maybe place 2.0.0 as a fix
version on an issue?

On Sun, Feb 5, 2017 at 7:06 AM, Andre <an...@fucs.org> wrote:

> devs,
>
> I was working on NIFI-940 when I noticed that PutFile and PutHDFS, while
> similar in nature have different ways of handling some of its common
> properties, more precisely, permissions (there may be others).
>
> While PutHDFS validates permissions via custom validators[1], PutFile will
> only validate permissions within onTrigger and if invalid permissions are
> configured, will just log an event.[1]
>
> I suppose that changing this behavior would break compatibility and will
> have to wait for a major release, but would others agree this issue should
> be addressed?
>
> Cheers
>
>
> [1]
> https://github.com/apache/nifi/blob/7f5eabd603bfc326dadc35590bbe69
> 304e8c90fa/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-
> processors/src/main/java/org/apache/nifi/processors/hadoop/
> PutHDFS.java#L145
>
> [2]
> https://github.com/apache/nifi/blob/master/nifi-nar-
> bundles/nifi-standard-bundle/nifi-standard-processors/src/
> main/java/org/apache/nifi/processors/standard/PutFile.java#L263
>