Pig
  1. Pig
  2. PIG-13

need a way to find out what version of pig i'm using

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Component/s: grunt
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      would be great if "pig -version" told me what version.

      also, the text prior to "USAGE: ..." could also print the version.

      1. PIG-13_v_1.patch
        8 kB
        Stefan Groschupf
      2. PIG-13-svnOptional_v_1_r633244.patch
        3 kB
        Stefan Groschupf

        Activity

        Olga Natkovich created issue -
        Hide
        Stefan Groschupf added a comment -

        this patch add
        pig -version or pig --version or pig -i (v was already in use )

        Results look like this:
        $java -cp pig.jar org.apache.pig.Main -help

        Apache Pig version 0.1.0-dev (r631875)
        compiled Feb 27 2008, 23:55:58

        USAGE: Pig [options] [-] : Run interactively in grunt shell.
        Pig [options] -e[xecute] cmd [cmd ...] : Run cmd(s).
        Pig [options] [-f[ile]] file : Run cmds found in file.
        options include:
        -4, -log4jconf log4j configuration file, overrides log conf
        -b, -brief brief logging (no timestamps)
        -c, -cluster clustername, kryptonite is default
        -d, -debug debug level, INFO is default
        -h, -help display this message
        -j, -jar jarfile load jarfile
        -o, -hod read hod server from system property ssh.gateway
        -v, -verbose print all log messages to screen (default to print only INFO and above to screen)
        -x, -exectype local|mapreduce, mapreduce is default
        -i, -version display version information

        OR

        $ java -cp pig.jar org.apache.pig.Main -version
        Apache Pig version 0.1.0-dev (r631875)
        compiled Feb 27 2008, 23:55:58

        Show
        Stefan Groschupf added a comment - this patch add pig -version or pig --version or pig -i (v was already in use ) Results look like this: $java -cp pig.jar org.apache.pig.Main -help Apache Pig version 0.1.0-dev (r631875) compiled Feb 27 2008, 23:55:58 USAGE: Pig [options] [-] : Run interactively in grunt shell. Pig [options] -e [xecute] cmd [cmd ...] : Run cmd(s). Pig [options] [-f [ile] ] file : Run cmds found in file. options include: -4, -log4jconf log4j configuration file, overrides log conf -b, -brief brief logging (no timestamps) -c, -cluster clustername, kryptonite is default -d, -debug debug level, INFO is default -h, -help display this message -j, -jar jarfile load jarfile -o, -hod read hod server from system property ssh.gateway -v, -verbose print all log messages to screen (default to print only INFO and above to screen) -x, -exectype local|mapreduce, mapreduce is default -i, -version display version information OR $ java -cp pig.jar org.apache.pig.Main -version Apache Pig version 0.1.0-dev (r631875) compiled Feb 27 2008, 23:55:58
        Stefan Groschupf made changes -
        Field Original Value New Value
        Attachment PIG-13_v_1.patch [ 12376700 ]
        Stefan Groschupf made changes -
        Patch Info [Patch Available]
        Hide
        Olga Natkovich added a comment -

        Stefan, this is great, thanks.

        One question: what does dev stand for in your version display? does this mean that it is not yet the official release and once we have an external release it will be changed to 0.1.0-rel?

        Show
        Olga Natkovich added a comment - Stefan, this is great, thanks. One question: what does dev stand for in your version display? does this mean that it is not yet the official release and once we have an external release it will be changed to 0.1.0-rel?
        Hide
        Olga Natkovich added a comment -

        +1

        Show
        Olga Natkovich added a comment - +1
        Hide
        Olga Natkovich added a comment -

        patch committed. Thanks Stefan for contributing!

        Show
        Olga Natkovich added a comment - patch committed. Thanks Stefan for contributing!
        Olga Natkovich made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Stefan Groschupf added a comment -

        It is a common pattern in open source:

        {major version}

        .

        {release version}

        .

        {bugFixRelease version}

        -

        {dev for svn stream|r for release candidate}

        So dev basically means development and indicate that this is a ongoing development stream e.g. svn trunk. That is also the reason why I added the svn reversion number.

        Show
        Stefan Groschupf added a comment - It is a common pattern in open source: {major version} . {release version} . {bugFixRelease version} - {dev for svn stream|r for release candidate} So dev basically means development and indicate that this is a ongoing development stream e.g. svn trunk. That is also the reason why I added the svn reversion number.
        Hide
        Xu Zhang added a comment -

        It would be nice if we could make svnversion command conditional so that the command will not be executed on a machine that does not have svn installed.

        Show
        Xu Zhang added a comment - It would be nice if we could make svnversion command conditional so that the command will not be executed on a machine that does not have svn installed.
        Xu Zhang made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Xu Zhang added a comment - - edited

        In addition to handling whether svn is installed conditionally, we might also need to handle the situation where the version of svn on the host machine is different from the version of svn that comes with the Pig project.

        For example, Pig build fails on my Windows machine because of the version mismatch:

        $ which svnversion
        /cygdrive/c/Program Files/Subversion/bin/svnversion
        
        $ svnversion
        svn: This client is too old to work with working copy '.'; please get a newer Subversion client
        
        Show
        Xu Zhang added a comment - - edited In addition to handling whether svn is installed conditionally, we might also need to handle the situation where the version of svn on the host machine is different from the version of svn that comes with the Pig project. For example, Pig build fails on my Windows machine because of the version mismatch: $ which svnversion /cygdrive/c/Program Files/Subversion/bin/svnversion $ svnversion svn: This client is too old to work with working copy '.'; please get a newer Subversion client
        Hide
        Stefan Groschupf added a comment -

        How about adding svn and the svn version to the pre requirements section of the document "how to build" pig?
        I happy to create such a document in the wik, if you like.

        Show
        Stefan Groschupf added a comment - How about adding svn and the svn version to the pre requirements section of the document "how to build" pig? I happy to create such a document in the wik, if you like.
        Hide
        Olga Natkovich added a comment -

        I don't think svn should be a prerequisite for pig as it is not needed if the pig is built from a distribution tar file (once we have official releases.) I think we should make the code that adds svn version conditional on the existance of the right version of svn

        Show
        Olga Natkovich added a comment - I don't think svn should be a prerequisite for pig as it is not needed if the pig is built from a distribution tar file (once we have official releases.) I think we should make the code that adds svn version conditional on the existance of the right version of svn
        Hide
        Olga Natkovich added a comment -

        clearing patch available patch as this bug has been re-opened and we need another patch to only conditionally us SVN

        Show
        Olga Natkovich added a comment - clearing patch available patch as this bug has been re-opened and we need another patch to only conditionally us SVN
        Olga Natkovich made changes -
        Patch Info [Patch Available]
        Stefan Groschupf made changes -
        Attachment PIG-13-svnOptional_v_1_r633244.patch [ 12377020 ]
        Stefan Groschupf made changes -
        Patch Info [Patch Available]
        Hide
        Olga Natkovich added a comment -

        New patch looks good. Nigel or Xu, could you test to make sure it fixes your build, thanks.

        Show
        Olga Natkovich added a comment - New patch looks good. Nigel or Xu, could you test to make sure it fixes your build, thanks.
        Hide
        Xu Zhang added a comment -

        I will take a look. By the way, should I apply both patches or just " PIG-13-svnOptional_v_1_r633244.patch"?

        Show
        Xu Zhang added a comment - I will take a look. By the way, should I apply both patches or just " PIG-13 -svnOptional_v_1_r633244.patch"?
        Hide
        Olga Natkovich added a comment -

        just the last one as the previous one is already committed

        Show
        Olga Natkovich added a comment - just the last one as the previous one is already committed
        Hide
        Xu Zhang added a comment -

        It works on my Windows machine now. Thanks Stefan.

        Show
        Xu Zhang added a comment - It works on my Windows machine now. Thanks Stefan.
        Hide
        Olga Natkovich added a comment -

        Committed the change. Stefan, thanks for quick fix. Xu, thanks for testing.

        Show
        Olga Natkovich added a comment - Committed the change. Stefan, thanks for quick fix. Xu, thanks for testing.
        Olga Natkovich made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Owen O'Malley made changes -
        Workflow jira [ 12416311 ] no-reopen-closed, patch-avail [ 12425357 ]
        Olga Natkovich made changes -
        Fix Version/s 0.1.0 [ 12312848 ]
        Alan Gates made changes -
        Assignee Stefan Groschupf [ joa23 ]
        Alan Gates made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Stefan Groschupf
            Reporter:
            Olga Natkovich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development