Windowsマシーン上でFlinkをローカルで実行したい場合は、バイナリのFlink配布物をダウンロードし解凍する必要があります。その後で、Flinkジョブマネージャーを実行するために、Windows Batch ファイル (.bat
)、あるいは Cygwin を使うことができます。
To start Flink in from the Windows Command Line, open the command window, navigate to the bin/
directory of Flink and run start-cluster.bat
.
注意: Javaランタイム環境のbin
フォルダが Windowの %PATH%
変数に含まれていなければなりません。Javaを%PATH%
変数に追加するには、このガイド に従ってください。
その後で、flink.bat
を使ってジョブを実行するために2つ目のターミナルを開く必要があります。
With Cygwin you need to start the Cygwin Terminal, navigate to your Flink directory and run the start-cluster.sh
script:
If you are installing Flink from the git repository and you are using the Windows git shell, Cygwin can produce a failure similar to this one:
このエラーは、gitはWindows上で実行する時にUNIXの行の終了が自動的にWindows形式の行の終了に変換されるために起こります。問題は、CygwinはUNIX形式の行の終了のみ取り扱うことができるという事です。解決方法は、以下の3つのステップに従うことで正しい行末を扱うようにCygwinの設定を調整することです。
Cygwinシェルを開始します。
以下を入力することでホームディレクトリを決定します
これはCygwinルートパスの下のパスを返すでしょう。
.bash_profile
を開き、以下を追加します: (ファイルが存在しない場合はそれを作成する必要があるでしょう)ファイルを保存し、新しいbashシェルを開きます。