sync_get_batch
(table)
| 130 | |
| 131 | |
| 132 | def sync_get_batch(table): |
| 133 | """ sync_get_batch """ |
| 134 | print("\nsync get batch") |
| 135 | s1 = long(time.time() * 1000) |
| 136 | reader_list = list() |
| 137 | for i in range(1, 1001): |
| 138 | reader = table.NewRowReader(str(i)) |
| 139 | # read column cf0:qu0 |
| 140 | reader.AddColumn("cf0", "qu0") |
| 141 | reader_list.append(reader) |
| 142 | table.BatchGet(reader_list) |
| 143 | for r in reader_list: |
| 144 | status = r.GetStatus() |
| 145 | if status.GetReasonNumber() != Status.OK: |
| 146 | print("get/read failed for key<" + r.RowKey() |
| 147 | + "> due to:" + status.GetReasonString()) |
| 148 | else: |
| 149 | # print(r.Value()) |
| 150 | pass |
| 151 | r.Destroy() |
| 152 | e1 = long(time.time() * 1000) |
| 153 | print(str(e1 - s1) + " ms") |
| 154 | |
| 155 | |
| 156 | def async_put(table): |
no test coverage detected