[jira] [Updated] (YARN-2804) Timeline server .out log have JAXB binding exceptions and warnings.

2014-11-04 Thread Zhijie Shen (JIRA)

 [ 
https://issues.apache.org/jira/browse/YARN-2804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhijie Shen updated YARN-2804:
--
Attachment: YARN-2804.2.patch

Thanks for the comments. I've moved the logic to setters, and validated it on 
my local cluster too, and it still suppressed all the exceptions and warning 
logs in .out file. In addition, I added a test case to verify that the changed 
POJO setters/getters are working properly.

 Timeline server .out log have JAXB binding exceptions and warnings.
 ---

 Key: YARN-2804
 URL: https://issues.apache.org/jira/browse/YARN-2804
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Zhijie Shen
Assignee: Zhijie Shen
Priority: Critical
 Attachments: YARN-2804.1.patch, YARN-2804.2.patch


 Unlike other daemon, timeline server binds JacksonJaxbJsonProvider to resolve 
 the resources. However, there are noises in .out log:
 {code}
 SEVERE: Failed to generate the schema for the JAX-B elements
 com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of 
 IllegalAnnotationExceptions
 java.util.Map is an interface, and JAXB can't handle interfaces.
   this problem is related to the following location:
   at java.util.Map
   at public java.util.Map 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEvent.getEventInfo()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEvent
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntity.getEvents()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntity
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntities.getEntities()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntities
 java.util.Map does not have a no-arg default constructor.
   this problem is related to the following location:
   at java.util.Map
   at public java.util.Map 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEvent.getEventInfo()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEvent
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntity.getEvents()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntity
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntities.getEntities()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntities
   at 
 com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106)
   at 
 com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:489)
   at 
 com.sun.xml.bind.v2.runtime.JAXBContextImpl.init(JAXBContextImpl.java:319)
   at 
 com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1170)
   at 
 com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:145)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:248)
   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:235)
   at javax.xml.bind.ContextFinder.find(ContextFinder.java:432)
   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
   at 
 com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator.buildModelAndSchemas(WadlGeneratorJAXBGrammarGenerator.java:412)
   at 
 com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator.createExternalGrammar(WadlGeneratorJAXBGrammarGenerator.java:352)
   at com.sun.jersey.server.wadl.WadlBuilder.generate(WadlBuilder.java:115)
   at 
 com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.getApplication(WadlApplicationContextImpl.java:104)
   at 
 com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.getApplication(WadlApplicationContextImpl.java:120)
   at 
 com.sun.jersey.server.impl.wadl.WadlMethodFactory$WadlOptionsMethodDispatcher.dispatch(WadlMethodFactory.java:98)
   at 
 com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
   at 
 com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
   at 
 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
   at 
 

[jira] [Updated] (YARN-2804) Timeline server .out log have JAXB binding exceptions and warnings.

2014-11-03 Thread Zhijie Shen (JIRA)

 [ 
https://issues.apache.org/jira/browse/YARN-2804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhijie Shen updated YARN-2804:
--
Attachment: YARN-2804.1.patch

In the patch, I made a compromise when changing TimelineEntity and 
TimelineEvent, to ensure java API compatible as well as satisfy JAXB. For put 
domain response, I change to return an empty TimelinePutResponse instead of 
using Jersey Response.

After these changes, the exceptions and the warnings are gone from .out.

 Timeline server .out log have JAXB binding exceptions and warnings.
 ---

 Key: YARN-2804
 URL: https://issues.apache.org/jira/browse/YARN-2804
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Zhijie Shen
Assignee: Zhijie Shen
Priority: Critical
 Attachments: YARN-2804.1.patch


 Unlike other daemon, timeline server binds JacksonJaxbJsonProvider to resolve 
 the resources. However, there are noises in .out log:
 {code}
 SEVERE: Failed to generate the schema for the JAX-B elements
 com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of 
 IllegalAnnotationExceptions
 java.util.Map is an interface, and JAXB can't handle interfaces.
   this problem is related to the following location:
   at java.util.Map
   at public java.util.Map 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEvent.getEventInfo()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEvent
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntity.getEvents()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntity
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntities.getEntities()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntities
 java.util.Map does not have a no-arg default constructor.
   this problem is related to the following location:
   at java.util.Map
   at public java.util.Map 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEvent.getEventInfo()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEvent
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntity.getEvents()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntity
   at public java.util.List 
 org.apache.hadoop.yarn.api.records.timeline.TimelineEntities.getEntities()
   at org.apache.hadoop.yarn.api.records.timeline.TimelineEntities
   at 
 com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106)
   at 
 com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:489)
   at 
 com.sun.xml.bind.v2.runtime.JAXBContextImpl.init(JAXBContextImpl.java:319)
   at 
 com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1170)
   at 
 com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:145)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:248)
   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:235)
   at javax.xml.bind.ContextFinder.find(ContextFinder.java:432)
   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
   at 
 com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator.buildModelAndSchemas(WadlGeneratorJAXBGrammarGenerator.java:412)
   at 
 com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator.createExternalGrammar(WadlGeneratorJAXBGrammarGenerator.java:352)
   at com.sun.jersey.server.wadl.WadlBuilder.generate(WadlBuilder.java:115)
   at 
 com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.getApplication(WadlApplicationContextImpl.java:104)
   at 
 com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.getApplication(WadlApplicationContextImpl.java:120)
   at 
 com.sun.jersey.server.impl.wadl.WadlMethodFactory$WadlOptionsMethodDispatcher.dispatch(WadlMethodFactory.java:98)
   at 
 com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
   at 
 com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
   at 
 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
   at