Merge "make metadata indexing optional"
This commit is contained in:
commit
64ba133a57
@ -73,9 +73,7 @@ class Elastic(object):
|
|||||||
return json_data
|
return json_data
|
||||||
|
|
||||||
def combine_metadata(self, result):
|
def combine_metadata(self, result):
|
||||||
if (self.config['elasticsearch']['metadata_files'] is not None and
|
meta = self.config['elasticsearch'].get('metadata_files', []) or []
|
||||||
len(self.config['elasticsearch']['metadata_files']) > 0):
|
|
||||||
meta = self.config['elasticsearch']['metadata_files']
|
|
||||||
for _meta in meta:
|
for _meta in meta:
|
||||||
try:
|
try:
|
||||||
with open(_meta['file']) as jdata:
|
with open(_meta['file']) as jdata:
|
||||||
|
@ -62,7 +62,7 @@ mapping:
|
|||||||
required: True
|
required: True
|
||||||
metadata_files:
|
metadata_files:
|
||||||
type: seq
|
type: seq
|
||||||
required: True
|
required: False
|
||||||
sequence:
|
sequence:
|
||||||
- type: map
|
- type: map
|
||||||
mapping:
|
mapping:
|
||||||
|
@ -70,7 +70,7 @@ class Tools(object):
|
|||||||
workloads.run_workload(copy.deepcopy(workload), run_iteration)
|
workloads.run_workload(copy.deepcopy(workload), run_iteration)
|
||||||
|
|
||||||
def check_metadata(self):
|
def check_metadata(self):
|
||||||
meta = self.config['elasticsearch']['metadata_files']
|
meta = self.config['elasticsearch'].get('metadata_files', []) or []
|
||||||
for _meta in meta:
|
for _meta in meta:
|
||||||
if not os.path.isfile(_meta['file']):
|
if not os.path.isfile(_meta['file']):
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
|
Loading…
Reference in New Issue
Block a user