def __init__(self, address, port, graph_name): ''' Constructor. Args: address: The IP address of HyperDex's coordinator process (str). port: The port number of HyperDex's coordinator process (int). Returns: An instance of the HyperDexStore, which wraps the underlying connection. ''' self._address = address self._port = port self._graph_name = graph_name self.hyperdex_client = Client(address, port) #HyperDex python binding (Client) self.hyperdex_admin = Admin(address, port) #HyperDex python binding (Admin) self.sysadmin = SysAdmin(address, port, graph_name, self.hyperdex_client, self.hyperdex_admin) self.typeadmin = TypeAdmin(address, port, graph_name, self.hyperdex_client, self.hyperdex_admin) #validate the underlying database for the particular components, i.e. #checking for the system/description space self.sysadmin.validate_database() self.typeadmin.validate_database() self._generic_vertex = graph_name + '_generic_vertex' self.validate_database()
def setUp(self): self.hyperdex = Admin(ADDRESS, PORT) self.hyperdex_client = Client(ADDRESS, PORT) self.g = HyperDexGraph(ADDRESS, PORT, GRAPH)
def connect_to_hyperdex(self, url=RPC_URL, port=RPC_PORT): self.client = Client(RPC_URL, RPC_PORT) print("Connected to {0}:{1}".format(RPC_URL, RPC_PORT))
def setUp(self): self.hyperdex_client = Client(ADDRESS, PORT) self.hyperdex_admin = Admin(ADDRESS, PORT) self.typeadmin = TypeAdmin(ADDRESS, PORT, GRAPH, self.hyperdex_client, self.hyperdex_admin) self.typeadmin.validate_database()