Re: Custom input format query

2011-05-23 Thread Mapred Learn
Hi Steve, I did what you said and removed while loop and replaced with: if (offset < fileSize) { . } but in this case, mapper is not processing complete file. It stops somewhere in the middle and processes only more than half the records in input split. For eg. fileSize is 11654 and last valu

Re: Custom input format query

2011-05-19 Thread Steve Lewis
1) add @Override public Text getCurrentKey() { return key; } @Override public Text getCurrentValue() { return value; } 2) do not make offset static 3) nextKeyValue should read a single record not while (offset < fileSize

Custom input format query

2011-05-19 Thread Mapred Learn
Hi, I have implemented a custom record reader to read fixed length records. Pseudo code is as: class CRecordReader extends RecordReader { private FileSplit fileSplit; private Configuration conf; private int recordSize; private int fileSize; private int recordNum = 0; private FSDataInputStre