YARN-6792. Incorrect XML convertion in NodeIDsInfo and LabelsToNodesInfo. Contributed by Giovanni Matteo Fumarola.

This commit is contained in:
Sunil G 2017-07-14 08:07:05 +05:30
parent 43f0503286
commit 228ddaa31d
2 changed files with 9 additions and 2 deletions

View File

@ -26,7 +26,10 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "labelsToNodesInfo")
/**
* XML element uses to represent NodeIds' list.
*/
@XmlRootElement(name = "nodeIDsInfo")
@XmlAccessorType(XmlAccessType.FIELD)
public class NodeIDsInfo {

View File

@ -37,7 +37,11 @@ public class LabelsToNodesInfo {
public LabelsToNodesInfo() {
} // JAXB needs this
public LabelsToNodesInfo(Map<NodeLabelInfo, NodeIDsInfo> labelsToNodes) {
this.labelsToNodes = labelsToNodes;
}
public Map<NodeLabelInfo, NodeIDsInfo> getLabelsToNodes() {
return labelsToNodes;
return labelsToNodes;
}
}