Google cloud dataflow 如何在direct runner和dataflow中交换apache beam中的执行器?

Google cloud dataflow 如何在direct runner和dataflow中交换apache beam中的执行器?,google-cloud-dataflow,apache-beam,dataflow,Google Cloud Dataflow,Apache Beam,Dataflow,我试图在PipelineOptions上这样做,以创建更多的单线程测试 options.setExecutorService(new DirectExecutorService()); 其中DirectExecutorService执行方法如下所示 public void execute(Runnable r) { r.run(); //run on client thread(typically test thread) } 所有其他方法都不受支持,以防

我试图在PipelineOptions上这样做,以创建更多的单线程测试

    options.setExecutorService(new DirectExecutorService());
其中DirectExecutorService执行方法如下所示

  public void execute(Runnable r) {
          r.run(); //run on client thread(typically test thread)
  }
所有其他方法都不受支持,以防我在apache beam使用的方法上出错。但是,这里的堆栈跟踪显示它不再在我的测试线程上->

是否无法更改正在使用的执行器,以便所有逻辑都保留在测试线程上

另外,稍后,如果我能让logback的MDC在GCP上的dataflow中的apachebeam中工作,这将在生产中非常好。以前的职位->

谢谢, 院长