directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1028857 - in /directory/apacheds/branches/apacheds-config: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jd...
Date Fri, 29 Oct 2010 17:17:11 GMT
Author: elecharny
Date: Fri Oct 29 17:17:10 2010
New Revision: 1028857

URL: http://svn.apache.org/viewvc?rev=1028857&view=rev
Log:
Fixed the path issues for indexes

Modified:
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/branches/apacheds-config/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Fri Oct 29 17:17:10 2010
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
 
 
 /** 
- * A Jdbm based index implementation.
+ * A Jdbm based index implementation. It creates an Index for a give AttributeType.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -140,13 +140,18 @@ public class JdbmIndex<K, O> implements 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ----------------------------------------------------------------------
-
+    /**
+     * Creates a JdbmIndex instance.
+     */
     public JdbmIndex()
     {
         initialized = false;
     }
 
 
+    /**
+     * Creates a JdbmIndex instance for a give AttributeId
+     */
     public JdbmIndex( String attributeId )
     {
         initialized = false;
@@ -154,9 +159,19 @@ public class JdbmIndex<K, O> implements 
     }
 
 
-    public void init( SchemaManager schemaManager, AttributeType attributeType, File wkDirPath
) throws IOException
+    /**
+     * Initialize the index for an Attribute, with a specific working directory (may be null).
+     * 
+     * @param schemaManager The schemaManager to use to get back the Attribute
+     * @param attributeType The attributeType this index is created for
+     * @param wkDirPath The bas directory where the index files will be created
+     * @throws IOException If the initialization failed
+     */
+    public void init( SchemaManager schemaManager, AttributeType attributeType ) throws IOException
     {
         LOG.debug( "Initializing an Index for attribute '{}'", attributeType.getName() );
+        
+        //.out.println( "IDX Initializing index for AT " + attributeType.getOid() + ", wkDirPath
: " + wkDirPath + ", base dir : " + this.wkDirPath );
 
         keyCache = new SynchronizedLRUMap( cacheSize );
         attribute = attributeType;
@@ -168,10 +183,15 @@ public class JdbmIndex<K, O> implements 
 
         if ( this.wkDirPath == null )
         {
-            this.wkDirPath = wkDirPath;
+            NullPointerException e = new NullPointerException( "The index working directory
has not be set" );
+            
+            e.printStackTrace();
+            throw e;
         }
 
-        String path = this.wkDirPath.getAbsolutePath();
+        String path = new File( this.wkDirPath, attributeType.getOid() ).getAbsolutePath();
+        //.out.println( "IDX Created index " + path );
+
         BaseRecordManager base = new BaseRecordManager( path );
         base.disableTransactions();
         this.recMan = new CacheRecordManager( base, new MRU( cacheSize ) );
@@ -188,7 +208,7 @@ public class JdbmIndex<K, O> implements 
         }
 
         // finally write a text file in the format <OID>-<attribute-name>.txt
-        FileWriter fw = new FileWriter( new File( this.wkDirPath + "-" + attribute.getName()
+ ".txt" ) );
+        FileWriter fw = new FileWriter( new File( path + "-" + attribute.getName() + ".txt"
) );
         // write the AttributeType description
         fw.write( attribute.toString() );
         fw.close();
@@ -362,6 +382,7 @@ public class JdbmIndex<K, O> implements 
      */
     public void setWkDirPath( File wkDirPath )
     {
+        //.out.println( "IDX Defining a WorkingDir : " + wkDirPath );
         protect( "wkDirPath" );
         this.wkDirPath = wkDirPath;
     }

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndex.java
Fri Oct 29 17:17:10 2010
@@ -68,9 +68,12 @@ public class JdbmRdnIndex<E> extends Jdb
     }
 
 
