Exemplo n.º 1
0
  public void invokeUserFunction(String componentTypeName, StreamInvokable<OUT> userInvokable)
      throws IOException, InterruptedException {
    if (LOG.isDebugEnabled()) {
      LOG.debug(
          componentTypeName
              + " "
              + streamComponent.getName()
              + " invoked with instance id "
              + streamComponent.getInstanceID());
    }

    initializeOutputSerializers();

    try {
      streamComponent.invokeUserFunction(userInvokable);
    } catch (Exception e) {
      flushOutputs();
      throw new RuntimeException(e);
    }

    if (LOG.isDebugEnabled()) {
      LOG.debug(
          componentTypeName
              + " "
              + streamComponent.getName()
              + " invoke finished with instance id "
              + streamComponent.getInstanceID());
    }

    flushOutputs();
  }