@InterfaceAudience.Public @InterfaceStability.Evolving public class DBRecordReader<T extends DBWritable> extends RecordReader<LongWritable,T>
修飾子とタイプ | フィールドと説明 |
---|---|
protected PreparedStatement |
statement |
コンストラクタと説明 |
---|
DBRecordReader(org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit split,
Class<T> inputClass,
Configuration conf,
Connection conn,
DBConfiguration dbConfig,
String cond,
String[] fields,
String table) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
close()
Close the record reader.
|
T |
createValue()
非推奨です。
|
protected ResultSet |
executeQuery(String query) |
protected String |
getConditions() |
protected Connection |
getConnection() |
LongWritable |
getCurrentKey()
Get the current key
|
T |
getCurrentValue()
Get the current value.
|
protected DBConfiguration |
getDBConf() |
protected String[] |
getFieldNames() |
long |
getPos()
非推奨です。
|
float |
getProgress()
The current progress of the record reader through its data.
|
protected String |
getSelectQuery()
Returns the query for selecting the records,
subclasses can override this for custom behaviour.
|
protected org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit |
getSplit() |
protected PreparedStatement |
getStatement() |
protected String |
getTableName() |
void |
initialize(InputSplit split,
TaskAttemptContext context)
Called once at initialization.
|
boolean |
next(LongWritable key,
T value)
非推奨です。
Use
nextKeyValue() |
boolean |
nextKeyValue()
Read the next key, value pair.
|
protected void |
setStatement(PreparedStatement stmt) |
protected PreparedStatement statement
public DBRecordReader(org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit split, Class<T> inputClass, Configuration conf, Connection conn, DBConfiguration dbConfig, String cond, String[] fields, String table) throws SQLException
split
- The InputSplit to read data forSQLException
protected ResultSet executeQuery(String query) throws SQLException
SQLException
protected String getSelectQuery()
public void close() throws IOException
close
インタフェース内 Closeable
close
インタフェース内 AutoCloseable
close
クラス内 RecordReader<LongWritable,T extends DBWritable>
IOException
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
RecordReader
initialize
クラス内 RecordReader<LongWritable,T extends DBWritable>
split
- the split that defines the range of records to readcontext
- the information about the taskIOException
InterruptedException
public LongWritable getCurrentKey()
getCurrentKey
クラス内 RecordReader<LongWritable,T extends DBWritable>
public T getCurrentValue()
getCurrentValue
クラス内 RecordReader<LongWritable,T extends DBWritable>
@Deprecated public T createValue()
@Deprecated public long getPos() throws IOException
IOException
@Deprecated public boolean next(LongWritable key, T value) throws IOException
nextKeyValue()
IOException
public float getProgress() throws IOException
getProgress
クラス内 RecordReader<LongWritable,T extends DBWritable>
IOException
public boolean nextKeyValue() throws IOException
nextKeyValue
クラス内 RecordReader<LongWritable,T extends DBWritable>
IOException
protected org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit getSplit()
protected String[] getFieldNames()
protected String getTableName()
protected String getConditions()
protected DBConfiguration getDBConf()
protected Connection getConnection()
protected PreparedStatement getStatement()
protected void setStatement(PreparedStatement stmt)
Copyright © 2016 Apache Software Foundation. All rights reserved.