[ 
https://issues.apache.org/jira/browse/PIG-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231691#comment-13231691
 ] 

Jonathan Coveney commented on PIG-2604:
---------------------------------------

Travis,

They don't exist for every property you want to set, but there are methods in 
Main that expose some of this information. They are set based on the build 
manifest. I'd support exposing the rest of the information you want, and then 
using these methods... it might be handy for other implementations to have the 
same info. Otherwise, +1

{code}
public static String getMajorVersion() {
    return majorVersion;
}

/**
 * Returns the major version of the Pig build being run.
 */
public static String getMinorVersion() {
    return minorVersion;
}

/**
 * Returns the patch version of the Pig build being run.
 */
public static String getPatchVersion() {
    return patchVersion;
}

/**
 * Returns the svn revision number of the Pig build being run.
 */
public static String getSvnRevision() {
    return svnRevision;
}

/**
 * Returns the built time of the Pig build being run.
 */
public static String getBuildTime() {
    return buildTime;
}
{code}
                
> Pig should print its build info at runtime
> ------------------------------------------
>
>                 Key: PIG-2604
>                 URL: https://issues.apache.org/jira/browse/PIG-2604
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Travis Crawford
>            Assignee: Travis Crawford
>            Priority: Minor
>         Attachments: PIG-2604_print_build_info.diff
>
>
> Currently no build info is printed when running pig, so its not clear 
> specifically what version you are running. For users, they do not know if the 
> version was updated, which might explain a change in behavior. For 
> developers, its not clear if you're actually running the development jar 
> you're testing.
> This could be improved by printing a line at startup saying what version of 
> pig you are using.
> PROPOSED BUILD MESSAGE:
> Note "exported" below happens because I built from a git repo, per the 
> {{svnversion}} command.
> {code}
> $ JAVA_HOME=/usr/java/default bin/pig
> 2012-03-16 22:13:15,266 [main] INFO  org.apache.pig.Main - Apache Pig 
> 0.11.0-SNAPSHOT revision exported built by travis at Mar 16 2012, 14:56:33
> 2012-03-16 22:13:15,267 [main] INFO  org.apache.pig.Main - Logging error 
> messages to: /home/travis/pig/pig_1331935995262.log
> 2012-03-16 22:13:15,291 [main] INFO  org.apache.pig.impl.util.Utils - Default 
> bootup file /home/travis/.pigbootup not found
> 2012-03-16 22:13:15,509 [main] INFO  
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting 
> to hadoop file system at: hdfs://foo.com:8020
> 2012-03-16 22:13:15,737 [main] INFO  
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting 
> to map-reduce job tracker at: foo.com:8021
> grunt>
> {code}
> CURRENT MESSAGES:
> {code}
> $ pig
> 2012-03-16 22:06:14,604 [main] INFO  org.apache.pig.Main - Logging error 
> messages to: /var/log/pig/pig_1331935574602.log
> 2012-03-16 22:06:14,834 [main] INFO  
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting 
> to hadoop file system at: hdfs://foo.com:8020
> 2012-03-16 22:06:15,078 [main] INFO  
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting 
> to map-reduce job tracker at: foo.com:8021
> grunt>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to