1.zookeeper返回的hbase地址是hostname,外网如何访问?
如果需要直接访问zk获取hbase地址进而访问,目前需要本机配置host
ip hostname
如果是要长期解决方法,那么只能通过搭建个Nginx来转发
2.Hbase本地Java测试写数据失败,端口访问不到
答:
这个是因为搭建的单机版本,然后regionServer配置的hostname,
在启动的时候会绑定端口hostname:16201(见/bin/local-regionservers.sh),
然后解析ubuntu的时候绑定的是127.0.0.1:16201,
所以外面访问不到.
解决:
修改hbase所在机器的host
127.0.0.1 myhostname
改为
10.0.0.1 myhostname
集群模式也一样,即/etc/hosts里面配置的hostname要指向本机ip
使用命令hostname查看本机hostname
http://blog.csdn.net/chaijunkun/article/details/44238163
ps:
(其实搭建hbase时候本应就指定好/etc/hosts里面的hostname对应具体ip,由于本人第一次搭建因此没注意所以踩了这个坑)
3.TSDB使用rest接口写数据OK,但是使用client写入不进数据?
现象:metric创建成功,但是没有数据
代码如下:
package net.opentsdb.core;
import com.stumbleupon.async.Callback;
import com.stumbleupon.async.Deferred;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import net.opentsdb.utils.Config;