Search in sources :

Example 1 with StringTableSection

use of org.apache.hadoop.hdfs.server.namenode.FsImageProto.StringTableSection in project hadoop by apache.

the class PBImageXmlWriter method loadStringTable.

private void loadStringTable(InputStream in) throws IOException {
    StringTableSection s = StringTableSection.parseDelimitedFrom(in);
    stringTable = new String[s.getNumEntry() + 1];
    for (int i = 0; i < s.getNumEntry(); ++i) {
        StringTableSection.Entry e = StringTableSection.Entry.parseDelimitedFrom(in);
        stringTable[e.getId()] = e.getStr();
    }
}
Also used : StringTableSection(org.apache.hadoop.hdfs.server.namenode.FsImageProto.StringTableSection)

Aggregations

StringTableSection (org.apache.hadoop.hdfs.server.namenode.FsImageProto.StringTableSection)1