Revision 42305
Added by Alessia Bardi over 8 years ago
modules/dnet-msro-service/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/mdstore/StoreMDStoreRecordsJobNode.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.Map; |
4 | 4 |
|
5 |
import org.apache.commons.logging.Log; |
|
6 |
import org.apache.commons.logging.LogFactory; |
|
7 |
import org.springframework.beans.factory.annotation.Required; |
|
8 |
|
|
9 | 5 |
import com.googlecode.sarasvati.Engine; |
10 | 6 |
import com.googlecode.sarasvati.NodeToken; |
11 | 7 |
import com.googlecode.sarasvati.env.Env; |
12 |
|
|
13 | 8 |
import eu.dnetlib.data.mdstore.MDStoreService; |
14 | 9 |
import eu.dnetlib.enabling.resultset.rmi.ResultSetException; |
15 | 10 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob; |
... | ... | |
20 | 15 |
import eu.dnetlib.msro.workflows.util.ProgressProvider; |
21 | 16 |
import eu.dnetlib.msro.workflows.util.ResultsetProgressProvider; |
22 | 17 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
18 |
import org.apache.commons.logging.Log; |
|
19 |
import org.apache.commons.logging.LogFactory; |
|
20 |
import org.springframework.beans.factory.annotation.Required; |
|
23 | 21 |
|
24 | 22 |
public class StoreMDStoreRecordsJobNode extends BlackboardJobNode implements ProgressJobNode { |
25 | 23 |
|
... | ... | |
55 | 53 |
|
56 | 54 |
@Override |
57 | 55 |
protected void populateEnv(final Env env, final Map<String, String> responseParams) { |
58 |
log.info("Number of stored records: " + responseParams.get("total")); |
|
56 |
log.info("Total records: " + responseParams.get("total")); |
|
57 |
log.info("Number of stored records: " + responseParams.get("stored")); |
|
59 | 58 |
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX + "total", responseParams.get("total")); |
59 |
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX + "stored", responseParams.get("stored")); |
|
60 | 60 |
} |
61 | 61 |
}; |
62 | 62 |
} |
Also available in: Unified diff
Let's store in the env the number of stored records together with the total number of records in a mdstore