[ https://issues.apache.org/jira/browse/MAPREDUCE-6761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Vary updated MAPREDUCE-6761: ---------------------------------- Attachment: MAPREDUCE-6761.3.patch Thank you for the comments! Here is what I have done in this patch: 1. Checked the imports, and removed wildcards as [~rchiang] commented. 2. Created Dummy providers, and protocols, and removed the dependency on client-common as [~jlowe] commented 3. This version of the patch uses the foreach to iterate through the elements, and the unit test checks that the next() is not called after the first error, so I think the result will be the same as before the previous patch. [~jlowe], could you please verify this 4. I had to change the type of the frameworkLoader to its' interface (Iterable), so I can mock it with mockito. We do not use any ServiceLoader specific methods in the Cluster class, and it is compiling and running now. Still I do not think it is a good solution. If anyone has a better idea, please share, or if you find this acceptable tradeoff then share that too. Thanks for the helpful reviews all! Peter > Regression when handling providers - invalid configuration > ServiceConfiguration causes Cluster initialization failure > --------------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-6761 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6761 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: mrv2 > Affects Versions: 3.0.0-alpha2 > Reporter: Peter Vary > Assignee: Peter Vary > Labels: supportability > Attachments: MAPREDUCE-6761.2.patch, MAPREDUCE-6761.3.patch, > MAPREDUCE-6761.patch > > > When a rogue org.apache.hadoop.mapreduce.protocol.ClientProtocolProvider > defines a provider that is not on classpath, then the initialization is > failed with the following exception: > java.util.ServiceConfigurationError: > org.apache.hadoop.mapreduce.protocol.ClientProtocolProvider: Provider > org.apache.hadoop.mapred.YarnClientProtocolProvider not found > at java.util.ServiceLoader.fail(ServiceLoader.java:239) > at java.util.ServiceLoader.access$300(ServiceLoader.java:185) > at > java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) > at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) > at java.util.ServiceLoader$1.next(ServiceLoader.java:480) > at org.apache.hadoop.mapreduce.Cluster.initProviderList(Cluster.java:84) > at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:114) > at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:108) > at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:101) > at org.apache.hadoop.mapred.JobClient.init(JobClient.java:477) > at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:455) > This regression is caused by MAPREDUCE-6473 -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org