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