directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r925934 - in /directory/sandbox/seelmann: hbase-partition-test/ hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/ hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ h...
Date Sun, 21 Mar 2010 23:40:13 GMT
Author: seelmann
Date: Sun Mar 21 23:40:12 2010
New Revision: 925934

URL: http://svn.apache.org/viewvc?rev=925934&view=rev
Log:
o Use new LdapException
o Restructured tests

Added:
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/GetPerformanceEvaluation.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/GetPerformanceEvaluation.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterEvaluation.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterTest.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPT.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseDistributedRunner.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseEmbeddedRunner.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseRunner.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/JdbmRunner.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/JdbmRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/RemoteRunner.java
      - copied, changed from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/RemoteRunner.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartitionFactory.java
Removed:
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/JdbmRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterTest.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/GetPerformanceEvaluation.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/RemoteRunner.java
Modified:
    directory/sandbox/seelmann/hbase-partition-test/pom.xml
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseClusterTestCaseAdapter.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java
    directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java
    directory/sandbox/seelmann/hbase-partition/pom.xml
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedPartition.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartition.java
    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/LdifImporter.java
    directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/table/HBaseMasterTable.java

Modified: directory/sandbox/seelmann/hbase-partition-test/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/pom.xml?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/pom.xml (original)
+++ directory/sandbox/seelmann/hbase-partition-test/pom.xml Sun Mar 21 23:40:12 2010
@@ -66,9 +66,13 @@
     <!-- ApacheDS integration test framework -->
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core-integ</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-server-integ</artifactId>
       <version>${pom.version}</version>
-      <scope>test</scope>
     </dependency>
 
     <!-- HBase dependencies -->
@@ -139,16 +143,36 @@
 
   <build>
     <plugins>
-      <!-- 
+      <plugin>
+         <artifactId>maven-compiler-plugin</artifactId>
+         <configuration>
+           <source>1.6</source>
+           <target>1.6</target>
+         </configuration>
+      </plugin>
+      <plugin>
+         <artifactId>maven-eclipse-plugin</artifactId>
+         <configuration>
+           <classpathContainers>
+             <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</classpathContainer>
+           </classpathContainers>
+         </configuration>
+      </plugin>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <includes>
+            <include>**/*Test.java</include>
             <include>**/*IT.java</include>
           </includes>
+          <excludes>
+            <exclude>**/*PT.java</exclude>
+          </excludes>
+          <systemPropertyVariables>
+            <apacheds.partition.factory>org.apache.directory.server.core.partition.hbase.HBaseEmbeddedPartitionFactory</apacheds.partition.factory>
+          </systemPropertyVariables>          
         </configuration>
       </plugin>
-       -->
       <!-- Delete build and test directories that were crated by hbase tests -->
       <plugin>
         <artifactId>maven-clean-plugin</artifactId>

Modified: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseClusterTestCaseAdapter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseClusterTestCaseAdapter.java?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseClusterTestCaseAdapter.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseClusterTestCaseAdapter.java
Sun Mar 21 23:40:12 2010
@@ -42,7 +42,8 @@ public class HBaseClusterTestCaseAdapter
 {
 
     protected MiniMRCluster mrCluster;
-    
+
+
     /**
      * Instantiates a new HBaseClusterTestCase.
      * 
@@ -61,7 +62,11 @@ public class HBaseClusterTestCaseAdapter
         // ...for hdfs
         System.setProperty( "test.build.data", testDir.getAbsolutePath() );
         // ...for map/reduce
-        System.setProperty("hadoop.log.dir", testDir.getAbsolutePath() + "/log");
+        System.setProperty( "hadoop.log.dir", testDir.getAbsolutePath() + "/log" );
+
+        // don't start info server (http server
+        conf.setInt( "hbase.master.info.port", -1 );
+        conf.setInt( "hbase.regionserver.info.port", -1 );
 
         // setup local file system if no DFS is used
         if ( !startDfs )
@@ -83,12 +88,12 @@ public class HBaseClusterTestCaseAdapter
         }
 
         super.setUp();
-        
-        if(startDfs)
+
+        if ( startDfs )
         {
             // These are needed for the new and improved Map/Reduce framework
-            conf.set("mapred.output.dir", conf.get("hadoop.tmp.dir"));
-            mrCluster = new MiniMRCluster(2, fs.getUri().toString(), 1);
+            conf.set( "mapred.output.dir", conf.get( "hadoop.tmp.dir" ) );
+            mrCluster = new MiniMRCluster( 2, fs.getUri().toString(), 1 );
         }
 
         // opening the META table ensures that cluster is running
@@ -101,6 +106,7 @@ public class HBaseClusterTestCaseAdapter
     public void tearDown() throws Exception
     {
         super.tearDown();
+        cluster.join();
         
         if(startDfs)
         {

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/GetPerformanceEvaluation.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/GetPerformanceEvaluation.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/GetPerformanceEvaluation.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/GetPerformanceEvaluation.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/GetPerformanceEvaluation.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/GetPerformanceEvaluation.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/GetPerformanceEvaluation.java
Sun Mar 21 23:40:12 2010
@@ -17,7 +17,7 @@
  *   under the License.
  *
  */
