#NEWLINE# def _wait_for_results_chunk( self , job_id , page_token ) : #NEWLINE# #INDENT# 'Retrieve a single chunk of results from a completed BigQuery job.\n\n        Retrieve a fixed number of BigQuery result rows, where the number\n        requested may be greater or less than the total number of rows\n        available.\n\n        Args:\n            job_id: (str) Job ID for which to retrieve results.\n            page_token: Token that indicates which page of results for which to\n                retrieve results or None to retrieve the first page of results.\n\n        Returns:\n            (list) A list of result rows in the current chunk of results.\n        ' #NEWLINE# MAX_RESULTS_PER_GET = 100000 #NEWLINE# query_request = { #NEWLINE# #INDENT# 'projectId' : self . _project_id , #NEWLINE# 'jobId' : job_id , #NEWLINE# 'maxResults' : MAX_RESULTS_PER_GET , #NEWLINE# 'timeoutMs' : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# if ( page_token is not None ) : #NEWLINE# #INDENT# query_request [ 'pageToken' ] = page_token #NEWLINE# #UNINDENT# retries_remaining = 4 #NEWLINE# while True : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return self . _execute_job_query ( query_request ) #NEWLINE# #UNINDENT# except BigQueryCommunicationError as e : #NEWLINE# #INDENT# if ( retries_remaining > 0 ) : #NEWLINE# #INDENT# sleep_seconds = 10 #NEWLINE# logging . warning ( 'Failed to communicate with BigQuery to retrieve job %s. Retrying in %d seconds... (%d attempts remaining)' , job_id , sleep_seconds , retries_remaining ) #NEWLINE# time . sleep ( sleep_seconds ) #NEWLINE# retries_remaining -= 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise e