directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r758883 - in /directory/apacheds/branches/ldif-partition: core-api/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/...
Date Thu, 26 Mar 2009 22:10:07 GMT
Author: akarasulu
Date: Thu Mar 26 22:10:06 2009
New Revision: 758883

URL: http://svn.apache.org/viewvc?rev=758883&view=rev
Log:
more cleanups after rearranging: added objectClass as a system index

Added:
    directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
  (props changed)
      - copied unchanged from r758192, directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/branches/ldif-partition/jdbm-partition/
    directory/apacheds/branches/ldif-partition/jdbm-partition/pom.xml
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/
Removed:
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
Modified:
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java

Propchange: directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Thu Mar 26 22:10:06 2009
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Propchange: directory/apacheds/branches/ldif-partition/core-api/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=758883&r1=758882&r2=758883&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Thu Mar 26 22:10:06 2009
@@ -51,9 +51,6 @@
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -63,6 +60,7 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
@@ -363,44 +361,11 @@
                         + override.getId() + "'." );
             }
             
-            // add all attribute oids of index configs to a hashset
-            if ( override instanceof JdbmPartition )
-            {
-                Set<Index<?,ServerEntry>> indices = ( ( JdbmPartition ) override
).getIndexedAttributes();
-                Set<String> indexOids = new HashSet<String>();
-                OidRegistry registry = registries.getOidRegistry();
-
-                for ( Index<?,ServerEntry> index : indices )
-                {
-                    indexOids.add( registry.getOid( index.getAttributeId() ) );
-                }
-
-                if ( ! indexOids.contains( registry.getOid( SchemaConstants.OBJECT_CLASS_AT
) ) )
-                {
-                    LOG.warn( "CAUTION: You have not included objectClass as an indexed attribute"
+
-                            "in the system partition configuration.  This will lead to poor
" +
-                            "performance.  The server is automatically adding this index
for you." );
-                    JdbmIndex<?,ServerEntry> index = new JdbmIndex<Object,ServerEntry>();
-                    index.setAttributeId( SchemaConstants.OBJECT_CLASS_AT );
-                    indices.add( index );
-                }
-
-                ( ( JdbmPartition ) override ).setIndexedAttributes( indices );
-            }
-
             system = override;
         }
         else
         {
-            system = new JdbmPartition();
-            system.setId( "system" );
-            system.setCacheSize( 500 );
-            system.setSuffix( ServerDNConstants.SYSTEM_DN );
-    
-            // Add objectClass attribute for the system partition
-            Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
-            indexedAttrs.add( new JdbmIndex<Object,ServerEntry>( SchemaConstants.OBJECT_CLASS_AT
) );
-            ( ( JdbmPartition ) system ).setIndexedAttributes( indexedAttrs );
+            throw new LdapConfigurationException( "No system partition found" );
         }
 
         system.init( directoryService );

Modified: directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=758883&r1=758882&r2=758883&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/branches/ldif-partition/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Thu Mar 26 22:10:06 2009
@@ -41,6 +41,7 @@
 import org.apache.directory.server.xdbm.*;
 import org.apache.directory.server.xdbm.search.Optimizer;
 import org.apache.directory.server.xdbm.search.SearchEngine;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -66,6 +67,7 @@
     static
     {
         Set<String> set = new HashSet<String>();
+        set.add( SchemaConstants.OBJECT_CLASS_AT_OID );
         set.add( ApacheSchemaConstants.APACHE_ALIAS_OID );
         set.add( ApacheSchemaConstants.APACHE_EXISTANCE_OID );
         set.add( ApacheSchemaConstants.APACHE_ONE_LEVEL_OID );

Added: directory/apacheds/branches/ldif-partition/jdbm-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/jdbm-partition/pom.xml?rev=758883&view=auto
==============================================================================
--- directory/apacheds/branches/ldif-partition/jdbm-partition/pom.xml (added)
+++ directory/apacheds/branches/ldif-partition/jdbm-partition/pom.xml Thu Mar 26 22:10:06
2009
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>apacheds-parent</artifactId>
+    <version>1.5.5-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-jdbm-partition</artifactId>
+  <name>ApacheDS Jdbm Partition</name>
+  <packaging>jar</packaging>
+
+  <description>
+    A Partition implementation backed by JDBM btrees.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-xdbm-search</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-xdbm-tools</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core-interceptor</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core-api</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core-constants</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-jdbm-store</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-xdbm-base</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+



Mime
View raw message