How to use the bigflow.error.BigflowRuntimeException function in bigflow

To help you get started, we’ve selected a few bigflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github baidu / bigflow / bigflow_python / python / bigflow / pipeline / pipeline_base.py View on Github external
def reset_all_counters(self):
        """
        将所有counter清零

        Raises:
          error.BigflowRuntimeException:  此方法不允许在 :mod:`Bigflow变换` 的用户自定义方法(UDF)中调用,否则抛出此异常
        """
        if os.getenv("__PYTHON_IN_REMOTE_SIDE", None) is not None:
            raise error.BigflowRuntimeException("reset_all_counters cannot be called at runtime")
        requests.reset_all_counters()
github baidu / bigflow / bigflow_python / python / bigflow / pipeline / pipeline_base.py View on Github external
def async_run(self):
        """
        立刻运行Pipeline并等待作业提交完成

        Raises:
            BigflowRuntimeException:  若运行期出错抛出此异常
        """
        raise error.BigflowRuntimeException("async_run isn't be supported in this pipeline")
github baidu / bigflow / bigflow_python / python / bigflow / pipeline / pipeline_base.py View on Github external
def _register_extension(self, extension):
        """ Experimental interface to register an extension

        :param extension:
        :return:
        """
        from bigflow.extension import BigFlowExtension
        if not isinstance(extension, BigFlowExtension):
            raise error.BigflowRuntimeException("Extension must be subclass of "
                                                "bigflow.extension.BigFlowExtension")
        else:
            extension.setup(self)  # setup the extension
            self._extensions.append(extension)
github baidu / bigflow / bigflow_python / python / bigflow / pipeline / pipeline_base.py View on Github external
def run(self):
        """
        立刻运行Pipeline并等待结束

        Raises:
          BigflowRuntimeException:  若运行期出错抛出此异常
        """
        raise error.BigflowRuntimeException("run is not supported in this pipeline")
github baidu / bigflow / bigflow_python / python / bigflow / pipeline / pipeline_base.py View on Github external
def reset_counter(self, name):
        """
        将一个counter清零, 若 name 中不包含 group 部分, 则默认将 Flume group 下面对应的 counter 清零

        Args:
          name (str):  counter名称,其说明请参考 :mod:`counter模块`

        Raises:
          error.BigflowRuntimeException:  此方法不允许在 :mod:`Bigflow变换` 的用户自定义方法(UDF)中调用,否则抛出此异常
        """
        if os.getenv("__PYTHON_IN_REMOTE_SIDE", None) is not None:
            raise error.BigflowRuntimeException("reset_counter cannot be called at runtime")
        requests.reset_counter(name)