Google Cloud Bigtable HBase shell 连接挂起
Posted
技术标签:
【中文标题】Google Cloud Bigtable HBase shell 连接挂起【英文标题】:Google Cloud Bigtable HBase shell connectivity hangs 【发布时间】:2016-06-13 03:13:26 【问题描述】:首先,我认为这个问题与this post 中的问题有关。但是,在 cmets 中建议的 HBase shell 连接修复对我也不起作用,而且我没有看到任何解决方案。
从 HBase shell 连接到我的 Bigtable 集群只是挂在任何命令上。示例:
ubuntu:/opt/hbase-1.1.2# ./bin/hbase shell
2016-02-29 13:43:38,975 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2016-02-29 13:43:39,114 INFO [main] grpc.BigtableSession: Opening connection for projectId [removed], zoneId us-central1-b, clusterId [removed], on data host bigtable.googleapis.com, table admin host bigtabletableadmin.googleapis.com.
2016-02-29 13:43:39,191 INFO [BigtableSession-startup-0] grpc.BigtableSession: gRPC is using the JDK provider (alpn-boot jar)
2016-02-29 13:43:39,516 INFO [bigtable-connection-shared-executor-pool1-t2] io.RefreshingOAuth2CredentialsInterceptor: Refreshing the OAuth token
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.2, rcc2b70cf03e3378800661ec5cab11eb43fafe0fc, Wed Aug 26 20:11:27 PDT 2015
hbase(main):001:0> list
TABLE
shell 只是无限期地挂在那里,并在输入的任何命令上执行此操作。
这里是 CheckConfig 实用程序的结果:
ubuntu:/opt/hbase-1.1.2# ./bin/hbase com.google.cloud.bigtable.hbase.CheckConfig
User Agent: bigtable-hbase-1.1-0.2.2
Project ID: [removed]
Cluster Id: [removed]
ZoneId: us-central1-b
Cluster admin host: bigtableclusteradmin.googleapis.com
Table admin host: bigtabletableadmin.googleapis.com
Data host: bigtable.googleapis.com
Attempting credential refresh...
Exception in thread "main" java.lang.IllegalAccessError: tried to access field sun.security.ssl.Handshaker.localSupportedSignAlgs from class sun.security.ssl.ClientHandshaker
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:278)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1093)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.google.bigtable.repackaged.com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)
at com.google.bigtable.repackaged.com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:222)
at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:76)
at com.google.cloud.bigtable.hbase.CheckConfig.main(CheckConfig.java:68)
以下是相关版本和环境变量:
Linux ubuntu7 3.19.0-30-generic #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux java version "1.7.0_95" export ALPN_VERSION=7.1.3.v20150130 export HBASE_CLASSPATH="$(pwd)/lib/bigtable/bigtable-hbase-1.1-0.2.2.jar" export HBASE_OPTS="$HBASE_OPTS -Xms1024m -Xmx2048m -Xbootclasspath/p:$(pwd)/lib/bigtable/alpn-boot-$ALPN_VERSION.jar"
对于解决此问题的任何解决方案/建议/提示,我将不胜感激。谢谢!
【问题讨论】:
【参考方案1】:您可能希望使用我们的Quickstart 访问 HBase Shell - 它应该可以正常工作。 (运行 quickstart 后看看 hbase-site & hbase-env 看看以后怎么配置)
Java 的 1.7.0_95 版本与 alpn-boot 不兼容。我们正在移动所有示例以使用 netty-tcnative-boringssl,请参阅 Managed-VM-GAE 示例了解更多信息。
【讨论】:
感谢@Les Vogel。我使用了手动 hbase shell 设置说明,一定错过了兼容版本的说明。我将尝试快速入门,以及 java 8 版本。 Java 7 也可以与 netty-tcnactive-boringssl 工件一起使用。以上是关于Google Cloud Bigtable HBase shell 连接挂起的主要内容,如果未能解决你的问题,请参考以下文章
抛开价格不谈,为啥要选择 Google Cloud Bigtable 而不是 Google Cloud Datastore?
在 Google Cloud Datastore 与 Google Cloud Bigtable 中存储用户事件历史记录
从 google appengine 数据存储迁移到 google cloud bigtable 的最佳方法是啥?