成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

Python通過Thrift插入Hbase實(shí)驗(yàn)

#python
from thrift import Thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol

創(chuàng)新互聯(lián)公司專注于鐵鋒企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站設(shè)計(jì),商城建設(shè)。鐵鋒網(wǎng)站建設(shè)公司,為鐵鋒等地區(qū)提供建站服務(wù)。全流程按需網(wǎng)站策劃,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)

from hbase import Hbase
from hbase.ttypes import *

transport = TSocket.TSocket('192.168.137.101',9090)

transport = TTransport.TBufferedTransport(transport)

protocol = TBinaryProtocol.TBinaryProtocol(transport)

client = Hbase.Client(protocol)
transport.open()

mutations = [Mutation(column="tuser:b",value="1")]

#client.mutateRow('ttable0','rowkey1', mutations, None)

for l1 in range(10):
for l2 in range(10):
for l3 in range(10):
for l4 in range(10):
client.mutateRow('ttable0','%d'%l1+'%d'%l2+'%d'%l3+'%d'%l4, mutations, None)

print 'finished'

4臺centos虛擬機(jī)

2.2Ghz CPU × 1

1.5GB內(nèi)存

共享單硬盤

插入1000條用時(shí)93秒,平均一秒插入107條

復(fù)制0.py為1.py, 2.py ……8.py

開啟9個(gè)進(jìn)程分別插入ttable0, ttable1, ttable2 ……ttable8

其它條件不變,總共用時(shí)約220秒,平均一秒插入409條

分享標(biāo)題:Python通過Thrift插入Hbase實(shí)驗(yàn)
標(biāo)題URL:http://jinyejixie.com/article24/jpocce.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站營銷型網(wǎng)站建設(shè)、網(wǎng)站內(nèi)鏈ChatGPT、App開發(fā)品牌網(wǎng)站設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化
铜鼓县| 漳州市| 巴马| 奉贤区| 蒲江县| 铜梁县| 达日县| 克拉玛依市| 壤塘县| 盐源县| 常州市| 常州市| 于田县| 会同县| 屏东市| 浏阳市| 曲阳县| 柘城县| 藁城市| 鹤壁市| 乌苏市| 吉林市| 双峰县| 鲁甸县| 阜城县| 绥中县| 三明市| 孟州市| 项城市| 资溪县| 永春县| 永城市| 桦川县| 余江县| 缙云县| 分宜县| 桦甸市| 论坛| 靖边县| 林周县| 大埔县|