gpt4 book ai didi

org.apache.hadoop.mapred.join.WrappedRecordReader类的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 01:31:05 25 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.mapred.join.WrappedRecordReader类的一些代码示例,展示了WrappedRecordReader类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WrappedRecordReader类的具体详情如下:
包路径:org.apache.hadoop.mapred.join.WrappedRecordReader
类名称:WrappedRecordReader

WrappedRecordReader介绍

[英]Proxy class for a RecordReader participating in the join framework. This class keeps track of the "head" key-value pair for the provided RecordReader and keeps a store of values matching a key when this source is participating in a join.
[中]参与联接框架的RecordReader的代理类。此类跟踪提供的RecordReader的“head”键值对,并在该源参与联接时保存与键匹配的值的存储。

代码示例

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

/**
 * Return true iff compareTo(other) retn true.
 */
@SuppressWarnings("unchecked") // Explicit type check prior to cast
public boolean equals(Object other) {
 return other instanceof ComposableRecordReader
   && 0 == compareTo((ComposableRecordReader)other);
}

代码示例来源: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: io.hops/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: io.hops/hadoop-mapreduce-client-core

/**
 * Read the next k,v pair into the head of this object; return true iff
 * the RR and this are exhausted.
 */
protected boolean next() throws IOException {
 empty = !rr.next(khead, vhead);
 return hasNext();
}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

/**
 * Implement Comparable contract (compare key at head of proxied RR
 * with that of another).
 */
public int compareTo(ComposableRecordReader<K,?> other) {
 return cmp.compare(key(), other.key());
}

代码示例来源: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: io.prestosql.hadoop/hadoop-apache

/**
 * Read the next k,v pair into the head of this object; return true iff
 * the RR and this are exhausted.
 */
protected boolean next() throws IOException {
 empty = !rr.next(khead, vhead);
 return hasNext();
}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

/**
 * Implement Comparable contract (compare key at head of proxied RR
 * with that of another).
 */
public int compareTo(ComposableRecordReader<K,?> other) {
 return cmp.compare(key(), other.key());
}

代码示例来源: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: io.prestosql.hadoop/hadoop-apache

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: com.github.jiayuhan-it/hadoop-mapreduce-client-core

/**
 * Read the next k,v pair into the head of this object; return true iff
 * the RR and this are exhausted.
 */
protected boolean next() throws IOException {
 empty = !rr.next(khead, vhead);
 return hasNext();
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

/**
 * Return true iff compareTo(other) retn true.
 */
@SuppressWarnings("unchecked") // Explicit type check prior to cast
public boolean equals(Object other) {
 return other instanceof ComposableRecordReader
   && 0 == compareTo((ComposableRecordReader)other);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * Implement Comparable contract (compare key at head of proxied RR
 * with that of another).
 */
public int compareTo(ComposableRecordReader<K,?> other) {
 return cmp.compare(key(), other.key());
}

代码示例来源: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: ch.cern.hadoop/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

/**
 * Read the next k,v pair into the head of this object; return true iff
 * the RR and this are exhausted.
 */
protected boolean next() throws IOException {
 empty = !rr.next(khead, vhead);
 return hasNext();
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

/**
 * Return true iff compareTo(other) retn true.
 */
@SuppressWarnings("unchecked") // Explicit type check prior to cast
public boolean equals(Object other) {
 return other instanceof ComposableRecordReader
   && 0 == compareTo((ComposableRecordReader)other);
}

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

/**
 * Implement Comparable contract (compare key at head of proxied RR
 * with that of another).
 */
public int compareTo(ComposableRecordReader<K,?> other) {
 return cmp.compare(key(), other.key());
}

代码示例来源: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: com.facebook.hadoop/hadoop-core

/**
 * For a given RecordReader rr, occupy position id in collector.
 */
WrappedRecordReader(int id, RecordReader<K,U> rr,
  Class<? extends WritableComparator> cmpcl) throws IOException {
 this.id = id;
 this.rr = rr;
 khead = rr.createKey();
 vhead = rr.createValue();
 try {
  cmp = (null == cmpcl)
   ? WritableComparator.get(khead.getClass())
   : 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();
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com