Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DF: allow single dataflow writing to two different ES indices. #366

Merged
merged 2 commits into from Jun 25, 2020

Conversation

mgolosova
Copy link
Collaborator

For now it is pretty much hardcoded: stage 019 (esFormat), that prepares data for upload, is only aware of 2 indices: "tasks" (for tasks metadata) and "progress" (for tasks processing progress metadata). If no index specified in the input data, "tasks" index is used.
There's also a "default" index -- it will be used if a desired index is not configured in the provided (or default) config file.

It may be improved later, e.g. when PHP script starts reading the configuration INI file by itself -- but for now that's enough.

ES configuration file previously contained only one index name ("ES_INDEX" variable); it is used by multiple stages so it is left in the config file to keep existing functionality. It can not be set to the
"value of ES_INDEX_TASKS" like this:

ES_INDEX=$ES_INDEX_TASKS

Although it will be OK for shell scripts that use this file by simply sourcing it, non-shell ones have to "manually" parse it, and "$ES_INDEX_TASKS" will be considered as a plain string, not variable
value.


NOTE: after this PR all stages but Stage 019 will continue to use the ES_INDEX parameter, while Stage 019 will ignore it.

For now it is pretty much hardcoded: stage 019 (esFormat), that
prepares data for upload, is only aware of 2 indices: "tasks" (for tasks
metadata) and "progress" (for tasks processing progress metadata).
If no index specified in the input data, "tasks" index is used.
There's also a "default" index -- it will be used if a desired index is
not configured in the provided (or default) config file.

It may be improved later, e.g. when PHP script starts reading the
configuration INI file by itself -- but for now that's enough.

ES configuration file previously contained only one index name
("ES_INDEX" variable); it is used by multiple stages so it is left in
the config file to keep existing functionality. It can not be set to the
"value of ES_INDEX_TASKS" like this:

  ES_INDEX=$ES_INDEX_TASKS

Although it will be OK for shell scripts that use this file by simply
sourcing it, non-shell ones have to "manually" parse it, and
"$ES_INDEX_TASKS" will be considered as a plain string, not variable
value.
@mgolosova mgolosova self-assigned this Jun 10, 2020
@mgolosova
Copy link
Collaborator Author

@mgolosova mgolosova merged commit 93803b9 into master Jun 25, 2020
@mgolosova mgolosova deleted the data4es-019-different-indices branch June 25, 2020 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants