public static Result getRow(String tableName, String rowkey) throws IOException {
Table table = conn.getTable(TableName.valueOf(tableName));
Get g = new Get(Bytes.toBytes(rowkey));
Result result = table.get(g);
table.close();
return result;
}
table.get(g)卡住不动,debug 信息显示 The application is running。
Google 了好久没找到,有的说没有本地配置 Hadoop 主机 hosts,配置了还是没用。
同事和我一样也是 mac 跑同样的程序,他的是没有任何问题的。。。
日志也没有任何消息:
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'hbase.zookeeper.quorum' was supplied but isn't a known config.
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'cloud.api.url' was supplied but isn't a known config.
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'consumer.poll.timeout.ms' was supplied but isn't a known config.
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'cloud.api.secret' was supplied but isn't a known config.
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'video_play_min_sec' was supplied but isn't a known config.
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'kafka.topic' was supplied but isn't a known config.
2017-07-06 11:27:35,521 WARN org.apache.kafka.clients.consumer.ConsumerConfig - The configuration 'hbase.zookeeper.property.clientPort' was supplied but isn't a known config.
2017-07-06 11:27:35,530 INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 0.10.2.0
2017-07-06 11:27:35,530 INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId : 576d93a8dc0cf421
2017-07-06 11:27:37,104 INFO org.apache.kafka.clients.consumer.internals.AbstractCoordinator - Discovered coordinator hadoop1:9092 (id: 2147483647 rack: null) for group hbase32.
2017-07-06 11:27:37,112 INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - Revoking previously assigned partitions [] for group hbase32
2017-07-06 11:27:37,113 INFO org.apache.kafka.clients.consumer.internals.AbstractCoordinator - (Re-)joining group hbase32
2017-07-06 11:27:37,149 INFO org.apache.kafka.clients.consumer.internals.AbstractCoordinator - Successfully joined group hbase32 with generation 19
2017-07-06 11:27:37,153 INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - Setting newly assigned partitions [player_access_log-0] for group hbase32
2017-07-06 11:27:38,443 INFO com.codeages.loader.player.KafkaHBaseConnector - {"path":"/var/log/nginx/test_for_ty.access.log","request":"/res/player.png?data=[{%22action%22%3A%22view%22%2C%22res_id%22%3A%223a4ee7ed4c71409fbc9d6439bfacc282%22%2C%22school_id%22%3A%2223938%22%2C%22res_type%22%3A%22video%22%2C%22user_id%22%3A%22110325%22%2C%22user_name%22%3A%22ES1497943356%22%2C%22res_length%22%3A4503.08%2C%22view_uuid%22%3A%22971e7b1a-b307-4684-967b-3ed9cb13425a%22%2C%22client_uuid%22%3A%225491e11b-47bf-4540-a90a-78d9da5a66ac%22%2C%22client_type%22%3A%22web%22%2C%22init_time%22%3A2.2%2C%22loading_time%22%3A%222.5%22%2C%22level%22%3A%22hd%22}]","agent":"\"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.7 Safari/537.36\"","@timestamp":"2017-07-06T03:02:41.323Z","clientip":"xxx","@version":"1","host":"hadoop1","message":"xxx - - [05/Jul/2017:14:22:26 +0800] \"GET /res/player.png?data=[{%22action%22%3A%22view%22%2C%22res_id%22%3A%223a4ee7ed4c71409fbc9d6439bfacc282%22%2C%22school_id%22%3A%2223938%22%2C%22res_type%22%3A%22video%22%2C%22user_id%22%3A%22110325%22%2C%22user_name%22%3A%22ES1497943356%22%2C%22res_length%22%3A4503.08%2C%22view_uuid%22%3A%22971e7b1a-b307-4684-967b-3ed9cb13425a%22%2C%22client_uuid%22%3A%225491e11b-47bf-4540-a90a-78d9da5a66ac%22%2C%22client_type%22%3A%22web%22%2C%22init_time%22%3A2.2%2C%22loading_time%22%3A%222.5%22%2C%22level%22%3A%22hd%22}] HTTP/1.1\" 200 0 \"http://service-cdn.qiqiuyun.net/js-sdk/video-player/1.1.27/video-player/player.html\" \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.7 Safari/537.36\"","ua":{"patch":"3112","os":"Windows 10","major":"60","minor":"0","name":"Chrome","os_name":"Windows 10","device":"Other"},"timestamp":"05/Jul/2017:14:22:26 +0800"}
还需要什么信息,我可以在回复例提供。
谢谢各位 v 友