Subject: How to print the entire data table according to the specific conditions in Apache HBase Shell


Hi
> (1) Sort the printed data in ascending order of timestamp value
Currently,  the hbase jruby scripts cannot meet your requirements now.  If
you really want this feature, you
may need to edit the *_scan_internal* method in
hbase-shell/src/main/ruby/hbase/table.rb.   say sort the cells
by your timestamp.

> (2) How to distinguish whether the printed actual data value is an "empty
string" or a "space key"
I see the ruby code:

    # Make a String of the passed kv
    # Intercept cells whose format we know such as the info:regioninfo in
hbase:meta
    def to_string(column, kv, maxlength = -1, converter_class = nil,
converter = nil)

Seems you can try to define your own converter to distinguish the space or
empty, by default the converter
will use the Bytes#toStringBinary method, so may you can also change
implementation of this method to meet
your requirement.

Thanks

On Tue, Aug 27, 2019 at 6:49 AM 李維哲 <[EMAIL PROTECTED]> wrote:

> In the "scan" command in Apache HBase Shell, how to print the entire data
> table according to the following conditions:
>
> (1) Sort the printed data in ascending order of timestamp value
>
> (2) How to distinguish whether the printed actual data value is an "empty
> string" or a "space key"
>
> <
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> 不含病毒。www.avast.com
> <
> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>