-    public void init( SchemaManager schemaManager, AttributeType attributeType, File wkDirPath
) throws IOException
+    public void init( SchemaManager schemaManager, AttributeType attributeType ) throws IOException
     {
         LOG.debug( "Initializing an Index for attribute '{}'", attributeType.getName() );
+        
+        //System.out.println( "IDX Initializing RDNindex for AT " + attributeType.getOid()
+ ", wkDirPath : " + wkDirPath + ", base dir : " + this.wkDirPath );
+
         keyCache = new SynchronizedLRUMap( cacheSize );
         attribute = attributeType;
 
@@ -78,20 +81,18 @@ public class JdbmRdnIndex<E> extends Jdb
         {
             setAttributeId( attribute.getName() );
         }
-
-        File file = null;
         
         if ( this.wkDirPath == null )
         {
-            this.wkDirPath = wkDirPath;
-            file = new File( this.wkDirPath.getPath() + File.separator + attribute.getOid()
);
-        }
-        else
-        {
-            file = this.wkDirPath;
+            NullPointerException e = new NullPointerException( "The index working directory
has not be set" );
+            
+            e.printStackTrace();
+            throw e;
         }
         
-        String path = file.getAbsolutePath();
+        String path = new File( this.wkDirPath, attributeType.getOid() ).getAbsolutePath();
+        
+        //System.out.println( "IDX Created index " + path );
         BaseRecordManager base = new BaseRecordManager( path );
         base.disableTransactions();
         this.recMan = new CacheRecordManager( base, new MRU( cacheSize ) );

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Fri Oct 29 17:17:10 2010
@@ -302,6 +302,7 @@ public class JdbmStore<E> extends Abstra
         else if ( index instanceof JdbmIndex<?, ?> )
         {
             jdbmIndex = ( JdbmIndex<?, E> ) index;
+            jdbmIndex.setWkDirPath( partitionDir );
         }
         else
         {
@@ -313,8 +314,7 @@ public class JdbmStore<E> extends Abstra
             jdbmIndex.setWkDirPath( index.getWkDirPath() );
         }
 
-        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( index.getAttributeId()
),
-            partitionDir );
+        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( index.getAttributeId()
) );
 
         return jdbmIndex;
     }

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
Fri Oct 29 17:17:10 2010
@@ -124,6 +124,7 @@ public class JdbmIndexTest
 
             // created by TransactionManager, if transactions are not disabled
             File logFile = new File( idx.getWkDirPath(), idx.getAttribute().getOid() + ".lg"
);
+            
             if ( logFile.exists() )
             {
                 assertTrue( logFile.delete() );
@@ -136,7 +137,9 @@ public class JdbmIndexTest
 
     void initIndex() throws Exception
     {
-        initIndex( new JdbmIndex<String, Entry>() );
+        JdbmIndex<String, Entry> index = new JdbmIndex<String, Entry>();
+        index.setWkDirPath( dbFileDir );
+        initIndex( index );
     }
 
 
@@ -146,8 +149,10 @@ public class JdbmIndexTest
         {
             jdbmIdx = new JdbmIndex<String, Entry>();
         }
+        
+        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OU_AT
);
 
-        jdbmIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OU_AT
), dbFileDir );
+        jdbmIdx.init( schemaManager, attributeType );
         this.idx = jdbmIdx;
     }
 
@@ -181,7 +186,9 @@ public class JdbmIndexTest
         assertEquals( "ou", idx.getAttributeId() );
 
         destroyIndex();
-        initIndex( new JdbmIndex<String, Entry>( "foo" ) );
+        JdbmIndex<String, Entry> index = new JdbmIndex<String, Entry>( "foo"
);
+        index.setWkDirPath( dbFileDir );
+        initIndex( index );
         assertEquals( "foo", idx.getAttributeId() );
     }
 
