Bläddra i källkod

HUE-8330 [cluster] Do not populate namespaces all the time

Romain 6 år sedan
förälder
incheckning
0a6470e7e7
1 ändrade filer med 3 tillägg och 8 borttagningar
  1. 3 8
      desktop/core/src/desktop/api2.py

+ 3 - 8
desktop/core/src/desktop/api2.py

@@ -79,19 +79,14 @@ def get_config(request):
 
 @api_error_handler
 def get_context_namespaces(request, interface):
+  '''
+  Namespaces are node cluster contexts (e.g. Hive + Ranger) that can be queried by computes.
+  '''
   response = {}
   namespaces = []
 
   clusters = get_clusters(request.user).values()
 
-  namespaces.extend([{
-      'id': cluster['id'],
-      'name': cluster['name'],
-      'status': 'CREATED',
-      'computes': [cluster]
-    } for cluster in clusters if cluster.get('type') == 'direct' and cluster['interface'] in (interface, 'all')
-  ])
-
   if interface == 'hive' or interface == 'impala' or interface == 'report':
     # From Altus SDX
     if [cluster for cluster in clusters if 'altus' in cluster['type']]: