<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      HBase Thrift接口C++客戶端

      hbase-thrift項(xiàng)目是對(duì)HBase Thrift接口的封裝,屏蔽底層的細(xì)節(jié),使用戶可以方便地通過(guò)HBase Thrift接口訪問(wèn)HBase集群,同時(shí)基于此對(duì)C++客戶端讀寫的效率進(jìn)行了簡(jiǎn)單的測(cè)試。該項(xiàng)目目前基于的是HBase thrift接口,至于HBase 0.94版本中的HBase thrift2接口,后續(xù)再考慮進(jìn)一步的支持。

      前提條件

      1)下載,解壓,安裝 thrift-0.8.0

      wget https://dist.apache.org/repos/dist/release/thrift/0.8.0/thrift-0.8.0.tar.gz
      tar zxvf thrift-0.8.0.tar.gz
      sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel
      cd thrift-0.8.0
      ./configure
      make
      sudo make install

      2)下載,解壓 hbase-0.92.1 或之前的版本,用戶根據(jù)Hbase.thrift文件生成客戶端thrift接口代碼實(shí)現(xiàn)。

      wget http://www.fayea.com/apache-mirror/hbase/hbase-0.92.1/hbase-0.92.1.tar.gz
      tar zxvf hbase-0.92.1.tar.gz

      接口實(shí)現(xiàn)

      目前已封裝實(shí)現(xiàn)的接口如下:

      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<TTransport> socket;
          boost::shared_ptr<TTransport> transport;
          boost::shared_ptr<TProtocol> protocol;
          HbaseClient client;
          bool _is_connected;
          
      };

      編譯安裝

      1)運(yùn)行thrift命令,生成C++模塊的客戶端代碼:

      thrift --gen cpp [hbase-root]/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift

      2)執(zhí)行make生成二進(jìn)制程序:

      make demo
      make perf

      3)執(zhí)行二進(jìn)制程序:

        ./demo <host> <port>
        ./testput <host> <port> <key_len> <val_len> <list_num>
        ./testget <host> <port> <key_len> <val_len> <list_num> <block_cache_flag>

      暫時(shí)更新這些內(nèi)容,感興趣的,詳見(jiàn):https://github.com/ypf412/hbase-thrift

      posted on 2012-08-28 13:08  大圓那些事  閱讀(11521)  評(píng)論(0)    收藏  舉報(bào)

      導(dǎo)航

      主站蜘蛛池模板: 亚洲AV成人片不卡无码| 亚洲国产在一区二区三区| 黑巨人与欧美精品一区| 国产午夜福利一区二区三区| 国产高清在线精品一区APP| 亚洲精品美女一区二区| 精品自拍偷拍一区二区三区| 国产午夜福利短视频| 日本真人做爰免费的视频| 无码AV动漫精品一区二区免费| 色欲狠狠躁天天躁无码中文字幕| 国产精品一二三入口播放| 久久成人 久久鬼色| 成全影视大全在线观看| 亚洲红杏AV无码专区首页| 国产99久久亚洲综合精品西瓜tv| 精品国产大片中文字幕| 巴东县| 国产毛片精品一区二区色| 美女扒开尿口让男人桶| 久久国内精品一国内精品| 污污污污污污WWW网站免费| 日韩av在线不卡一区二区三区| 精品久久人人做爽综合| 丁香花在线观看免费观看图片 | 美日韩精品综合一区二区| 激情综合网五月婷婷| 欧美精品18videosex性欧美| 久久精品国产亚洲夜色AV网站 | 国产在线中文字幕精品| 亚洲欧洲日产国码AV天堂偷窥 | 天天爽夜夜爽人人爽曰| 蜜桃AV抽搐高潮一区二区| 亚洲AV成人片不卡无码| 亚洲AV成人片不卡无码| 一本一道av中文字幕无码| 人妻激情乱人伦视频| 国产无码高清视频不卡| 亚洲av激情久久精品人| 午夜男女爽爽影院免费视频下载| 2020国产欧洲精品网站|