HashBaseTable is a part of collections google guava library.  This views returned by column, columnKeySet and columnMap have iterators than don’t support romove(). Otherwise, all optional operations are supported. Null values is not supported( column, row and values).

Lookups by row key are often faster than lookups by collumn key, because the data is stored in a Map<Row,Map<Column,Value>>. A method call like column(Key).get(RowKey) still runs quickly, since the row key is provided. However, column(Key).size() takes longer, since an iteration accross all row key occurs.

Note : HashBaseTable implementation is not synchronized. if multiple threads access this table concurerntly and one of the threads modifies the table. it mus be syncrhonized externally.

Let see the Example Code to use HashBaseTable.

The Result

Visit My Repository for full code


Google Guava HashTable