HBase
  1. HBase
  2. HBASE-2171

Alter statement in the hbase shell doesn't match documentation.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.2, 0.20.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      linux
      java -version
      java version "1.6.0_16"
      Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

      Description

      The documentation claims this should work. Perhaps this jira could be a starting point for a more detailed explanation of alter

      HBASE SHELL COMMANDS:
      alter Alter column family schema; pass table name and a dictionary
      specifying new column family schema. Dictionaries are described
      below in the GENERAL NOTES section. Dictionary must include name
      of column family to alter. For example,

      To change or add the 'f1' column family in table 't1' from defaults
      to instead keep a maximum of 5 cell VERSIONS, do:
      hbase> alter 't1',

      {NAME => 'f1', VERSIONS => 5}

      To delete the 'f1' column family in table 't1', do:
      hbase> alter 't1', {NAME => 'f1', METHOD => 'delete'}

      You can also change table-scope attributes like MAX_FILESIZE
      MEMSTORE_FLUSHSIZE and READONLY.

      For example, to change the max size of a family to 128MB, do:
      hbase> alter 't1', {METHOD => 'table_att', MAX_FILESIZE => '134217728'}
      ....
      ase Shell; enter 'help<RETURN>' for list of supported commands.
      Version: 0.20.3, r902334, Mon Jan 25 13:13:08 PST 2010
      hbase(main):001:0> drop 't3'
      0 row(s) in 0.0060 seconds
      0 row(s) in 0.0050 seconds
      0 row(s) in 0.1560 seconds
      hbase(main):002:0> create 't3'
      0 row(s) in 2.1050 seconds
      hbase(main):003:0> disable 't3'
      0 row(s) in 2.0980 seconds
      hbase(main):004:0> alter 't3', {NAME => 'f1', VERSIONS => 5}

      NativeException: java.lang.NullPointerException: null

        Activity

          People

          • Assignee:
            Alex Newman
            Reporter:
            Alex Newman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development