use of org.apache.hop.beam.engines.direct.BeamDirectPipelineRunConfiguration in project hop by apache.
the class PipelineTestBase method createRunPipeline.
@Ignore
public void createRunPipeline(IVariables variables, PipelineMeta pipelineMeta) throws Exception {
/*
FileOutputStream fos = new FileOutputStream( "/tmp/"+pipelineMeta.getName()+".hpl" );
fos.write( pipelineMeta.getXml().getBytes() );
fos.close();
*/
PipelineOptions pipelineOptions = PipelineOptionsFactory.create();
pipelineOptions.setJobName(pipelineMeta.getName());
pipelineOptions.setUserAgent(BeamConst.STRING_HOP_BEAM);
BeamDirectPipelineRunConfiguration beamRunConfig = new BeamDirectPipelineRunConfiguration();
beamRunConfig.setTempLocation(System.getProperty("java.io.tmpdir"));
// No extra plugins to load : null option
HopPipelineMetaToBeamPipelineConverter converter = new HopPipelineMetaToBeamPipelineConverter(variables, pipelineMeta, metadataProvider, beamRunConfig);
Pipeline pipeline = converter.createPipeline();
PipelineResult pipelineResult = pipeline.run();
pipelineResult.waitUntilFinish();
MetricResults metricResults = pipelineResult.metrics();
MetricQueryResults allResults = metricResults.queryMetrics(MetricsFilter.builder().build());
for (MetricResult<Long> result : allResults.getCounters()) {
System.out.println("Name: " + result.getName() + " Attempted: " + result.getAttempted());
}
}
Aggregations