Revision 9116
Added by Jing Tao almost 10 years ago
src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
import java.io.FileNotFoundException; |
30 | 30 |
import java.sql.SQLException; |
31 |
import java.text.DateFormat; |
|
32 |
import java.text.SimpleDateFormat; |
|
33 |
import java.util.Calendar; |
|
31 | 34 |
import java.util.HashSet; |
32 | 35 |
import java.util.Iterator; |
33 | 36 |
import java.util.List; |
... | ... | |
562 | 565 |
public void run() { |
563 | 566 |
try { |
564 | 567 |
// this is a push mechanism |
565 |
System.out.println("Start the hazelcast synchronization"); |
|
568 |
DateFormat dateFormat = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss aaa"); |
|
569 |
System.out.println(dateFormat.format(Calendar.getInstance().getTime())+" Start the hazelcast synchronization"); |
|
566 | 570 |
logMetacat.warn("Start the hazelcast synchronization"); |
567 | 571 |
resynchToRemote(); |
568 |
System.out.println("End the hazelcast synchronization");
|
|
572 |
System.out.println(dateFormat.format(Calendar.getInstance().getTime())+" End the hazelcast synchronization");
|
|
569 | 573 |
logMetacat.warn("End the hazelcast synchronization"); |
570 | 574 |
} catch (Exception e) { |
571 | 575 |
logMetacat.error("Error in resynchInThread: " + e.getMessage(), e); |
Also available in: Unified diff
Add the timestamp for the printing out the start and end of hazelcast synchronization.