ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From niti...@apache.org
Subject ambari git commit: AMBARI-20690 : fixed Hive view holds the operational logs open and also fills tmp folder (nitirajrathore)
Date Tue, 25 Apr 2017 11:30:00 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8bc2048d2 -> a76b3f061


AMBARI-20690 : fixed Hive view holds the operational logs open and also fills tmp folder (nitirajrathore)


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

Branch: refs/heads/branch-2.5
Commit: a76b3f061ca5ed47a9480e7449939dc9c5d5a1b5
Parents: 8bc2048
Author: Nitiraj Singh Rathore <nitiraj.rathore@gmail.com>
Authored: Tue Apr 25 16:56:08 2017 +0530
Committer: Nitiraj Singh Rathore <nitiraj.rathore@gmail.com>
Committed: Tue Apr 25 16:56:08 2017 +0530

----------------------------------------------------------------------
 .../ambari/view/hive2/actor/HiveActor.java      | 32 +++++++++-----------
 .../ambari/view/hive2/actor/JdbcConnector.java  |  8 +----
 .../view/hive2/actor/OperationController.java   |  2 +-
 .../ambari/view/hive20/actor/HiveActor.java     | 32 +++++++++-----------
 .../ambari/view/hive20/actor/JdbcConnector.java |  6 ----
 .../view/hive20/actor/OperationController.java  |  2 +-
 6 files changed, 31 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a76b3f06/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/HiveActor.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/HiveActor.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/HiveActor.java
index 36bc430..a71ca5c 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/HiveActor.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/HiveActor.java
@@ -25,26 +25,22 @@ import org.slf4j.LoggerFactory;
 
 public abstract class HiveActor extends UntypedActor {
 
-    private final Logger LOG = LoggerFactory.getLogger(getClass());
-
-    @Override
-    final public void onReceive(Object message) throws Exception {
-        HiveMessage hiveMessage = new HiveMessage(message);
-        if(LOG.isDebugEnabled()){
-            LOG.debug("Received message: " + message.getClass().getName() + ", generated
id: " + hiveMessage.getId() +
-                    " sent by: " + sender() + ", recieved by" + self());
-        }
-
-        handleMessage(hiveMessage);
-
-        if(LOG.isDebugEnabled()){
-            LOG.debug("Message submitted: " + hiveMessage.getId());
-
-        }
+  private static final Logger LOG = LoggerFactory.getLogger(HiveActor.class);
+
+  @Override
+  final public void onReceive(Object message) throws Exception {
+    HiveMessage hiveMessage = new HiveMessage(message);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Received message: " + message.getClass().getName() + ", generated id: "
+ hiveMessage.getId() +
+          " sent by: " + sender() + ", recieved by" + self());
     }
 
-    public abstract void handleMessage(HiveMessage hiveMessage);
-
+    handleMessage(hiveMessage);
 
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Message submitted: " + hiveMessage.getId());
+    }
+  }
 
+  public abstract void handleMessage(HiveMessage hiveMessage);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a76b3f06/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java
index 997c28a..f7746d9 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/JdbcConnector.java
@@ -77,7 +77,7 @@ import java.util.concurrent.TimeUnit;
  */
 public class JdbcConnector extends HiveActor {
 
-  private final Logger LOG = LoggerFactory.getLogger(getClass());
+  private static final Logger LOG = LoggerFactory.getLogger(JdbcConnector.class);
 
   public static final String SUFFIX = "validating the login";
 
@@ -527,12 +527,6 @@ public class JdbcConnector extends HiveActor {
   }
 
   private void checkTerminationInactivity() {
-    if (!isAsync()) {
-      // Should not terminate if job is sync. Will terminate after the job is finished.
-      stopTerminateInactivityScheduler();
-      return;
-    }
-
     LOG.debug("Termination check, executing status: {}", executing);
     if (executing) {
       keepAlive();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a76b3f06/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/OperationController.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/OperationController.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/OperationController.java
index 98e60f2..c8c8a6c 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/OperationController.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/OperationController.java
@@ -63,7 +63,7 @@ import java.util.UUID;
  */
 public class OperationController extends HiveActor {
 
-  private final Logger LOG = LoggerFactory.getLogger(getClass());
+  private static final Logger LOG = LoggerFactory.getLogger(OperationController.class);
 
   private final ActorSystem system;
   private final ActorRef deathWatch;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a76b3f06/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/HiveActor.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/HiveActor.java
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/HiveActor.java
index 384b798..b955650 100644
--- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/HiveActor.java
+++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/HiveActor.java
@@ -25,26 +25,22 @@ import org.slf4j.LoggerFactory;
 
 public abstract class HiveActor extends UntypedActor {
 
-    private final Logger LOG = LoggerFactory.getLogger(getClass());
-
-    @Override
-    final public void onReceive(Object message) throws Exception {
-        HiveMessage hiveMessage = new HiveMessage(message);
-        if(LOG.isDebugEnabled()){
-            LOG.debug("Received message: " + message.getClass().getName() + ", generated
id: " + hiveMessage.getId() +
-                    " sent by: " + sender() + ", recieved by" + self());
-        }
-
-        handleMessage(hiveMessage);
-
-        if(LOG.isDebugEnabled()){
-            LOG.debug("Message submitted: " + hiveMessage.getId());
-
-        }
+  private static final Logger LOG = LoggerFactory.getLogger(HiveActor.class);
+
+  @Override
+  final public void onReceive(Object message) throws Exception {
+    HiveMessage hiveMessage = new HiveMessage(message);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Received message: " + message.getClass().getName() + ", generated id: "
+ hiveMessage.getId() +
+          " sent by: " + sender() + ", recieved by" + self());
     }
 
-    public abstract void handleMessage(HiveMessage hiveMessage);
-
+    handleMessage(hiveMessage);
 
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Message submitted: " + hiveMessage.getId());
+    }
+  }
 
+  public abstract void handleMessage(HiveMessage hiveMessage);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a76b3f06/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java
index f93ecbf..5a744e2 100644
--- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java
+++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/JdbcConnector.java
@@ -578,12 +578,6 @@ public class JdbcConnector extends HiveActor {
   }
 
   private void checkTerminationInactivity() {
-    if (!isAsync()) {
-      // Should not terminate if job is sync. Will terminate after the job is finished.
-      stopTerminateInactivityScheduler();
-      return;
-    }
-
     LOG.debug("Termination check, executing status: {}", executing);
     if (executing) {
       keepAlive();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a76b3f06/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/OperationController.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/OperationController.java
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/OperationController.java
index f751d8f..3b1397c 100644
--- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/OperationController.java
+++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/OperationController.java
@@ -63,7 +63,7 @@ import java.util.UUID;
  */
 public class OperationController extends HiveActor {
 
-  private final Logger LOG = LoggerFactory.getLogger(getClass());
+  private static final Logger LOG = LoggerFactory.getLogger(OperationController.class);
 
   private final ActorSystem system;
   private final ActorRef deathWatch;


Mime
View raw message