Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2999

Compilation error in AllocationConfiguration.java in java1.7 while running tests

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: resourcemanager
    • Labels:
    • Target Version/s:

      Description

      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 :

      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)
      

        Attachments

        1. 0001-YARN-2999.patch
          1 kB
          Rohith Sharma K S

          Activity

            People

            • Assignee:
              rohithsharma Rohith Sharma K S
              Reporter:
              rohithsharma Rohith Sharma K S
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: