gigl.common.utils.compute.serialization.serialize_protos#
Classes#
Base class for coders. |
|
Base class for coders. |
|
Base class for coders. |
Module Contents#
- class gigl.common.utils.compute.serialization.serialize_protos.EdgePbWrapperCoder[source]#
Bases:
apache_beam.coders.Coder
Base class for coders.
- decode(s)[source]#
Decodes the given byte string into the corresponding object.
- Parameters:
s (bytes)
- encode(o)[source]#
Encodes the given object into a byte string.
- Parameters:
o (gigl.src.common.types.pb_wrappers.graph_data_types.EdgePbWrapper)
- Return type:
bytes
- is_deterministic()[source]#
Whether this coder is guaranteed to encode values deterministically.
A deterministic coder is required for key coders in GroupByKey operations to produce consistent results.
For example, note that the default coder, the PickleCoder, is not deterministic: the ordering of picked entries in maps may vary across executions since there is no defined order, and such a coder is not in general suitable for usage as a key coder in GroupByKey operations, since each instance of the same key may be encoded differently.
- Returns:
Whether coder is deterministic.
- class gigl.common.utils.compute.serialization.serialize_protos.GraphPbWrapperCoder[source]#
Bases:
apache_beam.coders.Coder
Base class for coders.
- decode(s)[source]#
Decodes the given byte string into the corresponding object.
- Parameters:
s (bytes)
- encode(o)[source]#
Encodes the given object into a byte string.
- Parameters:
o (gigl.src.common.types.pb_wrappers.graph_data_types.GraphPbWrapper)
- Return type:
bytes
- is_deterministic()[source]#
Whether this coder is guaranteed to encode values deterministically.
A deterministic coder is required for key coders in GroupByKey operations to produce consistent results.
For example, note that the default coder, the PickleCoder, is not deterministic: the ordering of picked entries in maps may vary across executions since there is no defined order, and such a coder is not in general suitable for usage as a key coder in GroupByKey operations, since each instance of the same key may be encoded differently.
- Returns:
Whether coder is deterministic.
- class gigl.common.utils.compute.serialization.serialize_protos.NodePbWrapperCoder[source]#
Bases:
apache_beam.coders.Coder
Base class for coders.
- decode(s)[source]#
Decodes the given byte string into the corresponding object.
- Parameters:
s (bytes)
- encode(o)[source]#
Encodes the given object into a byte string.
- Parameters:
o (gigl.src.common.types.pb_wrappers.graph_data_types.NodePbWrapper)
- Return type:
bytes
- is_deterministic()[source]#
Whether this coder is guaranteed to encode values deterministically.
A deterministic coder is required for key coders in GroupByKey operations to produce consistent results.
For example, note that the default coder, the PickleCoder, is not deterministic: the ordering of picked entries in maps may vary across executions since there is no defined order, and such a coder is not in general suitable for usage as a key coder in GroupByKey operations, since each instance of the same key may be encoded differently.
- Returns:
Whether coder is deterministic.