code: public void write(DataOutput out) throws IOException {
      super.write(out);
  
      //TODO: move it to DatanodeID once DatanodeID is not stored in FSImage
      out.writeShort(ipcPort);
  
      out.writeLong(capacity);
      out.writeLong(dfsUsed);
      out.writeLong(remaining);
      out.writeLong(lastUpdate);
      out.writeInt(xceiverCount);
      Text.writeStringOpt(out, location);
      Text.writeStringOpt(out, hostName == null? "": hostName);
      WritableUtils.writeEnum(out, getAdminState());
    }
docs: {@inheritDoc}