@@ -211,26 +218,29 @@ public class JdbmIndexTest
     @Test
     public void testWkDirPath() throws Exception
     {
+        File wkdir = new File( dbFileDir, "foo" );
+
         // uninitialized index
         JdbmIndex<String, Entry> jdbmIndex = new JdbmIndex<String, Entry>();
-        jdbmIndex.setWkDirPath( new File( dbFileDir, "foo" ) );
+        jdbmIndex.setWkDirPath( wkdir );
         assertEquals( "foo", jdbmIndex.getWkDirPath().getName() );
 
         // initialized index
         initIndex();
+        
         try
         {
-            idx.setWkDirPath( new File( dbFileDir, "foo" ) );
+            idx.setWkDirPath( wkdir );
             fail( "Should not be able to set wkDirPath after initialization." );
         }
         catch ( Exception e )
         {
         }
+        
         assertEquals( dbFileDir, idx.getWkDirPath() );
 
         destroyIndex();
         jdbmIndex = new JdbmIndex<String, Entry>();
-        File wkdir = new File( dbFileDir, "foo" );
         wkdir.mkdirs();
         jdbmIndex.setWkDirPath( wkdir );
         initIndex( jdbmIndex );
@@ -565,8 +575,8 @@ public class JdbmIndexTest
         try
         {
             AttributeType noEqMatchAttribute = new AttributeType( "1.1" );
-
-            jdbmIndex.init( schemaManager, noEqMatchAttribute, dbFileDir );
+            jdbmIndex.setWkDirPath( dbFileDir );
+            jdbmIndex.init( schemaManager, noEqMatchAttribute );
             fail( "should not get here" );
         }
         catch ( IOException e )
@@ -583,8 +593,8 @@ public class JdbmIndexTest
     public void testSingleValuedAttribute() throws Exception
     {
         JdbmIndex<Object, Object> jdbmIndex = new JdbmIndex<Object, Object>();
-        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CREATORS_NAME_AT
),
-            dbFileDir );
+        jdbmIndex.setWkDirPath( dbFileDir );
+        jdbmIndex.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( SchemaConstants.CREATORS_NAME_AT
) );
         jdbmIndex.close();
     }
 }

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
Fri Oct 29 17:17:10 2010
@@ -124,6 +124,7 @@ public class JdbmRdnIndexTest
 
             // created by TransactionManager, if transactions are not disabled
             File logFile = new File( idx.getWkDirPath(), idx.getAttribute().getOid() + ".lg"
);
+            
             if ( logFile.exists() )
             {
                 assertTrue( logFile.delete() );
@@ -136,7 +137,9 @@ public class JdbmRdnIndexTest
 
     void initIndex() throws Exception
     {
-        initIndex( new JdbmRdnIndex<Long>() );
+        JdbmRdnIndex<Long> index = new JdbmRdnIndex<Long>();
+        index.setWkDirPath( dbFileDir );
+        initIndex( index );
     }
 
 
@@ -147,7 +150,7 @@ public class JdbmRdnIndexTest
             jdbmIdx = new JdbmRdnIndex<Long>();
         }
 
-        jdbmIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.APACHE_RDN_AT_OID
), dbFileDir );
+        jdbmIdx.init( schemaManager, schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.APACHE_RDN_AT_OID
) );
         this.idx = jdbmIdx;
     }
 
