accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2594) Improve TabletLocator.getInstance() to check tableId points to a table which exists
Date Tue, 07 Apr 2015 03:21:12 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482509#comment-14482509
] 

Christopher Tubbs commented on ACCUMULO-2594:
---------------------------------------------

They are checked outside this method, as [~kturner] pointed out. Checking for existence is
outside the scope of the method. And the table can be deleted at any time after the check,
so there isn't much value in an internal check.

> Improve TabletLocator.getInstance() to check tableId points to a table which exists
> -----------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-2594
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2594
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 1.5.0
>            Reporter: Ara Ebrahimi
>            Priority: Minor
>
> If you pass an invalid tableId (or in my case tableName instead of tableId) TabletLocator
won't complain.
> TabletLocator tabletLocator = TabletLocator.getInstance(instance, new Text(tableId));
> Next if you use the returned tabletLocator to locate a tablet it just returns an empty
list, never complaining that the tableId was invalid:
> TabletLocator.TabletLocation tabletLocation = tabletLocator.locateTablet(rowKey.getText(),
false, false, credentials.toThrift());
> Ideally TabletLocator.getInstance() should guard against invalid/non-existing tableIds.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message