-package org.apache.directory.server.core.partition.hbase.it.mapreduce;
+package org.apache.directory.server.core.partition.hbase.eval;
 
 
 import org.apache.commons.lang.math.RandomUtils;

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterEvaluation.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterTest.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterEvaluation.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterEvaluation.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterTest.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterTest.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/eval/ScanFilterEvaluation.java
Sun Mar 21 23:40:12 2010
@@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.filter.Co
 import org.apache.hadoop.hbase.filter.FilterList.Operator;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 
@@ -47,7 +48,8 @@ import org.junit.Test;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ScanFilterTest
+@Ignore
+public class ScanFilterEvaluation
 {
 
     private static final int LOOPS = 100;

Modified: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionIT.java
Sun Mar 21 23:40:12 2010
@@ -32,7 +32,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import javax.naming.NameNotFoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
@@ -57,6 +56,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
+import org.apache.directory.shared.ldap.exception.LdapNoSuchObjectException;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
@@ -374,7 +374,7 @@ public class HBasePartitionIT extends Ab
             session.lookup( new DN( "cn=qwertz,ou=test-ou,o=hbase" ) );
             fail();
         }
-        catch ( NameNotFoundException e )
+        catch ( LdapNoSuchObjectException e )
         {
             // expected
         }

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPT.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPT.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPT.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPerformanceIT.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBasePartitionPT.java
Sun Mar 21 23:40:12 2010
@@ -73,7 +73,7 @@ import org.junit.runner.RunWith;
     })
 @CreateLdapServer(transports =
     { @CreateTransport(protocol = "LDAP") })
