/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
/** Read key/value pair in a line. */ public synchronized boolean next(Text key, Text value) throws IOException { Text tKey = key; Text tValue = value; if (!sequenceFileRecordReader.next(innerKey, innerValue)) { return false; } tKey.set(innerKey.toString()); tValue.set(innerValue.toString()); return true; }
private void resetDelegate() throws IOException { this.delegate = new SequenceFileRecordReader<BytesWritable, NullWritable>(conf, split); BytesWritable dummyValue = new BytesWritable(); for(int i=0; i<recordsRead; i++) { delegate.next(dummyValue, NullWritable.get()); } }
boolean ret = delegate.next(v, NullWritable.get()); k.set(split.getPailRelPath()); recordsRead++;
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public boolean nextKeyValue() throws IOException { if(key == null) { key = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.keyClass))); } if(value == null) { value = new GuaguaWritableAdapter(((Writable) ReflectionUtils.newInstance(this.valueClass))); } return this.sequenceReader.next(key.getWritable(), value.getWritable()); }
@Override public boolean next(LongWritable key, Text value) throws IOException { if (curChunk == null) { ChukwaArchiveKey k = new ChukwaArchiveKey(); curChunk = ChunkImpl.getBlankChunk(); boolean unfilteredChunk = false; while (!unfilteredChunk) { boolean readOK = sfrr.next(k, curChunk); if (!readOK) { curChunk = null; return false; } unfilteredChunk = passesFilters(curChunk); } lineOffsets = curChunk.getRecordOffsets(); lineInChunk = 0; byteOffsetOfLastLine = 0; } // end curChunk == null value.set(curChunk.getData(), byteOffsetOfLastLine, lineOffsets[lineInChunk] - byteOffsetOfLastLine); if (lineInChunk >= lineOffsets.length - 1) { // end of chunk curChunk = null; } else byteOffsetOfLastLine = lineOffsets[lineInChunk++] + 1; key.set(lineInFile); lineInFile++; return true; } } // end ChukwaRecordReader