apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/AppNamespaceService.java/AppNamespaceService/checkAppNamespaceGlobalUniqueness
class AppNamespaceService:  private void checkAppNamespaceGlobalUniqueness(AppNamespace appNamespace) {
    checkPublicAppNamespaceGlobalUniqueness(appNamespace);

    List<AppNamespace> privateAppNamespaces = findAllPrivateAppNamespaces(appNamespace.getName());

    if (!CollectionUtils.isEmpty(privateAppNamespaces)) {
      Set<String> appIds = Sets.newHashSet();
      for (AppNamespace ans : privateAppNamespaces) {
        appIds.add(ans.getAppId());
        if (appIds.size() == PRIVATE_APP_NAMESPACE_NOTIFICATION_COUNT) {
          break;
        }
      }

      throw new BadRequestException(
          "Public AppNamespace " + appNamespace.getName() + " already exists as private AppNamespace in appId: "
              + APP_NAMESPACE_JOINER.join(appIds) + ", etc. Please select another name!");
    }
  }