directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r919877 - in /directory/sandbox/seelmann/hbase-partition/src: main/java/org/apache/directory/server/core/partition/hbase/ main/java/org/apache/directory/server/core/partition/hbase/mapreduce/ main/java/org/apache/directory/server/core/parti...
Date Sat, 06 Mar 2010 23:31:52 GMT
Author: seelmann
Date: Sat Mar  6 23:31:51 2010
New Revision: 919877

URL: http://svn.apache.org/viewvc?rev=919877&view=rev
Log:
LdapDN -> DN

Modified:
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseStore.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/IndexBuilder.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/LdifImporter.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/TreeTableBuilder.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTable.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/AbstractHBasePartitionIT.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java
    directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTableTest.java

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseStore.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseStore.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseStore.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseStore.java Sat Mar  6 23:31:51 2010
@@ -51,7 +51,7 @@
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -73,7 +73,7 @@
 
     private String tablePrefix;
 
-    private LdapDN suffixDn;
+    private DN suffixDn;
     private String suffix;
     private String name;
     private int cacheSize;
@@ -108,7 +108,7 @@
         }
 
         this.schemaManager = schemaManager;
-        this.suffixDn = new LdapDN( suffix )
+        this.suffixDn = new DN( suffix )
             .normalize( schemaManager.getAttributeTypeRegistry().getNormalizerMapping() );
 
         // setup system indices
@@ -212,7 +212,7 @@
     public UUID getEntryId( String dn ) throws Exception
     {
         // TODO: is dn already normalized?
-        LdapDN normDn = new LdapDN( dn ).normalize( schemaManager.getAttributeTypeRegistry().getNormalizerMapping() );
+        DN normDn = new DN( dn ).normalize( schemaManager.getAttributeTypeRegistry().getNormalizerMapping() );
         UUID id = getMasterTable().fetchId( normDn );
         return id;
     }
@@ -378,7 +378,7 @@
     }
 
 
-    public LdapDN getSuffix()
+    public DN getSuffix()
     {
         return suffixDn;
     }
@@ -396,7 +396,7 @@
     }
 
 
-    public LdapDN getUpSuffix()
+    public DN getUpSuffix()
     {
         return suffixDn;
     }
@@ -476,7 +476,7 @@
     }
 
 
-    public void modify( LdapDN dn, List<Modification> mods ) throws Exception
+    public void modify( DN dn, List<Modification> mods ) throws Exception
     {
         UUID id = getEntryId( dn.getNormName() );
         ServerEntry entry = lookup( id );
@@ -569,25 +569,25 @@
     }
 
 
