code
stringlengths
3
6.57k
query._to_client_query(_client)
client_query.fetch(query.limit)
types.Entity.from_client_entity(client_entity)
_Mutate(PTransform)
operations (upsert and delete)
__init__(self, mutate_fn)
expand(self, pcoll)
ParDo(self._mutate_fn)
DatastoreMutateFn(DoFn)
idempotent (`upsert` and `delete` mutations)
__init__(self, project)
_update_rpc_stats(self, successes=0, errors=0, throttled_secs=0)
self._rpc_successes.inc(successes)
self._rpc_errors.inc(errors)
self._throttled_secs.inc(throttled_secs)
start_bundle(self)
helper.get_client(self._project, namespace=None)
self._init_batch()
util.DynamicBatchSizer()
time.time()
element_to_client_batch_item(self, element)
add_to_batch(self, client_batch_item)
write_mutations(self, throttler, rpc_stats_callback, throttle_delay=1)
throttler.throttle_request(time.time()
time.sleep(throttle_delay)
rpc_stats_callback(throttled_secs=throttle_delay)
self._client.batch()
self._batch.begin()
self.add_to_batch(element)
time.time()
self._batch.commit()
time.time()
rpc_stats_callback(successes=1)
throttler.successful_request(start_time * 1000)
int((end_time-start_time)
rpc_stats_callback(errors=1)
process(self, element)
self.element_to_client_batch_item(element)
self._batch_elements.append(client_element)
self.add_to_batch(client_element)
ByteSize()
if (len(self._batch.mutations)
self._flush_batch()
finish_bundle(self)
self._flush_batch()
_init_batch(self)
self._client.batch()
self._batch.begin()
_flush_batch(self)
len(self._batch.mutations)
time.time()
len(self._batch.mutations)
self._batch_sizer.get_batch_size(now)
self._init_batch()
typehints.with_input_types(types.Entity)
WriteToDatastore(_Mutate)
__init__(self, project)
WriteToDatastore._DatastoreWriteFn(project)
super(WriteToDatastore, self)
__init__(mutate_fn)
_DatastoreWriteFn(_Mutate.DatastoreMutateFn)
element_to_client_batch_item(self, element)
isinstance(element, types.Entity)
type(element)
element.to_client_entity()
add_to_batch(self, client_entity)
self._batch.put(client_entity)
display_data(self)
Write (upsert)
typehints.with_input_types(types.Key)
DeleteFromDatastore(_Mutate)
__init__(self, project)
DeleteFromDatastore._DatastoreDeleteFn(project)
super(DeleteFromDatastore, self)
__init__(mutate_fn)
_DatastoreDeleteFn(_Mutate.DatastoreMutateFn)
element_to_client_batch_item(self, element)
isinstance(element, types.Key)
type(element)
element.to_client_key()
add_to_batch(self, client_key)
self._batch.delete(client_key)
display_data(self)
Copyright (c)
run_command(args)
proc.communicate()
Exception('command "%s" failed: %s' % (args, stderr)
find_path_to_program(program)
find (e.g., 'render_pictures')
os.path.abspath(os.path.join(os.path.dirname(__file__)
os.path.join(trunk_path, 'out', 'Release', program)
os.path.join(trunk_path, 'out', 'Debug', program)
os.path.isfile(try_path)
values. (i.e., from left to right, level by level)
__init__(self, val=0, left=None, right=None)
levelOrder(self, root: Optional[TreeNode])
collections.deque()
q.append(root)
len(q)
range(q_len)