Fetch multiple rows of data from the hbase table. Arguments: table_name: Name of the Hbase table. row_keys: List of row key of the row to be inserted to hbase table. columns: the name of columns that needs to be fetched. timestamp: ti
(
self,
table_name: str,
row_keys,
columns=None,
timestamp=None,
include_timestamp=False,
)
| 135 | return table.row(row_key, columns, timestamp, include_timestamp) |
| 136 | |
| 137 | def rows( |
| 138 | self, |
| 139 | table_name: str, |
| 140 | row_keys, |
| 141 | columns=None, |
| 142 | timestamp=None, |
| 143 | include_timestamp=False, |
| 144 | ): |
| 145 | """ |
| 146 | Fetch multiple rows of data from the hbase table. |
| 147 | |
| 148 | Arguments: |
| 149 | table_name: Name of the Hbase table. |
| 150 | row_keys: List of row key of the row to be inserted to hbase table. |
| 151 | columns: the name of columns that needs to be fetched. |
| 152 | timestamp: timestamp specifies the maximum version the cells can have. |
| 153 | include_timestamp: specifies if (column, timestamp) to be return instead of only column. |
| 154 | """ |
| 155 | with self.pool.connection() as conn: |
| 156 | table = conn.table(table_name) |
| 157 | return table.rows(row_keys, columns, timestamp, include_timestamp) |
| 158 | |
| 159 | def print_table(self, table_name): |
| 160 | """Prints the table scanning all the rows of the hbase table.""" |
no test coverage detected