apache/accumulo

Create table name to table id map in zookeeper

keith-turner opened this issue · 3 comments

Tables in zookeeper are conceptually organized as a Map<TableId, TableName>. A lot of code in the Accumulo client needs the inverse Map< TableName, TableId>. There is complex code in the Accumulo client related to inverting the map in zookeeper and keeping it up to date. If an index were built in zookeeper of the form Map< TableName, TableId> then the complex code in the client could possibly be removed. Also mapping a table name to table id could be more efficient, avoiding always reading all tables to map a single table name to a table id. This would reduce the load on zookeeper server for the case of lots of client and lots of tables. For more details see the comments on #4684.

I think the best way to do this would be to remove all the names from under each table, and create a new single node (maybe per namespace?) that retains the table name mapping for all tables. Otherwise, it would be a nightmare to try to maintain consistency between the locations. I might be interested in working on this or helping direct somebody else. @meatballspaghetti recently asked me for ideas of what issues to work on, and might be interested in this.

@ctubbsii - if you are interested in this then feel free to re-assign this issue to @meatballspaghetti or anyone else, I haven't started working on it and it's more of a nice to have feature for performance so there's no rush so I unassigned myself for now.

I can look into this.