BoxClientService
Implementation: JsonConfigBasedBoxClientService
Controller Service used to obtain a Box API connection. | Folder ID | box-folder-id | | | The ID of the folder from which to pull list of files. Supports Expression Language: true (will be evaluated using variable registry only) |
Search Recursively | recursive-search | true | | When 'true', will include list of files from sub-folders. Otherwise, will return only files that are within the folder defined by the 'Folder ID' property. |
Minimum File Age | min-age | 0 sec | | The minimum age a file must be in order to be considered; any files younger than this will be ignored. |
Listing Strategy | listing-strategy | Tracking Timestamps | - Tracking Timestamps
![This strategy tracks the latest timestamp of listed entity to determine new/updated entities. Since it only tracks few timestamps, it can manage listing state efficiently. However, any newly added, or updated entity having timestamp older than the tracked latest timestamp can not be picked by this strategy. For example, such situation can happen in a file system if a file with old timestamp is copied or moved into the target directory without its last modified timestamp being updated. Also may miss files when multiple subdirectories are being written at the same time while listing is running. This strategy tracks the latest timestamp of listed entity to determine new/updated entities. Since it only tracks few timestamps, it can manage listing state efficiently. However, any newly added, or updated entity having timestamp older than the tracked latest timestamp can not be picked by this strategy. For example, such situation can happen in a file system if a file with old timestamp is copied or moved into the target directory without its last modified timestamp being updated. Also may miss files when multiple subdirectories are being written at the same time while listing is running.](../../../../../html/images/iconInfo.png) - Tracking Entities
![This strategy tracks information of all the listed entities within the latest 'Entity Tracking Time Window' to determine new/updated entities. This strategy can pick entities having old timestamp that can be missed with 'Tracking Timestamps'. Works even when multiple subdirectories are being written at the same time while listing is running. However additional DistributedMapCache controller service is required and more JVM heap memory is used. See the description of 'Entity Tracking Time Window' property for further details on how it works. This strategy tracks information of all the listed entities within the latest 'Entity Tracking Time Window' to determine new/updated entities. This strategy can pick entities having old timestamp that can be missed with 'Tracking Timestamps'. Works even when multiple subdirectories are being written at the same time while listing is running. However additional DistributedMapCache controller service is required and more JVM heap memory is used. See the description of 'Entity Tracking Time Window' property for further details on how it works.](../../../../../html/images/iconInfo.png) - Time Window
![This strategy uses a sliding time window. The window starts where the previous window ended and ends with the 'current time'. One cycle will list files with modification time falling within the time window. Works even when multiple subdirectories are being written at the same time while listing is running. IMPORTANT: This strategy works properly only if the time on both the system hosting NiFi and the one hosting the files are accurate. This strategy uses a sliding time window. The window starts where the previous window ended and ends with the 'current time'. One cycle will list files with modification time falling within the time window. Works even when multiple subdirectories are being written at the same time while listing is running. IMPORTANT: This strategy works properly only if the time on both the system hosting NiFi and the one hosting the files are accurate.](../../../../../html/images/iconInfo.png) - No Tracking
![This strategy lists an entity without any tracking. The same entity will be listed each time on executing this processor. It is recommended to change the default run schedule value. Any property that related to the persisting state will be disregarded. This strategy lists an entity without any tracking. The same entity will be listed each time on executing this processor. It is recommended to change the default run schedule value. Any property that related to the persisting state will be disregarded.](../../../../../html/images/iconInfo.png)
| Specify how to determine new/updated entities. See each strategy descriptions for detail. |
Entity Tracking State Cache | et-state-cache | | Controller Service API: DistributedMapCacheClient Implementations: CassandraDistributedMapCache SimpleRedisDistributedMapCacheClientService CouchbaseMapCacheClient HBase_2_ClientMapCacheService DistributedMapCacheClientService RedisDistributedMapCacheClientService HazelcastMapCacheClient | Listed entities are stored in the specified cache storage so that this processor can resume listing across NiFi restart or in case of primary node change. 'Tracking Entities' strategy require tracking information of all listed entities within the last 'Tracking Time Window'. To support large number of entities, the strategy uses DistributedMapCache instead of managed state. Cache key format is 'ListedEntities::{processorId}(::{nodeId})'. If it tracks per node listed entities, then the optional '::{nodeId}' part is added to manage state separately. E.g. cluster wide cache key = 'ListedEntities::8dda2321-0164-1000-50fa-3042fe7d6a7b', per node cache key = 'ListedEntities::8dda2321-0164-1000-50fa-3042fe7d6a7b::nifi-node3' The stored cache content is Gzipped JSON string. The cache key will be deleted when target listing configuration is changed. Used by 'Tracking Entities' strategy.
This Property is only considered if the [Listing Strategy] Property has a value of "Tracking Entities". |
Entity Tracking Time Window | et-time-window | 3 hours | | Specify how long this processor should track already-listed entities. 'Tracking Entities' strategy can pick any entity whose timestamp is inside the specified time window. For example, if set to '30 minutes', any entity having timestamp in recent 30 minutes will be the listing target when this processor runs. A listed entity is considered 'new/updated' and a FlowFile is emitted if one of following condition meets: 1. does not exist in the already-listed entities, 2. has newer timestamp than the cached entity, 3. has different size than the cached entity. If a cached entity's timestamp becomes older than specified time window, that entity will be removed from the cached already-listed entities. Used by 'Tracking Entities' strategy. Supports Expression Language: true (will be evaluated using variable registry only)
This Property is only considered if the [Listing Strategy] Property has a value of "Tracking Entities". |
Entity Tracking Initial Listing Target | et-initial-listing-target | All Available | - Tracking Time Window
![Ignore entities having timestamp older than the specified 'Tracking Time Window' at the initial listing activity. Ignore entities having timestamp older than the specified 'Tracking Time Window' at the initial listing activity.](../../../../../html/images/iconInfo.png) - All Available
![Regardless of entities timestamp, all existing entities will be listed at the initial listing activity. Regardless of entities timestamp, all existing entities will be listed at the initial listing activity.](../../../../../html/images/iconInfo.png)
| Specify how initial listing should be handled. Used by 'Tracking Entities' strategy.
This Property is only considered if the [Listing Strategy] Property has a value of "Tracking Entities". |
Record Writer | record-writer | | Controller Service API: RecordSetWriterFactory Implementations: JsonRecordSetWriter RecordSetWriterLookup AvroRecordSetWriter XMLRecordSetWriter FreeFormTextRecordSetWriter CSVRecordSetWriter ParquetRecordSetWriter ScriptedRecordSetWriter | Specifies the Record Writer to use for creating the listing. If not specified, one FlowFile will be created for each entity that is listed. If the Record Writer is specified, all entities will be written to a single FlowFile instead of adding attributes to individual FlowFiles. |
Relationships:
Name | Description |
---|
success | All FlowFiles that are received are routed to success |
Reads Attributes:
None specified.Writes Attributes:
Name | Description |
---|
box.id | The id of the file |
filename | The name of the file |
path | The folder path where the file is located |
box.size | The size of the file |
box.timestamp | The last modified time of the file |
State management:
Scope | Description |
---|
CLUSTER | The processor stores necessary data to be able to keep track what files have been listed already. What exactly needs to be stored depends on the 'Listing Strategy'. |
Restricted:
This component is not restricted.Input requirement:
This component does not allow an incoming relationship.System Resource Considerations:
None specified.See Also:
FetchBoxFile, PutBoxFile