@@ -185,26 +188,30 @@ public class JdbmRdnIndexTest
     @Test
     public void testWkDirPath() throws Exception
     {
+        File wkdir = new File( dbFileDir, "foo" );
+
         // uninitialized index
         JdbmRdnIndex<Long> jdbmRdnIndex = new JdbmRdnIndex<Long>();
-        jdbmRdnIndex.setWkDirPath( new File( dbFileDir, "foo" ) );
+        jdbmRdnIndex.setWkDirPath( wkdir );
         assertEquals( "foo", jdbmRdnIndex.getWkDirPath().getName() );
 
         // initialized index
         initIndex();
+        
         try
         {
-            idx.setWkDirPath( new File( dbFileDir, "foo" ) );
+            idx.setWkDirPath( wkdir );
             fail( "Should not be able to set wkDirPath after initialization." );
         }
         catch ( Exception e )
         {
         }
+        
         assertEquals( dbFileDir, idx.getWkDirPath() );
 
         destroyIndex();
+        
         jdbmRdnIndex = new JdbmRdnIndex<Long>();
-        File wkdir = new File( dbFileDir, "foo" );
         wkdir.mkdirs();
         jdbmRdnIndex.setWkDirPath( wkdir );
         initIndex( jdbmRdnIndex );

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Fri Oct 29 17:17:10 2010
@@ -152,8 +152,14 @@ public class JdbmStoreTest
         store.setCacheSize( 10 );
         store.setPartitionDir( wkdir );
         store.setSyncOnWrite( false );
-        store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID ) );
+
+        JdbmIndex ouIndex = new JdbmIndex( SchemaConstants.OU_AT_OID );
+        ouIndex.setWkDirPath( wkdir );
+        store.addIndex( ouIndex );
+        
+        JdbmIndex uidIndex = new JdbmIndex( SchemaConstants.UID_AT_OID );
+        uidIndex.setWkDirPath( wkdir );
+        store.addIndex( uidIndex );
 
         StoreUtils.loadExampleData( store, schemaManager );
         LOG.debug( "Created new store" );
@@ -231,7 +237,8 @@ public class JdbmStoreTest
         store.setSyncOnWrite( true ); // for code coverage
 
         assertNull( store.getAliasIndex() );
-        store.addIndex( new JdbmIndex<String, Attributes>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID
) );
+        Index<String, Attributes, Long> index = new JdbmIndex<String, Attributes>(
ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
+        store.addIndex( index );
         assertNotNull( store.getAliasIndex() );
 
         assertEquals( JdbmStore.DEFAULT_CACHE_SIZE, store.getCacheSize() );

Modified: directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
(original)
+++ directory/apacheds/branches/apacheds-config/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Fri Oct 29 17:17:10 2010
@@ -29,6 +29,7 @@ import java.io.File;
 
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.InstanceLayout;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
@@ -52,6 +53,7 @@ public class PartitionSchemaLoaderTest
 {
     private static SchemaManager schemaManager;
     private static DirectoryService directoryService;
+    private static InstanceLayout instanceLayout;
 
 
     @BeforeClass public static void setUp() throws Exception
@@ -59,6 +61,8 @@ public class PartitionSchemaLoaderTest
         // setup working directory
         directoryService = new DefaultDirectoryService();
         File workingDirectory = new File( System.getProperty( "workingDirectory", System.getProperty(
"user.dir" ) ) );
+        instanceLayout = new InstanceLayout( workingDirectory );
+        directoryService.setInstanceLayout( instanceLayout );
 
         if ( ! workingDirectory.exists() )
         {

Modified: directory/apacheds/branches/apacheds-config/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1028857&r1=1028856&r2=1028857&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
(original)
+++ directory/apacheds/branches/apacheds-config/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Fri Oct 29 17:17:10 2010
@@ -304,70 +304,70 @@ public abstract class AbstractStore<E, I
         if ( getPresenceIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<String, E, ID>( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID
) ;
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getOneLevelIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getSubLevelIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getRdnIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<ParentIdAndRdn<ID>, E,
ID>( ApacheSchemaConstants.APACHE_RDN_AT_OID );
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_RDN_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getAliasIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<String, E, ID>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_ALIAS_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getOneAliasIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getSubAliasIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getObjectClassIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<String, E, ID>( SchemaConstants.OBJECT_CLASS_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, SchemaConstants.OBJECT_CLASS_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getEntryUuidIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<String, E, ID>( SchemaConstants.ENTRY_UUID_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, SchemaConstants.ENTRY_UUID_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 
         if ( getEntryCsnIndex() == null )
         {
             Index<?, E, ID> index = new GenericIndex<String, E, ID>( SchemaConstants.ENTRY_CSN_AT_OID
);
-            index.setWkDirPath( new File( partitionDir, SchemaConstants.ENTRY_CSN_AT_OID
) );
+            index.setWkDirPath( partitionDir );
             addIndex( index );
         }
 



Mime
View raw message