HBase
  1. HBase
  2. HBASE-5752

Blank line in SPLITS_FILE causes Master to crash

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.92.1
    • Fix Version/s: None
    • Component/s: shell
    • Labels:
      None

      Description

      When creating a new table with the hbase shell, and specifying a SPLITS_FILE with a blank line in it will cause the master to crash.

      Uploading a sample splits file, here are the commands to test the split.

      create 'testTable',

      {NAME => 'a', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', MIN_VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}

      ,

      {SPLITS_FILE => '/tmp/test.txt'}
      1. test.txt
        0.2 kB
        Jeremy Carroll

        Activity

        Hide
        stack added a comment -

        Something like this Jeremy?

        Index: src/main/ruby/hbase/admin.rb
        ===================================================================
        --- src/main/ruby/hbase/admin.rb	(revision 1311378)
        +++ src/main/ruby/hbase/admin.rb	(working copy)
        @@ -194,7 +194,9 @@
                       end
                       arg[SPLITS] = []
                       File.foreach(arg[SPLITS_FILE]) do |line|
        -                arg[SPLITS].push(line.strip())
        +                stripped = line.strip()
        +                next unless stripped.length > 0
        +                arg[SPLITS].push(stripped)
                       end
                     end
        

        I've not tried it.

        Show
        stack added a comment - Something like this Jeremy? Index: src/main/ruby/hbase/admin.rb =================================================================== --- src/main/ruby/hbase/admin.rb (revision 1311378) +++ src/main/ruby/hbase/admin.rb (working copy) @@ -194,7 +194,9 @@ end arg[SPLITS] = [] File.foreach(arg[SPLITS_FILE]) do |line| - arg[SPLITS].push(line.strip()) + stripped = line.strip() + next unless stripped.length > 0 + arg[SPLITS].push(stripped) end end I've not tried it.
        Hide
        Jeremy Carroll added a comment -

        Here is the ZooKeeper Exception
        http://www.pastie.org/3757155

        Here is the Master Exception
        http://www.pastie.org/3757146

        Full master exception output
        http://www.pastie.org/3756831

        Show
        Jeremy Carroll added a comment - Here is the ZooKeeper Exception http://www.pastie.org/3757155 Here is the Master Exception http://www.pastie.org/3757146 Full master exception output http://www.pastie.org/3756831
        Jeremy Carroll made changes -
        Field Original Value New Value
        Attachment test.txt [ 12522021 ]
        Jeremy Carroll created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeremy Carroll
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development