2

BigTable に行を挿入するために Dataflow ジョブを作成しようとしていますが、Dataflow ジョブをローカルでテストしているときに、次のエラーが発生します。

Exception in thread "main" com.google.cloud.dataflow.sdk.Pipeline$PipelineExecutionException: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
at com.google.cloud.dataflow.sdk.Pipeline.run(Pipeline.java:186)

あなたは私のメインコードを見つけることができます:

    CloudBigtableOptions options =
            PipelineOptionsFactory.fromArgs(args).withValidation().create().as(CloudBigtableOptions.class);

    options.setProject("xxxxxxxxx");
    options.setBigtableProjectId("xxxxxxxxx");
    options.setBigtableInstanceId("xxxxxxxxx");
    options.setBigtableTableId("xxxxxxxxx");
    options.setZone("europe-west1-b");
    options.setRunner(DirectPipelineRunner.class);

    CloudBigtableTableConfiguration config =
            CloudBigtableTableConfiguration.fromCBTOptions(options);

    Pipeline p = Pipeline.create(options);
    CloudBigtableIO.initializeForWrite(p);

    FixedWindows window = FixedWindows.of(Duration.standardMinutes(1));

    p
            .apply(Create.of("Hello"))
            .apply(Window.into(window))
            .apply(ParDo.of(MUTATION_TRANSFORM))
            .apply(CloudBigtableIO.writeToTable(config));

    p.run();

別の試みは、次のコードで行われました。

    CloudBigtableTableConfiguration config =
            new CloudBigtableTableConfiguration.Builder()
                    .withProjectId("xxxxxxxxx")
                    .withInstanceId("xxxxxxxxx")
                    .withTableId("xxxxxxxxx")
                    .build();

    Pipeline p = Pipeline.create(options);
    CloudBigtableIO.initializeForWrite(p);

    FixedWindows window = FixedWindows.of(Duration.standardMinutes(1));

    p
            .apply(Create.of("Hello"))
            .apply(Window.into(window))
            .apply(ParDo.of(MUTATION_TRANSFORM))
            .apply(CloudBigtableIO.writeToTable(config));

    p.run();

しかし、同じエラーが発生しました。

私は何か間違ったことをしていますか?

編集:

完全なエラー:

Exception in thread "main" com.google.cloud.dataflow.sdk.Pipeline$PipelineExecutionException: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
    at com.google.cloud.dataflow.sdk.Pipeline.run(Pipeline.java:186)
    at HubCache.main(HubCache.java:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
    at com.google.bigtable.repackaged.com.google.cloud.grpc.BigtableSession.<init>(BigtableSession.java:236)
    at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:123)
    at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:91)
    at com.google.cloud.bigtable.hbase1_0.BigtableConnection.<init>(BigtableConnection.java:33)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool$1.<init>(CloudBigtableConnectionPool.java:72)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool.createConnection(CloudBigtableConnectionPool.java:72)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool.getConnection(CloudBigtableConnectionPool.java:64)
    at com.google.cloud.bigtable.dataflow.CloudBigtableConnectionPool.getConnection(CloudBigtableConnectionPool.java:57)
    at com.google.cloud.bigtable.dataflow.AbstractCloudBigtableTableDoFn.getConnection(AbstractCloudBigtableTableDoFn.java:96)
    at com.google.cloud.bigtable.dataflow.CloudBigtableIO$CloudBigtableSingleTableBufferedWriteFn.getBufferedMutator(CloudBigtableIO.java:941)
    at com.google.cloud.bigtable.dataflow.CloudBigtableIO$CloudBigtableSingleTableBufferedWriteFn.processElement(CloudBigtableIO.java:966)

pom.xml:

 <dependencies>
        <dependency>
            <groupId>com.google.cloud.dataflow</groupId>
            <artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
            <version>LATEST</version>
        </dependency>
        <dependency>
            <groupId>com.google.cloud.bigtable</groupId>
            <artifactId>bigtable-hbase-dataflow</artifactId>
            <version>LATEST</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.21</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>LATEST</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/io.netty/netty-tcnative-boringssl-static -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-tcnative-boringssl-static</artifactId>
            <version>1.1.33.Fork13</version>
            <classifier>${os.detected.classifier}</classifier>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <extensions>
            <!-- Use os-maven-plugin to initialize the "os.detected" properties -->
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.4.0.Final</version>
            </extension>
        </extensions>
    </build>
4

2 に答える 2

1

問題は、「os.detected」プロパティを初期化するための拡張機能os-maven-pluginが、プロパティを正しく初期化しなかったことです。

プロパティを正しく設定するテストを行いましたが、テストは問題なく実行されました。

于 2016-07-14T09:04:00.333 に答える