怎么配置hbase thrift端口
发布网友
发布时间:2022-04-13 20:12
我来回答
共1个回答
热心网友
时间:2022-04-13 21:41
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;
};