public void clear() { map.clear(); }
@Override public void set(MapWritable to, MapWritable from) { to.clear(); to.putAll(from); } }
@Override public boolean nextKeyValue() throws IOException, InterruptedException { while (reader.nextKeyValue()) { value_.clear(); if (decodeLineToJson(jsonParser_, reader.getCurrentValue(), value_)) { return true; } } return false; }
cachedWritable.clear(); for (int c = 0; c < fieldCount; c++) { StructField structField = fields.get(c);
@Override public boolean nextKeyValue() throws IOException, InterruptedException { // Since the lzop codec reads everything in lzo blocks, we can't stop if pos == end. // Instead we wait for the next block to be read in, when pos will be > end. value_.clear(); badRecordsSkipped_ = 0; while (pos_ <= end_) { key_.set(pos_); int newSize = in_.readLine(currentLine_); if (newSize == 0) { return false; } pos_ = getLzoFilePos(); if (!decodeLine()) { badRecordsSkipped_ += 1; continue; } return true; } return false; }
@Override public boolean nextKeyValue() throws IOException, InterruptedException { // Since the lzop codec reads everything in lzo blocks, we can't stop if pos == end. // Instead we wait for the next block to be read in, when pos will be > end. value_.clear(); while (pos_ <= end_) { key_.set(pos_); int newSize = in_.readLine(currentLine_); if (newSize == 0) { return false; } pos_ = getLzoFilePos(); if (!decodeLineToJson(jsonParser_, currentLine_, value_)) { continue; } return true; } return false; }