github.com/apache/beam/sdks/v2@v2.48.2/python/apache_beam/portability/python_urns.py (about)

     1  #
     2  # Licensed to the Apache Software Foundation (ASF) under one or more
     3  # contributor license agreements.  See the NOTICE file distributed with
     4  # this work for additional information regarding copyright ownership.
     5  # The ASF licenses this file to You under the Apache License, Version 2.0
     6  # (the "License"); you may not use this file except in compliance with
     7  # the License.  You may obtain a copy of the License at
     8  #
     9  #    http://www.apache.org/licenses/LICENSE-2.0
    10  #
    11  # Unless required by applicable law or agreed to in writing, software
    12  # distributed under the License is distributed on an "AS IS" BASIS,
    13  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  # See the License for the specific language governing permissions and
    15  # limitations under the License.
    16  #
    17  
    18  """Enumeration of URNs specific to the Python SDK.
    19  
    20  For internal use only; no backwards-compatibility guarantees."""
    21  
    22  PICKLED_CODER = "beam:coder:pickled_python:v1"
    23  PICKLED_COMBINE_FN = "beam:combinefn:pickled_python:v1"
    24  PICKLED_DOFN = "beam:dofn:pickled_python:v1"
    25  PICKLED_DOFN_INFO = "beam:dofn:pickled_python_info:v1"
    26  PICKLED_SOURCE = "beam:source:pickled_python:v1"
    27  PICKLED_TRANSFORM = "beam:transform:pickled_python:v1"
    28  PICKLED_WINDOW_MAPPING_FN = "beam:window_mapping_fn:pickled_python:v1"
    29  PICKLED_WINDOWFN = "beam:window_fn:pickled_python:v1"
    30  PICKLED_VIEWFN = "beam:view_fn:pickled_python_data:v1"
    31  
    32  IMPULSE_READ_TRANSFORM = "beam:transform:read_from_impulse_python:v1"
    33  
    34  GENERIC_COMPOSITE_TRANSFORM = "beam:transform:generic_composite:v1"
    35  
    36  KEY_WITH_NONE_DOFN = "beam:dofn:python_key_with_none:v1"
    37  PACKED_COMBINE_FN = "beam:combinefn:packed_python:v1"
    38  
    39  # A coder for a tuple.
    40  # Components: The coders for the tuple elements, in order.
    41  TUPLE_CODER = "beam:coder:tuple:v1"
    42  
    43  # Invoke UserFns in process, via direct function calls.
    44  # Payload: None.
    45  EMBEDDED_PYTHON = "beam:env:embedded_python:v1"
    46  
    47  # Invoke UserFns in process, but over GRPC channels.
    48  # Payload: (optional) Number of worker threads, followed by ',' and the size of
    49  # the state cache, as a decimal string, e.g. '2,1000'.
    50  EMBEDDED_PYTHON_GRPC = "beam:env:embedded_python_grpc:v1"
    51  
    52  # Instantiate SDK harness via a command line provided in the payload.
    53  # This is different than the standard process environment in that it
    54  # starts up the SDK harness directly, rather than the bootstrapping
    55  # and artifact fetching code.
    56  # (Used for testing.)
    57  SUBPROCESS_SDK = "beam:env:harness_subprocess_python:v1"
    58  
    59  # An annotation that indicates combiner packing is OK in all sub-transforms
    60  # of this transform.  This optimization may result in renamed counters and
    61  # PCollection element counts.
    62  APPLY_COMBINER_PACKING = "beam:annotation:apply_combiner_packing:v1"