소스 검색

HUE-7053 [search] Indexer requires options to avoid jar classes conflicts

Romain Rigaux 8 년 전
부모
커밋
093ec6c
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      desktop/libs/indexer/src/indexer/indexers/morphline.py

+ 3 - 1
desktop/libs/indexer/src/indexer/indexers/morphline.py

@@ -93,10 +93,12 @@ class MorphlineIndexer(object):
 
     client = SolrClient(self.user)
 
+    extra_args = ['-Dmapreduce.job.user.classpath.first=true'] if client.is_solr_six_or_more() else []
+
     task.add_java_snippet(
       clazz='org.apache.solr.hadoop.MapReduceIndexerTool',
       app_jar=lib_path if lib_path is not None else CONFIG_INDEXER_LIBS_PATH.get(),
-      arguments=[
+      arguments=extra_args + [
           u'--morphline-file',
           u'morphline.conf',
           u'--output-dir',