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:
parent
f843f590f1
commit
98df316058
|
@ -257,6 +257,10 @@ Release 0.23.3 - UNRELEASED
|
|||
directory (John George 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
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -88,6 +88,12 @@
|
|||
<scope>test</scope>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.io.IOException;
|
|||
|
||||
import org.apache.commons.logging.Log;
|
||||
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.conf.Configuration;
|
||||
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.output.*;
|
||||
import org.apache.hadoop.util.StringUtils;
|
||||
import org.hsqldb.Server;
|
||||
import org.hsqldb.server.Server;
|
||||
|
||||
/**
|
||||
* Test aspects of DataDrivenDBInputFormat
|
||||
|
@ -47,9 +47,9 @@ public class TestDataDrivenDBInputFormat extends HadoopTestCase {
|
|||
TestDataDrivenDBInputFormat.class);
|
||||
|
||||
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;
|
||||
private static final String DRIVER_CLASS = "org.hsqldb.jdbcDriver";
|
||||
private static final String DRIVER_CLASS = "org.hsqldb.jdbc.JDBCDriver";
|
||||
|
||||
private Server server;
|
||||
private Connection connection;
|
||||
|
@ -181,7 +181,7 @@ public class TestDataDrivenDBInputFormat extends HadoopTestCase {
|
|||
}
|
||||
|
||||
// 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-02')");
|
||||
s.executeUpdate("INSERT INTO " + DATE_TABLE + " VALUES('2010-05-01')");
|
|
@ -86,10 +86,6 @@
|
|||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1-jetty</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -92,6 +92,11 @@
|
|||
<artifactId>hadoop-mapreduce-client-hs</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
|
|||
import org.apache.hadoop.util.StringUtils;
|
||||
import org.apache.hadoop.util.Tool;
|
||||
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
|
||||
|
@ -78,7 +78,7 @@ public class DBCountPageView extends Configured implements Tool {
|
|||
|
||||
private static final String DB_URL =
|
||||
"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;
|
||||
|
||||
|
|
|
@ -30,10 +30,10 @@ public class TestDBJob extends HadoopTestCase {
|
|||
public TestDBJob() throws IOException {
|
||||
super(LOCAL_MR, LOCAL_FS, 3, 1);
|
||||
}
|
||||
|
||||
|
||||
public void testRun() throws Exception {
|
||||
DBCountPageView testDriver = new DBCountPageView();
|
||||
ToolRunner.run(createJobConf(), testDriver, new String[0]);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -55,10 +55,6 @@
|
|||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1-jetty</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -100,10 +100,6 @@
|
|||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1-jetty</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
|
Loading…
Reference in New Issue