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

Specify bash for local-regionservers.sh and local-master-backup.sh

    XMLWordPrintableJSON

    Details

      Description

      Running the following line, using /bin/sh:

      $ bin/local-regionservers.sh --config ~/hbase-dev/hbase-conf/conf/ start 1 2 3 4 5

      Produces the output below:

      bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
      Invalid argument
      bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
      Invalid argument
      bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
      Invalid argument
      bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
      Invalid argument
      bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
      Invalid argument

      Considering:

      if [[ "$i" =~ ^[0-9]+$ ]]; then
         run_master $cmd $i
        else
         echo "Invalid argument"
      fi
      

      The reasons is that the regex operator =~ doesn't have compatibility with /bin/sh but works running /bin/bash

      $ bash -x bin/local-regionservers.sh --config ~/hbase-dev/hbase-conf/conf/ start 1 2 3 4 5

        Attachments

        1. HBASE-13229.patch
          1 kB
          Gustavo Anatoly
        2. HBASE-12339-v1.patch
          2 kB
          Gustavo Anatoly
        3. HBASE-13229-v2.patch
          2 kB
          Gustavo Anatoly

          Activity

            People

            • Assignee:
              gustavoanatoly Gustavo Anatoly
              Reporter:
              gustavoanatoly Gustavo Anatoly
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: