浏览代码

HUE-6440 [assist] Also clear the Impala cache when clearing all caches

Johan Ahlen 8 年之前
父节点
当前提交
5dd9acc
共有 1 个文件被更改,包括 11 次插入7 次删除
  1. 11 7
      desktop/core/src/desktop/static/desktop/js/apiHelper.js

+ 11 - 7
desktop/core/src/desktop/static/desktop/js/apiHelper.js

@@ -130,16 +130,20 @@ var ApiHelper = (function () {
     });
 
     huePubSub.subscribe('assist.clear.all.caches', function () {
-      huePubSub.publish('assist.clear.db.cache', {
+      self.clearDbCache({
         sourceType: 'hive',
         clearAll: true
       });
-      huePubSub.publish('assist.clear.hdfs.cache');
-      huePubSub.publish('assist.clear.git.cache');
-      huePubSub.publish('assist.clear.s3.cache');
-      huePubSub.publish('assist.clear.collections.cache');
-      huePubSub.publish('assist.clear.hbase.cache');
-      huePubSub.publish('assist.clear.document.cache');
+      self.clearDbCache({
+        sourceType: 'impala',
+        clearAll: true
+      });
+      $.totalStorage(self.getAssistCacheIdentifier({ sourceType: 'hdfs' }), {});
+      $.totalStorage(self.getAssistCacheIdentifier({ sourceType: 'git' }), {});
+      $.totalStorage(self.getAssistCacheIdentifier({ sourceType: 's3' }), {});
+      $.totalStorage(self.getAssistCacheIdentifier({ sourceType: 'collections' }), {});
+      $.totalStorage(self.getAssistCacheIdentifier({ sourceType: 'hbase' }), {});
+      $.totalStorage(self.getAssistCacheIdentifier({ sourceType: 'document' }), {});
     });
   }