merge -r 1310042:1310043 from trunk. FIXES: MAPREDUCE-3621

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1310045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Graves 2012-04-05 20:13:11 +00:00
parent 53c866784b
commit 0d388cd1f4
9 changed files with 24 additions and 21 deletions

View File

@ -158,6 +158,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 java.io.IOException;
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.db.*;
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
@ -49,7 +49,7 @@ public class TestDataDrivenDBInputFormat extends HadoopTestCase {
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 class TestDataDrivenDBInputFormat extends HadoopTestCase {
} }
// 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

@ -93,6 +93,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.mapreduce.lib.reduce.LongSumReducer;
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

@ -69,10 +69,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>