Tacking a crack at NIFI-333

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Tacking a crack at NIFI-333

Dan Bress
All,

  I am taking a crack at NIFI-333, was able to catch ProcessException instead of Exception for these processors:


  *   CreateHadoopSequenceFile
  *   Base64EncodeContent
  *   CompressContent
  *   HashContent
  *   PutEmail
  *   TransformXml

Saw SegmentContent catching Exception, but then throwing ProcessException.  Is this OK even if FlowFileAccessExceptions get caught and thrown as ProcessExceptions? [1]

I noticed GetHTTP and PutFile catching Throwable, didn't think we wanted to change this.  What do you think?. [2] [3]


Also noticed org.apache.nifi.processors.hadoop.KeyValueReader.readSequenceFile(Path, Configuration, FileSystem) catches Exception when working with the session. Should this be changed to catch ProcessException? [4]

Same with: org.apache.nifi.processors.hadoop.ValueReader.readSequenceFile(Path, Configuration, FileSystem) Should this also be changed to ProcessException? [5]


Let me know what you think!

[1] https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SegmentContent.java#L158-L160

[2] https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java#L469-L474

[3] https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java#L291-L298

[4] https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/KeyValueReader.java#L90-L96

[5] https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ValueReader.java#L85-L91

[https://avatars1.githubusercontent.com/u/47359?v=3&s=400]<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ValueReader.java#L85-L91>

incubator-nifi/ValueReader.java at develop · apache/incubator-nifi · GitHub
incubator-nifi - Mirror of Apache NiFi (Incubating)
Read more...<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/ValueReader.java#L85-L91>

[https://avatars1.githubusercontent.com/u/47359?v=3&s=400]<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/KeyValueReader.java#L90-L96>

incubator-nifi/KeyValueReader.java at develop · apache/incubator-nifi · GitHub
incubator-nifi - Mirror of Apache NiFi (Incubating)
Read more...<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/KeyValueReader.java#L90-L96>

[https://avatars1.githubusercontent.com/u/47359?v=3&s=400]<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java#L291-L298>

incubator-nifi/PutFile.java at develop · apache/incubator-nifi · GitHub
incubator-nifi - Mirror of Apache NiFi (Incubating)
Read more...<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java#L291-L298>

[https://avatars1.githubusercontent.com/u/47359?v=3&s=400]<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java#L469-L474>

incubator-nifi/GetHTTP.java at develop · apache/incubator-nifi · GitHub
incubator-nifi - Mirror of Apache NiFi (Incubating)
Read more...<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java#L469-L474>

[https://avatars1.githubusercontent.com/u/47359?v=3&s=400]<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SegmentContent.java#L158-L160>

incubator-nifi/SegmentContent.java at develop · apache/incubator-nifi · GitHub
incubator-nifi - Mirror of Apache NiFi (Incubating)
Read more...<https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/SegmentContent.java#L158-L160>




Dan Bress
Software Engineer
ONYX Consulting Services