code: public synchronized void readFields(DataInput in) throws IOException {
      int numClasses = in.readInt();
      counters.clear();
      while (numClasses-- > 0) {
        String groupName = CounterNames.intern(Text.readString(in));
        Group group = new Group(groupName);
        group.readFields(in);
        counters.put(groupName, group);
      }
    }
docs: Read a set of groups.