Skip to content

Commit

Permalink
Merge pull request #437 from PanDAWMS/es-7.10.2
Browse files Browse the repository at this point in the history
ES v7.10.2
  • Loading branch information
witxka committed Jul 5, 2022
2 parents 5af54ca + e3e6e74 commit cfc3856
Show file tree
Hide file tree
Showing 31 changed files with 5,738 additions and 5,722 deletions.
2 changes: 1 addition & 1 deletion Utils/API/server/lib/dkb/api/storages/es/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'query')

# Default datetime format for ES
ES_DATE_FORMAT = '%d-%m-%y %H:%M:%S'
ES_DATE_FORMAT = '%d-%m-%Y %H:%M:%S'

# ES configuration
CONFIG = None
Expand Down
2 changes: 1 addition & 1 deletion Utils/API/server/lib/dkb/api/storages/es_nested/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'query')

# Default datetime format for ES
ES_DATE_FORMAT = '%d-%m-%y %H:%M:%S'
ES_DATE_FORMAT = '%d-%m-%Y %H:%M:%S'

# ES configuration
CONFIG = None
Expand Down
472 changes: 236 additions & 236 deletions Utils/Dataflow/data4es/009_oracleConnector/output/sample2016.ndjson

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions Utils/Dataflow/data4es/009_oracleConnector/output/sample2020.ndjson

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Utils/Dataflow/data4es/016_task2es/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
--------------
Add ES-specific service fields to task metadata:
* _id = taskid
* _type = 'task'

2. Samples
----------
Expand Down
1,246 changes: 623 additions & 623 deletions Utils/Dataflow/data4es/016_task2es/output/consistency.ndjson

Large diffs are not rendered by default.

472 changes: 236 additions & 236 deletions Utils/Dataflow/data4es/016_task2es/output/sample2016.ndjson

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions Utils/Dataflow/data4es/016_task2es/output/sample2020.ndjson

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions Utils/Dataflow/data4es/016_task2es/task2es.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def add_es_index_info(data):
Add fields:
_id => taskid
_type => 'task'
Return value:
False -- update failed, skip the record
Expand All @@ -42,7 +41,6 @@ def add_es_index_info(data):
if not data.get('taskid'):
return False
data['_id'] = data['taskid']
data['_type'] = 'task'
return True


