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作业的输出目标。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值