You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2011/01/05 02:10:47 UTC

[jira] Resolved: (HBASE-3410) Unable to set/modify TTL on a column family using the shell.

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

stack resolved HBASE-3410.
--------------------------

       Resolution: Fixed
    Fix Version/s: 0.90.0
         Assignee: stack

Works now after doing this change:

{code}
+++ src/main/ruby/hbase/admin.rb        (working copy)
@@ -354,8 +354,8 @@
       family.setBlockCacheEnabled(JBoolean.valueOf(arg[org.apache.hadoop.hbase.HColumnDescriptor::BLOCKCACHE])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::BLOCKCACHE)
       family.setScope(JInteger.valueOf(arg[REPLICATION_SCOPE])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::REPLICATION_SCOPE)
       family.setInMemory(JBoolean.valueOf(arg[IN_MEMORY])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::IN_MEMORY)
-      family.setTimeToLive(JInteger.valueOf(arg[HColumnDescriptor::TTL])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::TTL)
-      family.setBlocksize(JInteger.valueOf(arg[HColumnDescriptor::BLOCKSIZE])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::BLOCKSIZE)
+      family.setTimeToLive(JInteger.valueOf(arg[org.apache.hadoop.hbase.HColumnDescriptor::TTL])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::TTL)
+      family.setBlocksize(JInteger.valueOf(arg[org.apache.hadoop.hbase.HColumnDescriptor::BLOCKSIZE])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::BLOCKSIZE)
       family.setMaxVersions(JInteger.valueOf(arg[VERSIONS])) if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::VERSIONS)
       if arg.include?(org.apache.hadoop.hbase.HColumnDescriptor::BLOOMFILTER)
         bloomtype = arg[org.apache.hadoop.hbase.HColumnDescriptor::BLOOMFILTER].upcase
{code}

{code}
hbase(main):001:0> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
0 row(s) in 0.7780 seconds
{code}

Thanks Mathias.  This broke when we recently reverted our jruby version.

> Unable to set/modify TTL on a column family using the shell.
> ------------------------------------------------------------
>
>                 Key: HBASE-3410
>                 URL: https://issues.apache.org/jira/browse/HBASE-3410
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.90.0
>         Environment: All
>            Reporter: Mathias Herberts
>            Assignee: stack
>             Fix For: 0.90.0
>
>
> When attempting to set the TTL parameter on a column family using the HBase shell, the following error is reported and the parameter is not modified:
> hbase(main):042:0> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
> ERROR: uninitialized constant Hbase::Admin::HColumnDescriptor

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