public class DBRecord extends Object implements org.apache.hadoop.io.Writable, org.apache.hadoop.mapreduce.lib.db.DBWritable
DBInputFormat,
DBOutputFormat,
DBWritable| Constructor and Description |
|---|
DBRecord()
Used in map-reduce.
|
DBRecord(co.cask.cdap.api.data.format.StructuredRecord record,
int[] columnTypes)
Used to construct a DBRecord from a StructuredRecord in the ETL Pipeline
|
| Modifier and Type | Method and Description |
|---|---|
co.cask.cdap.api.data.format.StructuredRecord |
getRecord() |
void |
readFields(DataInput in) |
void |
readFields(ResultSet resultSet)
|
void |
write(DataOutput out) |
void |
write(PreparedStatement stmt)
Writes the
record to the specified PreparedStatement |
public DBRecord(co.cask.cdap.api.data.format.StructuredRecord record,
int[] columnTypes)
record - the StructuredRecord to construct the DBRecord frompublic DBRecord()
public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic co.cask.cdap.api.data.format.StructuredRecord getRecord()
StructuredRecord contained in this objectpublic void readFields(ResultSet resultSet) throws SQLException
readFields in interface org.apache.hadoop.mapreduce.lib.db.DBWritableresultSet - the ResultSet to build the StructuredRecord fromSQLExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(PreparedStatement stmt) throws SQLException
record to the specified PreparedStatementwrite in interface org.apache.hadoop.mapreduce.lib.db.DBWritablestmt - the PreparedStatement to write the StructuredRecord toSQLExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.