Java 类org.apache.hadoop.hdfs.server.namenode.FsImageProto.StringTableSection 实例源码

项目:hadoop    文件:FSImageFormatProtobuf.java   
private void loadStringTableSection(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  ctx.stringTable = new String[s.getNumEntry() + 1];
  for (int i = 0; i < s.getNumEntry(); ++i) {
    StringTableSection.Entry e = StringTableSection.Entry
        .parseDelimitedFrom(in);
    ctx.stringTable[e.getId()] = e.getStr();
  }
}
项目:hadoop    文件:FSImageFormatProtobuf.java   
private void saveStringTableSection(FileSummary.Builder summary)
    throws IOException {
  OutputStream out = sectionOutputStream;
  StringTableSection.Builder b = StringTableSection.newBuilder()
      .setNumEntry(saverContext.stringMap.size());
  b.build().writeDelimitedTo(out);
  for (Entry<String, Integer> e : saverContext.stringMap.entrySet()) {
    StringTableSection.Entry.Builder eb = StringTableSection.Entry
        .newBuilder().setId(e.getValue()).setStr(e.getKey());
    eb.build().writeDelimitedTo(out);
  }
  commitSection(summary, SectionName.STRING_TABLE);
}
项目:hadoop    文件:PBImageXmlWriter.java   
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();
  }
}
项目:aliyun-oss-hadoop-fs    文件:FSImageFormatProtobuf.java   
private void loadStringTableSection(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  ctx.stringTable = new String[s.getNumEntry() + 1];
  for (int i = 0; i < s.getNumEntry(); ++i) {
    StringTableSection.Entry e = StringTableSection.Entry
        .parseDelimitedFrom(in);
    ctx.stringTable[e.getId()] = e.getStr();
  }
}
项目:aliyun-oss-hadoop-fs    文件:FSImageFormatProtobuf.java   
private void saveStringTableSection(FileSummary.Builder summary)
    throws IOException {
  OutputStream out = sectionOutputStream;
  StringTableSection.Builder b = StringTableSection.newBuilder()
      .setNumEntry(saverContext.stringMap.size());
  b.build().writeDelimitedTo(out);
  for (Entry<String, Integer> e : saverContext.stringMap.entrySet()) {
    StringTableSection.Entry.Builder eb = StringTableSection.Entry
        .newBuilder().setId(e.getValue()).setStr(e.getKey());
    eb.build().writeDelimitedTo(out);
  }
  commitSection(summary, SectionName.STRING_TABLE);
}
项目:aliyun-oss-hadoop-fs    文件:PBImageXmlWriter.java   
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();
  }
}
项目:big-c    文件:FSImageFormatProtobuf.java   
private void loadStringTableSection(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  ctx.stringTable = new String[s.getNumEntry() + 1];
  for (int i = 0; i < s.getNumEntry(); ++i) {
    StringTableSection.Entry e = StringTableSection.Entry
        .parseDelimitedFrom(in);
    ctx.stringTable[e.getId()] = e.getStr();
  }
}
项目:big-c    文件:FSImageFormatProtobuf.java   
private void saveStringTableSection(FileSummary.Builder summary)
    throws IOException {
  OutputStream out = sectionOutputStream;
  StringTableSection.Builder b = StringTableSection.newBuilder()
      .setNumEntry(saverContext.stringMap.size());
  b.build().writeDelimitedTo(out);
  for (Entry<String, Integer> e : saverContext.stringMap.entrySet()) {
    StringTableSection.Entry.Builder eb = StringTableSection.Entry
        .newBuilder().setId(e.getValue()).setStr(e.getKey());
    eb.build().writeDelimitedTo(out);
  }
  commitSection(summary, SectionName.STRING_TABLE);
}
项目:big-c    文件:PBImageXmlWriter.java   
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();
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSImageFormatProtobuf.java   
private void loadStringTableSection(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  ctx.stringTable = new String[s.getNumEntry() + 1];
  for (int i = 0; i < s.getNumEntry(); ++i) {
    StringTableSection.Entry e = StringTableSection.Entry
        .parseDelimitedFrom(in);
    ctx.stringTable[e.getId()] = e.getStr();
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSImageFormatProtobuf.java   
private void saveStringTableSection(FileSummary.Builder summary)
    throws IOException {
  OutputStream out = sectionOutputStream;
  StringTableSection.Builder b = StringTableSection.newBuilder()
      .setNumEntry(saverContext.stringMap.size());
  b.build().writeDelimitedTo(out);
  for (Entry<String, Integer> e : saverContext.stringMap.entrySet()) {
    StringTableSection.Entry.Builder eb = StringTableSection.Entry
        .newBuilder().setId(e.getValue()).setStr(e.getKey());
    eb.build().writeDelimitedTo(out);
  }
  commitSection(summary, SectionName.STRING_TABLE);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBImageXmlWriter.java   
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();
  }
}
项目:FlexMap    文件:FSImageFormatProtobuf.java   
private void loadStringTableSection(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  ctx.stringTable = new String[s.getNumEntry() + 1];
  for (int i = 0; i < s.getNumEntry(); ++i) {
    StringTableSection.Entry e = StringTableSection.Entry
        .parseDelimitedFrom(in);
    ctx.stringTable[e.getId()] = e.getStr();
  }
}
项目:FlexMap    文件:FSImageFormatProtobuf.java   
private void saveStringTableSection(FileSummary.Builder summary)
    throws IOException {
  OutputStream out = sectionOutputStream;
  StringTableSection.Builder b = StringTableSection.newBuilder()
      .setNumEntry(saverContext.stringMap.size());
  b.build().writeDelimitedTo(out);
  for (Entry<String, Integer> e : saverContext.stringMap.entrySet()) {
    StringTableSection.Entry.Builder eb = StringTableSection.Entry
        .newBuilder().setId(e.getValue()).setStr(e.getKey());
    eb.build().writeDelimitedTo(out);
  }
  commitSection(summary, SectionName.STRING_TABLE);
}
项目:FlexMap    文件:PBImageXmlWriter.java   
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();
  }
}
项目:hadoop-on-lustre2    文件:FSImageFormatProtobuf.java   
private void loadStringTableSection(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  ctx.stringTable = new String[s.getNumEntry() + 1];
  for (int i = 0; i < s.getNumEntry(); ++i) {
    StringTableSection.Entry e = StringTableSection.Entry
        .parseDelimitedFrom(in);
    ctx.stringTable[e.getId()] = e.getStr();
  }
}
项目:hadoop-on-lustre2    文件:FSImageFormatProtobuf.java   
private void saveStringTableSection(FileSummary.Builder summary)
    throws IOException {
  OutputStream out = sectionOutputStream;
  StringTableSection.Builder b = StringTableSection.newBuilder()
      .setNumEntry(saverContext.stringMap.size());
  b.build().writeDelimitedTo(out);
  for (Entry<String, Integer> e : saverContext.stringMap.entrySet()) {
    StringTableSection.Entry.Builder eb = StringTableSection.Entry
        .newBuilder().setId(e.getValue()).setStr(e.getKey());
    eb.build().writeDelimitedTo(out);
  }
  commitSection(summary, SectionName.STRING_TABLE);
}
项目:hadoop-on-lustre2    文件:PBImageXmlWriter.java   
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();
  }
}
项目:hadoop-on-lustre2    文件:LsrPBImage.java   
private void loadStringTable(InputStream in) throws IOException {
  StringTableSection s = StringTableSection.parseDelimitedFrom(in);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Found " + s.getNumEntry() + " strings in string section");
  }
  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();
    if (LOG.isTraceEnabled()) {
      LOG.trace("Loaded string " + e.getStr());
    }
  }
}