MAPREDUCE-4846. Some JobQueueInfo methods are public in MR1 but protected in MR2. Contributed by Sandy Ryza.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1448597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas White 2013-02-21 11:34:09 +00:00
parent 567ab4335f
commit 7555b4df74
3 changed files with 21 additions and 8 deletions

View File

@ -177,6 +177,9 @@ Release 2.0.4-beta - UNRELEASED
MAPREDUCE-4994. Addendum fixing testcases failures. (sandyr via tucu) MAPREDUCE-4994. Addendum fixing testcases failures. (sandyr via tucu)
MAPREDUCE-4846. Some JobQueueInfo methods are public in MR1 but protected
in MR2. (Sandy Ryza via tomwhite)
Release 2.0.3-alpha - 2013-02-06 Release 2.0.3-alpha - 2013-02-06
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -67,7 +67,8 @@ public JobQueueInfo(String queueName, String schedulingInfo) {
* *
* @param queueName Name of the job queue. * @param queueName Name of the job queue.
*/ */
protected void setQueueName(String queueName) { @InterfaceAudience.Private
public void setQueueName(String queueName) {
super.setQueueName(queueName); super.setQueueName(queueName);
} }
@ -76,7 +77,8 @@ protected void setQueueName(String queueName) {
* *
* @param schedulingInfo * @param schedulingInfo
*/ */
protected void setSchedulingInfo(String schedulingInfo) { @InterfaceAudience.Private
public void setSchedulingInfo(String schedulingInfo) {
super.setSchedulingInfo(schedulingInfo); super.setSchedulingInfo(schedulingInfo);
} }
@ -84,15 +86,21 @@ protected void setSchedulingInfo(String schedulingInfo) {
* Set the state of the queue * Set the state of the queue
* @param state state of the queue. * @param state state of the queue.
*/ */
protected void setQueueState(String state) { @InterfaceAudience.Private
public void setQueueState(String state) {
super.setState(QueueState.getState(state)); super.setState(QueueState.getState(state));
} }
String getQueueState() { /**
* Use getState() instead
*/
@Deprecated
public String getQueueState() {
return super.getState().toString(); return super.getState().toString();
} }
protected void setChildren(List<JobQueueInfo> children) { @InterfaceAudience.Private
public void setChildren(List<JobQueueInfo> children) {
List<QueueInfo> list = new ArrayList<QueueInfo>(); List<QueueInfo> list = new ArrayList<QueueInfo>();
for (JobQueueInfo q : children) { for (JobQueueInfo q : children) {
list.add(q); list.add(q);
@ -108,7 +116,8 @@ public List<JobQueueInfo> getChildren() {
return list; return list;
} }
protected void setProperties(Properties props) { @InterfaceAudience.Private
public void setProperties(Properties props) {
super.setProperties(props); super.setProperties(props);
} }
@ -141,7 +150,8 @@ void removeChild(JobQueueInfo child) {
setChildren(children); setChildren(children);
} }
protected void setJobStatuses(org.apache.hadoop.mapreduce.JobStatus[] stats) { @InterfaceAudience.Private
public void setJobStatuses(org.apache.hadoop.mapreduce.JobStatus[] stats) {
super.setJobStatuses(stats); super.setJobStatuses(stats);
} }

View File

@ -449,7 +449,7 @@ static Element getQueueElement(Document document, JobQueueInfo jqi) {
q.appendChild(propsElement); q.appendChild(propsElement);
// Queue-state // Queue-state
String queueState = jqi.getQueueState(); String queueState = jqi.getState().getStateName();
if (queueState != null if (queueState != null
&& !queueState.equals(QueueState.UNDEFINED.getStateName())) { && !queueState.equals(QueueState.UNDEFINED.getStateName())) {
Element qStateElement = document.createElement(STATE_TAG); Element qStateElement = document.createElement(STATE_TAG);