You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ju...@apache.org on 2013/05/29 09:39:08 UTC
svn commit: r1487369 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
Author: jukka
Date: Wed May 29 07:39:07 2013
New Revision: 1487369
URL: http://svn.apache.org/r1487369
Log:
OAK-848: Segmentmk should log a warning when using the file backend on 32-bit systems
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java?rev=1487369&r1=1487368&r2=1487369&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java Wed May 29 07:39:07 2013
@@ -41,11 +41,16 @@ import org.apache.jackrabbit.oak.plugins
import org.apache.jackrabbit.oak.plugins.segment.SegmentStore;
import org.apache.jackrabbit.oak.plugins.segment.Template;
import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.google.common.collect.Maps;
public class FileStore implements SegmentStore {
+ /** Logger instance */
+ private static final Logger log = LoggerFactory.getLogger(FileStore.class);
+
private static final long SEGMENT_MAGIC = 0x4f616b0a527845ddL;
private static final long JOURNAL_MAGIC = 0xdf36544212c0cb24L;
@@ -68,6 +73,12 @@ public class FileStore implements Segmen
Maps.newConcurrentMap();
public FileStore(File directory, NodeState root) throws IOException {
+ // http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#64bit_detection
+ if ("32".equals(System.getProperty("sun.arch.data.model"))) {
+ log.warn("TarMK will only work with small repositories"
+ + " in a 32 bit JVM. Consider switching to a 64 bit JVM.");
+ }
+
checkNotNull(directory).mkdirs();
this.directory = directory;
this.index = 0;