Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-4022

Shell reports error on space prefixed colfam name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      See this test:

      hbase(main):002:0> create 'test', ' cf'
      
      hbase(main):003:0> scan 'test'
      ROW                                           COLUMN+CELL                                                                                                                         
      0 row(s) in 0.1050 seconds
      
      hbase(main):004:0> describe 'test'
      DESCRIPTION                                                                                                        ENABLED                                                        
      {NAME => 'test', FAMILIES => [{NAME => ' cf', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NO true                                                           
      NE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]}                                                                   
      1 row(s) in 0.0540 seconds
      
      hbase(main):005:0> put 'test', 'r1', ' cf:1', 'v1'
      0 row(s) in 0.0580 seconds
      
      hbase(main):006:0> scan 'test', { COLUMNS => [' cf'] }
      ROW                                           COLUMN+CELL                                                                                                                         
      
      ERROR: Unknown column family! Valid column names:  cf
      
      Here is some help for this command:
      Scan a table; pass table name and optionally a dictionary of scanner
      specifications.  Scanner specifications may include one or more of:
      TIMERANGE, FILTER, LIMIT, STARTROW, STOPROW, TIMESTAMP, MAXLENGTH,
      or COLUMNS. If no columns are specified, all columns will be scanned.
      To scan all members of a column family, leave the qualifier empty as in
      'col_family:'.
      
      Some examples:
      
       hbase> scan '.META.'
       hbase> scan '.META.', {COLUMNS => 'info:regioninfo'}
       hbase> scan 't1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'}
       hbase> scan 't1', {FILTER => org.apache.hadoop.hbase.filter.ColumnPaginationFilter.new(1, 0)}
       hbase> scan 't1', {COLUMNS => 'c1', TIMERANGE => [1303668804, 1303668904]}
      
      For experts, there is an additional option -- CACHE_BLOCKS -- which
      switches block caching for the scanner on (true) or off (false).  By
      default it is enabled.  Examples:
      
       hbase> scan 't1', {COLUMNS => ['c1', 'c2'], CACHE_BLOCKS => false}
      8:57 PM
      haha
      8:58 PM
      hbase(main):008:0> scan 'test'                          
      ROW                                           COLUMN+CELL                                                                                                                         
      r1                                           column= cf:1, timestamp=1308855379447, value=v1                                                                                     
      1 row(s) in 0.0450 seconds
      

      We should handle this better.

      Attachments

        Activity

          People

            Unassigned Unassigned
            larsgeorge Lars George
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: