hardcoded parameters in broker workflow #70

Closed
opened 2020-12-10 09:10:42 +01:00 by claudio.atzori · 4 comments

I see in https://code-repo.d4science.org/D-Net/dnet-hadoop/src/branch/master/dhp-workflows/dhp-broker-events/src/main/java/eu/dnetlib/dhp/broker/oa/IndexEventSubsetJob.java#L89

There are some hardcoded Elasticsearch connection properties:

esCfg.put("es.batch.write.retry.count", "8");
esCfg.put("es.batch.write.retry.wait", "60s");
esCfg.put("es.batch.size.entries", "200");

it would be good to have them optionally configurable.

I see in https://code-repo.d4science.org/D-Net/dnet-hadoop/src/branch/master/dhp-workflows/dhp-broker-events/src/main/java/eu/dnetlib/dhp/broker/oa/IndexEventSubsetJob.java#L89 There are some hardcoded Elasticsearch connection properties: ``` esCfg.put("es.batch.write.retry.count", "8"); esCfg.put("es.batch.write.retry.wait", "60s"); esCfg.put("es.batch.size.entries", "200"); ``` it would be good to have them optionally configurable.
claudio.atzori added the
enhancement
label 2020-12-10 09:10:42 +01:00
michele.artini was assigned by claudio.atzori 2020-12-10 09:10:42 +01:00
Author
Owner

The same parameters are hardcoded also in

https://code-repo.d4science.org/D-Net/dnet-hadoop/src/branch/master/dhp-workflows/dhp-broker-events/src/main/java/eu/dnetlib/dhp/broker/oa/IndexNotificationsJob.java#L95

As the action implemented by those two classes is quite similar (index Events and Notifications), perhaps you could consider to extract the common part in an abstract class?

The same parameters are hardcoded also in https://code-repo.d4science.org/D-Net/dnet-hadoop/src/branch/master/dhp-workflows/dhp-broker-events/src/main/java/eu/dnetlib/dhp/broker/oa/IndexNotificationsJob.java#L95 As the action implemented by those two classes is quite similar (index Events and Notifications), perhaps you could consider to extract the common part in an abstract class?
Member

The fix has been commited in the broker branch

The fix has been commited in the broker branch
Member

The wf parameters with suggested values are:

esBatchWriteRetryCount   = 8
esBatchWriteRetryWait    = 60s
esBatchSizeEntries       = 200
esNodesWanOnly           = true
The wf parameters with suggested values are: ``` esBatchWriteRetryCount = 8 esBatchWriteRetryWait = 60s esBatchSizeEntries = 200 esNodesWanOnly = true ```
Author
Owner

Integrated in PR !78

Integrated in PR !78
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: D-Net/dnet-hadoop#70
No description provided.