本文整理了Java中org.apache.hadoop.mapred.join.WrappedRecordReader.next()
方法的一些代码示例,展示了WrappedRecordReader.next()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WrappedRecordReader.next()
方法的具体详情如下:
包路径:org.apache.hadoop.mapred.join.WrappedRecordReader
类名称:WrappedRecordReader
方法名:next
[英]Read the next k,v pair into the head of this object; return true iff the RR and this are exhausted.
[中]将下一个k,v对读入这个物体的头部;当RR和该参数耗尽时返回true。
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Skip key-value pairs with keys less than or equal to the key provided.
*/
public void skip(K key) throws IOException {
if (hasNext()) {
while (cmp.compare(khead, key) <= 0 && next());
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
WrappedRecordReader(int id, RecordReader<K,U> rr,
Class<? extends WritableComparator> cmpcl,
Configuration conf) throws IOException {
this.id = id;
this.rr = rr;
this.conf = (conf == null) ? new Configuration() : conf;
khead = rr.createKey();
vhead = rr.createValue();
try {
cmp = (null == cmpcl)
? WritableComparator.get(khead.getClass(), this.conf)
: cmpcl.newInstance();
} catch (InstantiationException e) {
throw (IOException)new IOException().initCause(e);
} catch (IllegalAccessException e) {
throw (IOException)new IOException().initCause(e);
}
vjoin = new StreamBackedIterator<U>();
next();
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Write key-value pair at the head of this stream to the objects provided;
* get next key-value pair from proxied RR.
*/
public boolean next(K key, U value) throws IOException {
if (hasNext()) {
WritableUtils.cloneInto(key, khead);
WritableUtils.cloneInto(value, vhead);
next();
return true;
}
return false;
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* Add an iterator to the collector at the position occupied by this
* RecordReader over the values in this stream paired with the key
* provided (ie register a stream of values from this source matching K
* with a collector).
*/
// JoinCollector comes from parent, which has
@SuppressWarnings("unchecked") // no static type for the slot this sits in
public void accept(CompositeRecordReader.JoinCollector i, K key)
throws IOException {
vjoin.clear();
if (0 == cmp.compare(key, khead)) {
do {
vjoin.add(vhead);
} while (next() && 0 == cmp.compare(key, khead));
}
i.add(id, vjoin);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Add an iterator to the collector at the position occupied by this
* RecordReader over the values in this stream paired with the key
* provided (ie register a stream of values from this source matching K
* with a collector).
*/
// JoinCollector comes from parent, which has
@SuppressWarnings("unchecked") // no static type for the slot this sits in
public void accept(CompositeRecordReader.JoinCollector i, K key)
throws IOException {
vjoin.clear();
if (0 == cmp.compare(key, khead)) {
do {
vjoin.add(vhead);
} while (next() && 0 == cmp.compare(key, khead));
}
i.add(id, vjoin);
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Add an iterator to the collector at the position occupied by this
* RecordReader over the values in this stream paired with the key
* provided (ie register a stream of values from this source matching K
* with a collector).
*/
// JoinCollector comes from parent, which has
@SuppressWarnings("unchecked") // no static type for the slot this sits in
public void accept(CompositeRecordReader.JoinCollector i, K key)
throws IOException {
vjoin.clear();
if (0 == cmp.compare(key, khead)) {
do {
vjoin.add(vhead);
} while (next() && 0 == cmp.compare(key, khead));
}
i.add(id, vjoin);
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Add an iterator to the collector at the position occupied by this
* RecordReader over the values in this stream paired with the key
* provided (ie register a stream of values from this source matching K
* with a collector).
*/
// JoinCollector comes from parent, which has
@SuppressWarnings("unchecked") // no static type for the slot this sits in
public void accept(CompositeRecordReader.JoinCollector i, K key)
throws IOException {
vjoin.clear();
if (0 == cmp.compare(key, khead)) {
do {
vjoin.add(vhead);
} while (next() && 0 == cmp.compare(key, khead));
}
i.add(id, vjoin);
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Add an iterator to the collector at the position occupied by this
* RecordReader over the values in this stream paired with the key
* provided (ie register a stream of values from this source matching K
* with a collector).
*/
// JoinCollector comes from parent, which has
@SuppressWarnings("unchecked") // no static type for the slot this sits in
public void accept(CompositeRecordReader.JoinCollector i, K key)
throws IOException {
vjoin.clear();
if (0 == cmp.compare(key, khead)) {
do {
vjoin.add(vhead);
} while (next() && 0 == cmp.compare(key, khead));
}
i.add(id, vjoin);
}
内容来源于网络,如有侵权,请联系作者删除!