9. CSV
BLOB
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
10. BLOBの情報
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
11. Ma
pp er
InputFormat
Ma
pp er
InputFormat
Ma
pp er
InputFormat
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/
12. public class BLobRecordReader
implements RecordReader<RecordDataWritable, BytesWritable> {
private long start;
private long end;
private TreeMap<BLobInfo, RecordData> infoMap;
public BLobRecordReader(JobConf job, FileSplit split) throws Exception {
this.start = split.getStart();
this.end = start + split.getLength();
this.infoMap = new TreeMap<BLobInfo, RecordData>();
BufferedReader in = ... //from distributed cache
String line;
while( (line = in.readLine()) != null) {
BLobInfo infoKey = new BLobInfo(line);
if(start <= infoKey.getPos() && end > infoKey.getPos()) {
infoMap.put(infoKey, new RecordData(line));
}
}
...
}
public boolean next(RecordDataWritable key, BytesWritable value) throws IOException {
BLobInfo infoKey = new BLobInfo(pos);
if(!infoMap.containsKey(infoKey))return false;
RecordData infoData = infoMap.get(infoKey);
key.set(infoData);
int newSize = infoData.getFileSize();
in.readLine(value, newSize);
pos += newSize;
return true;
}
}
13. ?
ICON: Ravenna 3D By Double-J DesignAuthor Website: http://www.doublejdesign.co.uk/products-page/icons/ravenna-3d/