Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-3320

pig_cassandra script errors when running against pig 0.9.1 tar ball because there are multiple jars.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.8.8
    • None
    • None
    • Running on mac os x. PIG_HOME set to a fresh download of pig 0.9.1.

    • Low

    Description

      The pig_cassandra script in contrib/pig/bin assumes there is only one pig jar file in $PIG_HOME. However, the latest release of pig 0.9.1 has two jar files: one for hadoop and one without hadoop. See below:

      bone@zen:~/tools/pig-0.9.1-> ls -al *.jar
      rw-rr- 1 bone staff 5130595 Sep 29 18:55 pig-0.9.1-withouthadoop.jar
      rw-rr- 1 bone staff 12430153 Sep 29 18:55 pig-0.9.1.jar

      This breaks the shell script with:
      bin/pig_cassandra: line 42: [: /Users/bone/tools/pig/pig-0.9.1-withouthadoop.jar: binary operator expected
      Unrecognized option: -x

      Attached is a patch for the shell script that takes the last jar file listed in the directory. This fixes the problem. I also add an "echo" to notify the user which jar file they are using.

      Attachments

        1. trunk-3320.txt
          0.5 kB
          Brian ONeill

        Activity

          People

            boneill Brian ONeill
            boneill Brian ONeill
            Brian ONeill
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: