You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Steve Loughran (Jira)" <ji...@apache.org> on 2022/12/14 14:31:00 UTC

[jira] [Commented] (YARN-10992) schema generation produces code which doesn't compile on java 11+

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

Steve Loughran commented on YARN-10992:
---------------------------------------

update.

# the maven pojo plugin generates code with the correct @Generated attribute for that java version
# the plugin doesn't regenerate the .java classes if they are present
# if you have done a build with java11, you can't go back to java 8

fix
`
{code}
rm hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/placement/schema/*
{code}

maybe the mvn clean operation should do this. If the classes were generated into target/generated/java this would be automatic


> schema generation produces code which doesn't compile on java 11+
> -----------------------------------------------------------------
>
>                 Key: YARN-10992
>                 URL: https://issues.apache.org/jira/browse/YARN-10992
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: buid
>    Affects Versions: 3.4.0
>         Environment: build with openjdk 17
>            Reporter: Steve Loughran
>            Priority: Major
>
> The changes of  YARN-10386  are somehow stopping java 17 (maybe 11_+?) compilation, as the generated classes have an import javax.annotation.Generated which is not in the JRE classes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org