accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1493899 - in /accumulo/branches/1.4/src: ./ core/ core/src/main/java/org/apache/accumulo/core/file/ core/src/test/java/org/apache/accumulo/core/file/ server/ server/src/ server/src/main/java/org/apache/accumulo/server/zookeeper/
Date Mon, 17 Jun 2013 19:36:52 GMT
Author: kturner
Date: Mon Jun 17 19:36:52 2013
New Revision: 1493899

URL: http://svn.apache.org/r1493899
Log:
ACCUMULO-1518 Patch from David M. Lyle that allows opening rfiles w/ multiple dots in name.

Added:
    accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/file/FileOperationsTest.java
      - copied unchanged from r1493894, accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/file/FileOperationsTest.java
Modified:
    accumulo/branches/1.4/src/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
    accumulo/branches/1.4/src/server/   (props changed)
    accumulo/branches/1.4/src/server/src/   (props changed)
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
  (props changed)

Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1493894

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1493894

Modified: accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java?rev=1493899&r1=1493898&r2=1493899&view=diff
==============================================================================
--- accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
(original)
+++ accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/file/FileOperations.java
Mon Jun 17 19:36:52 2013
@@ -44,14 +44,13 @@ class DispatchingFileFactory extends Fil
     if (name.startsWith(Constants.MAPFILE_EXTENSION + "_")) {
       return new MapFileOperations();
     }
-    
     String[] sp = name.split("\\.");
     
-    if (sp.length != 2) {
+    if (sp.length < 2) {
       throw new IllegalArgumentException("File name " + name + " has no extension");
     }
     
-    String extension = sp[1];
+    String extension = sp[sp.length - 1];
     
     if (extension.equals(Constants.MAPFILE_EXTENSION) || extension.equals(Constants.MAPFILE_EXTENSION
+ "_tmp")) {
       return new MapFileOperations();

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1493894

Propchange: accumulo/branches/1.4/src/server/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server/src:r1493894

Propchange: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java:r1493894



Mime
View raw message