本文整理了Java中cascading.flow.Flow.writeStepsDOT()
方法的一些代码示例,展示了Flow.writeStepsDOT()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.writeStepsDOT()
方法的具体详情如下:
包路径:cascading.flow.Flow
类名称:Flow
方法名:writeStepsDOT
[英]Method writeStepsDOT writes this Flow step graph to the given filename as a DOT file for import into a graphics package.
[中]方法writeStepsDOT将此流程步骤图作为点文件写入给定的文件名,以便导入到图形包中。
代码示例来源:origin: org.springframework.data/spring-cascading
@Override
public void afterPropertiesSet() throws Exception {
flow = createFlow();
if (skipStrategy != null) {
flow.setFlowSkipStrategy(skipStrategy);
}
if (stepStrategy != null) {
flow.setFlowStepStrategy(stepStrategy);
}
if (listeners != null) {
for (FlowListener listener : listeners) {
flow.addListener(listener);
}
}
if (StringUtils.hasText(writeDOT)) {
flow.writeDOT(writeDOT);
}
if (StringUtils.hasText(writeStepsDOT)) {
flow.writeStepsDOT(writeStepsDOT);
}
if (priority != null) {
flow.setSubmitPriority(priority);
}
}
代码示例来源:origin: cwensel/cascading
/**
* sanity check to make sure writeDOT still works
*
* @throws Exception
*/
@Test
public void testWriteDot() throws Exception
{
Tap source = getPlatform().getTextFile( "input" );
Tap sink = getPlatform().getTextFile( "unknown" );
Pipe pipe = new Pipe( "test" );
pipe = new Each( pipe, new Fields( "line" ), new RegexSplitter( Fields.UNKNOWN ) );
pipe = new Each( pipe, new Debug() );
pipe = new Each( pipe, new Fields( 2 ), new Identity( new Fields( "label" ) ) );
pipe = new Each( pipe, new Debug() );
pipe = new Each( pipe, new Fields( "label" ), new RegexFilter( "[A-Z]*" ) );
pipe = new Each( pipe, new Debug() );
pipe = new GroupBy( pipe, Fields.ALL );
pipe = new GroupBy( pipe, Fields.ALL );
Flow flow = getPlatform().getFlowConnector().connect( source, sink, pipe );
String outputPath = getOutputPath( "writedot.dot" );
flow.writeDOT( outputPath );
assertTrue( new File( outputPath ).exists() );
outputPath = getOutputPath( "writestepdot.dot" );
flow.writeStepsDOT( outputPath );
assertTrue( new File( outputPath ).exists() );
}
代码示例来源:origin: cascading/cascading-platform
/**
* sanity check to make sure writeDOT still works
*
* @throws Exception
*/
@Test
public void testWriteDot() throws Exception
{
Tap source = getPlatform().getTextFile( "input" );
Tap sink = getPlatform().getTextFile( "unknown" );
Pipe pipe = new Pipe( "test" );
pipe = new Each( pipe, new Fields( "line" ), new RegexSplitter( Fields.UNKNOWN ) );
pipe = new Each( pipe, new Debug() );
pipe = new Each( pipe, new Fields( 2 ), new Identity( new Fields( "label" ) ) );
pipe = new Each( pipe, new Debug() );
pipe = new Each( pipe, new Fields( "label" ), new RegexFilter( "[A-Z]*" ) );
pipe = new Each( pipe, new Debug() );
pipe = new GroupBy( pipe, Fields.ALL );
pipe = new GroupBy( pipe, Fields.ALL );
Flow flow = getPlatform().getFlowConnector().connect( source, sink, pipe );
String outputPath = getOutputPath( "writedot.dot" );
flow.writeDOT( outputPath );
assertTrue( new File( outputPath ).exists() );
outputPath = getOutputPath( "writestepdot.dot" );
flow.writeStepsDOT( outputPath );
assertTrue( new File( outputPath ).exists() );
}
内容来源于网络,如有侵权,请联系作者删除!