Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # dev - isRegionName logic in HBaseAdmin


Copy link to this message
-
Re: isRegionName logic in HBaseAdmin
Shrijeet Paliwal 2011-12-23, 04:58
Stack,
We took the discussion here  HBASE-5041
I uploaded a patch . Could you please review?

On Thu, Dec 22, 2011 at 8:27 PM, Stack <[EMAIL PROTECTED]> wrote:
> On Thu, Dec 22, 2011 at 3:01 PM, Shrijeet Paliwal
> <[EMAIL PROTECTED]> wrote:
>>  private boolean isRegionName(final byte [] tableNameOrRegionName)
>>  throws IOException {
>>    if (tableNameOrRegionName == null) {
>>      throw new IllegalArgumentException("Pass a table name or region name");
>>    }
>>    return !tableExists(tableNameOrRegionName);
>>  }
>>
>
> The above is a bit crass for sure; if not a table name, it MUST BE a
> region name.
>
>> What do others think about changing this logic? I do not have enough
>> insight to propose an alternative.
>
> Should we next go look for a region in .META.?  Or do this optionally?
>  Make new methods isTableName and isRegionName with each doing looksee
> if table/region exists?
>
> Open to any suggestion....
>
> St.Ack