本文整理了Java中org.apache.hadoop.mapred.RecordReader.getPos
方法的一些代码示例,展示了RecordReader.getPos
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RecordReader.getPos
方法的具体详情如下:
包路径:org.apache.hadoop.mapred.RecordReader
类名称:RecordReader
方法名:getPos
[英]Returns the current position in the input.
[中]返回输入中的当前位置。
代码示例来源:origin: prestodb/presto
@Override
public long getPos()
throws IOException
{
return delegate.getPos();
}
代码示例来源:origin: apache/hive
public long getPos() throws IOException {
if (recordReader != null) {
return recordReader.getPos();
} else {
return 0;
}
}
代码示例来源:origin: apache/hive
private long getSyncedPosition() throws IOException {
return recordReader.getPos();
}
/**
代码示例来源:origin: apache/hive
@Override
public long getPos() throws IOException {
return recordReader.getPos();
}
代码示例来源:origin: apache/hive
@Override
public long getPos() throws IOException {
return rr.getPos();
}
代码示例来源:origin: apache/hive
public long getPos() throws IOException {
return recordReader.getPos();
}
代码示例来源:origin: apache/drill
public long getPos() throws IOException {
if (recordReader != null) {
return recordReader.getPos();
} else {
return 0;
}
}
代码示例来源:origin: apache/drill
@Override
public long getPos() throws IOException {
return recordReader.getPos();
}
代码示例来源:origin: apache/drill
private long getSyncedPosition() throws IOException {
return recordReader.getPos();
}
/**
代码示例来源:origin: apache/drill
public long getPos() throws IOException {
return recordReader.getPos();
}
代码示例来源:origin: apache/drill
@Override
public String toString() {
long position = -1;
try {
if (reader != null) {
position = reader.getPos();
}
} catch (IOException e) {
logger.trace("Unable to obtain reader position.", e);
}
return getClass().getSimpleName() + "[Database=" + table.getDbName()
+ ", Table=" + table.getTableName()
+ ", Position=" + position
+ "]";
}
}
代码示例来源:origin: apache/hive
@Override
public float getProgress() throws IOException {
// The calculation is strongly dependent on the assumption that all splits
// came from the same file
return Math.min(1.0f, ((recordReader == null || this.getIOContext().isBinarySearching()) ?
progress : recordReader.getPos()) / (float) (split.getLength()));
}
代码示例来源:origin: apache/drill
@Override
public float getProgress() throws IOException {
// The calculation is strongly dependent on the assumption that all splits
// came from the same file
return Math.min(1.0f, ((recordReader == null || this.getIOContext().isBinarySearching()) ?
progress : recordReader.getPos()) / (float) (split.getLength()));
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Request position from proxied RR.
*/
public long getPos() throws IOException {
return rr.getPos();
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Request position from proxied RR.
*/
public long getPos() throws IOException {
return rr.getPos();
}
代码示例来源:origin: prestosql/presto
@Override
public long getPos()
throws IOException
{
return delegate.getPos();
}
代码示例来源:origin: cwensel/cascading
@Override
public long getPos() throws IOException
{
return recordReader.getPos();
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Request position from proxied RR.
*/
public long getPos() throws IOException {
return rr.getPos();
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core
/**
* test DBInputFormat class. Class should split result for chunks
* @throws Exception
*/
@Test(timeout = 10000)
public void testDBInputFormat() throws Exception {
JobConf configuration = new JobConf();
setupDriver(configuration);
DBInputFormat<NullDBWritable> format = new DBInputFormat<NullDBWritable>();
format.setConf(configuration);
format.setConf(configuration);
DBInputFormat.DBInputSplit splitter = new DBInputFormat.DBInputSplit(1, 10);
Reporter reporter = mock(Reporter.class);
RecordReader<LongWritable, NullDBWritable> reader = format.getRecordReader(
splitter, configuration, reporter);
configuration.setInt(MRJobConfig.NUM_MAPS, 3);
InputSplit[] lSplits = format.getSplits(configuration, 3);
assertEquals(5, lSplits[0].getLength());
assertEquals(3, lSplits.length);
// test reader .Some simple tests
assertEquals(LongWritable.class, reader.createKey().getClass());
assertEquals(0, reader.getPos());
assertEquals(0, reader.getProgress(), 0.001);
reader.close();
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
@Override
public float getProgress() throws IOException {
// The calculation is strongly dependent on the assumption that all splits
// came from the same file
return Math.min(1.0f, ((recordReader == null || this.getIOContext().isBinarySearching()) ?
progress : recordReader.getPos()) / (float) (split.getLength()));
}
内容来源于网络,如有侵权,请联系作者删除!