Bigtable: A Distributed Storage System for Structured Data : part3 API

3 API
The Bigtable API provides functions for creating and deleting tables and column families. 
It also provides functions for changing cluster, table, and column family metadata, such as access control rights.
Client applications can write or delete values in Bigtable, look up values from individual rows, or iterate over a subset of the data in a table. 

3 API
Bigtable API提供了創建和刪除表和column families的功能。
它還提供了更改集羣,表和column family元數據(如訪問控制權限)的功能。
客戶端應用程序可以在Bigtable中寫入或刪除值,從各個行查找值,或者迭代表中某個數據的子集。



Figure 2 shows C++ code that uses a RowMutation abstraction to perform a series of updates.
 (Irrelevant details were elided to keep the example short.) 
The call to Apply performs an atomic mutation to the Webtable: 
it adds one anchor to www.cnn.com and deletes a different anchor.

圖2顯示了使用RowMutation抽象來執行一系列更新的C++代碼。(無關緊要的細節,以保持這個例子很短)

對Apply的調用對Webtable執行原子突變:它向www.cnn.com添加一個anchor,並刪除不同的anchor。



Figure 3 shows C++ code that uses a Scanner abstraction to iterate over all anchors in a particular row.
Clients can iterate over multiple column families, and there are several mechanisms for limiting the rows,columns, and timestamps produced by a scan. 

圖3顯示了使用掃描器抽象來迭代特定行中的所有錨點的C++代碼。
客戶端可以遍歷多個列系列,並且有幾種限制掃描產生的[行,列和時間戳]的機制。

For example, we could restrict the scan above to only produce anchors whose columns match the regular expression anchor:*.cnn.com, 
or to only produce anchors whose timestamps fall within ten days of the current time.

例如,我們可以將上面的掃描限制爲僅生成其columns與正則表達式匹配的 anchor:*.cnn.com,或僅產生時間戳在當前時間的十天內的anchor。

Bigtable supports several other features that allow the user to manipulate data in more complex ways. 
First, Bigtable supports single-row transactions, which can be used to perform atomic read-modify-write sequences on data stored under a single row key. 
Bigtable does not currently support general transactions across row keys, although it provides an interface for batching writes across row keys at the clients. 
Second, Bigtable allows cells to be used as integer counters. 
Finally, Bigtable supports the execution of client-supplied scripts in the address spaces of the servers. 
The scripts are written in a language developed at Google for processing data called Sawzall. 
At the moment, our Sawzall-based API does not allow client scripts to write back into Bigtable,but it does allow various forms of data transformation, filtering based on arbitrary expressions, and summarization via a variety of operators.
Bigtable can be used with MapReduce , a framework for running large-scale parallel computations developed at Google. 
We have written a set of wrappers that allow a Bigtable to be used both as an input source and as an output target for MapReduce jobs.

Bigtable支持其他幾個功能,允許用戶以更復雜的方式操縱數據。
(1)Bigtable支持single-row 事務,可以用於對存儲在single row key下的數據執行原子 [讀取-修改-寫入] 序列。Bigtable目前不支持跨鍵的一般事務,儘管它提供了一個接口,用於在客戶端的行鍵上批量寫入。
(2)Bigtable允許將單元格用作整數計數器。
(3)Bigtable支持在服務器的地址空間中執行客戶端提供的腳本。
這些腳本是用[Google開發的一種語言]編寫的,用於處理名爲Sawzall的數據。
目前,我們基於Sawzall的API不允許客戶端腳本寫回Bigtable,但它允許各種形式的數據轉換,基於任意表達式的過濾,以及通過各種運算符進行彙總。
Bigtable可以與MapReduce一起使用,MapReduce是在Google開發的大規模並行計算的框架。
我們已經寫了一套包裝器,它允許將BigTable用作輸入源,也可以用作MapReduce作業的輸出目標。
發佈了63 篇原創文章 · 獲贊 24 · 訪問量 6萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章