... | ... | @@ -206,34 +206,102 @@ Error messages: |
|
|
|
|
|
### Replication with asynchronous PID registration
|
|
|
|
|
|
In this case the replication is perfomed with **registered data boolean flag = False**. And the PID registration is triggered in a second step.
|
|
|
In this case the replication is performed with **registered data boolean flag = False**. And the PID registration is triggered in a second step.
|
|
|
|
|
|
**Replication rule**
|
|
|
|
|
|
Replication {
|
|
|
*source = /My/source/irods/path;
|
|
|
*destination = /My/destination/irods/path;
|
|
|
*registered = bool("false");
|
|
|
*recursive = bool("false");
|
|
|
*status_repl = EUDATReplication(*source, *destination, *registered, *recursive, *response);
|
|
|
if (*status_repl) {
|
|
|
writeLine("stdout", "Successful replication!");
|
|
|
}
|
|
|
else {
|
|
|
writeLine("stdout", "Failed replication: *response");
|
|
|
}
|
|
|
}
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
![replication async](https://raw.githubusercontent.com/wiki/EUDAT-B2SAFE/B2SAFE-core/b2safe_flows_registration.png)
|
|
|
|
|
|
**Registration rule**
|
|
|
|
|
|
PID_Registration {
|
|
|
*source = /My/source/irods/path;
|
|
|
*destination = /My/destination/irods/path;
|
|
|
*status_reg = EUDATPIDRegistration(*source, *destination, *registration_response);
|
|
|
if (*status_reg) {
|
|
|
writeLine("stdout", "Successful PID registration!");
|
|
|
}
|
|
|
else {
|
|
|
writeLine("stdout", "Failed PID registration = *registration_response");
|
|
|
}
|
|
|
}
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
***
|
|
|
|
|
|
### Integrity check between a DO and its replica
|
|
|
|
|
|
This procedure allows to verify the coherence between a digital object and its replica.
|
|
|
|
|
|
<ac:image ac:width="700"><ri:attachment ri:filename="b2safe_flows_integrity-check.png"></ri:attachment></ac:image>
|
|
|
![integrity check](https://raw.githubusercontent.com/wiki/EUDAT-B2SAFE/B2SAFE-core/b2safe_flows_integrity-check.png)
|
|
|
|
|
|
The boolean input parameter **log enabled** allows to enable the logging of failed checks. In this way it is possible to manage the inconsistencies both in a synchronous way (**log enabled**=False) and in a asynchronous way (**log enabled**=True). For the second option see the pattern "Recover failed transfers from the logging system's queue", while the first option implies to couple the integrity check procedure with another one like "Replication".
|
|
|
|
|
|
Error messages
|
|
|
Error messages:
|
|
|
|
|
|
* missing replicated object
|
|
|
* different size (between source and destination)
|
|
|
* different checksum (between source and destination)
|
|
|
|
|
|
**Integrity check rule**
|
|
|
|
|
|
IntCheck_DO {
|
|
|
*source = /My/source/irods/path;
|
|
|
*destination = /My/destination/irods/path;
|
|
|
*logEnabled = bool("true");
|
|
|
*status_check = EUDATCheckIntegrityDO(*source,*destination,*logEnabled,*response);
|
|
|
if (*status_check) {
|
|
|
writeLine("stdout", "Successful check!");
|
|
|
}
|
|
|
else {
|
|
|
writeLine("stdout", "Failed check: *response");
|
|
|
}
|
|
|
}
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
***
|
|
|
|
|
|
### Recover failed transfers from the logging system's queue
|
|
|
|
|
|
<ac:image ac:width="700"><ri:attachment ri:filename="b2safe_flows_failrecover_v2.png"></ri:attachment></ac:image>
|
|
|
![integrity check](https://raw.githubusercontent.com/wiki/EUDAT-B2SAFE/B2SAFE-core/b2safe_flows_failrecover_v2.png)
|
|
|
|
|
|
The input parameter **buffer length** defines the number of failed operations that are processed by the rule. They are the last operations logged in the queue. If the parameter is > of the queue length, the process stops after the last operation logged in the queue.
|
|
|
|
|
|
**Recover rule**
|
|
|
|
|
|
Recover_failures {
|
|
|
*buffer_length = 10;
|
|
|
EUDATTransferUsingFailLog(*buffer_length, *stats);
|
|
|
writeLine("stdout", "Result: *stats");
|
|
|
}
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
***
|
|
|
|
|
|
### Update URL field in the PID record
|
|
|
|
|
|
<ac:image ac:width="700"><ri:attachment ri:filename="b2safe_flows_url-update.png"></ri:attachment></ac:image> |
|
|
![integrity check](https://raw.githubusercontent.com/wiki/EUDAT-B2SAFE/B2SAFE-core/b2safe_flows_url-update.png)
|
|
|
|
|
|
**Update rule**
|
|
|
|
|
|
Update_rule {
|
|
|
*pid = "843/7d4c7ad2-24ab-11e5-bf18-0050569ed64e";
|
|
|
*newURL = "irods://hostname/ZoneB/new_path/to/data-object-replica.dat"
|
|
|
EUDATeURLupdate(*pid, *newURL);
|
|
|
}
|
|
|
OUTPUT ruleExecOut |
|
|
\ No newline at end of file |