Re: TestRunner fileSize Attribute
I found the code for it that inserts those like they were attributed in ValueLookup. To further confuse it some processors appear to set an attribute of that name. Thanks for explaining that I was a bit confused. Shawn Weeks Sent from my iPhone On Feb 26, 2019, at 10:54 AM, Mark Payne mailto:marka...@hotmail.com>> wrote: Shawn, I think it is presented that way in the given link because it is accessed via the Expression Language by using ${fileSize} - the same as if it were an attribute. So from the point of view of the user/flow designer, they can be assumed to be the same. However, from the POV of a developer working on a processor, it is obtained via getSize() because it is not truly an attribute. Thanks -Mark On Feb 26, 2019, at 11:37 AM, Shawn Weeks mailto:swe...@weeksconsulting.us>> wrote: fileSize is listed as a default attribute for a flow file along with uuid and filename. It always seems to be populated in a real workflow. It’s also listed here https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_getting-started-with-apache-nifi/content/common-attributes.html and while they aren’t they only supporting organization I know they do quiet a bit. Sent from my iPhone On Feb 26, 2019, at 10:28 AM, Mark Payne mailto:marka...@hotmail.com>> wrote: Hi Shawn, filename and uuid are attributes of the FlowFile. There's no fileSize attribute (unless added explicitly by a processor). You can get the size of a FlowFile by calling FlowFile.getSize() Does that help? Thanks -Mark On Feb 26, 2019, at 11:20 AM, Shawn Weeks mailto:swe...@weeksconsulting.us>> wrote: Since fileSize is a standard property for a flow file shouldn’t the TestRunner set it when you queue a new file? The properties it appears to set are filename and uuid. Thanks Shawn Weeks Sent from my iPhone
Re: TestRunner fileSize Attribute
Shawn, I think it is presented that way in the given link because it is accessed via the Expression Language by using ${fileSize} - the same as if it were an attribute. So from the point of view of the user/flow designer, they can be assumed to be the same. However, from the POV of a developer working on a processor, it is obtained via getSize() because it is not truly an attribute. Thanks -Mark On Feb 26, 2019, at 11:37 AM, Shawn Weeks mailto:swe...@weeksconsulting.us>> wrote: fileSize is listed as a default attribute for a flow file along with uuid and filename. It always seems to be populated in a real workflow. It’s also listed here https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_getting-started-with-apache-nifi/content/common-attributes.html and while they aren’t they only supporting organization I know they do quiet a bit. Sent from my iPhone On Feb 26, 2019, at 10:28 AM, Mark Payne mailto:marka...@hotmail.com>> wrote: Hi Shawn, filename and uuid are attributes of the FlowFile. There's no fileSize attribute (unless added explicitly by a processor). You can get the size of a FlowFile by calling FlowFile.getSize() Does that help? Thanks -Mark On Feb 26, 2019, at 11:20 AM, Shawn Weeks mailto:swe...@weeksconsulting.us>> wrote: Since fileSize is a standard property for a flow file shouldn’t the TestRunner set it when you queue a new file? The properties it appears to set are filename and uuid. Thanks Shawn Weeks Sent from my iPhone
Re: TestRunner fileSize Attribute
Shawn, Searching the codebase, I couldn't really find (m)any places where "fileSize" is set as a flow file attribute. It is available via the UI (which I presume calls flowFile.getSize()) as well as in provenance events (again populated by flowFile.getSize() not an attribute per se). That documentation appears incorrect, I wonder if it was meant to refer to available "attributes" (really metadata) on provenance events for a flow file. Regards, Matt On Tue, Feb 26, 2019 at 11:37 AM Shawn Weeks wrote: > > fileSize is listed as a default attribute for a flow file along with uuid and > filename. It always seems to be populated in a real workflow. It’s also > listed here > https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_getting-started-with-apache-nifi/content/common-attributes.html > and while they aren’t they only supporting organization I know they do quiet > a bit. > > Sent from my iPhone > > On Feb 26, 2019, at 10:28 AM, Mark Payne wrote: > > Hi Shawn, > > filename and uuid are attributes of the FlowFile. There's no fileSize > attribute (unless added explicitly by a processor). You can get the size of a > FlowFile by calling FlowFile.getSize() > > Does that help? > > Thanks > -Mark > > > On Feb 26, 2019, at 11:20 AM, Shawn Weeks wrote: > > > Since fileSize is a standard property for a flow file shouldn’t the > TestRunner set it when you queue a new file? The properties it appears to set > are filename and uuid. > > > Thanks > > Shawn Weeks > > > Sent from my iPhone > >
Re: TestRunner fileSize Attribute
fileSize is listed as a default attribute for a flow file along with uuid and filename. It always seems to be populated in a real workflow. It’s also listed here https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_getting-started-with-apache-nifi/content/common-attributes.html and while they aren’t they only supporting organization I know they do quiet a bit. Sent from my iPhone On Feb 26, 2019, at 10:28 AM, Mark Payne mailto:marka...@hotmail.com>> wrote: Hi Shawn, filename and uuid are attributes of the FlowFile. There's no fileSize attribute (unless added explicitly by a processor). You can get the size of a FlowFile by calling FlowFile.getSize() Does that help? Thanks -Mark On Feb 26, 2019, at 11:20 AM, Shawn Weeks mailto:swe...@weeksconsulting.us>> wrote: Since fileSize is a standard property for a flow file shouldn’t the TestRunner set it when you queue a new file? The properties it appears to set are filename and uuid. Thanks Shawn Weeks Sent from my iPhone
Re: TestRunner fileSize Attribute
Hi Shawn, filename and uuid are attributes of the FlowFile. There's no fileSize attribute (unless added explicitly by a processor). You can get the size of a FlowFile by calling FlowFile.getSize() Does that help? Thanks -Mark > On Feb 26, 2019, at 11:20 AM, Shawn Weeks wrote: > > Since fileSize is a standard property for a flow file shouldn’t the > TestRunner set it when you queue a new file? The properties it appears to set > are filename and uuid. > > Thanks > Shawn Weeks > > Sent from my iPhone