docs: public byte[] assignUid(final String type, final String name) {
      Tags.validateString(type, name);
      if (type.toLowerCase().equals("metric")) {
        try {
          final byte[] uid = this.metrics.getId(name);
          throw new IllegalArgumentException("Name already exists with UID: " +
              UniqueId.uidToString(uid));
        } catch (NoSuchUniqueName nsue) {
          return this.metrics.getOrCreateId(name);
        }
      } else if (type.toLowerCase().equals("tagk")) {
        try {
          final byte[] uid = this.tag_names.getId(name);
          throw new IllegalArgumentException("Name already exists with UID: " +
              UniqueId.uidToString(uid));
        } catch (NoSuchUniqueName nsue) {
          return this.tag_names.getOrCreateId(name);
        }
      } else if (type.toLowerCase().equals("tagv")) {
        try {
          final byte[] uid = this.tag_values.getId(name);
          throw new IllegalArgumentException("Name already exists with UID: " +
              UniqueId.uidToString(uid));
        } catch (NoSuchUniqueName nsue) {
          return this.tag_values.getOrCreateId(name);
        }
      } else {
        LOG.warn("Unknown type name: " + type);
        throw new IllegalArgumentException("Unknown type name");
      }
    }