Author: bleny Date: 2010-08-04 12:27:48 +0200 (Wed, 04 Aug 2010) New Revision: 222 Url: http://nuiton.org/repositories/revision/wikitty/222 Log: making wikitty-hbase-impl module buildable ; fix tests Modified: trunk/wikitty-hbase-impl/pom.xml trunk/wikitty-hbase-impl/src/main/java/org/nuiton/wikitty/hbase/WikittyStorageHBase.java trunk/wikitty-hbase-impl/src/test/java/org/nuiton/wikitty/hbase/test/HBaseConnectorTest.java Modified: trunk/wikitty-hbase-impl/pom.xml =================================================================== --- trunk/wikitty-hbase-impl/pom.xml 2010-08-04 10:26:33 UTC (rev 221) +++ trunk/wikitty-hbase-impl/pom.xml 2010-08-04 10:27:48 UTC (rev 222) @@ -1,170 +1,183 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.nuiton</groupId> - <artifactId>wikitty</artifactId> - <version>2.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.nuiton</groupId> + <artifactId>wikitty</artifactId> + <version>2.1-SNAPSHOT</version> + </parent> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-hbase-impl</artifactId> + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + <groupId>org.nuiton.wikitty</groupId> + <artifactId>wikitty-hbase-impl</artifactId> - <dependencies> - <!-- TEST --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - <scope>test</scope> - </dependency> + <dependencies> + <!-- TEST --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> - <!-- COMPILE --> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-solr-impl</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> + <!-- COMPILE --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-solr-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> - <dependency> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jetty</artifactId> - <version>${jetty.version}</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> - <dependency> - <groupId>xpp3</groupId> - <artifactId>xpp3</artifactId> - <version>1.1.4c</version> - </dependency> + <dependency> + <groupId>xpp3</groupId> + <artifactId>xpp3</artifactId> + <version>1.1.4c</version> + </dependency> - <!-- HBASE --> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>org.apache.hadoop.zookeeper</groupId> - <artifactId>zookeeper</artifactId> - <version>r785019-hbase-1329</version> - <!--version>3.3.0</version--> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.hadoop</groupId> - <artifactId>hadoop</artifactId> - <version>0.20.0-plus4681-core</version> - <!--version>0.20.2</version --> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.hadoop</groupId> - <artifactId>hbase</artifactId> - <version>0.20.0</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.hadoop</groupId> - <artifactId>hbase-test</artifactId> - <version>0.20.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hadoop</groupId> - <artifactId>hadoop-test</artifactId> - <version>0.20.0</version> - <!--version>0.20.2</version--> - <scope>test</scope> - </dependency> - <dependency> - <groupId>commons-cli</groupId> - <artifactId>commons-cli</artifactId> - <version>1.1</version> - <scope>test</scope> - </dependency> - </dependencies> + <!-- HBASE --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> + <!-- + Those dependencies was available on ShareAndGo repository and are + not available from central + --> + <!-- + <dependency> <groupId>org.apache.hadoop.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + <version>r785019-hbase-1329</version> <!- + -<version>3.3.0</version> - -> <scope>compile</scope> + </dependency> <dependency> <groupId>org.hadoop</groupId> + <artifactId>hadoop</artifactId> + <version>0.20.0-plus4681-core</version> <!- + -<version>0.20.2</version> - -> <scope>compile</scope> + </dependency> <dependency> <groupId>org.hadoop</groupId> + <artifactId>hbase</artifactId> <version>0.20.0</version> + <scope>compile</scope> </dependency> <dependency> + <groupId>org.hadoop</groupId> <artifactId>hbase-test</artifactId> + <version>0.20.0</version> <scope>test</scope> </dependency> + <dependency> <groupId>org.hadoop</groupId> + <artifactId>hadoop-test</artifactId> <version>0.20.0</version> <!- + -<version>0.20.2</version>- -> <scope>test</scope> </dependency> + --> - <name>Wikitty :: wikitty-hbase-impl</name> - <description>hbase impl of wikitty</description> - <inceptionYear>2009</inceptionYear> + <!-- using dependencies provided by Apache Snapshot repository --> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase</artifactId> + <version>0.89.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase</artifactId> + <version>0.89.0-SNAPSHOT</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <dependency> + <!-- needed at runtime for tests --> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-test</artifactId> + <version>0.20.3-SNAPSHOT</version> + <scope>test</scope> + </dependency> - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.1</version> + <scope>test</scope> + </dependency> + </dependencies> - <packaging>jar</packaging> + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> - <properties> - <!-- Test don't run in hudson due to port restriction --> - <maven.test.skip>true</maven.test.skip> - </properties> + <name>Wikitty :: wikitty-hbase-impl</name> - <!-- ************************************************************* --> - <!-- *** Build Environment ************************************** --> - <!-- ************************************************************* --> + <description>hbase impl of wikitty</description> + <inceptionYear>2009</inceptionYear> - <build> - <plugins> - <!-- Create a jar that includes all tests --> - <plugin> - <artifactId>maven-jar-plugin</artifactId> - <executions> - <execution> - <id>attach-test</id> - <goals> - <goal>test-jar</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + <packaging>jar</packaging> + + <properties> + <!-- Test don't run in hudson due to port restriction --> + <maven.test.skip>false</maven.test.skip> + </properties> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + + <build> + <plugins> + <!-- Create a jar that includes all tests --> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <id>attach-test</id> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </project> Modified: trunk/wikitty-hbase-impl/src/main/java/org/nuiton/wikitty/hbase/WikittyStorageHBase.java =================================================================== --- trunk/wikitty-hbase-impl/src/main/java/org/nuiton/wikitty/hbase/WikittyStorageHBase.java 2010-08-04 10:26:33 UTC (rev 221) +++ trunk/wikitty-hbase-impl/src/main/java/org/nuiton/wikitty/hbase/WikittyStorageHBase.java 2010-08-04 10:27:48 UTC (rev 222) @@ -44,6 +44,7 @@ import org.nuiton.wikitty.WikittyException; import org.nuiton.wikitty.WikittyExtension; import org.nuiton.wikitty.WikittyExtensionStorage; +import org.nuiton.wikitty.WikittyImpl; import org.nuiton.wikitty.WikittyStorage; import org.nuiton.wikitty.WikittyTransaction; import org.nuiton.wikitty.WikittyUtil; Modified: trunk/wikitty-hbase-impl/src/test/java/org/nuiton/wikitty/hbase/test/HBaseConnectorTest.java =================================================================== --- trunk/wikitty-hbase-impl/src/test/java/org/nuiton/wikitty/hbase/test/HBaseConnectorTest.java 2010-08-04 10:26:33 UTC (rev 221) +++ trunk/wikitty-hbase-impl/src/test/java/org/nuiton/wikitty/hbase/test/HBaseConnectorTest.java 2010-08-04 10:27:48 UTC (rev 222) @@ -99,7 +99,7 @@ for (int j = 0; j < 10; j++) { Put put = new Put(rowId); - put.setTimeStamp(getTime()); + // put.setTimeStamp(getTime()); put.add(Bytes.toBytes("data"), Bytes.toBytes("1:" + j), Bytes.toBytes(j)); hTable.put(put); } @@ -119,7 +119,7 @@ for (int j = 0; j < 10; j++) { Put put = new Put(rowId); - put.setTimeStamp(getTime()); + // put.setTimeStamp(getTime()); put.add(Bytes.toBytes("data"), Bytes.toBytes("2:" + j), Bytes.toBytes(j)); hTable.put(put); }