From: <tho...@us...> - 2013-04-11 17:18:16
|
Revision: 7043 http://bigdata.svn.sourceforge.net/bigdata/?rev=7043&view=rev Author: thompsonbry Date: 2013-04-11 17:18:07 +0000 (Thu, 11 Apr 2013) Log Message: ----------- TimeUnit.DAYS.toMillis() does not work inside of a Configuration file. Updated configuration file and added ConfigMath.d2ms(). Added "MUST" to synchronized clocks in the readme. Modified Paths: -------------- branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/jini/util/ConfigMath.java branches/READ_CACHE/src/resources/HAJournal/HAJournal.config branches/READ_CACHE/src/resources/HAJournal/README Modified: branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/jini/util/ConfigMath.java =================================================================== --- branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/jini/util/ConfigMath.java 2013-04-10 17:37:44 UTC (rev 7042) +++ branches/READ_CACHE/bigdata-jini/src/java/com/bigdata/jini/util/ConfigMath.java 2013-04-11 17:18:07 UTC (rev 7043) @@ -148,6 +148,20 @@ } /** + * Convert days to milliseconds. + * + * @param d + * days + * + * @return Milliseconds. + */ + public static long d2ms(final long m) { + + return TimeUnit.DAYS.toMillis(m); + + } + + /** * Return the absolute path for the file. * * @param file Modified: branches/READ_CACHE/src/resources/HAJournal/HAJournal.config =================================================================== --- branches/READ_CACHE/src/resources/HAJournal/HAJournal.config 2013-04-10 17:37:44 UTC (rev 7042) +++ branches/READ_CACHE/src/resources/HAJournal/HAJournal.config 2013-04-11 17:18:07 UTC (rev 7043) @@ -45,8 +45,6 @@ import com.bigdata.rdf.lexicon.LexiconRelation; import com.bigdata.rdf.lexicon.LexiconKeyOrder; import com.bigdata.rawstore.Bytes; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeUnit.*; /* * This is a sample configuration file for a highly available Journal. A @@ -105,7 +103,7 @@ private static snapshotPolicy = new DefaultSnapshotPolicy(200/*hhmm*/,20/*percent*/); // Restore policy - private static restorePolicy = new DefaultRestorePolicy(TimeUnit.DAYS.toMillis(7)); + private static restorePolicy = new DefaultRestorePolicy(ConfigMath.d2ms(7)); // one federation, multicast discovery. //static private groups = LookupDiscovery.ALL_GROUPS; Modified: branches/READ_CACHE/src/resources/HAJournal/README =================================================================== --- branches/READ_CACHE/src/resources/HAJournal/README 2013-04-10 17:37:44 UTC (rev 7042) +++ branches/READ_CACHE/src/resources/HAJournal/README 2013-04-11 17:18:07 UTC (rev 7043) @@ -6,7 +6,7 @@ The basic procedure is: -0. The nodes should have synchronized clocks, both for logging and to ensure +0. The nodes MUST have synchronized clocks, both for logging and to ensure that the transaction services have closely correlated clocks for assigning timestamps. Make sure that ntp or a similar service is running to synchronize the clocks. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |