2017-06-21 64 views

回答

2

波束2.0,使用DataflowRunner並指定--templateLocation

mvn compile exec:java \ 
-Dexec.mainClass=com.example.myclass \ 
-Dexec.args="--runner=DataflowRunner \ 
       --project=[YOUR_PROJECT_ID] \ 
       --stagingLocation=gs://[YOUR_BUCKET_NAME]/staging \ 
       --output=gs://[YOUR_BUCKET_NAME]/output \ 
       --templateLocation=gs://[YOUR_BUCKET_NAME]/templates/MyTemplate" 

注意--templateLocation取代了以前的--dataflowJobFile

請參閱Creating and staging templates上關於Java SDK 2.x的數據流文檔。X