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

A column Family can have VERSIONS less than zero

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.94.8
    • 0.98.0
    • Client
    • None
    • Reviewed

    Description

      User can create/alter a columnfam and set its VERSION(aka maxVERSIONS) to a negative or zero value. Although there is a checking in HColumnDesciptor#construtor, hbase shell command will invoke the setter(setMaxVersions and setMinVersions) directly, hence by pass the checking. For example:

      set VERSIONS = -1
      hbase(main):016:0> create 't5_dn',{NAME=>'cf1',VERSIONS=>-1}
      0 row(s) in 1.0420 seconds
      
      hbase(main):017:0> put 't5_dn','row1','cf1:q1','row1cf1_v1'
      0 row(s) in 0.0700 seconds
      
      hbase(main):018:0> scan 't5_dn'
      ROW                   COLUMN+CELL                                              
      0 row(s) in 0.0090 seconds
      
      hbase(main):019:0> describe 't5_dn'
      DESCRIPTION                                          ENABLED                    
      't5_dn', {NAME => 'cf1', REPLICATION_SCOPE => '0',  true                      
      KEEP_DELETED_CELLS => 'false', COMPRESSION => 'NONE                            
      ', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true',                            
      MIN_VERSIONS => '0', DATA_BLOCK_ENCODING => 'NONE',                            
       IN_MEMORY => 'false', BLOOMFILTER => 'NONE', TTL =                            
      > '2147483647', VERSIONS => '-1', BLOCKSIZE => '655                            
      36'}                                                                          
      1 row(s) in 0.0410 seconds
      

      above example shows VERSIONS => '-1', and put/scan doesn't keep the data

      Attachments

        1. HBASE-8780-0.94.8-v0.patch
          3 kB
          Demai Ni
        2. HBASE-8780-test.txt
          2 kB
          Demai Ni
        3. HBASE-8780-trunk.patch
          3 kB
          Demai Ni
        4. HBASE-8780-trunk.patch
          3 kB
          Demai Ni
        5. HBASE-8780-trunk-v1.patch
          3 kB
          Demai Ni
        6. HBASE-8780-trunk-v2.patch
          1 kB
          Demai Ni

        Activity

          People

            nidmhbase Demai Ni
            nidmhbase Demai Ni
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: