Repository: ambari
Updated Branches:
  refs/heads/trunk 849e28e98 -> a92932560


AMBARI-18178. yarn capacity scheduler queue issue. (Akhil PB via gauravn7)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a9293256
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a9293256
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a9293256

Branch: refs/heads/trunk
Commit: a92932560a74ba70577c15fbbdc447ae1e4b997d
Parents: 849e28e
Author: Gaurav Nagar <[email protected]>
Authored: Thu Aug 18 00:00:47 2016 +0530
Committer: Gaurav Nagar <[email protected]>
Committed: Thu Aug 18 00:05:05 2016 +0530

----------------------------------------------------------------------
 .../ambari/view/capacityscheduler/ConfigurationService.java  | 8 ++++----
 .../capacity-scheduler/src/main/resources/ui/app/adapters.js | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a9293256/contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
----------------------------------------------------------------------
diff --git 
a/contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
 
b/contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
index 03520fe..e5f5cb5 100644
--- 
a/contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
+++ 
b/contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java
@@ -390,10 +390,10 @@ public class ConfigurationService {
    * @return the http response
    */
   @PUT
-  @Consumes(MediaType.APPLICATION_JSON)
+  @Consumes(MediaType.TEXT_PLAIN)
   @Produces(MediaType.APPLICATION_JSON)
-  public Response writeConfiguration(JSONObject request) {
-    LOG.debug("writeConfiguration for request : {} ", request);
+  public Response writeConfiguration(String requestBody) {
+    LOG.debug("writeConfiguration for request : {} ", requestBody);
     JSONObject response;
     try {
 
@@ -404,7 +404,7 @@ public class ConfigurationService {
 
       Map<String, String> headers = new HashMap<String, String>();
       headers.put("Content-Type", "application/x-www-form-urlencoded");
-      String responseString = ambariApi.requestClusterAPI("", "PUT", 
request.toJSONString(), headers);
+      String responseString = ambariApi.requestClusterAPI("", 
"PUT",requestBody, headers);
       response = getJsonObject(responseString);
 
     } catch (WebApplicationException ex) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9293256/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
index 86c1484..770db51 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
@@ -158,7 +158,7 @@ App.QueueAdapter = DS.Adapter.extend({
     });
 
     return new Ember.RSVP.Promise(function(resolve, reject) {
-      _ajax(uri,'PUT',{contentType:'application/json; 
charset=utf-8',data:data}).then(function(data) {
+      _ajax(uri,'PUT',{contentType:'text/plain; 
charset=utf-8',data:data}).then(function(data) {
         store.setProperties({'current_tag':new_tag,'tag':new_tag});
         Ember.run(null, resolve, 
data.resources.objectAt(0).configurations.objectAt(0).configs);
       }, function(jqXHR) {

Reply via email to