private Optional<String> parseServiceName(String name) {
    if (name != null && name.startsWith("/") && name.split("/").length > 2) {
      return Optional.of(name.split("/")[1]);
    } else {
      return Optional.absent();
    }
  }
A name that refers to a service has a format like /[<service name>/[<component name>/]]<identity name>
@return an optional referenced service name
ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptor.java