(self, response, master_future, query_future)
| 2953 | master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) |
| 2954 | |
| 2955 | def _on_analytics_master_result(self, response, master_future, query_future): |
| 2956 | try: |
| 2957 | row = master_future.result()[0] |
| 2958 | addr = row[0]['location'] |
| 2959 | delimiter_index = addr.rfind(':') # assumes <ip>:<port> - not robust, but that's what is being provided |
| 2960 | if delimiter_index > 0: |
| 2961 | addr = addr[:delimiter_index] |
| 2962 | targeted_query = HostTargetingStatement(query_future.query, addr) |
| 2963 | query_future.query_plan = query_future._load_balancer.make_query_plan(self.keyspace, targeted_query) |
| 2964 | except Exception: |
| 2965 | log.debug("Failed querying analytics master (request might not be routed optimally). " |
| 2966 | "Make sure the session is connecting to a graph analytics datacenter.", exc_info=True) |
| 2967 | |
| 2968 | self.submit(query_future.send_request) |
| 2969 | |
| 2970 | def _create_response_future(self, query, parameters, trace, custom_payload, |
| 2971 | timeout, execution_profile=EXEC_PROFILE_DEFAULT, |
nothing calls this directly
no test coverage detected