Move TableId and NamespaceId to public API#950
Conversation
* Move TableId and NamespaceId to public API package for use in SPI and elsewhere, as needed. * Retain AbstractId (in public API) for common implementation, and because our internal namespace/table locking mechanism and unique ID generation is agnostic to the specific ID type. * Consolidate some constants for built-in tables/namespaces. * Shorten/simplify/reduce API method names.
|
This supersedes #938 |
| } | ||
|
|
||
| public Table.ID getTableId() { | ||
| public TableId getTableId() { |
There was a problem hiding this comment.
In 1.9 this returned a string.
There was a problem hiding this comment.
This PR didn't make that change. It just made the change from an internal type to a public API type.
There was a problem hiding this comment.
yeah I know it didn't make the change... its just something I noticed. The change was made in the switch to Table IDs
|
It looks like the build is failing due to error below: |
Hmm, I'll take a look. I didn't see that fail, but I could have missed it. I thought the Travis build was failing due to sec-bugs timing out... which it frequently does in Travis. |
| @Override | ||
| public Text getTableId() { | ||
| return new Text(ke.getTableId().getUtf8()); | ||
| return new Text(ke.getTableId().canonical()); |
There was a problem hiding this comment.
Would be nice if we deprecated this method for a new one that returns the new TableId type. I think its confusing to have two different types returned across our API.
There was a problem hiding this comment.
The more we can deprecate Text from our API, the better.
|
Will fix sec-bugs errors next. Merging now to facilitate follow-on issues which might otherwise cause conflicts later. |
elsewhere, as needed.
because our internal namespace/table locking mechanism and unique ID
generation is agnostic to the specific ID type.