WIP: simplify the workflow parameters

This commit is contained in:
Claudio Atzori 2024-12-16 15:11:59 +01:00
parent 729671789d
commit ef09660cab
3 changed files with 17 additions and 18 deletions

View File

@ -52,17 +52,10 @@ public class SolrAdminApplication implements Closeable {
final String zkHost = parser.get("zkHost");
log.info("zkHost: {}", zkHost);
final String publicFormat = parser.get("publicFormat");
log.info("publicFormat: {}", publicFormat);
final String shadowFormat = parser.get("shadowFormat");
log.info("shadowFormat: {}", shadowFormat);
// get collection names from metadata format profiles names
final String publicCollection = ProvisionConstants.getCollectionName(publicFormat);
final String publicCollection = parser.get("publicCollection");
log.info("publicCollection: {}", publicCollection);
final String shadowCollection = ProvisionConstants.getCollectionName(shadowFormat);
final String shadowCollection = parser.get("shadowCollection");
log.info("shadowCollection: {}", shadowCollection);
try (SolrAdminApplication app = new SolrAdminApplication(zkHost)) {

View File

@ -18,16 +18,21 @@
"paramRequired": false
},
{
"paramName": "pf",
"paramLongName": "publicFormat",
"paramDescription": "the name of the public metadata format profile - used to create an alias",
"paramName": "pc",
"paramLongName": "publicCollection",
"paramDescription": "the name of the public collection - used to create an alias",
"paramRequired": false
},
{
"paramName": "sf",
"paramLongName": "shadowFormat",
"paramDescription": "the name of the shadow metadata format profile - used to create an alias",
"paramName": "sc",
"paramLongName": "shadowCollection",
"paramDescription": "the name of the shadow collection - used to create an alias",
"paramRequired": false
},
{
"paramName": "z",
"paramLongName": "zkHost",
"paramDescription": "the Zookeeper host list",
"paramRequired": true
}
]

View File

@ -742,7 +742,7 @@
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
<arg>--zkHost</arg><arg>${zkHost}</arg>
<arg>--action</arg><arg>DELETE_BY_QUERY</arg>
<arg>--shadowFormat</arg><arg>${collection}</arg>
<arg>--shadowCollection</arg><arg>${collection}</arg>
<arg>--query</arg><arg>${solrDeletionQuery}</arg>
<arg>--commit</arg><arg>true</arg>
</java>
@ -778,6 +778,7 @@
<arg>--collection</arg><arg>${collection}</arg>
<arg>--zkHost</arg><arg>${zkHost}</arg>
<arg>--batchSize</arg><arg>${batchSize}</arg>
<arg>--shouldCommit</arg><arg>false</arg>
</spark>
<ok to="commit_solr_collection"/>
<error to="Kill"/>
@ -793,7 +794,7 @@
</configuration>
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
<arg>--zkHost</arg><arg>${zkHost}</arg>
<arg>--shadowFormat</arg><arg>${collection}</arg>
<arg>--shadowCollection</arg><arg>${collection}</arg>
<arg>--action</arg><arg>COMMIT</arg>
</java>
<ok to="End"/>