ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject git commit: AMBARI-6219. Performance Issues When Parsing structured_output From Agents. (Jonathan Hurley via mpapirkovskyy)
Date Fri, 20 Jun 2014 19:26:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 8a4be2d04 -> 54e633716


AMBARI-6219. Performance Issues When Parsing structured_output From Agents. (Jonathan Hurley
via mpapirkovskyy)


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

Branch: refs/heads/branch-1.6.1
Commit: 54e633716aaa5cd322a62ed328e60abec3d8c7f9
Parents: 8a4be2d
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Fri Jun 20 22:26:11 2014 +0300
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Fri Jun 20 22:26:52 2014 +0300

----------------------------------------------------------------------
 .../server/controller/internal/TaskResourceProvider.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/54e63371/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
index 0b9a4f6..79a4f05 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
@@ -68,6 +68,11 @@ class TaskResourceProvider extends AbstractControllerResourceProvider {
       new HashSet<String>(Arrays.asList(new String[]{
           TASK_ID_PROPERTY_ID}));
 
+  /**
+   * Thread-safe Jackson JSON mapper.
+   */
+  private static final ObjectMapper mapper = new ObjectMapper();
+
   // ----- Constructors ----------------------------------------------------
 
   /**
@@ -187,7 +192,6 @@ class TaskResourceProvider extends AbstractControllerResourceProvider
{
     Map<?, ?> result = null;
 
     try {
-      ObjectMapper mapper = new ObjectMapper();
       result = mapper.readValue(structuredOutput, Map.class);
     } catch (Exception excepton) {
       LOG.warn("Unable to parse task structured output: {}", structuredOutput);


Mime
View raw message