1.1) static Client* NewClient(const std::string& confpath, const std::string& log_prefix, ErrorCode* err = NULL)
1.2) static Client* NewClient(const std::string& confpath, ErrorCode* err = NULL)
1.3) static Client* NewClient()
Table* OpenTable(const std::string& table_name, ErrorCode* err) = 0
1) bool CreateTable(const TableDescriptor& desc, ErrorCode* err) = 0 //新建带有具体描述符的表格
2) bool CreateTable(const TableDescriptor& desc, const std::vector<std::string>& tablet_delim, ErrorCode* err) = 0 //新建多个前缀为tablet_delim的tablets
bool ClientImpl::UpdateTableSchema(const TableDescriptor& desc, ErrorCode* err) = 0
调用UpdateTable(desc, err),分两种情况:
- 更新lg属性。需要先disable表格
- 更新cf属性。直接更新
bool UpdateCheck(const std::string& table_name, bool* done, ErrorCode* err) = 0
暂停表,表格不再提供读、写服务。某些属性的更新需要先disable表;使用drop删除表时,需要先执行disable操作,此操作不可回滚。
bool DisableTable(const std::string& name, ErrorCode* err) = 0
删除处于disable状态的表格,此操作不可回滚。
bool DropTable(const std::string& name, ErrorCode* err) = 0
将处于disable状态的表格重新enable,恢复读、写服务。
bool EnableTable(const std::string& name, ErrorCode* err) = 0
TableDescriptor* GetTableDescriptor(const std::string& table_name, ErrorCode* err) = 0
bool List(std::vector<TableInfo>* table_list, ErrorCode* err) = 0;//列出所有的表
bool List(const std::string& table_name, TableInfo* table_info, std::vector<TabletInfo>* tablet_list, ErrorCode* err) = 0;//获取指定的表
bool IsTableExist(const std::string& table_name, ErrorCode* err) = 0
bool IsTableEnabled(const std::string& table_name, ErrorCode* err) = 0
bool IsTableEmpty(const std::string& table_name, ErrorCode* err) = 0
bool CmdCtrl(const std::string& command, const std::vector<std::string>& arg_list, bool* bool_result, std::string* str_result, ErrorCode* err) = 0
void SetGlogIsInitialized()
bool DeleteTable(const std::string& name, ErrorCode* err) = 0
bool UpdateTable(const TableDescriptor& desc, ErrorCode* err) = 0
bool GetTabletLocation(const std::string& table_name, std::vector<TabletInfo>* tablets, ErrorCode* err) = 0
bool Rename(const std::string& old_table_name, const std::string& new_table_name, ErrorCode* err) = 0
bool ClientImpl::CreateUser(const std::string& user,
const std::string& password, ErrorCode* err) = 0
bool ClientImpl::DeleteUser(const std::string& user, ErrorCode* err) = 0
bool ClientImpl::ChangePwd(const std::string& user, const std::string& password, ErrorCode* err) = 0
bool ClientImpl::ShowUser(const std::string& user, std::vector<std::string>& user_groups, ErrorCode* err) = 0
bool ClientImpl::AddUserToGroup(const std::string& user_name, const std::string& group_name, ErrorCode* err)= 0
bool ClientImpl::DeleteUserFromGroup(const std::string& user_name, const std::string& group_name, ErrorCode* err) = 0