@Override public Tuple2<WritableComparable, Writable> call(Tuple2<WritableComparable, Writable> tuple) throws Exception { if (conf == null) { conf = new Configuration(); } return new Tuple2<WritableComparable, Writable>(tuple._1(), WritableUtils.clone(tuple._2(), conf)); }
public boolean next(X val) throws IOException { if (iter.hasNext()) { WritableUtils.cloneInto(val, iter.next()); if (null == hold) { hold = WritableUtils.clone(val, null); } else { WritableUtils.cloneInto(hold, val); } return true; } return false; }
@Override public Tuple2<WritableComparable, Writable> call(Tuple2<WritableComparable, Writable> tuple) throws Exception { if (conf == null) { conf = new Configuration(); } return new Tuple2<WritableComparable, Writable>(tuple._1(), WritableUtils.clone(tuple._2(), conf)); }
public boolean next(X val) throws IOException { if (iter.hasNext()) { WritableUtils.cloneInto(val, iter.next()); if (null == hold) { hold = WritableUtils.clone(val, null); } else { WritableUtils.cloneInto(hold, val); } return true; } return false; }
public TaggedMapOutput clone(JobConf job) { return (TaggedMapOutput) WritableUtils.clone(this, job); }
public TaggedMapOutput clone(JobConf job) { return (TaggedMapOutput) WritableUtils.clone(this, job); }
public OutputValue clone(JobConf job) { return WritableUtils.clone(this, job); }
public void add(X item) throws IOException { data.add(WritableUtils.clone(item, null)); }
public void add(X item) throws IOException { data.add(WritableUtils.clone(item, null)); }
@Override public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException { List<Text> cached = new ArrayList<Text>(); for (Text value : values) { cached.add(WritableUtils.clone(value, context.getConfiguration())); } } }
@Override public Tuple2<WritableComparable, Writable> call(Tuple2<WritableComparable, Writable> tuple) throws Exception { if (conf == null) { conf = new Configuration(); } return new Tuple2<WritableComparable, Writable>(tuple._1(), WritableUtils.clone(tuple._2(), conf)); }
public boolean next(X val) throws IOException { if (iter.hasNext()) { ReflectionUtils.copy(conf, iter.next(), val); if (null == hold) { hold = WritableUtils.clone(val, null); } else { ReflectionUtils.copy(conf, val, hold); } return true; } return false; }
public boolean next(X val) throws IOException { if (iter.hasNext()) { ReflectionUtils.copy(conf, iter.next(), val); if (null == hold) { hold = WritableUtils.clone(val, null); } else { ReflectionUtils.copy(conf, val, hold); } return true; } return false; }
public boolean next(X val) throws IOException { if (iter.hasNext()) { ReflectionUtils.copy(conf, iter.next(), val); if (null == hold) { hold = WritableUtils.clone(val, null); } else { ReflectionUtils.copy(conf, val, hold); } return true; } return false; }
public boolean next(X val) throws IOException { if (iter.hasNext()) { ReflectionUtils.copy(conf, iter.next(), val); if (null == hold) { hold = WritableUtils.clone(val, null); } else { ReflectionUtils.copy(conf, val, hold); } return true; } return false; }
public boolean next(X val) throws IOException { if (iter.hasNext()) { ReflectionUtils.copy(conf, iter.next(), val); if (null == hold) { hold = WritableUtils.clone(val, null); } else { ReflectionUtils.copy(conf, val, hold); } return true; } return false; }
@SuppressWarnings("unchecked") private KV<K, V> nextPair() throws IOException, InterruptedException { K key = currentReader.getCurrentKey(); V value = currentReader.getCurrentValue(); // clone Writable objects since they are reused between calls to RecordReader#nextKeyValue if (key instanceof Writable) { key = (K) WritableUtils.clone((Writable) key, conf); } if (value instanceof Writable) { value = (V) WritableUtils.clone((Writable) value, conf); } return KV.of(key, value); }
@SuppressWarnings("unchecked") protected KV<K, V> nextPair() throws IOException, InterruptedException { K key = currentReader.getCurrentKey(); V value = currentReader.getCurrentValue(); // clone Writable objects since they are reused between calls to RecordReader#nextKeyValue if (key instanceof Writable) { key = (K) WritableUtils.clone((Writable) key, conf); } if (value instanceof Writable) { value = (V) WritableUtils.clone((Writable) value, conf); } return KV.of(key, value); }
@SuppressWarnings("unchecked") protected KV<K, V> nextPair() throws IOException, InterruptedException { K key = currentReader.getCurrentKey(); V value = currentReader.getCurrentValue(); // clone Writable objects since they are reused between calls to RecordReader#nextKeyValue if (key instanceof Writable) { key = (K) WritableUtils.clone((Writable) key, conf); } if (value instanceof Writable) { value = (V) WritableUtils.clone((Writable) value, conf); } return KV.of(key, value); }
private void initClusters() throws IOException { List<Vertex<Text, DoubleWritable, SemiClusterMessage>> lV = new ArrayList<Vertex<Text, DoubleWritable, SemiClusterMessage>>(); lV.add(WritableUtils.clone(this, this.getConf())); String newClusterName = "C" + createNewSemiClusterName(lV); SemiClusterMessage initialClusters = new SemiClusterMessage(); initialClusters.setSemiClusterId(newClusterName); initialClusters.addVertexList(lV); initialClusters.setScore(1); sendMessageToNeighbors(initialClusters); Set<SemiClusterDetails> scList = new TreeSet<SemiClusterDetails>(); scList.add(new SemiClusterDetails(newClusterName, 1.0)); SemiClusterMessage vertexValue = new SemiClusterMessage(); vertexValue.setSemiClusterContainThis(scList); this.setValue(vertexValue); }