code: @Override
    public NamingRegisterRequest decode(final byte[] buf) {
      final AvroNamingRegisterRequest avroNamingRegisterRequest =
          AvroUtils.fromBytes(buf, AvroNamingRegisterRequest.class);
      return new NamingRegisterRequest(
          new NameAssignmentTuple(factory.getNewInstance(avroNamingRegisterRequest.getId().toString()),
              new InetSocketAddress(avroNamingRegisterRequest.getHost().toString(), avroNamingRegisterRequest.getPort()))
      );
    }
docs: Decodes the bytes to a name assignment.
  
  @param buf the byte array
  @return a naming registration request
  @throws org.apache.reef.io.network.naming.exception.NamingRuntimeException