ListSmb 2025.10.2.19

バンドル

org.apache.nifi | nifi-smb-nar

説明

SMB プロトコルで共有される具体的なファイルをリストします。リストされた各ファイルは、1つの FlowFile になり、メタデータは FlowFile 属性として書き込まれます。あるいは - 'Record Writer' プロパティがセットされている場合 - 全結果が一つの FlowFile に記録として書き込まれます。このプロセッサーは、クラスタ内のプライマリノードのみで動作するように設計されています。プライマリ・ノードが変更された場合、新しいプライマリ・ノードは、すべてのデータを複製することなく、前のノードが去った場所を引き継ぎます。

タグ

list, samba, smb, cifs, files

入力要件

FORBIDDEN

機密動的プロパティをサポート

false

プロパティ

プロパティ

説明

directory

ファイルをリストするネットワークフォルダ。これは、共有後の残りの相対パスです: smb://HOSTNAME:PORT/SHARE/[DIRECTORY]/sub/directories.サブディレクトリを追加することも可能です。リモートファイル共有上に指定されたパスが存在する必要があります。これは検証で確認できます。WindowsスタイルとLinuxスタイルのディレクトリセパレータを混在させてもかまいません。

et-initial-listing-target

Specify how initial listing should be handled. Used by 'Tracking Entities'strategy.

et-state-cache

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.

et-time-window

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.

file-filter

指定された正規表現に一致する名前のファイルだけがリストされます。

file-name-suffix-filter

与えられた接尾辞で終わるファイルは省略されます。アップロード中のファイルに接尾辞を付け、アップロードが終了したら接尾辞を削除することで、アップロード中のファイルが複数回リストされないようにすることができます。「トラッキングエンティティ」または「トラッキングタイムスタンプ」のリスト戦略を使用する場合は、この方法を強くお勧めします。

initial-listing-strategy

プロセッサーの初回起動時 (または状態クリア時) に、 SMB 共有上の既存ファイルをどのように処理するかを指定します。

initial-listing-timestamp

プロセッサーが初めて起動した(または状態がクリアされた)ときに、ファイルがリストされるタイムスタンプ。値は、ミリ秒単位のエポックタイムスタンプか、2025-02-01T00:00:00Z のような形式の UTC datetime で指定できます。

listing-strategy

新規/更新エンティティの判定方法を指定します。詳しくは各戦略の説明をご覧ください。

max-file-age

指定された値より古いファイルは省略されます。

max-file-size

与えられた値より大きなファイルは省略されます。

min-file-age

リストされるために必要な、ファイルの最低年齢。(最終更新日付に従って)この期間より若いファイルは無視されます。

min-file-size

与えられた値より小さいファイルは省略されます。

path-filter

指定した正規表現にパス (ファイルの親ディレクトリまで) が一致するファイルだけがリストされます。

record-writer

リストの作成に使用するRecord Writerを指定します。指定しない場合は、リストされたエンティティごとに FlowFile が1つ作成されます。Record Writerを指定すると、個々の FlowFiles に属性を追加する代わりに、すべてのエンティティが単一の FlowFile に書き込まれます。

smb-client-provider-service

SMB 接続の作成に使用する SMB クライアントプロバイダーを指定します。

target-system-timestamp-precision

ターゲットシステムでのタイムスタンプ精度を指定します。このプロセッサーは、エンティティのタイムスタンプを使用してリストを決定するため、正しいタイムスタンプ精度を使用することが重要です。

状態管理

スコープ

説明

CLUSTER

ファイルのリストをパフォーマンスした後、重複することなく連続的にファイルをリストするために、前回のリストの状態を保存することができます。

リレーションシップ

名前

説明

success

受信したすべての FlowFiles は成功にルーティングされます。

属性の書き込み

名前

説明

filename

ファイルシステムから読み込まれたファイル名。

shortName

ファイルシステムから読み込まれたファイルのショートネーム。

path

パスは、リモートファイルシステム上のファイルのディレクトリの、共有ルートディレクトリからの相対パスにセットされます。例えば、与えられたリモートlocationsmb://HOSTNAME:PORT/SHARE/DIRECTORY で、ファイルがsmb://HOSTNAME:PORT/SHARE/DIRECTORY/sub/folder/fileからリストされる場合、パス属性は "DIRECTORY/sub/folder" にセットされます。

serviceLocation

シェアの SMB URL。

lastModifiedTime

'yyyy-MM-dd'T'HH:mm:ss' としてファイルシステムでファイルの内容が変更された時のタイムスタンプ。

creationTime

'yyyy-MM-dd'T'HH:mm:ss' としてファイルがファイルシステムに作成された時のタイムスタンプ。

lastAccessTime

ファイルがファイルシステムでアクセスされた時のタイムスタンプを 'yyyy-MM-dd'T'HH:mm:ss' で表します。

changeTime

ファイルの属性がファイルシステムで変更されたときのタイムスタンプを 'yyyy-MM-dd'T'HH:mm:ss' で指定します。

size

ファイルのサイズ(バイト単位)。

allocationSize

サーバー上のファイルに割り当てられたバイト数。

こちらもご覧ください