コード例 #1
0
 @Override
 protected boolean readPartitions(GribCollectionProto.GribCollectionIndex proto) {
   for (int i = 0; i < proto.getPartitionsCount(); i++) {
     GribCollectionProto.Partition pp = proto.getPartitions(i);
     tp.addPartition(pp.getName(), pp.getFilename());
   }
   return proto.getPartitionsCount() > 0;
 }
コード例 #2
0
  private GribCollectionProto.Partition writePartitionProto(String name, TimePartition.Partition p)
      throws IOException {
    GribCollectionProto.Partition.Builder b = GribCollectionProto.Partition.newBuilder();

    b.setFilename(p.getIndexFilename());
    b.setName(name);

    return b.build();
  }