hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Carroll <phobos...@gmail.com>
Subject Re: HBase Shell iterating over & truncating tables
Date Tue, 06 Nov 2012 21:07:30 GMT
the list() method does not return anything (returns nil). The method
outputs to stdout. You cannot iterate over 'nil'. What are you attempting
to accomplish via the shell? There is most likely an easier way.

hbase(main):028:0> list.public_methods
=> ["|", "to_s", "to_f", "type", "to_a", "nil?", "^", "&", "inspect",
"to_i", "handle_different_imports", "include_class", "java_kind_of?",
"java_signature", "methods", "freeze", "extend", "==", "object_id",
"method", "tainted?", "is_a?", "instance_variable_get",
"instance_variable_defined?", "instance_variable_set", "hash", "display",
"send", "private_methods", "enum_for", "equal?", "com", "to_java",
"instance_of?", "id", "taint", "class", "java_annotation",
"instance_variables", "org", "__send__", "=~", "protected_methods",
"__id__", "java_implements", "tap", "frozen?", "java", "respond_to?",
"instance_eval", "===", "java_package", "untaint", "clone", "java_name",
"to_enum", "singleton_methods", "eql?", "instance_exec", "dup", "kind_of?",
"java_require", "javax", "public_methods"]

hbase(main):028:0> puts list.inspect
nil


On Tue, Nov 6, 2012 at 8:01 AM, Jasper Rädisch <jasper@trakken.de> wrote:

> Hello everyone,
>
> Trying to truncate tables like this (from HBase shell) won't work:
>
> list.each{|name| truncate(name) if name.end_with?('abc123')}
>
> How would one approach this?
>
> Thanks,
>
> Jasper
>
> P.S.: I have also asked this at Stack Overflow here:
>
> http://stackoverflow.com/questions/13253643/hbase-shell-iterating-over-truncating-tables
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message