[
https://issues.apache.org/jira/browse/HBASE-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175284#comment-13175284
]
stack commented on HBASE-5041:
------------------------------
I think patch is doing right thing. Its changing the contract for isRegionName
but this is a private method and you are tightening what was a sloppy contract
previous; it looks too like all instances of isRegionName can benefit from this
tightening (is this your though Shrijeet?).
Here's a few comments on the patch:
This bit of code is repeated three time:
{code}
+ final String tableName = Bytes.toString(tableNameOrRegionName);
+ if (!MetaReader.tableExists(ct, tableName)) {
+ throw new TableNotFoundException(tableName);
+ }
{code}
... which isn't the end of the world but if you are going to cut a new
patch..... you might make a method that returns a String tablename for a table
you know exists (else it throws the TNFE).
Then, given who the author of this patch is, I wonder about the below:
{code}
+ CatalogTracker ct = getCatalogTracker();
+ try {
+ return (MetaReader.getRegion(ct, tableNameOrRegionName) != null);
+ } finally {
+ cleanupCatalogTracker(ct);
+ }
{code}
We are creating a new CatalogTracker instance. No one seems to be shutting it
down? Is that a prob?
Otherwise, patch is good by me.
> Major compaction on non existing table does not throw error
> ------------------------------------------------------------
>
> Key: HBASE-5041
> URL: https://issues.apache.org/jira/browse/HBASE-5041
> Project: HBase
> Issue Type: Bug
> Components: regionserver, shell
> Affects Versions: 0.90.3
> Reporter: Shrijeet Paliwal
> Assignee: Shrijeet Paliwal
> Fix For: 0.92.0, 0.94.0, 0.90.6
>
> Attachments: 0001-HBASE-5041-Throw-error-if-table-does-not-exist.patch
>
>
> Following will not complain even if fubar does not exist
> {code}
> echo "major_compact 'fubar'" | $HBASE_HOME/bin/hbase shell
> {code}
> The downside for this defect is that major compaction may be skipped due to
> a typo by Ops.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira