🎏

Apache NiFiのParametersとVariablesの使い分け

2021/03/10に公開

結論からいうと、Parameters(Parameter Contexts)だけを使えばOKです。Variablesは将来的に機能削除される予定のため使わないほうがいいです。

Parameters(Parameter Contexts)

Parameters have numerous advantages over Variables. In addition to sensitive value support, Parameters offer more granular control over access policies. Additionally, properties that reference Parameters are validated against the substituted value, unlike most properties that reference Variables using Expression Language.

Parameters

ParametersはVariablesに比べ以下のような利点があるよ、と書かれています。

  • セキュアな値が扱える
  • アクセスポリシのきめ細かい制御が行える
  • 変数を値に置き換えるときにバリデートが行える

Variables

Custom properties via Variables and the nifi.properties file are still supported for compatibility purposes but do not have the same power as Parameters such as support for sensitive properties and more granular control over who can create, modify or use them. Variables and the nifi.variable.registry.properties property will be removed in a future release. As a result, it is highly recommended to switch to Parameters.

Variables

Variablesはまだ互換性の目的でサポートしているけど、Parametersと比べて機能的に劣るから将来的に削除する予定。なので、Parametersに切り替えることを強く推奨するよ、と書かれています。

参考リンク

Discussion