【发布时间】:2020-01-16 23:45:33
【问题描述】:
在我的 Cloud Bigtable 表中,我每秒有数百万个请求。我得到一个唯一的行键,然后我需要用原子突变修改行。
当我按列过滤以获取密钥时,每个请求都会是原子的吗?
col1_filter = row_filters.ColumnQualifierRegexFilter(b'customerId')
label1_filter = row_filters.ValueRegexFilter('')
chain1 = row_filters.RowFilterChain(filters=[col1_filter, label1_filter])
partial_rows = table.read_rows(filter_=chain1)
for data in partial_rows:
row_cond = table.row(data.cell[row_key])
row_cond.set_cell(u'data', b'customerId', b'value', state=True)
row_cond.commit()
【问题讨论】:
标签: python bigtable google-cloud-bigtable