-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# nifi-basic-tutorial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is Data source folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is Data destination folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 用語集 | ||
|
||
この書籍では、可能なかぎり英語をそのまま使うことにします。簡単な解説を以下に示します。 | ||
|
||
| 英語 | 本書の和訳 | 解説 | | ||
|:----------|:--------|:----------------| | ||
| Data Flow Manager(DFM) | データーフローマネージャー | NiFiで処理を書くプログラマのこと。 | | ||
|Canvas | キャンバス | フローを作成する画面 | | ||
|Components | コンポーネント | ドラッグ可能な部品 | | ||
|Flowfile |フローファイル | Nifi上を流れていく、一件ごとにデータが断片化されたもの。 | | ||
| _uuid_ | uuid | フローファイルのユニークID。 | | ||
| _filename_ | ファイル名 | ファイルや外部サービスにストアされる際の可読可能な名前。 | | ||
| _path_ | パス | ファイルや外部サービスにストアされる際の値。 | | ||
| Processor | プロセッサ| nifiで使用する処理機。ローファイルを取得・加工・出力するためのメソッドのようなもの。 | | ||
|Flow | フロー | フロジックを記載するためにプロセッサを繋いだもの。 | | ||
|Relationship| リレーションシップ| プロセッサ間を接続しフローファイルの処理結果を示す名前がついている。 | | ||
|Connection|コネクション| コンポーネント間を接続するもの。上記リレーションシップと組み合わせて設定を行う。それぞれがフローファイルのキューを持つ。| | ||
|Controller Service| | | | ||
|Reporting Task| レポーティングタスク| バックグラウンドで動作し、NiFiの統計情報を提供する。 | | ||
|Funnel | ファンネル | 複数のコネクションのデータを単一にまとめる、漏斗のようなもの。| | ||
|Remote Process Group| プロセスグループ | NiFiのフローが複雑化したときに、処理のくくりでグループ化を行うことができる。 | | ||
|Port | ポート | プロセスグループ間を接続する際にポートを指定して接続する必要がある。データフローマネージャーが出入力に対し任意の番号を設定する。 | | ||
|Bulletin| 掲示板 | NiFiのユーサーインターフェスが提供するアプリケーションの各種情報を表示する機能| | ||
|Template | テンプレート |各種の処理を再利用するためにデータフローの一部か全部をまとめてテンプレート化したもの。 | | ||
|flow.xml.gz|flow.xml.gz | 作成したフローは自動でセーブされ、nifi/conf/ディレクトリに保存される。ファイル名はflow.xml.gz ただ一つである。| | ||
|Property | プロパティ| 設定値 | | ||
|Expression | エクスプレッション | 表現 | | ||
|Attribute | アトリビュート | 属性 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<template> | ||
<description>Flow Demo v3</description> | ||
<name>Flow Demo v3</name> | ||
<snippet> | ||
<flowController> | ||
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount> | ||
<maxEventDrivenThreadCount>5</maxEventDrivenThreadCount> | ||
<rootGroup> | ||
<id>3c7a1a3c-1567-4d85-8e84-11bb4c3f0cb4</id> | ||
<name>NiFi Flow</name> | ||
<position x="0.0" y="0.0"/> | ||
<comment/> | ||
<processor> | ||
<id>b5b841a8-72ba-43ac-ba20-f95a8a35caa8</id> | ||
<name>PutFile</name> | ||
<position x="783.0" y="77.99999237060547"/> | ||
<styles/> | ||
<comment/> | ||
<class>org.apache.nifi.processors.standard.PutFile</class> | ||
<maxConcurrentTasks>1</maxConcurrentTasks> | ||
<schedulingPeriod>0 sec</schedulingPeriod> | ||
<penalizationPeriod>30 sec</penalizationPeriod> | ||
<yieldPeriod>1 sec</yieldPeriod> | ||
<bulletinLevel>WARN</bulletinLevel> | ||
<lossTolerant>false</lossTolerant> | ||
<scheduledState>RUNNING</scheduledState> | ||
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> | ||
<runDurationNanos>0</runDurationNanos> | ||
<property> | ||
<name>Directory</name> | ||
<value>/tmp/nifi</value> | ||
</property> | ||
<property> | ||
<name>Conflict Resolution Strategy</name> | ||
<value>fail</value> | ||
</property> | ||
<property> | ||
<name>Create Missing Directories</name> | ||
<value>true</value> | ||
</property> | ||
<property> | ||
<name>Maximum File Count</name> | ||
</property> | ||
<property> | ||
<name>Last Modified Time</name> | ||
</property> | ||
<property> | ||
<name>Permissions</name> | ||
</property> | ||
<property> | ||
<name>Owner</name> | ||
</property> | ||
<property> | ||
<name>Group</name> | ||
</property> | ||
<autoTerminatedRelationship>success</autoTerminatedRelationship> | ||
<autoTerminatedRelationship>failure</autoTerminatedRelationship> | ||
</processor> | ||
<processor> | ||
<id>fef7a608-ff9b-40e2-b3d8-25dab1d1cd56</id> | ||
<name>ListenHTTP</name> | ||
<position x="153.0" y="88.0"/> | ||
<styles/> | ||
<comment/> | ||
<class>org.apache.nifi.processors.standard.ListenHTTP</class> | ||
<maxConcurrentTasks>1</maxConcurrentTasks> | ||
<schedulingPeriod>0 sec</schedulingPeriod> | ||
<penalizationPeriod>30 sec</penalizationPeriod> | ||
<yieldPeriod>1 sec</yieldPeriod> | ||
<bulletinLevel>INFO</bulletinLevel> | ||
<lossTolerant>false</lossTolerant> | ||
<scheduledState>RUNNING</scheduledState> | ||
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> | ||
<runDurationNanos>0</runDurationNanos> | ||
<property> | ||
<name>Base Path</name> | ||
<value>contentListener</value> | ||
</property> | ||
<property> | ||
<name>Listening Port</name> | ||
<value>10080</value> | ||
</property> | ||
<property> | ||
<name>Max Data to Receive per Second</name> | ||
</property> | ||
<property> | ||
<name>SSL Context Service</name> | ||
</property> | ||
<property> | ||
<name>Authorized DN Pattern</name> | ||
<value>.*</value> | ||
</property> | ||
<property> | ||
<name>Max Unconfirmed Flowfile Time</name> | ||
<value>60 secs</value> | ||
</property> | ||
<property> | ||
<name>HTTP Headers to receive as Attributes (Regex)</name> | ||
</property> | ||
</processor> | ||
<connection> | ||
<id>f2ed26b7-d82b-4cfd-8064-391996d5bedb</id> | ||
<name/> | ||
<bendPoints/> | ||
<labelIndex>1</labelIndex> | ||
<zIndex>0</zIndex> | ||
<sourceId>fef7a608-ff9b-40e2-b3d8-25dab1d1cd56</sourceId> | ||
<sourceGroupId>3c7a1a3c-1567-4d85-8e84-11bb4c3f0cb4</sourceGroupId> | ||
<sourceType>PROCESSOR</sourceType> | ||
<destinationId>b5b841a8-72ba-43ac-ba20-f95a8a35caa8</destinationId> | ||
<destinationGroupId>3c7a1a3c-1567-4d85-8e84-11bb4c3f0cb4</destinationGroupId> | ||
<destinationType>PROCESSOR</destinationType> | ||
<relationship>success</relationship> | ||
<maxWorkQueueSize>0</maxWorkQueueSize> | ||
<maxWorkQueueDataSize>0 MB</maxWorkQueueDataSize> | ||
<flowFileExpiration>0 sec</flowFileExpiration> | ||
</connection> | ||
</rootGroup> | ||
<controllerServices> | ||
<controllerService> | ||
<id>3f903634-2972-4672-b59c-dae965575d28</id> | ||
<name>StandardHttpContextMap</name> | ||
<comment/> | ||
<class>org.apache.nifi.http.StandardHttpContextMap</class> | ||
<enabled>false</enabled> | ||
<property> | ||
<name>Maximum Outstanding Requests</name> | ||
<value>5000</value> | ||
</property> | ||
<property> | ||
<name>Request Expiration</name> | ||
<value>1 min</value> | ||
</property> | ||
<property> | ||
<name>http.query.string</name> | ||
<value>${http.query.string}</value> | ||
</property> | ||
</controllerService> | ||
</controllerServices> | ||
<reportingTasks/> | ||
</flowController> | ||
</snippet> | ||
<timestamp>10/18/2015 03:09:16 PDT</timestamp> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"GYAO-engineers":[ | ||
{"name": "Bikash", nickname"biky"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
TMP_DATE=`date "+%Y-%m-%d% %H:%M:%S"` | ||
CURL="curl -v -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '{\"device\":{\"device_uuid\":\"aa-bb-cc-dd\",\"account_uuid\":\"your_own_address@mydomain.co.jp\",\"key1\":\"value1\",\"created_at\":\"`echo $TMP_DATE`\"}}' http://localhost:10080/contentListener" | ||
eval $CURL |