hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2999) Compilation error in AllocationConfiguration.java in java1.7 while running tests
Date Thu, 01 Jan 2015 14:59:13 GMT

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

Steve Loughran commented on YARN-2999:
--------------------------------------

-1 to the patch

Use of <> entries is valid Java 7 code; Hadoop 2.7 is meant to be java 7 only, and the
language source tagged as such. Therefore it should be valid in the source.

If it is not compiling on your machine, then something is wrong with either your machines
or the POM files aren't passing the java source tag down to the javac command. This is a maven
build ,not an IDE build, right?


> Compilation error in AllocationConfiguration.java in java1.7 while running tests
> --------------------------------------------------------------------------------
>
>                 Key: YARN-2999
>                 URL: https://issues.apache.org/jira/browse/YARN-2999
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: Rohith
>            Assignee: Rohith
>         Attachments: 0001-YARN-2999.patch
>
>
> In AllocationConfiguration, in the below object creation, generic type must be specified
as instance variable,otherwise java1.7 lead compilation error while running tests for RM and
NM
> {{reservableQueues = new HashSet<>();}}
> Report :
> {code}
> java.lang.Error: Unresolved compilation problem: 
> 	'<>' operator is not allowed for source level below 1.7
> 	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration.<init>(AllocationConfiguration.java:150)
> 	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.initScheduler(FairScheduler.java:1276)
> 	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.serviceInit(FairScheduler.java:1320)
> 	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
> 	at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:107)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceInit(ResourceManager.java:559)
> 	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.createAndInitActiveServices(ResourceManager.java:985)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:251)
> 	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
> 	at org.apache.hadoop.yarn.server.resourcemanager.TestRMRestart$TestSecurityMockRM.init(TestRMRestart.java:2027)
> 	at org.apache.hadoop.yarn.server.resourcemanager.MockRM.<init>(MockRM.java:108)
> 	at org.apache.hadoop.yarn.server.resourcemanager.TestRMRestart$TestSecurityMockRM.<init>(TestRMRestart.java:2020)
> 	at org.apache.hadoop.yarn.server.resourcemanager.TestRMRestart.testAppAttemptTokensRestoredOnRMRestart(TestRMRestart.java:1199)
> {code} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message