accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1457066 - in /accumulo/branches/1.5: core/src/main/java/org/apache/accumulo/core/conf/ start/src/main/java/org/apache/accumulo/start/classloader/vfs/ start/src/test/java/org/apache/accumulo/test/
Date Fri, 15 Mar 2013 18:56:19 GMT
Author: kturner
Date: Fri Mar 15 18:56:18 2013
New Revision: 1457066

URL: http://svn.apache.org/r1457066
Log:
ACCUMULO-1074 made vfs cache dir in tmp differ per user

Modified:
    accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/conf/Property.java
    accumulo/branches/1.5/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
    accumulo/branches/1.5/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java

Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/conf/Property.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/conf/Property.java?rev=1457066&r1=1457065&r2=1457066&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/conf/Property.java (original)
+++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/conf/Property.java Fri
Mar 15 18:56:18 2013
@@ -343,7 +343,7 @@ public enum Property {
           + "If delegation is not specified, it defaults to loading from parent classloader
first."),
  VFS_CLASSLOADER_CACHE_DIR(
 	    AccumuloVFSClassLoader.VFS_CACHE_DIR,
-	    new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache")
+      new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache-" + System.getProperty("user.name",
"nouser"))
 		    .getAbsolutePath(),
 	    PropertyType.ABSOLUTEPATH,
 	    "Directory to use for the vfs cache. The cache will keep a soft reference to all of
the classes loaded in the VM. This should be on local disk on each node with sufficient space.
It defaults to /tmp",

Modified: accumulo/branches/1.5/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java?rev=1457066&r1=1457065&r2=1457066&view=diff
==============================================================================
--- accumulo/branches/1.5/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
(original)
+++ accumulo/branches/1.5/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
Fri Mar 15 18:56:18 2013
@@ -231,9 +231,9 @@ public class AccumuloVFSClassLoader {
             vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory());
             vfs.setFilesCache(new SoftRefFilesCache());
             String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, "");
-            File cacheDir = new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache");
+            File cacheDir = new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache-"
+ System.getProperty("user.name", "nouser"));
             if (!("".equals(cacheDirPath)))
-        	cacheDir = new File(cacheDirPath);
+              cacheDir = new File(cacheDirPath);
             vfs.setReplicator(new DefaultFileReplicator(cacheDir));
             vfs.setCacheStrategy(CacheStrategy.ON_RESOLVE);
             vfs.init();

Modified: accumulo/branches/1.5/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java?rev=1457066&r1=1457065&r2=1457066&view=diff
==============================================================================
--- accumulo/branches/1.5/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java
(original)
+++ accumulo/branches/1.5/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java
Fri Mar 15 18:56:18 2013
@@ -17,6 +17,7 @@
 package org.apache.accumulo.test;
 
 import java.io.BufferedReader;
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.URI;
@@ -135,7 +136,8 @@ public class AccumuloDFSBase {
       vfs.addMimeTypeMap("application/zip", "zip");
       vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory());
       vfs.setFilesCache(new SoftRefFilesCache());
-      vfs.setReplicator(new DefaultFileReplicator());
+      vfs.setReplicator(new DefaultFileReplicator(new File(System.getProperty("java.io.tmpdir"),
"accumulo-vfs-cache-"
+          + System.getProperty("user.name", "nouser"))));
       vfs.setCacheStrategy(CacheStrategy.ON_RESOLVE);
       vfs.init();
     } catch (FileSystemException e) {



Mime
View raw message