2017-09-08 28 views
0

我正在閱讀Google Dataflow程序中的一些配置文件,並想知道如何對它們進行分級。目前我這樣做,系統找不到它們。如何使用Google雲端數據流播放其他文件?

FileReader filereader1 = new FileReader("config_1.csv"); 
FileReader filereader2 = new FileReader("config_2.csv"); 

config_1.csvconfig_2.csv存儲在./target/classes/org/model/examples/

我的行書是這樣的:

mvn compile exec:java -Dexec.mainClass=org.model.examples.MyPipeline \ 
-Dexec.args="--runner=DataflowRunner \ 
    --project=mortgage-data-warehouse 
    --gcpTempLocation=gs://my-project-bucket/tmp \ 
    --inputFile=gs://my-project-bucket/Data/input.txt \ 
    --filesToStage=./target/classes/org/datamodel/examples/config_1.csv, ./target/classes/org/datamodel/examples/config_2.csv" \  
-Pdataflow-runner 

我已經得到了錯誤

java.io.FileNotFoundException:config_1 .csv(系統找不到指定的文件)

我不知道這是否正確設置--filesToStage

+0

你能提供從錯誤的完整堆棧跟蹤的併發症?在提交作業時,或者在嘗試讀取文件時Dataflow作業中,是否在本地計算機上獲得了'FileNotFoundException'? –

回答

0

對於小的配置文件,它是更好的閱讀,如已被寫入該link從資源文件夾中的文件,並避免使用--filesToStage

相關問題