-public class HBasePartitionPerformanceIT extends AbstractHBasePartitionIT
+public class HBasePartitionPT extends AbstractHBasePartitionIT
 {
 
     @Before

Modified: directory/sandbox/seelmann/hbase-partition-test/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-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/LdifImportAndIndexIT.java
Sun Mar 21 23:40:12 2010
@@ -156,9 +156,9 @@ public class LdifImportAndIndexIT extend
         //            new DN( "dc=example,dc=com" ) );
         //        assertNotNull( entry );
         //
-        dump();
-        System.out.println( "ApacheDS started on port " + ldapServer.getPort() + ", press
any key to shutdown..." );
-        System.in.read();
+        //dump();
+        //System.out.println( "ApacheDS started on port " + ldapServer.getPort() + ", press
any key to shutdown..." );
+        //System.in.read();
     }
 
 

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseDistributedRunner.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseDistributedRunner.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseDistributedRunner.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedRunner.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseDistributedRunner.java
Sun Mar 21 23:40:12 2010
@@ -17,7 +17,7 @@
  *   under the License.
  *
  */
-package org.apache.directory.server.core.partition.hbase;
+package org.apache.directory.server.core.partition.hbase.runner;
 
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
@@ -26,6 +26,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.annotations.CreatePartition;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.core.partition.hbase.HBaseDistributedPartition;
 import org.apache.directory.server.core.partition.hbase.it.AbstractHBasePartitionIT;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.hadoop.hbase.HBaseConfiguration;

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseEmbeddedRunner.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseEmbeddedRunner.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseEmbeddedRunner.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedRunner.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseEmbeddedRunner.java
Sun Mar 21 23:40:12 2010
@@ -17,7 +17,7 @@
  *   under the License.
  *
  */
-package org.apache.directory.server.core.partition.hbase;
+package org.apache.directory.server.core.partition.hbase.runner;
 
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
@@ -27,6 +27,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.annotations.CreatePartition;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.core.partition.hbase.HBaseEmbeddedPartition;
 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;

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseRunner.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseRunner.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseRunner.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/HBaseRunner.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/HBaseRunner.java
Sun Mar 21 23:40:12 2010
@@ -17,7 +17,7 @@
  *   under the License.
  *
  */
-package org.apache.directory.server.core.partition.hbase.it;
+package org.apache.directory.server.core.partition.hbase.runner;
 
 
 import org.apache.directory.server.annotations.CreateLdapServer;
@@ -29,6 +29,7 @@ import org.apache.directory.server.core.
 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.server.core.partition.hbase.it.AbstractHBasePartitionIT;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Before;
 import org.junit.Ignore;

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/JdbmRunner.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/JdbmRunner.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/JdbmRunner.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/JdbmRunner.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/JdbmRunner.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/JdbmRunner.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/JdbmRunner.java
Sun Mar 21 23:40:12 2010
@@ -17,7 +17,7 @@
  *   under the License.
  *
  */
-package org.apache.directory.server.core.partition.hbase;
+package org.apache.directory.server.core.partition.hbase.runner;
 
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 import static org.junit.Assert.assertFalse;

Copied: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/RemoteRunner.java
(from r925744, directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/RemoteRunner.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/RemoteRunner.java?p2=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/RemoteRunner.java&p1=directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/RemoteRunner.java&r1=925744&r2=925934&rev=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/it/mapreduce/RemoteRunner.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/runner/RemoteRunner.java
Sun Mar 21 23:40:12 2010
@@ -17,7 +17,7 @@
  *   under the License.
  *
  */
-package org.apache.directory.server.core.partition.hbase.it.mapreduce;
+package org.apache.directory.server.core.partition.hbase.runner;
 
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;

Modified: directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java
(original)
+++ directory/sandbox/seelmann/hbase-partition-test/src/test/java/org/apache/directory/server/core/partition/hbase/table/AbstractHBaseTableTest.java
Sun Mar 21 23:40:12 2010
@@ -24,14 +24,12 @@ import static org.junit.Assert.fail;
 import java.io.File;
 import java.util.UUID;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.partition.hbase.HBaseClusterTestCaseAdapter;
 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.exception.LdapException;
 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;
@@ -122,7 +120,7 @@ public abstract class AbstractHBaseTable
     }
 
 
-    protected DefaultServerEntry buildContextEntry() throws NamingException
+    protected DefaultServerEntry buildContextEntry() throws LdapException
     {
         DefaultServerEntry entry = new DefaultServerEntry( schemaManager, suffixDn );
         entry.add( "objectClass", "organization" );
@@ -135,7 +133,7 @@ public abstract class AbstractHBaseTable
     }
 
 
-    protected DefaultServerEntry buildOuSalesEntry() throws InvalidNameException, NamingException
+    protected DefaultServerEntry buildOuSalesEntry() throws LdapException
     {
         DN dn = new DN( "ou=Sales \\E6\\97\\A5\\E6\\9C\\AC,o=Good Times Co." );
         dn.normalize( schemaManager.getNormalizerMapping() );
@@ -150,7 +148,7 @@ public abstract class AbstractHBaseTable
     }
 
 
-    protected DefaultServerEntry buildCnJohnnyWalkerEntry() throws InvalidNameException,
NamingException
+    protected DefaultServerEntry buildCnJohnnyWalkerEntry() throws LdapException
     {
         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." );

Modified: directory/sandbox/seelmann/hbase-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/pom.xml?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/pom.xml (original)
+++ directory/sandbox/seelmann/hbase-partition/pom.xml Sun Mar 21 23:40:12 2010
@@ -56,6 +56,11 @@
       <artifactId>apacheds-xdbm-search</artifactId>
       <version>${pom.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>apacheds-core-annotations</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
 
     <!-- HBase dependencies -->
     <!-- 
@@ -125,6 +130,21 @@
 
   <build>
     <plugins>
+      <plugin>
+         <artifactId>maven-compiler-plugin</artifactId>
+         <configuration>
+           <source>1.6</source>
+           <target>1.6</target>
+         </configuration>
+      </plugin>
+      <plugin>
+         <artifactId>maven-eclipse-plugin</artifactId>
+         <configuration>
+           <classpathContainers>
+             <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</classpathContainer>
+           </classpathContainers>
+         </configuration>
+      </plugin>
       <!-- 
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedPartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedPartition.java?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedPartition.java
(original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseDistributedPartition.java
Sun Mar 21 23:40:12 2010
@@ -73,7 +73,7 @@ public class HBaseDistributedPartition e
     /**
      * {@inheritDoc}
      */
-    public void initialize() throws Exception
+    protected void doInit() throws Exception
     {
         Map<String, OidNormalizer> oidsMap = schemaManager.getAttributeTypeRegistry().getNormalizerMapping();
         this.suffix.normalize( oidsMap );

Modified: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartition.java?rev=925934&r1=925933&r2=925934&view=diff
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartition.java
(original)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartition.java
Sun Mar 21 23:40:12 2010
@@ -49,13 +49,13 @@ public class HBaseEmbeddedPartition exte
     /**
      * {@inheritDoc}
      */
-    public void initialize() throws Exception
+    protected void doInit() throws Exception
     {
         // setting the working directory triggers the store to 
         // start up an embedded HBase server.
         store.setWorkingDirectory( getPartitionDir() );
 
-        super.initialize();
+        super.doInit();
     }
 
 }

Added: directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartitionFactory.java?rev=925934&view=auto
==============================================================================
--- directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartitionFactory.java
(added)
+++ directory/sandbox/seelmann/hbase-partition/src/main/java/org/apache/directory/server/core/partition/hbase/HBaseEmbeddedPartitionFactory.java
Sun Mar 21 23:40:12 2010
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+package org.apache.directory.server.core.partition.hbase;
+
+
+import java.io.File;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.factory.PartitionFactory;
+import org.apache.directory.server.core.partition.Partition;
+import org.apache.directory.server.core.partition.hbase.index.HBaseUserRowIndex;
+import org.apache.directory.server.xdbm.Index;
+
+
+/**
+ * A factory used to generate {@link HBaseEmbeddedPartition}s.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class HBaseEmbeddedPartitionFactory implements PartitionFactory
+{
+
+    public HBaseEmbeddedPartition createPartition( String id, String suffix, int cacheSize,
File workingDirectory )
+        throws Exception
+    {
+        HBaseEmbeddedPartition partition = new HBaseEmbeddedPartition();
+        partition.setId( id );
+        partition.setSuffix( suffix );
+        partition.setCacheSize( 500 );
+        partition.setPartitionDir( workingDirectory );
+        return partition;
+    }
+
+
+    public void addIndex( Partition partition, String attrbuteId, int cacheSize ) throws
Exception
+    {
+        if ( !( partition instanceof HBaseEmbeddedPartition ) )
+        {
+            throw new IllegalArgumentException( "Partition must be a HBaseEmbeddedPartition"
);
+        }
+
+        HBaseEmbeddedPartition hbasePartition = ( HBaseEmbeddedPartition ) partition;
+        Set<Index<? extends Object, ServerEntry, UUID>> indexedAttributes = hbasePartition.getIndexedAttributes();
+
+        HBaseUserRowIndex index = new HBaseUserRowIndex( attrbuteId );
+        // HBaseUserColumnIndex index = new HBaseUserColumnIndex( attrbuteId );
+        index.setCacheSize( cacheSize );
+
+        indexedAttributes.add( index );
+        hbasePartition.setIndexedAttributes( indexedAttributes );
+    }
+
+}

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=925934&r1=925933&r2=925934&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
Sun Mar 21 23:40:12 2010
@@ -30,8 +30,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.DefaultServerAttribute;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -46,6 +44,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.partition.hbase.index.HBaseUserIndex;
 import org.apache.directory.server.core.partition.hbase.table.HBaseIndexTable;
 import org.apache.directory.server.core.partition.hbase.table.HBaseMasterTable;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.IndexNotFoundException;
@@ -54,6 +53,7 @@ import org.apache.directory.shared.ldap.
 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.exception.LdapException;
 import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
@@ -436,7 +436,7 @@ public class HBaseStore implements Store
         {
             return schemaManager.getAttributeTypeRegistry().getOidByName( oid );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             throw new IndexNotFoundException( "Failed to identify OID for: " + oid, oid,
e );
         }
@@ -560,7 +560,7 @@ public class HBaseStore implements Store
                     break;
 
                 default:
-                    throw new NamingException( "Unidentified modification operation" );
+                    throw new LdapException( I18n.err( I18n.ERR_221 ) );
             }
         }
 
@@ -770,7 +770,6 @@ public class HBaseStore implements Store
 
     public void setTablePrefix( String tablePrefix )
     {
-        System.out.println("tablePrefix="+tablePrefix);
         this.tablePrefix = tablePrefix;
     }
 

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=925934&r1=925933&r2=925934&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
Sun Mar 21 23:40:12 2010
@@ -25,8 +25,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -34,6 +32,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.partition.hbase.table.HBaseMasterTable;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.csn.CsnFactory;
+import org.apache.directory.shared.ldap.ldif.LdapLdifException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.name.DN;
@@ -147,7 +146,7 @@ public class LdifImporter extends Mapper
                 }
             }
         }
-        catch ( NamingException e )
+        catch ( LdapLdifException e )
         {
             System.err.println( "Error parsing LDIF: " );
             System.err.println( ">>>" + record + "<<<" );

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=925934&r1=925933&r2=925934&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
Sun Mar 21 23:40:12 2010
@@ -26,8 +26,6 @@ import java.util.Map;
 import java.util.NavigableMap;
 import java.util.UUID;
 
-import javax.naming.directory.InvalidAttributeValueException;
-
 import org.apache.directory.server.core.entry.DefaultServerAttribute;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
@@ -40,6 +38,7 @@ import org.apache.directory.server.core.
 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.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -738,7 +737,7 @@ public class HBaseMasterTable
     }
 
 
-    private UUID getId( ServerEntry entry ) throws InvalidAttributeValueException
+    private UUID getId( ServerEntry entry ) throws LdapInvalidAttributeValueException
     {
         String name = entry.get( SchemaConstants.ENTRY_UUID_AT ).getString();
         UUID uuid = UUID.fromString( name );



Mime
View raw message