DataflowRunner extends PipelineRunner<DataflowPipelineJob> { @Override public String toString() { return "DataflowRunner#" + options.getJobName(); } @VisibleForTesting protected  DataflowRunner(DataflowPipelineOptions options); static DataflowRunner fromOptions(PipelineOptions options); @Override DataflowPipelineJob run(Pipeline pipeline); static boolean hasExperiment(DataflowPipelineDebugOptions options, String experiment); DataflowPipelineTranslator getTranslator(); @Experimental void setHooks(DataflowRunnerHooks hooks); @Override String toString(); static final String PROJECT_ID_REGEXP; }
@Test public void testToString() { DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class); options.setJobName("TestJobName"); options.setProject("test-project"); options.setRegion(REGION_ID); options.setTempLocation("gs: options.setGcpCredential(new TestCredential()); options.setPathValidatorClass(NoopPathValidator.class); options.setRunner(DataflowRunner.class); assertEquals("DataflowRunner#testjobname", DataflowRunner.fromOptions(options).toString()); }
@Test public void testToString() { assertEquals( "TestDataflowRunner#TestAppName", TestDataflowRunner.fromOptions(options).toString()); }
@Test public void testToString() { DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class); options.setJobName("TestJobName"); options.setProject("test-project"); options.setTempLocation("gs: options.setGcpCredential(new TestCredential()); options.setPathValidatorClass(NoopPathValidator.class); options.setRunner(DataflowRunner.class); assertEquals("DataflowRunner#testjobname", DataflowRunner.fromOptions(options).toString()); }