-    public void modify( LdapDN arg0, ModificationOperation arg1, ServerEntry arg2 ) throws Exception
+    public void modify( DN arg0, ModificationOperation arg1, ServerEntry arg2 ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
 
 
-    public void move( LdapDN arg0, LdapDN arg1 ) throws Exception
+    public void move( DN arg0, DN arg1 ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
 
 
-    public void move( LdapDN arg0, LdapDN arg1, RDN arg2, boolean arg3 ) throws Exception
+    public void move( DN arg0, DN arg1, RDN arg2, boolean arg3 ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
 
 
-    public void rename( LdapDN arg0, RDN arg1, boolean arg2 ) throws Exception
+    public void rename( DN arg0, RDN arg1, boolean arg2 ) throws Exception
     {
         throw new UnsupportedOperationException();
     }

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/IndexBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/IndexBuilder.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/IndexBuilder.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/IndexBuilder.java Sat Mar  6 23:31:51 2010
@@ -34,7 +34,7 @@
 import org.apache.directory.server.core.partition.hbase.table.HBaseMasterTable;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.loader.ldif.JarLdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
@@ -77,7 +77,7 @@
             SchemaManager schemaManager = new DefaultSchemaManager( schemaLoader );
             schemaManager.loadAllEnabled();
 
-            LdapDN suffixDn = new LdapDN( context.getConfiguration().get( SUFFIX ) );
+            DN suffixDn = new DN( context.getConfiguration().get( SUFFIX ) );
             suffixDn.normalize( schemaManager.getNormalizerMapping() );
 
             store = new HBaseStore();

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/LdifImporter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/LdifImporter.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/LdifImporter.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/LdifImporter.java Sat Mar  6 23:31:51 2010
@@ -36,7 +36,7 @@
 import org.apache.directory.shared.ldap.csn.CsnFactory;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.loader.ldif.JarLdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
@@ -84,7 +84,7 @@
             SchemaManager schemaManager = new DefaultSchemaManager( schemaLoader );
             schemaManager.loadAllEnabled();
 
-            LdapDN suffixDn = new LdapDN( context.getConfiguration().get( SUFFIX ) );
+            DN suffixDn = new DN( context.getConfiguration().get( SUFFIX ) );
             suffixDn.normalize( schemaManager.getNormalizerMapping() );
 
             store = new HBaseStore();
@@ -138,7 +138,7 @@
             {
                 if ( ldifEntry.isEntry() )
                 {
-                    LdapDN dn = ldifEntry.getDn();
+                    DN dn = ldifEntry.getDn();
                     int size = dn.size();
                     if ( size == count )
                     {

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/TreeTableBuilder.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/TreeTableBuilder.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/TreeTableBuilder.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/mapreduce/TreeTableBuilder.java Sat Mar  6 23:31:51 2010
@@ -28,7 +28,7 @@
 import org.apache.directory.server.core.partition.hbase.HBaseStore;
 import org.apache.directory.server.core.partition.hbase.Utils;
 import org.apache.directory.server.core.partition.hbase.table.HBaseMasterTable;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.loader.ldif.JarLdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
@@ -70,7 +70,7 @@
             SchemaManager schemaManager = new DefaultSchemaManager( schemaLoader );
             schemaManager.loadAllEnabled();
 
-            LdapDN suffixDn = new LdapDN( context.getConfiguration().get( SUFFIX ) );
+            DN suffixDn = new DN( context.getConfiguration().get( SUFFIX ) );
             suffixDn.normalize( schemaManager.getNormalizerMapping() );
 
             store = new HBaseStore();

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTable.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTable.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTable.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTable.java Sat Mar  6 23:31:51 2010
@@ -40,7 +40,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.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -94,7 +94,7 @@
     private HBaseConfiguration configuration;
     private boolean maintainCounters;
     private SchemaManager schemaManager;
-    private LdapDN suffixDn;
+    private DN suffixDn;
 
     private HBaseTablePool masterTablePool;
     private String masterTableName;
@@ -115,7 +115,7 @@
     private Cache<UUID, Long> subLevelCountCache;
 
     /** id -> DN */
-    private Cache<UUID, LdapDN> dnCache;
+    private Cache<UUID, DN> dnCache;
 
     /** id -> entry */
     private Cache<UUID, ServerEntry> entryCache;
@@ -134,7 +134,7 @@
         this.entryCache = new Cache<UUID, ServerEntry>( store.getCacheSize() );
 
         int dnCacheSize = Math.max( store.getCacheSize(), store.getNdnIndex().getCacheSize() );
-        this.dnCache = new Cache<UUID, LdapDN>( dnCacheSize );
+        this.dnCache = new Cache<UUID, DN>( dnCacheSize );
         this.mtiCache = new Cache<UUID, MasterTreeInfo>( dnCacheSize );
         this.idCache = new Cache<String, UUID>( dnCacheSize );
 
@@ -418,7 +418,7 @@
         String normRdn = Bytes.toString( result.getValue( TREE_INFO_FAMILY, NORM_RDN_QUALIFIER ) );
         String upRdn = Bytes.toString( result.getValue( TREE_INFO_FAMILY, UP_RDN_QUALIFIER ) );
         MasterTreeInfo mti = new MasterTreeInfo( parentId, normRdn, upRdn );
-        LdapDN dn = fetchDn( id, mti );
+        DN dn = fetchDn( id, mti );
 
         NavigableMap<byte[], byte[]> attributesMap = result.getFamilyMap( UP_ATTRIBUTES_FAMILY );
         ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
@@ -449,9 +449,9 @@
     }
 
 
-    private LdapDN fetchDn( UUID id, MasterTreeInfo mti ) throws Exception
+    private DN fetchDn( UUID id, MasterTreeInfo mti ) throws Exception
     {
-        LdapDN dn = dnCache.get( id );
+        DN dn = dnCache.get( id );
         if ( dn != null )
         {
             return dn;
@@ -469,7 +469,7 @@
             }
         }
         while ( mti != null );
-        dn = new LdapDN( sb.toString() );
+        dn = new DN( sb.toString() );
         dn.normalize( schemaManager.getAttributeTypeRegistry().getNormalizerMapping() );
 
         // put DN to cache
@@ -486,7 +486,7 @@
      * @return the entry ID, null if entry doesn't exist.
      * @throws Exception
      */
-    public UUID fetchId( LdapDN dn ) throws Exception
+    public UUID fetchId( DN dn ) throws Exception
     {
         if ( dn == null )
         {
@@ -593,7 +593,7 @@
     }
 
 
-    private List<UUID> fetchParentIds( LdapDN dn, boolean includeChild ) throws Exception
+    private List<UUID> fetchParentIds( DN dn, boolean includeChild ) throws Exception
     {
         if ( !dn.startsWith( suffixDn ) )
         {

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java Sat Mar  6 23:31:51 2010
@@ -27,7 +27,7 @@
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.partition.hbase.it.AbstractHBasePartitionIT;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -73,20 +73,20 @@
     {
         session = ldapServer.getDirectoryService().getAdminSession();
 
-        if ( !session.exists( new LdapDN( "o=hbase" ) ) || !session.exists( new LdapDN( "ou=test-ou,o=hbase" ) )
-            || !session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "o=hbase" ) ) || !session.exists( new DN( "ou=test-ou,o=hbase" ) )
+            || !session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
         {
             AbstractHBasePartitionIT.createBasicTestData( ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test1000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test1000,o=hbase" ) ) )
         {
             AbstractHBasePartitionIT.createTestData( 1000, "000", ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test10000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test10000,o=hbase" ) ) )
         {
             AbstractHBasePartitionIT.createTestData( 10000, "0000", ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test100000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test100000,o=hbase" ) ) )
         {
             AbstractHBasePartitionIT.createTestData( 100000, "00000", ldapServer );
         }

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java Sat Mar  6 23:31:51 2010
@@ -30,7 +30,7 @@
 import org.apache.directory.server.core.partition.hbase.index.HBaseUserColumnIndex;
 import org.apache.directory.server.core.partition.hbase.index.HBaseUserRowIndex;
 import org.apache.directory.server.core.partition.hbase.it.AbstractHBasePartitionIT;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -87,20 +87,20 @@
     {
         session = ldapServer.getDirectoryService().getAdminSession();
 
-        if ( !session.exists( new LdapDN( "o=hbase" ) ) || !session.exists( new LdapDN( "ou=test-ou,o=hbase" ) )
-            || !session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "o=hbase" ) ) || !session.exists( new DN( "ou=test-ou,o=hbase" ) )
+            || !session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
         {
             AbstractHBasePartitionIT.createBasicTestData( ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test1000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test1000,o=hbase" ) ) )
         {
             AbstractHBasePartitionIT.createTestData( 1000, "000", ldapServer );
         }
-//        if ( !session.exists( new LdapDN( "ou=test10000,o=hbase" ) ) )
+//        if ( !session.exists( new DN( "ou=test10000,o=hbase" ) ) )
 //        {
 //            AbstractHBasePartitionIT.createTestData( 10000, "0000", ldapServer );
 //        }
-//        if ( !session.exists( new LdapDN( "ou=test100000,o=hbase" ) ) )
+//        if ( !session.exists( new DN( "ou=test100000,o=hbase" ) ) )
 //        {
 //            AbstractHBasePartitionIT.createTestData( 100000, "00000", ldapServer );
 //        }

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/AbstractHBasePartitionIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/AbstractHBasePartitionIT.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/AbstractHBasePartitionIT.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/AbstractHBasePartitionIT.java Sat Mar  6 23:31:51 2010
@@ -29,7 +29,7 @@
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.partition.hbase.HBaseClusterTestCaseAdapter;
 import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
@@ -82,27 +82,27 @@
 
         LOG.debug( "Adding basic test data..." );
 
-        if ( !session.exists( new LdapDN( "o=hbase" ) ) )
+        if ( !session.exists( new DN( "o=hbase" ) ) )
         {
-            ServerEntry entry = new DefaultServerEntry( schemaManager, new LdapDN( "o=hbase" ) );
+            ServerEntry entry = new DefaultServerEntry( schemaManager, new DN( "o=hbase" ) );
             entry.add( "objectClass", "top", "organization" );
             entry.add( "o", "hbase" );
             session.add( entry );
             LOG.debug( "  added " + entry.getDn().getName() );
         }
 
-        if ( !session.exists( new LdapDN( "ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test-ou,o=hbase" ) ) )
         {
-            ServerEntry entry = new DefaultServerEntry( schemaManager, new LdapDN( "ou=test-ou,o=hbase" ) );
+            ServerEntry entry = new DefaultServerEntry( schemaManager, new DN( "ou=test-ou,o=hbase" ) );
             entry.add( "objectClass", "top", "organizationalUnit" );
             entry.add( "ou", "test-ou" );
             session.add( entry );
             LOG.debug( "  added " + entry.getDn().getName() );
         }
 
-        if ( !session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
         {
-            ServerEntry entry = new DefaultServerEntry( schemaManager, new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) );
+            ServerEntry entry = new DefaultServerEntry( schemaManager, new DN( "cn=test-person,ou=test-ou,o=hbase" ) );
             entry.add( "objectClass", "top", "person" );
             entry.add( "cn", "test-person" );
             entry.add( "Sn", "test-person" );
@@ -129,7 +129,7 @@
 
         LOG.debug( "Adding test data " + number + "..." );
 
-        LdapDN dn = new LdapDN( "ou=test" + number + ",o=hbase" );
+        DN dn = new DN( "ou=test" + number + ",o=hbase" );
         if ( !session.exists( dn ) )
         {
             ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
@@ -143,7 +143,7 @@
         {
             String s = df.format( i );
 
-            dn = new LdapDN( "cn=test" + s + ",ou=test" + number + ",o=hbase" );
+            dn = new DN( "cn=test" + s + ",ou=test" + number + ",o=hbase" );
             if ( session.exists( dn ) )
             {
                 continue;

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java Sat Mar  6 23:31:51 2010
@@ -57,7 +57,7 @@
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Before;
 import org.junit.Test;
@@ -81,12 +81,12 @@
     @Before
     public void initTestData() throws Exception
     {
-        if ( !session.exists( new LdapDN( "o=hbase" ) ) || !session.exists( new LdapDN( "ou=test-ou,o=hbase" ) )
-            || !session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "o=hbase" ) ) || !session.exists( new DN( "ou=test-ou,o=hbase" ) )
+            || !session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
         {
             createBasicTestData( ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test1000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test1000,o=hbase" ) ) )
         {
             createTestData( 1000, "000", ldapServer );
         }
@@ -102,11 +102,11 @@
     @Test
     public void testDelete() throws Exception
     {
-        session.delete( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) );
-        session.delete( new LdapDN( "ou=test-ou,o=hbase" ) );
+        session.delete( new DN( "cn=test-person,ou=test-ou,o=hbase" ) );
+        session.delete( new DN( "ou=test-ou,o=hbase" ) );
 
-        assertFalse( session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) );
-        assertFalse( session.exists( new LdapDN( "ou=test-ou,o=hbase" ) ) );
+        assertFalse( session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) );
+        assertFalse( session.exists( new DN( "ou=test-ou,o=hbase" ) ) );
 
         // TODO: assert updates in HBase (id2dn, master, index, one-level-count, sub-level-counts)
     }
@@ -125,10 +125,10 @@
             "seeAlso", "uid=admin,ou=system" ) ) );
         resetMods.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultClientAttribute(
             "userPassword", "secret1" ) ) );
-        session.modify( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ), resetMods );
+        session.modify( new DN( "cn=test-person,ou=test-ou,o=hbase" ), resetMods );
 
         // assert initial values
-        ClonedServerEntry entry = session.lookup( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) );
+        ClonedServerEntry entry = session.lookup( new DN( "cn=test-person,ou=test-ou,o=hbase" ) );
         assertNotNull( entry );
         assertNull( entry.get( "telephoneNumber" ) );
         assertNotNull( entry.get( "description" ) );
@@ -148,9 +148,9 @@
             "seeAlso" ) ) );
         modifications.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultClientAttribute(
             "userPassword", "secret2" ) ) );
-        session.modify( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ), modifications );
+        session.modify( new DN( "cn=test-person,ou=test-ou,o=hbase" ), modifications );
 
-        entry = session.lookup( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) );
+        entry = session.lookup( new DN( "cn=test-person,ou=test-ou,o=hbase" ) );
         assertNotNull( entry );
         assertNotNull( entry.get( "telephoneNumber" ) );
         assertEquals( 2, entry.get( "telephoneNumber" ).size() );
@@ -165,7 +165,7 @@
     @Test
     public void testLookup1() throws Exception
     {
-        ClonedServerEntry entry = session.lookup( new LdapDN( "o=hbase" ) );
+        ClonedServerEntry entry = session.lookup( new DN( "o=hbase" ) );
         assertNotNull( entry );
         assertEquals( "2.5.4.10=hbase", entry.getDn().getNormName() );
     }
@@ -174,7 +174,7 @@
     @Test
     public void testLookup2() throws Exception
     {
-        ClonedServerEntry entry = session.lookup( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) );
+        ClonedServerEntry entry = session.lookup( new DN( "cn=test-person,ou=test-ou,o=hbase" ) );
         assertNotNull( entry );
         assertEquals( "2.5.4.3=test-person,2.5.4.11=test-ou,2.5.4.10=hbase", entry.getDn().getNormName() );
     }
@@ -183,10 +183,10 @@
     @Test
     public void testLookupNonExisting() throws Exception
     {
-        assertFalse( session.exists( new LdapDN( "cn=qwertz,ou=test-ou,o=hbase" ) ) );
+        assertFalse( session.exists( new DN( "cn=qwertz,ou=test-ou,o=hbase" ) ) );
         try
         {
-            session.lookup( new LdapDN( "cn=qwertz,ou=test-ou,o=hbase" ) );
+            session.lookup( new DN( "cn=qwertz,ou=test-ou,o=hbase" ) );
             fail();
         }
         catch ( NameNotFoundException e )
@@ -199,7 +199,7 @@
     @Test
     public void testSearchBaseEqualsFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.OBJECT,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.OBJECT,
             FilterParser.parse( "(objectClass=organizationalUnit)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -218,7 +218,7 @@
     @Test
     public void testSearchBaseNotEqualsFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.OBJECT,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.OBJECT,
             FilterParser.parse( "(!(objectClass=organizationalUnit))" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -230,7 +230,7 @@
     @Test
     public void testSearchBasePresenceFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ),
+        EntryFilteringCursor cursor = session.search( new DN( "cn=test-person,ou=test-ou,o=hbase" ),
             SearchScope.OBJECT, FilterParser.parse( "(objectClass=*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -249,7 +249,7 @@
     @Test
     public void testSearchBasePresenceFilter2() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ),
+        EntryFilteringCursor cursor = session.search( new DN( "cn=test-person,ou=test-ou,o=hbase" ),
             SearchScope.OBJECT, FilterParser.parse( "(sn=*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -268,7 +268,7 @@
     @Test
     public void testSearchBaseSubstringFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ),
+        EntryFilteringCursor cursor = session.search( new DN( "cn=test-person,ou=test-ou,o=hbase" ),
             SearchScope.OBJECT, FilterParser.parse( "(objectClass=per*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -287,7 +287,7 @@
     @Test
     public void testSearchOneLevelEqualFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(ou=test-OU)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -306,7 +306,7 @@
     @Test
     public void testSearchOneLevelEqualFilter2() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.ONELEVEL,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.ONELEVEL,
             FilterParser.parse( "(objectClass=person)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -326,7 +326,7 @@
     @Test
     public void testSearchOneLevelEqualFilter3() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.ONELEVEL,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.ONELEVEL,
             FilterParser.parse( "(cn=test-person)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -346,7 +346,7 @@
     @Test
     public void testSearchOneLevelNotEqualFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(!(ou=test-ou))" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -366,7 +366,7 @@
     @Test
     public void testSearchOneLevelPresenceFilterIndexed() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(objectClass=*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -387,7 +387,7 @@
     @Test
     public void testSearchOneLevelPresenceFilterUnindexed() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.ONELEVEL,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.ONELEVEL,
             FilterParser.parse( "(sn=*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -405,7 +405,7 @@
     @Test
     public void testSearchOneLevelPresenceFilterIndexed2() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.ONELEVEL,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.ONELEVEL,
             FilterParser.parse( "(objectClass=*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -425,7 +425,7 @@
     @Test
     public void testSearchOneLevelSubstringInitialFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(ou=test-*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -444,7 +444,7 @@
     @Test
     public void testSearchOneLevelSubstringAnyFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(ou=*-*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -463,7 +463,7 @@
     @Test
     public void testSearchOneLevelSubstringFinalFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(ou=*-ou)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -484,7 +484,7 @@
     {
         // not a good example to use ou for ordering filter...
 
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(ou>=test-)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -507,7 +507,7 @@
     {
         // not a good example to use ou for ordering filter...
 
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
             .parse( "(ou<=u)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -528,7 +528,7 @@
     @Test
     public void testSearchSubLevelEqualFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
             .parse( "(cn=test999)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -547,7 +547,7 @@
     @Test
     public void testSearchSubLevelEqualFilterUnindexed() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+        EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
             .parse( "(sn=test999)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -567,7 +567,7 @@
     public void testSearchSubLevelOrEqualFilter() throws Exception
     {
         // 
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(|(ou=test-ou)(cn=test-person))" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -595,7 +595,7 @@
     @Test
     public void testSearchSubLevelAndEqualFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(&(cn=test777)(objectClass=person))" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -611,7 +611,7 @@
     @Test
     public void testSearchSubLevelAndEqualFilterNoResult() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test-ou,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test-ou,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(&(cn=test777)(objectClass=person))" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -623,7 +623,7 @@
     @Test
     public void testSearchPresenceFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(cn=*)" ), AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -646,7 +646,7 @@
     public void testSearchSubLevelSubstringInitialFilter() throws Exception
     {
         // uses sub-level index
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(cn=test99*)" ), AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -672,7 +672,7 @@
         assertTrue( actualDns.contains( "cn=test999,ou=test1000,o=hbase" ) );
 
         // uses cn index
-        cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn=test99*)" ),
+        cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn=test99*)" ),
             AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -703,7 +703,7 @@
     public void testSearchSubLevelSubstringAnyFilter() throws Exception
     {
         // uses sub-level index
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(cn=*st00*)" ), AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -729,7 +729,7 @@
         assertTrue( actualDns.contains( "cn=test009,ou=test1000,o=hbase" ) );
 
         // uses cn index
-        cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn=*st00*)" ),
+        cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn=*st00*)" ),
             AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -760,7 +760,7 @@
     public void testSearchSubLevelSubstringFinalFilter() throws Exception
     {
         // uses sub-level index
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(cn=*99)" ), AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -786,7 +786,7 @@
         assertTrue( actualDns.contains( "cn=test999,ou=test1000,o=hbase" ) );
 
         // uses cn index
-        cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn=*99)" ),
+        cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn=*99)" ),
             AliasDerefMode.DEREF_ALWAYS, null, 0, 0 );
 
         assertNotNull( cursor );
@@ -819,7 +819,7 @@
         // not a good example to use cn for ordering filter...
 
         // uses sub-level index
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(cn>=TeSt900)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -837,7 +837,7 @@
         assertTrue( actualDns.contains( "cn=test999,ou=test1000,o=hbase" ) );
 
         // uses cn index
-        cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn>=TeSt900)" ),
+        cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn>=TeSt900)" ),
             AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -862,7 +862,7 @@
         // not a good examle to use cn for ordering filter...
 
         // uses sub-level index
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(cn<=test099)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -881,7 +881,7 @@
         assertFalse( actualDns.contains( "cn=test100,ou=test1000,o=hbase" ) );
 
         // uses cn index
-        cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn<=test099)" ),
+        cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser.parse( "(cn<=test099)" ),
             AliasDerefMode.DEREF_ALWAYS, null );
 
         assertNotNull( cursor );
@@ -905,7 +905,7 @@
     @Test
     public void testSearchSubLevelMixedOrderingFilter() throws Exception
     {
-        EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
+        EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.SUBTREE,
             FilterParser.parse( "(&(cn>=test200)(!(cn=test200))(!(cn=test250))(!(cn=test300))(cn<=test300))" ),
             AliasDerefMode.DEREF_ALWAYS, null );
 

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java Sat Mar  6 23:31:51 2010
@@ -45,7 +45,7 @@
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.junit.Before;
 import org.junit.Test;
@@ -79,16 +79,16 @@
     @Before
     public void initTestData() throws Exception
     {
-        if ( !session.exists( new LdapDN( "o=hbase" ) ) || !session.exists( new LdapDN( "ou=test-ou,o=hbase" ) )
-            || !session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "o=hbase" ) ) || !session.exists( new DN( "ou=test-ou,o=hbase" ) )
+            || !session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
         {
             createBasicTestData( ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test1000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test1000,o=hbase" ) ) )
         {
             createTestData( 1000, "000", ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test10000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test10000,o=hbase" ) ) )
         {
             createTestData( 10000, "0000", ldapServer );
 
@@ -111,7 +111,7 @@
         long t0 = System.currentTimeMillis();
         SchemaManager schemaManager = ldapServer.getDirectoryService().getSchemaManager();
 
-        LdapDN dn = new LdapDN( "cn=test000,ou=test-ou,o=hbase" );
+        DN dn = new DN( "cn=test000,ou=test-ou,o=hbase" );
         ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person" );
         entry.add( "cn", "test000" );
@@ -136,7 +136,7 @@
         for ( int i = 0; i < 1000; i++ )
         {
             String s = df.format( i );
-            ServerEntry entry = new DefaultServerEntry( schemaManager, new LdapDN( "cn=test" + s
+            ServerEntry entry = new DefaultServerEntry( schemaManager, new DN( "cn=test" + s
                 + ",ou=test-ou,o=hbase" ) );
             entry.add( "objectClass", "top", "person" );
             entry.add( "cn", "test" + s );
@@ -157,7 +157,7 @@
         for ( int i = 0; i < 1000; i++ )
         {
             String s = df.format( i );
-            session.delete( new LdapDN( "cn=test" + s + ",ou=test-ou,o=hbase" ) );
+            session.delete( new DN( "cn=test" + s + ",ou=test-ou,o=hbase" ) );
         }
         long t1 = System.currentTimeMillis();
         long t = t1 - t0;
@@ -171,7 +171,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1000; i++ )
         {
-            ClonedServerEntry entry = session.lookup( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) );
+            ClonedServerEntry entry = session.lookup( new DN( "cn=test-person,ou=test-ou,o=hbase" ) );
             assertNotNull( entry );
             assertEquals( "2.5.4.3=test-person,2.5.4.11=test-ou,2.5.4.10=hbase", entry.getDn().getNormName() );
         }
@@ -188,7 +188,7 @@
         for ( int i = 0; i < 1000; i++ )
         {
             String cn = RandomStringUtils.randomNumeric( 4 );
-            ClonedServerEntry entry = session.lookup( new LdapDN( "cn=test" + cn + ",ou=test10000,o=hbase" ) );
+            ClonedServerEntry entry = session.lookup( new DN( "cn=test" + cn + ",ou=test10000,o=hbase" ) );
             assertNotNull( entry );
             assertEquals( "2.5.4.3=test" + cn + ",2.5.4.11=test10000,2.5.4.10=hbase", entry.getDn().getNormName() );
         }
@@ -204,7 +204,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1000; i++ )
         {
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
                 .parse( "(objectClass=organizationalUnit)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -230,7 +230,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1; i++ )
         {
-            EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test1000,o=hbase" ), SearchScope.ONELEVEL,
+            EntryFilteringCursor cursor = session.search( new DN( "ou=test1000,o=hbase" ), SearchScope.ONELEVEL,
                 FilterParser.parse( "(objectClass=person)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -258,7 +258,7 @@
         {
             String cn = RandomStringUtils.randomNumeric( 4 );
             String filter = "(cn=test" + cn + ")";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test10000,o=hbase" ), SearchScope.ONELEVEL,
+            EntryFilteringCursor cursor = session.search( new DN( "ou=test10000,o=hbase" ), SearchScope.ONELEVEL,
                 FilterParser.parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -282,7 +282,7 @@
         {
             String sn = RandomStringUtils.randomNumeric( 4 );
             String filter = "(sn=test" + sn + ")";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test10000,o=hbase" ), SearchScope.ONELEVEL,
+            EntryFilteringCursor cursor = session.search( new DN( "ou=test10000,o=hbase" ), SearchScope.ONELEVEL,
                 FilterParser.parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -303,7 +303,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1000; i++ )
         {
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
                 .parse( "(objectClass=*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -330,7 +330,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1000; i++ )
         {
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
                 .parse( "(objectClass=org*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -355,7 +355,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1000; i++ )
         {
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.ONELEVEL, FilterParser
                 .parse( "(objectClass=*org*)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -380,7 +380,7 @@
         long t0 = System.currentTimeMillis();
         for ( int i = 0; i < 1000; i++ )
         {
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
                 .parse( "(objectClass=organizationalUnit)" ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -408,7 +408,7 @@
         {
             String cn = df.format( i );
             String filter = "(cn=test" + cn + ")";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
                 .parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -432,7 +432,7 @@
         {
             String cn = RandomStringUtils.randomNumeric( 4 );
             String filter = "(cn=test" + cn + ")";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
                 .parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -455,7 +455,7 @@
         {
             String cn = RandomStringUtils.randomNumeric( 4 );
             String filter = "(cn=test" + cn + "*)";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
                 .parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -481,7 +481,7 @@
             String cn = RandomStringUtils.randomNumeric( 4 );
             //String cn = "9999";
             String filter = "(cn=test" + cn + "*)";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "ou=test10000,o=hbase" ), SearchScope.SUBTREE,
+            EntryFilteringCursor cursor = session.search( new DN( "ou=test10000,o=hbase" ), SearchScope.SUBTREE,
                 FilterParser.parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -506,7 +506,7 @@
         {
             String cn = RandomStringUtils.randomNumeric( 4 );
             String filter = "(cn=test*" + cn + "*)";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
                 .parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();
@@ -532,7 +532,7 @@
             //String cn = RandomStringUtils.randomNumeric( 4 );
             String cn = "9999";
             String filter = "(cn=*" + cn + "*)";
-            EntryFilteringCursor cursor = session.search( new LdapDN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
+            EntryFilteringCursor cursor = session.search( new DN( "o=hbase" ), SearchScope.SUBTREE, FilterParser
                 .parse( filter ), AliasDerefMode.DEREF_ALWAYS, null );
 
             cursor.beforeFirst();

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java Sat Mar  6 23:31:51 2010
@@ -29,7 +29,7 @@
 import org.apache.directory.server.core.partition.hbase.HBaseDistributedPartition;
 import org.apache.directory.server.core.partition.hbase.index.HBaseUserColumnIndex;
 import org.apache.directory.server.core.partition.hbase.index.HBaseUserRowIndex;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -73,16 +73,16 @@
     @Before
     public void initTestData() throws Exception
     {
-        if ( !session.exists( new LdapDN( "o=hbase" ) ) || !session.exists( new LdapDN( "ou=test-ou,o=hbase" ) )
-            || !session.exists( new LdapDN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
+        if ( !session.exists( new DN( "o=hbase" ) ) || !session.exists( new DN( "ou=test-ou,o=hbase" ) )
+            || !session.exists( new DN( "cn=test-person,ou=test-ou,o=hbase" ) ) )
         {
             createBasicTestData( ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test1000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test1000,o=hbase" ) ) )
         {
             createTestData( 1000, "000", ldapServer );
         }
-        if ( !session.exists( new LdapDN( "ou=test10000,o=hbase" ) ) )
+        if ( !session.exists( new DN( "ou=test10000,o=hbase" ) ) )
         {
             createTestData( 10000, "0000", ldapServer );
         }

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java Sat Mar  6 23:31:51 2010
@@ -153,7 +153,7 @@
 
         //
         //        ClonedServerEntry entry = ldapServer.getDirectoryService().getAdminSession().lookup(
-        //            new LdapDN( "dc=example,dc=com" ) );
+        //            new DN( "dc=example,dc=com" ) );
         //        assertNotNull( entry );
         //
         dump();

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java Sat Mar  6 23:31:51 2010
@@ -32,7 +32,7 @@
 import org.apache.directory.server.core.partition.hbase.HBaseStore;
 import org.apache.directory.server.core.partition.hbase.it.AbstractHBasePartitionIT;
 import org.apache.directory.shared.ldap.csn.CsnFactory;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 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;
@@ -56,7 +56,7 @@
     protected static HBaseClusterTestCaseAdapter adapter;
     protected static SchemaManager schemaManager;
     protected static HBaseStore store;
-    protected static LdapDN suffixDn;
+    protected static DN suffixDn;
 
     protected static final UUID CONTEXT_ENTRY_ID = UUID.fromString( "00000000-0000-0000-0000-000000000001" );
     protected static final UUID OU_SALES_ID = UUID.fromString( "00000000-0000-0000-0000-000000000002" );
@@ -111,7 +111,7 @@
             fail( "Schema load failed : " + ExceptionUtils.printErrors( schemaManager.getErrors() ) );
         }
 
-        suffixDn = new LdapDN( "o=Good Times Co." );
+        suffixDn = new DN( "o=Good Times Co." );
         suffixDn.normalize( schemaManager.getNormalizerMapping() );
 
         store = new HBaseStore();
@@ -137,7 +137,7 @@
 
     protected DefaultServerEntry buildOuSalesEntry() throws InvalidNameException, NamingException
     {
-        LdapDN dn = new LdapDN( "ou=Sales \\E6\\97\\A5\\E6\\9C\\AC,o=Good Times Co." );
+        DN dn = new DN( "ou=Sales \\E6\\97\\A5\\E6\\9C\\AC,o=Good Times Co." );
         dn.normalize( schemaManager.getNormalizerMapping() );
         DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
@@ -152,7 +152,7 @@
 
     protected DefaultServerEntry buildCnJohnnyWalkerEntry() throws InvalidNameException, NamingException
     {
-        LdapDN dn = new LdapDN(
+        DN dn = new DN(
             "cn=JOhnny \\E6\\97\\A5\\E6\\9C\\AC WAlkeR,ou=Sales \\E6\\97\\A5\\E6\\9C\\AC,o=Good Times Co." );
         dn.normalize( schemaManager.getNormalizerMapping() );
         DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );

Modified: directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTableTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTableTest.java?rev=919877&r1=919876&r2=919877&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTableTest.java (original)
+++ directory/sandbox/seelmann/hbase-partition/src/test/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTableTest.java Sat Mar  6 23:31:51 2010
@@ -30,7 +30,7 @@
 
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.partition.hbase.HBaseStore;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
@@ -107,7 +107,7 @@
     @Test
     public void testEmpty() throws Exception
     {
-        assertNull( masterTable.fetchId( new LdapDN( "a=b" ) ) );
+        assertNull( masterTable.fetchId( new DN( "a=b" ) ) );
     }
 
 
@@ -332,7 +332,7 @@
 
         // fetch entry IDs of non-existing entries
         assertNull( masterTable.fetchId( null ) );
-        assertNull( masterTable.fetchId( new LdapDN( "a=b" ) ) );
+        assertNull( masterTable.fetchId( new DN( "a=b" ) ) );
     }
 
 



Mime
View raw message