소스 검색

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

Johan Ahlen 9 년 전
부모
커밋
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' }), {});
     });
   }