Эх сурвалжийг харах

HUE-7 [metastore] Remove hard dependency on Solr

Romain Rigaux 9 жил өмнө
parent
commit
91cdb5f

+ 2 - 2
apps/beeswax/src/beeswax/server/hive_server2_lib.py

@@ -118,7 +118,7 @@ class HiveServerTable(Table):
     except:
       # Impala does not have it
       return rows
-  
+
   def _get_partition_column(self):
     rows = self.describe
     try:
@@ -790,7 +790,7 @@ class HiveServerClient:
     req = TGetTablesReq(schemaName=database, tableName=table_name)
     res = self.call(self._client.GetTables, req)
 
-    table_results, table_schema = self.fetch_result(res.operationHandle, orientation=TFetchOrientation.FETCH_NEXT)    
+    table_results, table_schema = self.fetch_result(res.operationHandle, orientation=TFetchOrientation.FETCH_NEXT)
     self.close_operation(res.operationHandle)
 
     if partition_spec:

+ 6 - 10
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -335,12 +335,12 @@ ${ assist.assistPanel() }
             </label>
           <!-- /ko -->
 
-          <span class="help-inline muted" data-bind="visible: $root.createWizard.isNameAvailable()">
+          <span class="help-inline muted" data-bind="visible: $root.createWizard.isTargetExisting()">
             ${ _('Create a new ') } <span data-bind="text: ouputFormat"></span>
           </span>
-          <span class="help-inline muted" data-bind="visible: ! $root.createWizard.isNameAvailable() && name().length > 0">
-            ${ _('Adding data to this existing ') } <span data-bind="text: ouputFormat"></span>
-            <a href="javascript:void(0)" data-bind="attr: {href: '${ url("indexer:collections") }' +'#edit/' + name() }, text: name" target="_blank"></a>
+          <span class="help-inline muted" data-bind="visible: ! $root.createWizard.isTargetExisting() && name().length > 0">
+            ${ _('Adding data to the existing ') } <span data-bind="text: ouputFormat"></span>
+            <a href="javascript:void(0)" data-bind="text: name" target="_blank"></a>
           </span>
         </label>
       </div>
@@ -1086,7 +1086,7 @@ ${ assist.assistPanel() }
 
       self.indexingStarted = ko.observable(false);
 
-      self.isNameAvailable = ko.computed(function () {
+      self.isTargetExisting = ko.computed(function () {
         var name = self.source.name();
         return viewModel && viewModel.collectionNameAvailable(name) && name.length > 0;
       });
@@ -1317,14 +1317,10 @@ ${ assist.assistPanel() }
         }
       }
 
-      self.collections = ${ indexes_json | n }.
-      filter(function (index) {
-        return index.type == 'collection';
-      });
-
       self.createWizard = new CreateWizard(self);
       self.isLoading = ko.observable(false);
 
+      self.collections = [];
       self.collectionNameAvailable = function (name) {
         var matchingCollections = self.collections.filter(function (collection) {
           return collection.name == name;

+ 0 - 6
desktop/libs/indexer/src/indexer/views.py

@@ -89,15 +89,9 @@ def importer_prefill(request, source_type, target_type, target_path=None):
 
 
 def _importer(request, prefill):
-  searcher = IndexController(request.user)
-  indexes = searcher.get_indexes()
-
-  for index in indexes:
-    index['isSelected'] = False
 
   return render('importer.mako', request, {
       'is_embeddable': request.GET.get('is_embeddable', False),
-      'indexes_json': json.dumps(indexes),
       'fields_json' : json.dumps({'solr': [field.name for field in FIELD_TYPES], 'hive': HIVE_TYPES}),
       'operators_json' : json.dumps([operator.to_dict() for operator in OPERATORS]),
       'file_types_json' : json.dumps([format_.format_info() for format_ in get_file_indexable_format_types()]),