accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1494648 - in /accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server: ServerConstants.java fs/VolumeManagerImpl.java util/FileUtil.java
Date Wed, 19 Jun 2013 14:55:20 GMT
Author: ecn
Date: Wed Jun 19 14:55:19 2013
New Revision: 1494648

URL: http://svn.apache.org/r1494648
Log:
ACCUMULO-118 fix fs chooser, enabled multi-volume where the first volume is not the same as
the HDFS config

Modified:
    accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/ServerConstants.java
    accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
    accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/util/FileUtil.java

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/ServerConstants.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/ServerConstants.java?rev=1494648&r1=1494647&r2=1494648&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/ServerConstants.java
(original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/ServerConstants.java
Wed Jun 19 14:55:19 2013
@@ -75,11 +75,11 @@ public class ServerConstants {
   }
   
   public static Path getInstanceIdLocation() {
-    return new Path(ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_DIR)
+ "/instance_id");
+    return new Path(getBaseDirs()[0] + "/instance_id");
   }
   
   public static Path getDataVersionLocation() {
-    return new Path(ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_DIR)
+ "/version");
+    return new Path(getBaseDirs()[0] + "/version");
   }
   
   public static String[] getMetadataTableDirs() {

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java?rev=1494648&r1=1494647&r2=1494648&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
(original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
Wed Jun 19 14:55:19 2013
@@ -66,8 +66,8 @@ public class VolumeManagerImpl implement
     this.conf = conf;
     ensureSyncIsEnabled();
     try {
-      this.getClass().getClassLoader().loadClass(conf.get(Property.GENERAL_VOLUME_CHOOSER));
-    } catch (ClassNotFoundException e) {
+      chooser = (VolumeChooser)this.getClass().getClassLoader().loadClass(conf.get(Property.GENERAL_VOLUME_CHOOSER)).newInstance();
+    } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
@@ -306,14 +306,14 @@ public class VolumeManagerImpl implement
     return getFileSystemByPath(path).isFile(path);
   }
 
-  public static org.apache.accumulo.server.fs.VolumeManager get() throws IOException {
+  public static VolumeManager get() throws IOException {
     AccumuloConfiguration conf = ServerConfiguration.getSystemConfiguration(HdfsZooInstance.getInstance());
     return get(conf);
   }
   
   static private final String DEFAULT = "";
 
-  public static org.apache.accumulo.server.fs.VolumeManager get(AccumuloConfiguration conf)
throws IOException {
+  public static VolumeManager get(AccumuloConfiguration conf) throws IOException {
     Map<String, FileSystem> fileSystems = new HashMap<String, FileSystem>();
     Configuration hadoopConf = CachedConfiguration.getInstance();
     fileSystems.put(DEFAULT, FileSystem.get(hadoopConf));

Modified: accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/util/FileUtil.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/util/FileUtil.java?rev=1494648&r1=1494647&r2=1494648&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/util/FileUtil.java
(original)
+++ accumulo/branches/ACCUMULO-118/server/src/main/java/org/apache/accumulo/server/util/FileUtil.java
Wed Jun 19 14:55:19 2013
@@ -434,7 +434,6 @@ public class FileUtil {
     for (FileRef mapfile : mapfiles) {
       
       FileSKVIterator reader = null;
-      //String path = mapfile.path().toString();
       FileSystem ns = fs.getFileSystemByPath(mapfile.path());
       try {
         reader = FileOperations.getInstance().openReader(mapfile.toString(), false, ns, ns.getConf(),
acuConf);



Mime
View raw message