Revision 6397
Added by ben leinfelder over 12 years ago
MNodeService.java | ||
---|---|---|
54 | 54 |
import org.dataone.service.mn.tier3.v1.MNStorage; |
55 | 55 |
import org.dataone.service.mn.tier4.v1.MNReplication; |
56 | 56 |
import org.dataone.service.types.v1.Checksum; |
57 |
import org.dataone.service.types.v1.ChecksumAlgorithm; |
|
58 | 57 |
import org.dataone.service.types.v1.DescribeResponse; |
59 | 58 |
import org.dataone.service.types.v1.Event; |
60 | 59 |
import org.dataone.service.types.v1.Group; |
... | ... | |
64 | 63 |
import org.dataone.service.types.v1.MonitorInfo; |
65 | 64 |
import org.dataone.service.types.v1.MonitorList; |
66 | 65 |
import org.dataone.service.types.v1.Node; |
67 |
import org.dataone.service.types.v1.NodeHealth; |
|
68 | 66 |
import org.dataone.service.types.v1.NodeReference; |
69 | 67 |
import org.dataone.service.types.v1.NodeState; |
70 | 68 |
import org.dataone.service.types.v1.NodeType; |
... | ... | |
76 | 74 |
import org.dataone.service.types.v1.Service; |
77 | 75 |
import org.dataone.service.types.v1.Services; |
78 | 76 |
import org.dataone.service.types.v1.Session; |
79 |
import org.dataone.service.types.v1.Status; |
|
80 | 77 |
import org.dataone.service.types.v1.Subject; |
81 | 78 |
import org.dataone.service.types.v1.Synchronization; |
82 | 79 |
import org.dataone.service.types.v1.SystemMetadata; |
... | ... | |
555 | 552 |
|
556 | 553 |
try { |
557 | 554 |
checksum = |
558 |
ChecksumUtil.checksum(inputStream, ChecksumAlgorithm.convert(algorithm));
|
|
555 |
ChecksumUtil.checksum(inputStream, algorithm);
|
|
559 | 556 |
|
560 | 557 |
} catch (NoSuchAlgorithmException e) { |
561 | 558 |
throw new ServiceFailure("1410", "The checksum for the object specified by " + |
... | ... | |
733 | 730 |
node.setDescription(nodeDesc); |
734 | 731 |
|
735 | 732 |
// set the node's health information |
736 |
NodeHealth health = new NodeHealth(); |
|
737 | 733 |
NodeState state = NodeState.UP; |
738 |
health.setState(state);
|
|
734 |
node.setState(state);
|
|
739 | 735 |
// set the ping response to the current value |
740 | 736 |
Ping canPing = new Ping(); |
741 | 737 |
canPing.setSuccess(false); |
... | ... | |
748 | 744 |
e.printStackTrace(); |
749 | 745 |
|
750 | 746 |
} |
751 |
health.setPing(canPing); |
|
752 |
// TODO: getStatus() should be consulted here when it's implemented |
|
753 |
Status nodeStatus = new Status(); |
|
754 |
nodeStatus.setSuccess(true); |
|
755 |
nodeStatus.setDateChecked(new Date()); |
|
756 |
health.setStatus(nodeStatus); |
|
757 |
node.setHealth(health); |
|
747 |
node.setPing(canPing); |
|
758 | 748 |
|
759 | 749 |
NodeReference identifier = new NodeReference(); |
760 | 750 |
identifier.setValue(nodeId); |
Also available in: Unified diff
changes for schema update (d1_common)