问题描述
Cloud Dataflow是否允许您将其与第三方库jar文件一起使用?非Java库呢?
Does Cloud Dataflow allows you to use it with third party library jar files? How about non-Java libraries?
Kaz
推荐答案
是的,您可以使用第三方库文件就可以了.默认情况下,当您运行Dataflow主程序来提交作业时,Dataflow将分析您的类路径并上传其看到的所有jar,并将其添加到worker的类路径中.
Yes you can use third party library files just fine. By default when you run your Dataflow main program to submit your job, Dataflow will analyze your classpath and upload any jars it sees and add them to the class path of the workers.
如果需要更多控制权,则可以使用命令行选项-filesToStage 指定要在工作程序上暂存的其他文件.
If you need more controlthen you can use the command line option --filesToStage to specify additional files to stage on the workers.
另一种常用技术是构建一个包含所有依赖项的捆绑jar.构建捆绑式jar的一种方法是使用诸如shade之类的Maven插件.
Another common technique is building a single bundled jar which contains all your dependencies. One way to build a bundled jar is to use a maven plugin like shade.
这篇关于我可以将第三方库与Cloud Dataflow一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!