meatballspaghetti opened a new pull request, #4996: URL: https://github.com/apache/accumulo/pull/4996
This PR is part of an ongoing work to improve efficiency and reduce slowdown of retrieving and writing namespace names and table names in ZooKeeper. These particular changes modify the namespace names, and **a follow-up PR in the near future will modify the table names**. It replaces the use of the `/name` nodes under namespaces with a namespace id-to-name mapping in a Json format stored under the `/namespaces` node. With this, when any function wants to retrieve a namespace name, ZooKeeper will only need to read the single mapping instead of iterating through all `/name` nodes every time. **New files added for implementation:** - `core/src/main/java/org/apache/accumulo/core/clientImpl/NamespaceMapping.java`: Class that holds functionality for initializing, retrieving, writing, serializing, and deserializing namespace id-to-name map (and name-to-id map). **Files changed for implementation:** - `ClientContext.java`: Allow namespace mapping to be retrieved from ZooKeeper by referencing the context. - `Namespaces.java`: Update namespace name retrieval functionality with new mapping. - `ZooKeeperInitializer.java`: Replace initialization of `default` and `accumulo` `/name` nodes with creation of new mapping. - `TableManager.java`: Update namespace creation functionality to use new mapping. - `RenameNamespace.java`: Replace usage of `/name` node to instead use new mapping. **Files changed for upgrading:** - `Constants.java`: Deprecate `ZNAMESPACE_NAME`, as the `/name` node will no longer be used. - `Upgrader11to12.java`: Build namespace id-to-name mapping in ZooKeeper out of current `/name` nodes. Follow with deletion of `/name` nodes. - `Upgrader11to12Test.java`: Add test code respective to additions made in `Upgrader11to12.java`. Original Issue: #4698 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
