hbase 需要开放哪些端口
答案:2 悬赏:0 手机版
解决时间 2021-03-16 09:00
- 提问者网友:沉默菋噵
- 2021-03-15 14:59
hbase 需要开放哪些端口
最佳答案
- 五星知识达人网友:北方的南先生
- 2021-03-15 16:13
class HbCli {
public:
// Constructor and Destructor
HbCli(const char *server, const char *port);
~HbCli();
// Util Functions
bool connect();
bool disconnect();
bool reconnect();
inline bool isconnect();
// HBase DDL Functions
bool createTable(const std::string table, const ColVec &columns);
bool deleteTable(const std::string table);
bool tableExists(const std::string table);
// HBase DML Functions
bool putRow(const std::string table, const std::string row, const std::string column, const std::string value);
bool putRowWithColumns(const std::string table, const std::string row, const StrMap columns);
bool putRows(const std::string table, const RowMap rows);
bool getRow(const std::string table, const std::string row, ResVec &rowResult);
bool getRowWithColumns(const std::string table, const std::string row, const StrVec columns, ResVec &rowResult);
bool getRows(const std::string table, const StrVec rows, ResVec &rowResult);
bool getRowsWithColumns(const std::string table, const StrVec rows, const StrVec columns, ResVec &rowResult);
bool delRow(const std::string table, const std::string row);
bool delRowWithColumn(const std::string table, const std::string row, const std::string column);
bool delRowWithColumns(const std::string table, const std::string row, const StrVec columns);
bool scan(const std::string table, const std::string startRow, StrVec columns, ResVec &values);
bool scanWithStop(const std::string table, const std::string startRow, const std::string stopRow, StrVec columns, ResVec &values);
// HBase Util Functions
void printRow(const ResVec &rowResult);
private:
boost::shared_ptr socket;
boost::shared_ptr transport;
boost::shared_ptr protocol;
HbaseClient client;
bool _is_connected;
};
public:
// Constructor and Destructor
HbCli(const char *server, const char *port);
~HbCli();
// Util Functions
bool connect();
bool disconnect();
bool reconnect();
inline bool isconnect();
// HBase DDL Functions
bool createTable(const std::string table, const ColVec &columns);
bool deleteTable(const std::string table);
bool tableExists(const std::string table);
// HBase DML Functions
bool putRow(const std::string table, const std::string row, const std::string column, const std::string value);
bool putRowWithColumns(const std::string table, const std::string row, const StrMap columns);
bool putRows(const std::string table, const RowMap rows);
bool getRow(const std::string table, const std::string row, ResVec &rowResult);
bool getRowWithColumns(const std::string table, const std::string row, const StrVec columns, ResVec &rowResult);
bool getRows(const std::string table, const StrVec rows, ResVec &rowResult);
bool getRowsWithColumns(const std::string table, const StrVec rows, const StrVec columns, ResVec &rowResult);
bool delRow(const std::string table, const std::string row);
bool delRowWithColumn(const std::string table, const std::string row, const std::string column);
bool delRowWithColumns(const std::string table, const std::string row, const StrVec columns);
bool scan(const std::string table, const std::string startRow, StrVec columns, ResVec &values);
bool scanWithStop(const std::string table, const std::string startRow, const std::string stopRow, StrVec columns, ResVec &values);
// HBase Util Functions
void printRow(const ResVec &rowResult);
private:
boost::shared_ptr socket;
boost::shared_ptr transport;
boost::shared_ptr protocol;
HbaseClient client;
bool _is_connected;
};
全部回答
- 1楼网友:渡鹤影
- 2021-03-15 17:06
hbase的安装包里面有自带zookeeper的。很多系统部署也是直接启动上面的zookeeper。本来也是没有问题的,想想吧,系统里也只有hbase在用zookeeper。先启动zookeeper,再将hbase起来就好了
?
但是今天遇到了一个很蛋疼的问题。和同事争论了很久。
?
因为我们是好多hbase集群共用一个zookeeper的,其中一个集群需要从hbase 0.90.2 升级到hbase 0.92上,自然,包也要更新。但是其中一台regionserver上面同时也有跑zookeeper,而zookeeper还是用hbase 0.90.2 自带的zookeeper在跑。
?
现在好了,升级一个regionserver,连着zookeeper也要受到牵连,看来必须要重启,不然,jar包替换掉,可能会影响到zk正在跑的经常。但是重启zk毕竟对正在连接这个zk的client端会有短暂的影响。
?
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