Jetty ALPN/NPN Exception while connecting to BigTable from Spark, scala code

202 views Asked by At

Facing Issues while trying to connect to the BigTable from Spark Below is the error I am facing while executing the connection

    INFO grpc.BigtableSession: Bigtable options: BigtableOptions{dataHost=bigtable.googleapis.com, tableAdminHost=bigtableadmin.googleapis.com, instanceAdminHost=bigtableadmin.googleapis.com, projectId=ProjectID, instanceId=InstanceForBigTable, userAgent=hbase-1.2.5, credentialType=DefaultCredentials, port=443, dataChannelCount=20, retryOptions=RetryOptions{retriesEnabled=true, allowRetriesWithoutTimestamp=false, statusToRetryOn=[UNAVAILABLE, DEADLINE_EXCEEDED, UNAUTHENTICATED, INTERNAL, ABORTED], initialBackoffMillis=5, maxElapsedBackoffMillis=60000, backoffMultiplier=2.0, streamingBufferSize=60, readPartialRowTimeoutMillis=60000, maxScanTimeoutRetries=3}, bulkOptions=BulkOptions{asyncMutatorCount=2, useBulkApi=true, bulkMaxKeyCount=25, bulkMaxRequestSize=1048576, autoflushMs=0, maxInflightRpcs=1000, maxMemory=715862835, enableBulkMutationThrottling=false, bulkMutationRpcTargetMs=100}, callOptionsConfig=CallOptionsConfig{useTimeout=false, shortRpcTimeoutMs=60000, longRpcTimeoutMs=600000}, usePlaintextNegotiation=false}.

Exception in thread "BigtableSession-startup-1" java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.
    at com.google.bigtable.repackaged.io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:159)
    at com.google.bigtable.repackaged.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:136)
    at com.google.bigtable.repackaged.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:124)
    at com.google.bigtable.repackaged.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:94)
    at com.google.bigtable.repackaged.com.google.cloud.bigtable.grpc.BigtableSession.createSslContext(BigtableSession.java:132)
    at com.google.bigtable.repackaged.com.google.cloud.bigtable.grpc.BigtableSession.access$000(BigtableSession.java:84)
    at com.google.bigtable.repackaged.com.google.cloud.bigtable.grpc.BigtableSession$2.run(BigtableSession.java:159)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

Code which I am trying to create connection

val tableDF: DataFrame = sqlContext.read.options(Map(HBaseTableCatalog.tableCatalog -> hbaseReadSchema))
        .format("org.apache.spark.sql.execution.datasources.hbase").load()

Can Anyone provide reasons for the above-mentioned error?

1

There are 1 answers

0
Igor Bernstein On

This is most likely a dependency issue.

Using bigtable-hbase-1.x-hadoop:1.0.0-pre3 should fix most of the possible dependency pitfalls. It shades all of the bigtable dependencies and is designed to work well with hadoop environments.

As Solomon pointed out in his comment, please model your dependencies after the example on github.