Class Driver


  • public class Driver
    extends Object
    The entrypoint for all graphscope operations.
    • Method Detail

      • connect

        public static Driver connect()
        Connect to the interactive service with the environment variables INTERACTIVE_ADMIN_ENDPOINT, INTERACTIVE_STORED_PROC_ENDPOINT, INTERACTIVE_CYPHER_ENDPOINT, INTERACTIVE_GREMLIN_ENDPOINT
        Returns:
        The driver object.
      • connect

        public static Driver connect​(String adminUri,
                                     String storedProcUri,
                                     String cypherUri,
                                     String gremlinUri)
        Connect to the interactive service by specifying the URIs of the admin, stored procedure, cypher, and gremlin services.
        Parameters:
        adminUri - The URI of the admin service.
        storedProcUri - The URI of the stored procedure service.
        cypherUri - The URI of the cypher service.
        gremlinUri - The URI of the gremlin service.
        Returns:
        The driver object.
      • connect

        public static Driver connect​(String uri)
        Should only be used internally. Users should use method connect() or connect(admin_uri,storedProcUri,cypherUri,gremlinUri) which require the URIs of all services, or need all uris exported to the environment variables. Connect to the interactive service by only specifying the admin service's uri.
        Parameters:
        uri - The URI of the admin service.
        Returns:
        The driver object.
      • session

        public Session session()
        Create a GraphScope session
        Returns:
      • getDefaultSession

        public Session getDefaultSession()
      • getNeo4jSession

        public org.neo4j.driver.Session getNeo4jSession​(org.neo4j.driver.SessionConfig sessionConfig)
        Create a neo4j session with the given session config.
        Parameters:
        sessionConfig -
        Returns:
      • getNeo4jSession

        public org.neo4j.driver.Session getNeo4jSession()
        Create a neo4j session with default session config.
        Returns:
        a neo4j session
      • getNeo4jEndpoint

        public String getNeo4jEndpoint()
      • getGremlinEndpoint

        public org.apache.commons.lang3.tuple.Pair<String,​Integer> getGremlinEndpoint()
        Get the gremlin endpoint.
        Returns:
        a pair of host and port
      • getGremlinClient

        public org.apache.tinkerpop.gremlin.driver.Client getGremlinClient()