MAPREDUCE-3621. TestDBJob and TestDataDrivenDBInputFormat ant tests fail (Ravi Prakash via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1310043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Graves 2012-04-05 20:11:52 +00:00
parent f843f590f1
commit 98df316058
9 changed files with 24 additions and 21 deletions

View File

@ -257,6 +257,10 @@ Release 0.23.3 - UNRELEASED
directory (John George via bobby) directory (John George via bobby)
MAPREDUCE-3650. testGetTokensForHftpFS() fails (Ravi Prakash via bobby) MAPREDUCE-3650. testGetTokensForHftpFS() fails (Ravi Prakash via bobby)
MAPREDUCE-3621. TestDBJob and TestDataDrivenDBInputFormat ant tests fail
(Ravi Prakash via tgraves)
Release 0.23.2 - UNRELEASED Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -88,6 +88,12 @@
<scope>test</scope> <scope>test</scope>
<type>test-jar</type> <type>test-jar</type>
</dependency> </dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -25,7 +25,7 @@
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.examples.DBCountPageView; //import org.apache.hadoop.examples.DBCountPageView;
import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.*;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.NullWritable;
@ -36,7 +36,7 @@
import org.apache.hadoop.mapreduce.lib.input.*; import org.apache.hadoop.mapreduce.lib.input.*;
import org.apache.hadoop.mapreduce.lib.output.*; import org.apache.hadoop.mapreduce.lib.output.*;
import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.StringUtils;
import org.hsqldb.Server; import org.hsqldb.server.Server;
/** /**
* Test aspects of DataDrivenDBInputFormat * Test aspects of DataDrivenDBInputFormat
@ -47,9 +47,9 @@ public class TestDataDrivenDBInputFormat extends HadoopTestCase {
TestDataDrivenDBInputFormat.class); TestDataDrivenDBInputFormat.class);
private static final String DB_NAME = "dddbif"; private static final String DB_NAME = "dddbif";
private static final String DB_URL = private static final String DB_URL =
"jdbc:hsqldb:hsql://localhost/" + DB_NAME; "jdbc:hsqldb:hsql://localhost/" + DB_NAME;
private static final String DRIVER_CLASS = "org.hsqldb.jdbcDriver"; private static final String DRIVER_CLASS = "org.hsqldb.jdbc.JDBCDriver";
private Server server; private Server server;
private Connection connection; private Connection connection;
@ -181,7 +181,7 @@ public void testDateSplits() throws Exception {
} }
// Create the table. // Create the table.
s.executeUpdate("CREATE TABLE " + DATE_TABLE + "(" + COL + " TIMESTAMP)"); s.executeUpdate("CREATE TABLE " + DATE_TABLE + "(" + COL + " DATE)");
s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-04-01')"); s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-04-01')");
s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-04-02')"); s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-04-02')");
s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-05-01')"); s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-05-01')");

View File

@ -86,10 +86,6 @@
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1-jetty</artifactId> <artifactId>jsp-2.1-jetty</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>

View File

@ -92,6 +92,11 @@
<artifactId>hadoop-mapreduce-client-hs</artifactId> <artifactId>hadoop-mapreduce-client-hs</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -49,7 +49,7 @@
import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner; import org.apache.hadoop.util.ToolRunner;
import org.hsqldb.Server; import org.hsqldb.server.Server;
/** /**
* This is a demonstrative program, which uses DBInputFormat for reading * This is a demonstrative program, which uses DBInputFormat for reading
@ -78,7 +78,7 @@ public class DBCountPageView extends Configured implements Tool {
private static final String DB_URL = private static final String DB_URL =
"jdbc:hsqldb:hsql://localhost/URLAccess"; "jdbc:hsqldb:hsql://localhost/URLAccess";
private static final String DRIVER_CLASS = "org.hsqldb.jdbcDriver"; private static final String DRIVER_CLASS = "org.hsqldb.jdbc.JDBCDriver";
private Server server; private Server server;

View File

@ -30,10 +30,10 @@ public class TestDBJob extends HadoopTestCase {
public TestDBJob() throws IOException { public TestDBJob() throws IOException {
super(LOCAL_MR, LOCAL_FS, 3, 1); super(LOCAL_MR, LOCAL_FS, 3, 1);
} }
public void testRun() throws Exception { public void testRun() throws Exception {
DBCountPageView testDriver = new DBCountPageView(); DBCountPageView testDriver = new DBCountPageView();
ToolRunner.run(createJobConf(), testDriver, new String[0]); ToolRunner.run(createJobConf(), testDriver, new String[0]);
} }
} }

View File

@ -55,10 +55,6 @@
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1-jetty</artifactId> <artifactId>jsp-2.1-jetty</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>

View File

@ -100,10 +100,6 @@
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1-jetty</artifactId> <artifactId>jsp-2.1-jetty</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>