Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 从云数据流连接到bigtable_Google Cloud Platform_Apache Beam_Google Cloud Bigtable - Fatal编程技术网

Google cloud platform 从云数据流连接到bigtable

Google cloud platform 从云数据流连接到bigtable,google-cloud-platform,apache-beam,google-cloud-bigtable,Google Cloud Platform,Apache Beam,Google Cloud Bigtable,我正在尝试从beam api连接到BigTable。我经常面临一个错误: Exception in thread "BigtableSession-startup-1" java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. 以下是我正在使用的POM: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 <groupId

我正在尝试从beam api连接到BigTable。我经常面临一个错误:

Exception in thread "BigtableSession-startup-1" 
java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been 
properly configured.
以下是我正在使用的POM: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<groupId>com.dataflow.example</groupId>
<artifactId>dataflowTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>dataflowTest</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
    <maven-exec-plugin.version>1.6.0</maven-exec-plugin.version>
    <beam.version>2.1.0</beam.version>
    <bigtable.version>1.0.0</bigtable.version>
    <slf4j.version>1.7.21</slf4j.version>
    <bigtable.table>Dataflow_test</bigtable.table>
    <pubsubTopic>projects/${bigtable.projectID}/topics/shakes</pubsubTopic>
    <bigtable.hbase.version>${bigtable.version}</bigtable.hbase.version>
</properties>

<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>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
                <execution>
                    <id>bundle-and-repackage</id>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                </excludes>
                            </filter>
                        </filters>
                        <transformers>
                            <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                        </transformers>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>


<dependencies>
    <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
        <version>2.2.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
        <version>2.2.0</version>
        <exclusions>
            <exclusion>
                <groupId>io.netty</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.mortbay.jetty.alpn/alpn-boot -->
    <!-- https://mvnrepository.com/artifact/io.netty/netty-tcnative-boringssl-static -->
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-tcnative-boringssl-static</artifactId>
        <version>2.0.7.Final</version>
    </dependency>

    <dependency>
        <groupId>com.google.cloud.bigtable</groupId>
        <artifactId>bigtable-hbase-beam</artifactId>
        <version>${bigtable.version}</version>
        <exclusions>
            <exclusion>
                <groupId>io.netty</groupId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>com.google.cloud.dataflow</groupId>
        <artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
        <version>2.2.0</version>
        <exclusions>
            <exclusion>
                <groupId>io.netty</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>6.0.6</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>

我尝试过fork26、fork13、2.0.7.Final和各种其他版本的netty。

您正在使用的netty版本之间似乎存在冲突。您是否可以使用DependencyManagement之类的方法来解决此问题


可能有其他版本的netty正在其他依赖项中使用,请尝试删除其他版本。

尝试此链接-。您可能需要从每个依赖项中排除所有netty依赖项,并单独添加netty作为依赖项以避免冲突。我在使用Spark时遇到类似问题

我建议使用1.4.0来使用<代码> BigTabl。版本。应该修复它。
try (BigtableSession session = new BigtableSession(optionsBuilder
        .setCredentialOptions(CredentialOptions.credential(options.as(GcpOptions.class).getGcpCredential())).build())) {

      BigtableTableAdminClient tableAdminClient = session.getTableAdminClient();