You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2008/07/01 07:13:45 UTC

[jira] Resolved: (HBASE-717) alter table broke with new shell returns InvalidColumnNameException

     [ https://issues.apache.org/jira/browse/HBASE-717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-717.
-------------------------

    Resolution: Fixed

Thanks for reporting the bug Billy (and thanks for exercising the shell).

Was a small bug in the alter column code:

{code}
durruti:~/Documents/checkouts/trunk stack$ svn diff
Index: src/java/org/apache/hadoop/hbase/master/ModifyColumn.java
===================================================================
--- src/java/org/apache/hadoop/hbase/master/ModifyColumn.java   (revision 672999)
+++ src/java/org/apache/hadoop/hbase/master/ModifyColumn.java   (working copy)
@@ -44,7 +44,7 @@
   protected void postProcessMeta(MetaRegion m, HRegionInterface server)
   throws IOException {
     for (HRegionInfo i: unservedRegions) {
-      if (!i.getTableDesc().hasFamily(columnName)) {
+      if (i.getTableDesc().hasFamily(columnName)) {
         i.getTableDesc().addFamily(descriptor);
         updateRegionInfo(server, m.getRegionName(), i);
       } else { // otherwise, we have an error.
{code}

Now it seems to work, with or without the colon:

{code}
durruti:~/Documents/checkouts/trunk stack$ ./bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.2.0-dev, r672988, Mon Jun 30 22:06:16 PDT 2008
hbase(main):001:0> create 't1', 'f1'
0 row(s) in 10.1930 seconds
hbase(main):002:0> disable 't1'
08/06/30 22:09:20 INFO client.HBaseAdmin: Disabled t1
0 row(s) in 10.0340 seconds
hbase(main):003:0> describe 't1' 
NAME => 't1', FAMILIES => [{NAME => 'f1', VERSIONS => 3, COMPRESSION => 'NONE', IN_MEMORY => false, BLOCKCACHE
 => false, LENGTH => 2147483647, TTL => FOREVER, BLOOMFILTER => NONE}]                                        
1 row(s) in 0.0110 seconds
hbase(main):004:0> alter 't1', {NAME => 'f1', VERSIONS => 1}
0 row(s) in 0.0130 seconds
hbase(main):005:0> describe 't1'                            
NAME => 't1', FAMILIES => [{NAME => 'f1', VERSIONS => 1, COMPRESSION => 'NONE', IN_MEMORY => false, BLOCKCACHE
 => false, LENGTH => 2147483647, TTL => FOREVER, BLOOMFILTER => NONE}]                                        
1 row(s) in 0.0050 seconds
{code}

Resolving

> alter table broke with new shell returns InvalidColumnNameException
> -------------------------------------------------------------------
>
>                 Key: HBASE-717
>                 URL: https://issues.apache.org/jira/browse/HBASE-717
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>         Environment: hbase trunk rev:671438
>            Reporter: Billy Pearson
>            Priority: Critical
>             Fix For: 0.2.0
>
>
> create table disable table alter table output below:
> {code}
> hbase(main):041:0> create 't1', {NAME => 'f1', VERSIONS => 5}
> 08/06/30 01:26:43 DEBUG client.HConnectionManager$TableServers: reloading table servers because: No server address listed in .META. for region t1,,1214807203247
> 08/06/30 01:26:43 DEBUG client.HConnectionManager$TableServers: Removed .META.,,1 from cache because of t1,,99999999999999
> 08/06/30 01:26:43 DEBUG client.HConnectionManager$TableServers: Found ROOT REGION => {NAME => '-ROOT-,,0', STARTKEY => '', ENDKEY => '', ENCODED => 70236052, TABLE => {NAME => '-ROOT-', FAMILIES => [{NAME => 'info', VERSIONS => 1, COMPRESSION => 'NONE', IN_MEMORY => false, BLOCKCACHE => false, LENGTH => 2147483647, TTL => FOREVER, BLOOMFILTER => NONE}]}
> 0 row(s) in 10.4300 seconds
> hbase(main):042:0> disable 't1'
> 08/06/30 01:27:08 DEBUG client.HBaseAdmin: Sleep. Waiting for first region to be disabled from t1
> 08/06/30 01:27:18 DEBUG client.HBaseAdmin: Wake. Waiting for first region to be disabled from [B@1bc93a7
> 08/06/30 01:27:18 INFO client.HBaseAdmin: Disabled t1
> 0 row(s) in 10.0810 seconds
> hbase(main):043:0> alter 't1', {NAME => 'f1', VERSIONS => 1}
> NativeException: org.apache.hadoop.hbase.InvalidColumnNameException: org.apache.hadoop.hbase.InvalidColumnNameException: Column family 'f1' doesn't exist, so cannot be modified.
>         at org.apache.hadoop.hbase.master.ModifyColumn.postProcessMeta(ModifyColumn.java:51)
>         at org.apache.hadoop.hbase.master.TableOperation$ProcessTableOperation.call(TableOperation.java:130)
>         at org.apache.hadoop.hbase.master.TableOperation$ProcessTableOperation.call(TableOperation.java:67)
>         at org.apache.hadoop.hbase.master.RetryableMetaOperation.doWithRetries(RetryableMetaOperation.java:62)
>         at org.apache.hadoop.hbase.master.TableOperation.process(TableOperation.java:141)
>         at org.apache.hadoop.hbase.master.HMaster.modifyColumn(HMaster.java:655)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.hbase.ipc.HbaseRPC$Server.call(HbaseRPC.java:424)
>         at org.apache.hadoop.ipc.Server$Handler.run(Server.java:896)
>         from sun/reflect/NativeConstructorAccessorImpl.java:-2:in `newInstance0'
>         from sun/reflect/NativeConstructorAccessorImpl.java:39:in `newInstance'
>         from sun/reflect/DelegatingConstructorAccessorImpl.java:27:in `newInstance'
>         from java/lang/reflect/Constructor.java:513:in `newInstance'
>         from org/apache/hadoop/hbase/RemoteExceptionHandler.java:82:in `decodeRemoteException'
>         from org/apache/hadoop/hbase/client/HBaseAdmin.java:658:in `modifyColumn'
>         from org/apache/hadoop/hbase/client/HBaseAdmin.java:636:in `modifyColumn'
>         from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
>         from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
>         from sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke'
>         from java/lang/reflect/Method.java:597:in `invoke'
>         from org/jruby/javasupport/JavaMethod.java:250:in `invokeWithExceptionHandling'
>         from org/jruby/javasupport/JavaMethod.java:219:in `invoke'
>         from org/jruby/javasupport/JavaClass.java:416:in `execute'
>         from org/jruby/internal/runtime/methods/SimpleCallbackMethod.java:67:in `call'
>         from org/jruby/internal/runtime/methods/DynamicMethod.java:94:in `call'
> ... 118 levels...
>         from ruby.hbase_minus_671438.bin.hirbInvokermethod__23$RUBY$startOpt:-1:in `call'
>         from org/jruby/internal/runtime/methods/DynamicMethod.java:74:in `call'
>         from org/jruby/internal/runtime/methods/CompiledMethod.java:48:in `call'
>         from org/jruby/runtime/CallSite.java:123:in `cacheAndCall'
>         from org/jruby/runtime/CallSite.java:298:in `call'
>         from ruby/hbase_minus_671438/bin//hbase/bin/hirb.rb:348:in `__file__'
>         from ruby/hbase_minus_671438/bin//hbase/bin/hirb.rb:-1:in `__file__'
>         from ruby/hbase_minus_671438/bin//hbase/bin/hirb.rb:-1:in `load'
>         from org/jruby/Ruby.java:512:in `runScript'
>         from org/jruby/Ruby.java:432:in `runNormally'
>         from org/jruby/Ruby.java:312:in `runFromMain'
>         from org/jruby/Main.java:144:in `run'
>         from org/jruby/Main.java:89:in `run'
>         from org/jruby/Main.java:80:in `main'
>         from /hbase/bin/hirb.rb:229:in `alter'
>         from (hbase):44:in `binding'hbase(main):044:0>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.