accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [3/5] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT
Date Sat, 11 Jan 2014 00:15:33 GMT
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:
	start/src/main/java/org/apache/accumulo/start/classloader/vfs/UniqueFileReplicator.java


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9f563741
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9f563741
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9f563741

Branch: refs/heads/master
Commit: 9f56374178a6daa0c804251db68231e65fcb7ed3
Parents: d1b53ed db56d8d
Author: Josh Elser <elserj@apache.org>
Authored: Fri Jan 10 18:43:11 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Jan 10 18:43:11 2014 -0500

----------------------------------------------------------------------
 .../classloader/vfs/AccumuloVFSClassLoader.java |  8 +++---
 .../classloader/vfs/UniqueFileReplicator.java   | 26 ++++++++++----------
 2 files changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9f563741/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9f563741/start/src/main/java/org/apache/accumulo/start/classloader/vfs/UniqueFileReplicator.java
----------------------------------------------------------------------
diff --cc start/src/main/java/org/apache/accumulo/start/classloader/vfs/UniqueFileReplicator.java
index f60e165,cdc5248..29407f9
--- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/UniqueFileReplicator.java
+++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/UniqueFileReplicator.java
@@@ -36,11 -36,10 +36,10 @@@ import org.apache.log4j.Logger
   * 
   */
  public class UniqueFileReplicator implements VfsComponent, FileReplicator {
-   
-   private static final char[] TMP_RESERVED_CHARS = new char[] {'?', '/', '\\', ' ', '&',
'"', '\'', '*', '#', ';', ':', '<', '>', '|'};
  
+   private static final char[] TMP_RESERVED_CHARS = new char[] {'?', '/', '\\', ' ', '&',
'"', '\'', '*', '#', ';', ':', '<', '>', '|'};
    private static final Logger log = Logger.getLogger(UniqueFileReplicator.class);
--  
++
    private File tempDir;
    private VfsComponentContext context;
    private List<File> tmpFiles = Collections.synchronizedList(new ArrayList<File>());
@@@ -52,10 -51,9 +51,10 @@@
    @Override
    public File replicateFile(FileObject srcFile, FileSelector selector) throws FileSystemException
{
      String baseName = srcFile.getName().getBaseName();
-     
+ 
      try {
 -      tempDir.mkdirs();
 +      if (!tempDir.mkdirs())
 +        log.warn("Unexpected error creating directory " + tempDir);
        String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%',
'_');
        File file = File.createTempFile("vfsr_", "_" + safeBasename, tempDir);
        file.deleteOnExit();
@@@ -89,10 -87,10 +88,11 @@@
    public void close() {
      synchronized (tmpFiles) {
        for (File tmpFile : tmpFiles) {
 -        tmpFile.delete();
 +        if (!tmpFile.delete())
 +          log.warn("File does not exist: " + tmpFile);
        }
      }
+ 
      if (tempDir.exists()) {
        int numChildren = tempDir.list().length;
        if (0 == numChildren && !tempDir.delete())


Mime
View raw message