HBase (Intra) Row Transactions
As said in a previous post "HBase ensures that all new versions created by single Put operation for a particular rowkey are either all seen by other clients or seen by none." Indeed HBase can execute atomic Put operations and atomic Delete
As said in a previous post "HBase ensures that all new versions created by single Put operation for a particular rowkey are either all seen by other clients or seen by none."Indeed HBase can execute atomic Put operations and atomic Delete operations (as well as a few specialized operations like Increment and Append).
What HBase cannot currently do is to execute a grouping of different operations atomically. For example you cannot execute a Put and Delete operation atomically.
HBASE-3584 and HBASE-5203 change that. It is now possible to group multiple Puts and Deletes for the same row key together as a single atomic operation. The combined operation is atomic even when the executing regionserver fails half way through the operation.
The client facing API looks like this:
HTable t = ...;
byte[] row = ...;
RowMutation arm = new RowMutation(row);
Put p = new Put(row);
p.add(...)
Delete d = new Delete(now);
p.delete{Column|Columns|Family}(...);
arm.add(p);
arm.add(d);
t.mutateRow(arm);
RowMutation implements the Row interface and can hence itself be part of a multi row batch operation:
HTable t = ...;
byte[] row1, row2;
RowMutation arm1 = new RowMutation(row1);
RowMutation arm2 = new RowMutation(row2);
...
List
rows.add(arm1);
rows.add(arm2);
t.batch(rows);
But note that this multi row batch is not atomic between different rows.
原文地址:HBase (Intra) Row Transactions, 感谢原作者分享。

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

創維安防最近發表了年度旗艦新品-創維智慧螢幕攝影機S50。身為業界首款搭載人工智慧技術的智慧螢幕攝影機,創維智慧螢幕攝影機S50最大的特色是將彩色智慧螢幕與攝影機巧妙地結合,實現了雙向視覺通話的創新功能;強大的2T運算能力使其人工智慧能力得到了大幅提升這款年度旗艦新品外觀極具未來感,細膩磨砂材質,搭載了一塊炫彩可觸控的高清屏,操作絲滑流暢;雙向可視對講,微信視頻通話;500W極清畫質,360°無死角監控;極黑光全彩夜視,再黑也跟白天一樣多彩;12倍智能變焦,放大可看清每一處細節;重寫的內容是:2

隨著大數據時代的到來,資料處理和儲存變得越來越重要,如何有效率地管理和分析大量的資料也成為企業面臨的挑戰。 Hadoop和HBase作為Apache基金會的兩個項目,為大數據儲存和分析提供了一個解決方案。本文將介紹如何在Beego中使用Hadoop和HBase進行大數據儲存和查詢。一、Hadoop和HBase簡介Hadoop是一個開源的分散式儲存和運算系統,它可

依賴:org.springframework.dataspring-data-hadoop-hbase2.5.0.RELEASEorg.apache.hbasehbase-client1.1.2org.springframework.dataspring-data-hadoop2.5.0.RELEASE增加配置官方提供的方式是透過xml方式,簡單改寫後如下:@ConfigurationpublicclassHBaseConfiguration{@Value("${hbase.zooke

如何使用Java開發一個基於HBase的NoSQL資料庫應用引言:隨著大數據時代的到來,NoSQL資料庫成為處理大量資料的重要工具之一。 HBase作為一種開源的分散式NoSQL資料庫系統,在大數據領域有廣泛的應用。本文將介紹如何使用Java來開發基於HBase的NoSQL資料庫應用,並提供具體的程式碼範例。一、HBase介紹:HBase是基於Hadoop的分

随着互联网应用和数据量的不断增长,传统的关系型数据库已经不能满足存储和处理海量数据的需求。而NoSQL(NotOnlySQL)作为一种新型的数据库管理系统,其能够在海量数据存储和处理方面具有显著的优势,得到越来越多的关注和应用。在NoSQL数据库中,ApacheHBase是一个非常流行的开源分布式数据库,它基于Google的BigTable思想设计,具

隨著大數據時代的到來,海量資料的儲存和處理顯得格外重要。在NoSQL資料庫方面,HBase是目前廣泛應用的解決方案。 Go語言作為靜態強類型程式語言,由於其語法簡單、效能優秀,越來越多地應用於雲端運算、網站開發和資料科學等領域。本文將介紹如何在Go語言中使用HBase來實現高效率的NoSQL資料庫應用。 HBase介紹HBase是高可擴展、高可靠性、基

在Beego框架中使用HBase進行資料儲存和查詢隨著網路時代的不斷發展,資料儲存和查詢變得越來越關鍵。大數據時代來臨,各種資料來源都在各自不同的領域佔據著重要地位,其中非關係型資料庫是一種在資料儲存和查詢方面優勢明顯的資料庫,而HBase是一種基於Hadoop的分散式非關係型資料庫。本文將介紹如何在Beego框架中使用HBase進行資料儲存與查詢。一、H

Workerman是高效能的PHPsocket框架,它的特點是可以承載大量的並發連接。與傳統的PHP框架不同的是,Workerman不依賴Apache或Nginx等Web伺服器,而是透過開啟一個PHP進程,獨自運行整個應用程式。 Workerman具有極高的運作效率和更好的負載能力。同時,HBase是一個分散式的NoSQL資料庫系統,廣泛應用於大數
