0

Google DataflowプロジェクトからGradleを使用して実行可能なjarファイルを作成しようとしています。 は、私はちょうどjarファイルをエクスポートするbuild.gradleにこのコードを追加:Gradleでrunnable jar google Dataflowプロジェクトを作成

task fatJar(type: Jar) { 
    manifest { 
     attributes 'Implementation-Title': 'Deepmind Jar File', 
       'Implementation-Version': version, 
       'Main-Class': 'MyMainClass' 
    } 
    baseName = project.name + '-all' 
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } 
    with jar 
} 

私はjarファイルをエクスポートするサンプルのメインクラスにしようとしたし、それが正常に動作します。私はjarファイルを実行した後、私は、Googleのデータフローパイプラインを含むメインクラスを適用した場合に はしかし、私はエラーを得た:

Exception in thread "main" java.lang.IllegalStateException: Unable to return a default Coder for Transform: UsersNormalize/RemoveDuplication: usersDailyCollection/Format: usersDailyNormalize/ParMultiDo(Anonymous).out0 [PCollection]. Correct one of the following root causes: 
    No Coder has been manually specified; you may do so using .setCoder(). 
    Inferring a Coder from the CoderRegistry failed: Unable to provide a Coder for com.google.api.services.bigquery.model.TableRow. 
    Building a Coder using a registered CoderProvider failed. 
    See suppressed exceptions for detailed failures. 
    Using the default output Coder from the producing PTransform failed: Unable to provide a Coder for com.google.api.services.bigquery.model.TableRow. 
    Building a Coder using a registered CoderProvider failed. 
    See suppressed exceptions for detailed failures. 

誰がこの問題を解決するか、Googleのデータフローのための実行可能なjarファイルを作成する方法を提案することを助けることができますプロジェクト?

+0

感謝を – lknguyen

答えて

0

我々は単に(あなたのJARファイルが含まれる)distTarを使用します。フォーマットの

distTar { 
compression = Compression.GZIP 
mainClassName = '<main-class>' 
applicationName = '<app-name>' 
jar.baseName = applicationName 
dependsOn('test') 
} 
+0

おかげでグラハム・ポーリー@Frogatto私の質問、私はこれをしようとします。しかし、今、私はbuildscriptを追加{} リポジトリ{ jcenter() } 依存関係{ クラスパス ":Gradleの-fatjar-プラグイン0.3 eu.appsatori"}で、私の問題を修正しました – lknguyen

関連する問題