ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [16/19] ambari git commit: AMBARI-18745. Logs wont display for users in Ambari hive view after job completion. (Ashween Rajeev via dipayanb)
Date Mon, 14 Nov 2016 15:46:39 GMT
AMBARI-18745. Logs wont display for users in Ambari hive view after job completion. (Ashween
Rajeev via dipayanb)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 24f1eb6dad2fc1d3f65849560a7d16e687acd8f8
Parents: 8424364
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Sun Nov 13 00:05:39 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Sun Nov 13 00:07:11 2016 +0530

----------------------------------------------------------------------
 .../org/apache/ambari/view/hive2/actor/LogAggregator.java |  5 ++---
 .../ambari/view/hive2/internal/SafeViewContext.java       |  4 +++-
 .../ambari/view/hive2/resources/jobs/JobService.java      | 10 +---------
 3 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/24f1eb6d/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/LogAggregator.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/LogAggregator.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/LogAggregator.java
index 889611a..9412f81 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/LogAggregator.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/LogAggregator.java
@@ -72,10 +72,9 @@ public class LogAggregator extends HiveActor {
       try {
         getMoreLogs();
       } catch (SQLException e) {
-        LOG.error("SQL Error while getting logs. Tried writing to: {}", logFile);
+        LOG.error("SQL Error while getting logs. Tried writing to: {}. Exception: {}", logFile,
e);
       } catch (HdfsApiException e) {
-        LOG.warn("HDFS Error while getting writing logs to {}", logFile);
-
+        LOG.warn("HDFS Error while getting writing logs to {}. Exception: {}", logFile, e);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/24f1eb6d/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/internal/SafeViewContext.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/internal/SafeViewContext.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/internal/SafeViewContext.java
index 739e9cc..2ee3697 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/internal/SafeViewContext.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/internal/SafeViewContext.java
@@ -45,11 +45,13 @@ public class SafeViewContext implements ViewContext {
   private final ViewContext viewContext;
   private final String username;
   private final String loggedinUser;
+  private final Map<String, String> properties;
 
   public SafeViewContext(ViewContext viewContext) {
     this.viewContext = viewContext;
     username = viewContext.getUsername();
     loggedinUser = viewContext.getLoggedinUser();
+    properties = viewContext.getProperties();
   }
 
   @Override
@@ -89,7 +91,7 @@ public class SafeViewContext implements ViewContext {
 
   @Override
   public Map<String, String> getProperties() {
-    return viewContext.getProperties();
+    return properties;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/24f1eb6d/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/jobs/JobService.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/jobs/JobService.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/jobs/JobService.java
index ff315e4..6eedcca 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/jobs/JobService.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/jobs/JobService.java
@@ -100,7 +100,6 @@ public class JobService extends BaseService {
 
   protected final static Logger LOG =
       LoggerFactory.getLogger(JobService.class);
-  private Aggregator aggregator;
 
   protected synchronized JobResourceManager getResourceManager() {
     if (resourceManager == null) {
@@ -112,16 +111,9 @@ public class JobService extends BaseService {
 
 
   protected Aggregator getAggregator() {
-    if (aggregator == null) {
       IATSParser atsParser = getSharedObjectsFactory().getATSParser();
       ActorRef operationController = ConnectionSystem.getInstance().getOperationController(context);
-      aggregator = new Aggregator(getResourceManager(), atsParser, operationController);
-    }
-    return aggregator;
-  }
-
-  protected void setAggregator(Aggregator aggregator) {
-    this.aggregator = aggregator;
+      return new Aggregator(getResourceManager(), atsParser, operationController);
   }
 
   /**


Mime
View raw message