如何将Java依赖项添加到Google Dataflow项目? [英] How do I add Java dependencies to a Google Dataflow project?
问题描述
我的Java项目有很多来自第三方库的jar以及我自己的代码.如何部署这些资源,以便Google Cloud Dataflow可以使用它们?
My Java project has lots of jars from third party libraries as well as my own code. How do I deploy these so that Google Cloud Dataflow can use them?
有有关如何在Python中执行此操作的文档,但没有有关Java的文档.
There is documentation on how do this in Python, but not Java.
推荐答案
您无需执行任何特殊操作:只需将这些jar添加到您的类路径中,Dataflow就会自动将其提供给您的工作人员.这与Dataflow用来使工作人员本身可以使用管道的代码的机制相同.
You don't need to do anything special: simply add those jars to your classpath and Dataflow will automatically make them available to your workers. This is the same mechanism Dataflow uses to make your pipeline's code per se available to the workers.
有关更多详细信息,请参见
For more details, please see the filesToStage
option in Specifying Execution Parameters. And please let us know if this option is not doing what you expect or if you're looking for something else.
这篇关于如何将Java依赖项添加到Google Dataflow项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!