ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-15530. Hive View: Execution of queries throws 'No query to process'. (dipayanb)
Date Mon, 28 Mar 2016 19:41:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c4b16eefb -> 466467617


AMBARI-15530. Hive View: Execution of queries throws 'No query to process'. (dipayanb)


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

Branch: refs/heads/trunk
Commit: 466467617bf49498c37fd9ba6df3772e8cee3afc
Parents: c4b16ee
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Tue Mar 29 01:09:54 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Tue Mar 29 01:11:20 2016 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/ambari/view/hive/HiveViewImpl.java    | 6 +++---
 .../apache/ambari/view/hive/utils/SharedObjectsFactory.java    | 2 +-
 .../src/main/java/org/apache/ambari/view/utils/UserLocal.java  | 2 +-
 .../src/main/java/org/apache/ambari/view/utils/ViewImpl.java   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/46646761/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HiveViewImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HiveViewImpl.java
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HiveViewImpl.java
index f98e2b0..e28dfbf 100644
--- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HiveViewImpl.java
+++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HiveViewImpl.java
@@ -38,13 +38,13 @@ public class HiveViewImpl implements View {
 
   @Override
   public void onDestroy(ViewInstanceDefinition definition) {
-
+    SharedObjectsFactory.dropInstanceCache(definition.getInstanceName());
   }
 
   @Override
   public void onUpdate(ViewInstanceDefinition definition) {
     //drop all cached connection for instance
-    UserLocal.dropInstanceConnection(definition.getInstanceName());
-    SharedObjectsFactory.dropInstanceConnection(definition.getInstanceName());
+    UserLocal.dropInstanceCache(definition.getInstanceName());
+    SharedObjectsFactory.dropInstanceCache(definition.getInstanceName());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/46646761/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/utils/SharedObjectsFactory.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/utils/SharedObjectsFactory.java
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/utils/SharedObjectsFactory.java
index 94af2fb..45f2fbf 100644
--- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/utils/SharedObjectsFactory.java
+++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/utils/SharedObjectsFactory.java
@@ -174,7 +174,7 @@ public class SharedObjectsFactory implements IStorageFactory {
    *
    * @param instanceName
    */
-  public static void dropInstanceConnection(String instanceName){
+  public static void dropInstanceCache(String instanceName){
     for(Map<String,Object> cache : localObjects.values()){
       for(Iterator<Map.Entry<String, Object>> it = cache.entrySet().iterator();
it.hasNext();){
         Map.Entry<String, Object> entry = it.next();

http://git-wip-us.apache.org/repos/asf/ambari/blob/46646761/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java
----------------------------------------------------------------------
diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java
index 9d831ee..40c8e6e 100644
--- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java
+++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/UserLocal.java
@@ -134,7 +134,7 @@ public class UserLocal<T> {
    *
    * @param instanceName
    */
-  public static void dropInstanceConnection(String instanceName){
+  public static void dropInstanceCache(String instanceName){
     for(Map<String,Object> cache : viewSingletonObjects.values()){
       for(Iterator<Map.Entry<String, Object>> it = cache.entrySet().iterator();it.hasNext();){
         Map.Entry<String, Object> entry = it.next();

http://git-wip-us.apache.org/repos/asf/ambari/blob/46646761/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ViewImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ViewImpl.java
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ViewImpl.java
index 170e775..57f693d 100644
--- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ViewImpl.java
+++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ViewImpl.java
@@ -45,6 +45,6 @@ public class ViewImpl implements View {
   @Override
   public void onUpdate(ViewInstanceDefinition definition) {
     //refresh all cached connection
-    UserLocal.dropInstanceConnection(definition.getInstanceName());
+    UserLocal.dropInstanceCache(definition.getInstanceName());
   }
 }


Mime
View raw message