Class GeneratedPhoenixClient


  • public class GeneratedPhoenixClient
    extends java.lang.Object
    Client to remote phoenix service, exposes a GraphQL API
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GeneratedPhoenixClient​(java.lang.String url, java.lang.String token)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.c12e.cortex.generated.types.Connection connectionByName​(java.lang.String project, java.lang.String name)
      Retrieves a Connection
      com.c12e.cortex.generated.types.DataSource dataSourceByName​(java.lang.String project, java.lang.String name)
      Retrieves a DataSource
      java.lang.Iterable<com.c12e.cortex.generated.types.Feature> featureSetBySourceName​(java.lang.String project, java.lang.String source)  
      <T> T makeRequest​(com.netflix.graphql.dgs.client.codegen.GraphQLQuery query, com.netflix.graphql.dgs.client.codegen.BaseProjectionNode responseProjection, java.lang.Class<T> clazz)
      Generic request structure, use with catalog extensions
      com.c12e.cortex.generated.types.ProfileSchema profileSchemaByName​(java.lang.String project, java.lang.String name)
      Retrieves a ProfileSchema
      java.lang.Iterable<com.c12e.cortex.generated.types.Feature> saveFeatureSet​(java.lang.String project, java.lang.String source, java.util.List<com.c12e.cortex.phoenix.Feature> features)
      Saves the List of Feature's associated with given the project and DataSource.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeneratedPhoenixClient

        @Inject
        protected GeneratedPhoenixClient​(@Named("spark.cortex.client.phoenix.url")
                                         java.lang.String url,
                                         @Named("spark.cortex.phoenix.token")
                                         java.lang.String token)
    • Method Detail

      • makeRequest

        public <T> T makeRequest​(com.netflix.graphql.dgs.client.codegen.GraphQLQuery query,
                                 com.netflix.graphql.dgs.client.codegen.BaseProjectionNode responseProjection,
                                 java.lang.Class<T> clazz)
                          throws java.lang.Exception
        Generic request structure, use with catalog extensions
        Type Parameters:
        T -
        Parameters:
        query - - The GraphQL query
        responseProjection - - The response projection
        clazz - - The response type
        Returns:
        The response
        Throws:
        java.lang.Exception
      • connectionByName

        public com.c12e.cortex.generated.types.Connection connectionByName​(java.lang.String project,
                                                                           java.lang.String name)
        Retrieves a Connection
        Parameters:
        project - the project contained the connection
        name - the connection name with the project
        Returns:
        the connection or null
      • dataSourceByName

        public com.c12e.cortex.generated.types.DataSource dataSourceByName​(java.lang.String project,
                                                                           java.lang.String name)
        Retrieves a DataSource
        Parameters:
        project - the project contained the dataSource
        name - the dataSource name with the project
        Returns:
        the dataSource or null
      • featureSetBySourceName

        public java.lang.Iterable<com.c12e.cortex.generated.types.Feature> featureSetBySourceName​(java.lang.String project,
                                                                                                  java.lang.String source)
      • saveFeatureSet

        public java.lang.Iterable<com.c12e.cortex.generated.types.Feature> saveFeatureSet​(java.lang.String project,
                                                                                          java.lang.String source,
                                                                                          java.util.List<com.c12e.cortex.phoenix.Feature> features)
        Saves the List of Feature's associated with given the project and DataSource.
        Parameters:
        project - project name
        source - DataSource name
        features - list of features
        Returns:
        the saved list of features
      • profileSchemaByName

        public com.c12e.cortex.generated.types.ProfileSchema profileSchemaByName​(java.lang.String project,
                                                                                 java.lang.String name)
        Retrieves a ProfileSchema
        Parameters:
        project - the project contained the profileSchema
        name - the profileSchema name with the project
        Returns:
        the profileSchema or null