nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plj <>
Subject RE: Process to create multiple files
Date Mon, 17 Aug 2015 17:45:12 GMT

               Thanks for the reply.  I think my situation is different than you suggest.
 I have an image file in NITF format.  That file may have multiple images and multiple bands
inside that one file.  The software that I have that reads that file does create a thumbnail
for each image and each band inside that file.   I don't know how many thumbnails I need until
I read the files metadata.



From: Dan Bress [via Apache NiFi (incubating) Developer List] []
Sent: Monday, August 17, 2015 1:40 PM
To: Jones, Patrick L. <>
Subject: Re: Process to create multiple files

   I would not recommend having this processor create multiple thumbnails.  What I would recommend
is the following:

   Create a new processor called "CreateThumbnail" or "RescaleImage"

    Then have a configuration on the processor that says what size the output image should
be(e.g. 128x128, or 1/X of original size).

    Your new processor will read in the incoming image, and rescale it down to the user specified
size and pass it forward.

     Now if you want to create a 128x128 64x64 and 32x32 sized images you would do the following.

    (GetFile)->(RescaleImage configured to 128x128)->(PutFile)
                      |->(RescaleImage configured to 64x64)->(PutFile)
                      \->(RescaleImage configured to 32x32)->(PutFile)

Where GetFile has 3 success relationships, each going to a different RescaleImage processor.

I think it makes more sense to have one processor create one file, then you can use the flow
to visually configure how many copies of the file you want to make.  This should make this
processor simpler and more reusable.

Dan Bress
Software Engineer
ONYX Consulting Services

From: plj <[hidden email]</user/SendEmail.jtp?type=node&node=2511&i=0>>
Sent: Monday, August 17, 2015 1:27 PM
To: [hidden email]</user/SendEmail.jtp?type=node&node=2511&i=1>
Subject: Process to create  multiple files


  I'm new to NiFi so please bear with me.  What I want to accomplish is:
      read an image file
     process the file to create one or more thumbnails from the image.
     Send the resulting thumbnails along the flow

    So I can use GetFile to read the file and then send it along.  I think I
need to write a custom java processor that will process the image file and
then send each of the thumbnail files (say .jpg for now) on to the next
thing in the flow (say PutFile for example).

    Are there suggestions on what I should implement or extend to create my
custom processor?  It will take in one file and output multiple files.
Would extending "PutFile" so that it processed and then puts each thumbnail
on the flow be a good strategy?  Other ideas?

Thank you,

View this message in context:
Sent from the Apache NiFi (incubating) Developer List mailing list archive at

If you reply to this email, your message will be added to the discussion below:
To unsubscribe from Process to create multiple files, click here<>.

View this message in context:
Sent from the Apache NiFi (incubating) Developer List mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message