Expand Down
472 changes: 236 additions & 236 deletions Utils/Dataflow/data4es/017_adjustMetadata/output/sample2016.ndjson

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions Utils/Dataflow/data4es/017_adjustMetadata/output/sample2020.ndjson

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Utils/Dataflow/data4es/019_esFormat/esFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function check_input($row) {
:return: TRUE if input is correct, FALSE if it is not
:rtype: bool
*/
$required_fields = array('_id', '_type');
$required_fields = array('_id');

if (!is_array($row)) {
fwrite(STDERR, "(WARN) Failed to decode message.\n");
Expand Down Expand Up @@ -181,7 +181,6 @@ function constructActionJson($row) {
$action = Array(
$act => Array(
'_index' => $index,
'_type' => $row['_type'],
'_id' => $row['_id'],
)
);
Expand Down
944 changes: 472 additions & 472 deletions Utils/Dataflow/data4es/019_esFormat/output/sample2016.ndjson

Large diffs are not rendered by default.

944 changes: 472 additions & 472 deletions Utils/Dataflow/data4es/019_esFormat/output/sample2016.update.ndjson

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions Utils/Dataflow/data4es/019_esFormat/output/sample2020.ndjson

Large diffs are not rendered by default.

472 changes: 236 additions & 236 deletions Utils/Dataflow/data4es/025_chicagoES/output/sample2016.ndjson

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions Utils/Dataflow/data4es/025_chicagoES/output/sample2020.ndjson

Large diffs are not rendered by default.

944 changes: 472 additions & 472 deletions Utils/Dataflow/data4es/040_progress/output/sample2016.ndjson

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions Utils/Dataflow/data4es/040_progress/output/sample2020.ndjson

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Utils/Dataflow/data4es/040_progress/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def progress_data(data, granularity=86400):
rounded_ts_sec = int((rounded_ts - datetime(1970, 1, 1)).total_seconds())
rounded_ts_ms = rounded_ts_sec * 10**3
result['_id'] = '%s_%s' % (rounded_ts_ms, result['taskid'])
result['_type'] = 'task_progress'
result['_index'] = 'progress'

return result
Expand Down
1,416 changes: 708 additions & 708 deletions Utils/Dataflow/data4es/069_upload2es/input/sample2016

Large diffs are not rendered by default.

964 changes: 492 additions & 472 deletions Utils/Dataflow/data4es/069_upload2es/input/sample2016.update

Large diffs are not rendered by default.

300 changes: 150 additions & 150 deletions Utils/Dataflow/data4es/069_upload2es/input/sample2020

Large diffs are not rendered by default.

472 changes: 236 additions & 236 deletions Utils/Dataflow/data4es/091_datasetsRucio/output/sample2016.ndjson

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions Utils/Dataflow/data4es/091_datasetsRucio/output/sample2020.ndjson

Large diffs are not rendered by default.

944 changes: 472 additions & 472 deletions Utils/Dataflow/data4es/093_datasetsFormat/output/sample2016.ndjson

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions Utils/Dataflow/data4es/093_datasetsFormat/output/sample2020.ndjson

Large diffs are not rendered by default.

197 changes: 99 additions & 98 deletions Utils/Dataflow/data4es/095_datasetInfoAMI/output/sample2020.ndjson

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Utils/Elasticsearch/mapping/progress.mapping
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"template": "*_progress",
"settings": {
"number_of_shards": 4
},
"mappings": {
"task_progress": {
"index_patterns": "progress_*",
"template": {
"settings": {
"number_of_shards": 4
},
"mappings": {
"properties": {
"taskid": {
"type": "integer",
Expand All @@ -16,7 +16,7 @@
},
"date": {
"type": "date",
"format": "dd-MM-yy HH:mm:ss||epoch_millis"
"format": "dd-MM-yyyy HH:mm:ss||epoch_millis"
},
"processed_events": {
"type": "long"
Expand Down
96 changes: 48 additions & 48 deletions Utils/Elasticsearch/mapping/tasks.mapping
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
{
"template": "tasks_*",
"settings": {
"number_of_shards": 4,
"analysis": {
"analyzer": {
"dsname": {
"char_filter": ["dsname_wildcarded", "remove_wildcard"],
"tokenizer": "dsname_tokenizer",
"filter": ["lowercase"]
},
"dsname_fields": {
"char_filter": ["dsname_wildcarded", "remove_wildcard"],
"tokenizer": "dsname_field_tokenizer",
"filter": "lowercase"
},
"dsname_fields_wildcarded": {
"char_filter": ["dsname_wildcarded"],
"tokenizer": "dsname_field_tokenizer",
"filter": "lowercase"
}
},
"tokenizer": {
"dsname_tokenizer": {
"type": "pattern",
"pattern": "\\.+|_+"
},
"dsname_field_tokenizer": {
"type": "pattern",
"pattern": "\\.+"
}
},
"char_filter": {
"dsname_wildcarded": {
"type": "pattern_replace",
"pattern": "[^a-zA-Z0-9_/.*?-]",
"replacement": ""
},
"remove_wildcard": {
"type": "pattern_replace",
"pattern": "[?*]",
"replacement": ""
"index_patterns": ["tasks_*"],
"template": {
"settings": {
"number_of_shards": 4,
"analysis": {
"analyzer": {
"dsname": {
"char_filter": ["dsname_wildcarded", "remove_wildcard"],
"tokenizer": "dsname_tokenizer",
"filter": ["lowercase"]
},
"dsname_fields": {
"char_filter": ["dsname_wildcarded", "remove_wildcard"],
"tokenizer": "dsname_field_tokenizer",
"filter": "lowercase"
},
"dsname_fields_wildcarded": {
"char_filter": ["dsname_wildcarded"],
"tokenizer": "dsname_field_tokenizer",
"filter": "lowercase"
}
},
"tokenizer": {
"dsname_tokenizer": {
"type": "pattern",
"pattern": "\\.+|_+"
},
"dsname_field_tokenizer": {
"type": "pattern",
"pattern": "\\.+"
}
},
"char_filter": {
"dsname_wildcarded": {
"type": "pattern_replace",
"pattern": "[^a-zA-Z0-9_/.*?-]",
"replacement": ""
},
"remove_wildcard": {
"type": "pattern_replace",
"pattern": "[?*]",
"replacement": ""
}
}
}
}
},
"mappings": {
"task": {
},
"mappings": {
"properties": {
"site": {
"type": "text",
Expand Down Expand Up @@ -192,15 +192,15 @@
},
"task_timestamp": {
"type": "date",
"format": "dd-MM-yy HH:mm:ss"
"format": "dd-MM-yyyy HH:mm:ss"
},
"start_time": {
"type": "date",
"format": "dd-MM-yy HH:mm:ss"
"format": "dd-MM-yyyy HH:mm:ss"
},
"end_time": {
"type": "date",
"format": "dd-MM-yy HH:mm:ss"
"format": "dd-MM-yyyy HH:mm:ss"
},
"hashtag_list": {
"type": "keyword",
Expand Down
2 changes: 1 addition & 1 deletion Utils/Elasticsearch/tools/load_mapping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ shift $((OPTIND-1))
&& echo "You must provide path to mapping file!" \
|| curl $ES_AUTH -H "Content-Type: application/x-ndjson" \
-XPUT --data-binary "@${1}" \
"${ES_PROTO}://${ES_HOST}:${ES_PORT}${ES_PATH}/_template/`basename ${1%.*}`?pretty"
"${ES_PROTO}://${ES_HOST}:${ES_PORT}${ES_PATH}/_index_template/`basename ${1%.*}`?pretty"

0 comments on commit cfc3856

Please sign in to comment.