5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 06:22:46 +08:00

SQOOP-840: Inconsistent java generics declaration for exportwriter classes

(Venkat Ranganathan via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2013-01-23 09:45:09 -08:00
parent 20af67ef60
commit 9de589e83c
5 changed files with 14 additions and 10 deletions

View File

@ -30,7 +30,7 @@ public class ExportOutputFormat<K extends SqoopRecord, V>
extends org.apache.sqoop.mapreduce.ExportOutputFormat<K, V> {
/** {@inheritDoc}. **/
public class ExportRecordWriter extends
public class ExportRecordWriter<K extends SqoopRecord, V> extends
org.apache.sqoop.mapreduce.ExportOutputFormat<K, V>.ExportRecordWriter {
public ExportRecordWriter(TaskAttemptContext context)

View File

@ -45,7 +45,7 @@ public class ExportBatchOutputFormat<K extends SqoopRecord, V>
public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
throws IOException {
try {
return new ExportBatchRecordWriter(context);
return new ExportBatchRecordWriter<K, V>(context);
} catch (Exception e) {
throw new IOException(e);
}
@ -55,7 +55,8 @@ public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
* RecordWriter to write the output to a row in a database table.
* The actual database updates are executed in a second thread.
*/
public class ExportBatchRecordWriter extends ExportRecordWriter {
public class ExportBatchRecordWriter<K extends SqoopRecord, V>
extends ExportRecordWriter<K, V> {
public ExportBatchRecordWriter(TaskAttemptContext context)
throws ClassNotFoundException, SQLException {

View File

@ -36,7 +36,7 @@ public class OracleExportOutputFormat<K extends SqoopRecord, V>
public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
throws IOException {
try {
return new OracleExportRecordWriter(context);
return new OracleExportRecordWriter<K, V>(context);
} catch (Exception e) {
throw new IOException(e);
}
@ -46,7 +46,8 @@ public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
* RecordWriter to write the output to a row in a database table.
* The actual database updates are executed in a second thread.
*/
public class OracleExportRecordWriter extends ExportRecordWriter {
public class OracleExportRecordWriter<K extends SqoopRecord, V>
extends ExportRecordWriter<K, V> {
public OracleExportRecordWriter(TaskAttemptContext context)
throws ClassNotFoundException, SQLException {

View File

@ -36,7 +36,7 @@ public class SQLServerExportOutputFormat<K extends SqoopRecord, V>
public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
throws IOException {
try {
return new SQLServerExportRecordWriter(context);
return new SQLServerExportRecordWriter<K, V>(context);
} catch (Exception e) {
throw new IOException(e);
}
@ -46,7 +46,8 @@ public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
* RecordWriter to write the output to a row in a database table.
* The actual database updates are executed in a second thread.
*/
public class SQLServerExportRecordWriter extends ExportRecordWriter {
public class SQLServerExportRecordWriter<K extends SqoopRecord, V>
extends ExportRecordWriter<K, V> {
public SQLServerExportRecordWriter(TaskAttemptContext context)
throws ClassNotFoundException, SQLException {

View File

@ -32,7 +32,7 @@
* Output format specific for Microsoft SQL Connector.
*/
public class SqlServerExportBatchOutputFormat<K extends SqoopRecord, V>
extends ExportBatchOutputFormat {
extends ExportBatchOutputFormat<K, V> {
private static final Log LOG =
LogFactory.getLog(SqlServerExportBatchOutputFormat.class);
@ -42,14 +42,15 @@ public class SqlServerExportBatchOutputFormat<K extends SqoopRecord, V>
public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
throws IOException {
try {
return new SqlServerExportBatchRecordWriter(context);
return new SqlServerExportBatchRecordWriter<K, V>(context);
} catch (Exception e) {
throw new IOException(e);
}
}
/** {@inheritDoc}. */
public class SqlServerExportBatchRecordWriter extends ExportBatchRecordWriter{
public class SqlServerExportBatchRecordWriter<K extends SqoopRecord, V>
extends ExportBatchRecordWriter<K, V>{
public SqlServerExportBatchRecordWriter(TaskAttemptContext context)
throws ClassNotFoundException, SQLException {