public GetAllFunctionsResponse getAllFunctions()

in aws-glue-datacatalog-hive2-client/src/main/java/com/amazonaws/glue/catalog/metastore/AWSCatalogMetastoreClient.java [970:997]


  public GetAllFunctionsResponse getAllFunctions() throws MetaException, TException {
    List<String> databaseNames = getDatabases(".*");
    List<org.apache.hadoop.hive.metastore.api.Function> result = new ArrayList<>();
    try {
      for (String databaseName : databaseNames) {
        GetUserDefinedFunctionsRequest getUserDefinedFunctionsRequest = new GetUserDefinedFunctionsRequest()
            .withDatabaseName(databaseName).withPattern(".*").withCatalogId(catalogId);
        
        List<UserDefinedFunction> catalogFunctions = glueClient.getUserDefinedFunctions(
            getUserDefinedFunctionsRequest)
            .getUserDefinedFunctions();
        for (UserDefinedFunction catalogFunction : catalogFunctions) {
          result.add(CatalogToHiveConverter.convertFunction(databaseName, catalogFunction));
        }
      }

      GetAllFunctionsResponse response = new GetAllFunctionsResponse();
      response.setFunctions(result);
      return response;
    } catch (AmazonServiceException e) {
      logger.error(e);
      throw CatalogToHiveConverter.wrapInHiveException(e);
    } catch (Exception e) {
      String msg = "Unable to get Functions: ";
      logger.error(msg, e);
      throw new MetaException(msg + e);
    }
  }