Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-6814 [WINDOWS] HBase on Windows
  3. HBASE-8901

[WINDOWS] Powershell based bin script (bin/hbase.ps1)

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • scripts
    • None

    Description

      This is a continuation of HADOOP-9660.

      Powershell does argument parsing itself before sending them to the program. Thus using the hbase.cmd script from the powershell environment comes with some surprises since ","s and "="s are parsed into .NET objects, and hbase.cmd receives those arguments separated by space.

      An example is:

      hbase org.apache.hadoop.hbase.mapreduce.CopyTable --new.name=tablecopy --families=f1:f1,f2:f2,f3:f3 table1
      

      will be send to the java process as
      ["--new.name", "tablecopy", "--families", "f1:f1", "f2:f2", "f3:f3", "table1"]

      A lot of HBase commands already make use of commas and equals signs for their arguments, it is important to create least surprise for the users between different platforms (meaning that they should be able to copy-paste commands).

      Although there are some workarounds (like using -% or single and double quota-ing every argument, like '"-new.name=tablecopy"') they are not user friendly.

      In this isssue, I propose we add a small powershell script to pre-parse the arguments and reconstruct them to send to the hbase.cmd script.

      Attachments

        1. hbase.ps1
          2 kB
          Enis Soztutar

        Activity

          People

            Unassigned Unassigned
            enis Enis Soztutar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: