Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 edcc6c6e8 -> 5fe4b5f32


AMBARI-21163 : fixed : Hive view 1.5 and 2.0 not exporting/downloading the 
worksheet with entire number of rows to csv (nitirajrathore)


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

Branch: refs/heads/branch-2.5
Commit: 5fe4b5f32c558a5a1f876cdcac88e9538742872b
Parents: edcc6c6
Author: Nitiraj Singh Rathore <nitiraj.rath...@gmail.com>
Authored: Mon Jun 5 12:33:46 2017 +0530
Committer: Nitiraj Singh Rathore <nitiraj.rath...@gmail.com>
Committed: Mon Jun 5 12:33:46 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/ambari/view/hive2/actor/DeathWatch.java   | 5 +++--
 .../apache/ambari/view/hive2/client/NonPersistentCursor.java  | 4 ++--
 .../java/org/apache/ambari/view/hive20/actor/DeathWatch.java  | 7 ++++---
 .../apache/ambari/view/hive20/client/NonPersistentCursor.java | 4 ++--
 4 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5fe4b5f3/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/DeathWatch.java
----------------------------------------------------------------------
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/DeathWatch.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/DeathWatch.java
index dbb6c3d..d72eb29 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/DeathWatch.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/actor/DeathWatch.java
@@ -41,13 +41,14 @@ public class DeathWatch extends HiveActor {
             this.getContext().watch(actorRef);
             LOG.info("Registered new actor "+ actorRef);
             LOG.info("Registration for {} at {}", actorRef,new Date());
-        }
-        if(message instanceof Terminated){
+        }else if(message instanceof Terminated){
             Terminated terminated = (Terminated) message;
             ActorRef actor = terminated.actor();
             LOG.info("Received terminate for actor "+ actor);
             LOG.info("Termination for {} at {}", actor,new Date());
 
+        }else{
+            LOG.info("received unknown message : {}", hiveMessage);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fe4b5f3/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/client/NonPersistentCursor.java
----------------------------------------------------------------------
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/client/NonPersistentCursor.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/client/NonPersistentCursor.java
index 0be2683..13cab33 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/client/NonPersistentCursor.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/client/NonPersistentCursor.java
@@ -55,13 +55,14 @@ public class NonPersistentCursor implements Cursor<Row, 
ColumnDescription> {
   private final List<ColumnDescription> descriptions = Lists.newLinkedList();
   private int offSet = 0;
   private boolean endReached = false;
-
+  private Inbox inbox;
 
   public NonPersistentCursor(ViewContext context, ActorSystem system, ActorRef 
actorRef) {
     this.context = context;
     this.system = system;
     this.actorRef = actorRef;
     actorConfiguration = new HiveActorConfiguration(context);
+    inbox = Inbox.create(system);
   }
 
   @Override
@@ -120,7 +121,6 @@ public class NonPersistentCursor implements Cursor<Row, 
ColumnDescription> {
   }
 
   private void getNextRows() {
-    Inbox inbox = Inbox.create(system);
     inbox.send(actorRef, new Next());
     Object receive;
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fe4b5f3/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/DeathWatch.java
----------------------------------------------------------------------
diff --git 
a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/DeathWatch.java
 
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/DeathWatch.java
index 58cefcd..17b491c 100644
--- 
a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/DeathWatch.java
+++ 
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/actor/DeathWatch.java
@@ -41,13 +41,14 @@ public class DeathWatch extends HiveActor {
             this.getContext().watch(actorRef);
             LOG.info("Registered new actor "+ actorRef);
             LOG.info("Registration for {} at {}", actorRef,new Date());
-        }
-        if(message instanceof Terminated){
+        }else if(message instanceof Terminated){
             Terminated terminated = (Terminated) message;
             ActorRef actor = terminated.actor();
-            LOG.info("Received terminate for actor "+ actor);
+            LOG.info("Received terminate for actor {} with message : {}", 
actor, terminated);
             LOG.info("Termination for {} at {}", actor,new Date());
 
+        }else{
+            LOG.info("received unknown message : {}", hiveMessage);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fe4b5f3/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/client/NonPersistentCursor.java
----------------------------------------------------------------------
diff --git 
a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/client/NonPersistentCursor.java
 
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/client/NonPersistentCursor.java
index 1d76e9c..80ffe79 100644
--- 
a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/client/NonPersistentCursor.java
+++ 
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/client/NonPersistentCursor.java
@@ -55,13 +55,14 @@ public class NonPersistentCursor implements Cursor<Row, 
ColumnDescription> {
   private final List<ColumnDescription> descriptions = Lists.newLinkedList();
   private int offSet = 0;
   private boolean endReached = false;
-
+  private Inbox inbox;
 
   public NonPersistentCursor(ViewContext context, ActorSystem system, ActorRef 
actorRef) {
     this.context = context;
     this.system = system;
     this.actorRef = actorRef;
     actorConfiguration = new HiveActorConfiguration(context);
+    inbox = Inbox.create(system);
   }
 
   @Override
@@ -120,7 +121,6 @@ public class NonPersistentCursor implements Cursor<Row, 
ColumnDescription> {
   }
 
   private void getNextRows() {
-    Inbox inbox = Inbox.create(system);
     inbox.send(actorRef, new Next());
     Object receive;
     try {

Reply via email to