put get with timestamp
(table)
| 179 | |
| 180 | |
| 181 | def put_get_with_timestamp(table): |
| 182 | """ put get with timestamp """ |
| 183 | print("\nput_get_with_timestamp") |
| 184 | key = "nput_get_with_timestamp" |
| 185 | mu = table.NewRowMutation(key) |
| 186 | mu.PutWithTimestamp("cf0", "qu0", 42, "value") |
| 187 | table.ApplyMutation(mu) |
| 188 | while not table.IsPutFinished(): |
| 189 | time.sleep(0.01) |
| 190 | |
| 191 | reader = table.NewRowReader(key) |
| 192 | reader.AddColumn("cf0", "qu0") |
| 193 | table.ApplyReader(reader) |
| 194 | while not table.IsGetFinished(): |
| 195 | time.sleep(0.01) |
| 196 | |
| 197 | status = reader.GetStatus() |
| 198 | if status.GetReasonNumber() != Status.OK: |
| 199 | print(status.GetReasonString()) |
| 200 | return |
| 201 | while not reader.Done(): |
| 202 | row = reader.RowKey() |
| 203 | column = reader.Family() + ":" + reader.Qualifier() |
| 204 | timestamp = str(reader.Timestamp()) |
| 205 | assert reader.Timestamp() == 42 |
| 206 | val = reader.Value() |
| 207 | print row + ":" + column + ":" + timestamp + ":" + val |
| 208 | reader.Next() |
| 209 | |
| 210 | |
| 211 | def put_get_int64(table, rowkey, cf, qu, value): |
no test coverage detected