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

Dmitriy V. Ryaboy commented on PIG-924:
---------------------------------------

Regarding deprecation -- I tried setting it back to off, and adding 
@SuppressWarnings("deprecation") to the shims for 20, but and complained about 
deprecation nonetheless. Not sure what its deal is.

Adding something like this to the main build.xml works. Does this seem like a 
reasonable solution?

{code}
    <!-- set deprecation off if hadoop version greater or equals 20 -->
    <target name="set_deprecation">
      <condition property="hadoop_is20">
        <equals arg1="${hadoop.version}" arg2="20"/>
      </condition>
      <antcall target="if_hadoop_is20"/>
      <antcall target="if_hadoop_not20"/>
    </target>
    <target name="if_hadoop_is20" if="hadoop_is20">
      <property name="javac.deprecation" value="off" />
    </target>
    <target name="if_hadoop_not20" unless="hadoop_is20">
      <property name="javac.deprecation" value="on" />
    </target>


    <target name="init" depends="set_deprecation">
  [....]
{code}

> Make Pig work with multiple versions of Hadoop
> ----------------------------------------------
>
>                 Key: PIG-924
>                 URL: https://issues.apache.org/jira/browse/PIG-924
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Dmitriy V. Ryaboy
>         Attachments: pig_924.2.patch, pig_924.3.patch, pig_924.patch
>
>
> The current Pig build scripts package hadoop and other dependencies into the 
> pig.jar file.
> This means that if users upgrade Hadoop, they also need to upgrade Pig.
> Pig has relatively few dependencies on Hadoop interfaces that changed between 
> 18, 19, and 20.  It is possibly to write a dynamic shim that allows Pig to 
> use the correct calls for any of the above versions of Hadoop. Unfortunately, 
> the building process precludes us from the ability to do this at runtime, and 
> forces an unnecessary Pig rebuild even if dynamic shims are created.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to