WIP: simplify the workflow parameters
This commit is contained in:
parent
729671789d
commit
ef09660cab
|
@ -52,17 +52,10 @@ public class SolrAdminApplication implements Closeable {
|
||||||
final String zkHost = parser.get("zkHost");
|
final String zkHost = parser.get("zkHost");
|
||||||
log.info("zkHost: {}", zkHost);
|
log.info("zkHost: {}", zkHost);
|
||||||
|
|
||||||
final String publicFormat = parser.get("publicFormat");
|
final String publicCollection = parser.get("publicCollection");
|
||||||
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);
|
|
||||||
log.info("publicCollection: {}", publicCollection);
|
log.info("publicCollection: {}", publicCollection);
|
||||||
|
|
||||||
final String shadowCollection = ProvisionConstants.getCollectionName(shadowFormat);
|
final String shadowCollection = parser.get("shadowCollection");
|
||||||
log.info("shadowCollection: {}", shadowCollection);
|
log.info("shadowCollection: {}", shadowCollection);
|
||||||
|
|
||||||
try (SolrAdminApplication app = new SolrAdminApplication(zkHost)) {
|
try (SolrAdminApplication app = new SolrAdminApplication(zkHost)) {
|
||||||
|
|
|
@ -18,16 +18,21 @@
|
||||||
"paramRequired": false
|
"paramRequired": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"paramName": "pf",
|
"paramName": "pc",
|
||||||
"paramLongName": "publicFormat",
|
"paramLongName": "publicCollection",
|
||||||
"paramDescription": "the name of the public metadata format profile - used to create an alias",
|
"paramDescription": "the name of the public collection - used to create an alias",
|
||||||
"paramRequired": false
|
"paramRequired": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"paramName": "sf",
|
"paramName": "sc",
|
||||||
"paramLongName": "shadowFormat",
|
"paramLongName": "shadowCollection",
|
||||||
"paramDescription": "the name of the shadow metadata format profile - used to create an alias",
|
"paramDescription": "the name of the shadow collection - used to create an alias",
|
||||||
"paramRequired": false
|
"paramRequired": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"paramName": "z",
|
||||||
|
"paramLongName": "zkHost",
|
||||||
|
"paramDescription": "the Zookeeper host list",
|
||||||
|
"paramRequired": true
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
|
@ -742,7 +742,7 @@
|
||||||
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
||||||
<arg>--zkHost</arg><arg>${zkHost}</arg>
|
<arg>--zkHost</arg><arg>${zkHost}</arg>
|
||||||
<arg>--action</arg><arg>DELETE_BY_QUERY</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>--query</arg><arg>${solrDeletionQuery}</arg>
|
||||||
<arg>--commit</arg><arg>true</arg>
|
<arg>--commit</arg><arg>true</arg>
|
||||||
</java>
|
</java>
|
||||||
|
@ -778,6 +778,7 @@
|
||||||
<arg>--collection</arg><arg>${collection}</arg>
|
<arg>--collection</arg><arg>${collection}</arg>
|
||||||
<arg>--zkHost</arg><arg>${zkHost}</arg>
|
<arg>--zkHost</arg><arg>${zkHost}</arg>
|
||||||
<arg>--batchSize</arg><arg>${batchSize}</arg>
|
<arg>--batchSize</arg><arg>${batchSize}</arg>
|
||||||
|
<arg>--shouldCommit</arg><arg>false</arg>
|
||||||
</spark>
|
</spark>
|
||||||
<ok to="commit_solr_collection"/>
|
<ok to="commit_solr_collection"/>
|
||||||
<error to="Kill"/>
|
<error to="Kill"/>
|
||||||
|
@ -793,7 +794,7 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
||||||
<arg>--zkHost</arg><arg>${zkHost}</arg>
|
<arg>--zkHost</arg><arg>${zkHost}</arg>
|
||||||
<arg>--shadowFormat</arg><arg>${collection}</arg>
|
<arg>--shadowCollection</arg><arg>${collection}</arg>
|
||||||
<arg>--action</arg><arg>COMMIT</arg>
|
<arg>--action</arg><arg>COMMIT</arg>
|
||||||
</java>
|
</java>
|
||||||
<ok to="End"/>
|
<ok to="End"/>
|
||||||
|
|
Loading…
Reference in New Issue