String file = Table.TableMetadata.getFileName();
File f = new File(file);
if ( f.exists() )
{
DataOutputBuffer bufOut = new DataOutputBuffer();
DataInputBuffer bufIn = new DataInputBuffer();
if ( reader_ == null )
{
reader_ = SequenceFile.reader(file);
}
while ( !reader_.isEOF() )
{
/* Read the metadata info. */
reader_.next(bufOut);
bufIn.reset(bufOut.getData(), bufOut.getLength());
/* The key is the table name */
bufIn.readUTF();
/* read the size of the data we ignore this value */
bufIn.readInt();
tableMetadata_ = Table.TableMetadata.serializer().deserialize(bufIn);
break;
}
}
}