V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ekoeko
V2EX  ›  Hadoop

求助: Java 连接 hbase 卡住不报错。

  •  
  •   ekoeko · 2017-07-06 11:44:23 +08:00 · 6109 次点击
    这是一个创建于 2726 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 友
    3 条回复    2017-07-06 12:47:34 +08:00
    funky
        1
    funky  
       2017-07-06 12:03:44 +08:00   ❤️ 1
    这里一般是集群上的所有 host 都需要在本地 host 配置一遍,而且你确定你本地练得上线上集群?
    funky
        2
    funky  
       2017-07-06 12:08:18 +08:00   ❤️ 1
    你设置了 hbase Zookeeper Quorum??
    ekoeko
        3
    ekoeko  
    OP
       2017-07-06 12:47:34 +08:00
    @funky 太太太感激了,我只配了主节点的。。。全部配置了就好了。。。wtf !
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2895 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 14:20 · PVG 22:20 · LAX 06:20 · JFK 09:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.