本文整理了Java中cascading.util.Util.createHashMap()
方法的一些代码示例,展示了Util.createHashMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.createHashMap()
方法的具体详情如下:
包路径:cascading.util.Util
类名称:Util
方法名:createHashMap
暂无
代码示例来源:origin: cwensel/cascading
protected void initialize( Map<String, Tap> sources, Map<String, Tap> sinks, Pipe... tails )
{
this.sources = sources;
this.sinks = sinks;
this.traps = Util.createHashMap();
assembleGraph( tails, sources, sinks );
verifyGraph();
}
代码示例来源:origin: cwensel/cascading
public MulitStepFlowGraph()
{
Pipe lower = new Pipe( "lower" );
Pipe upper = new Pipe( "upper" );
lower = new Checkpoint( lower );
upper = new Checkpoint( upper );
lower = new Checkpoint( lower );
upper = new Checkpoint( upper );
Pipe sink = new Merge( "sink", lower, upper );
Map<String, Tap> sources = createHashMap();
sources.put( lower.getName(), new NonTap( new Fields( "offset", "line" ) ) );
sources.put( upper.getName(), new NonTap( new Fields( "offset", "line" ) ) );
Map<String, Tap> sinks = createHashMap();
sinks.put( sink.getName(), new NonTap( new Fields( "offset", "line" ) ) );
initialize( sources, sinks, sink );
}
}
代码示例来源:origin: cwensel/cascading
public LoneGroupAssertionGraph()
{
Pipe pipe = new Pipe( "test" );
pipe = new Each( pipe, AssertionLevel.STRICT, new AssertNotNull() );
pipe = new Each( pipe, new Fields( "line" ), new RegexFilter( "^POST" ) );
pipe = new Each( pipe, new Fields( "line" ), AssertionLevel.STRICT, new AssertMatches( "^POST" ) );
pipe = new GroupBy( pipe, new Fields( "line" ) );
pipe = new Every( pipe, AssertionLevel.STRICT, new AssertGroupSizeEquals( 7L ) );
Map<String, Tap> sources = createHashMap();
sources.put( "test", new NonTap( new Fields( "line" ) ) );
Map<String, Tap> sinks = createHashMap();
sinks.put( "test", new NonTap() );
initialize( sources, sinks, pipe );
}
}
代码示例来源:origin: cwensel/cascading
public JoinAroundJoinRightMostGraph()
{
Function function = new Insert( new Fields( "num", "char" ), "a", "b" );
Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), function );
Pipe pipeUpper1 = new Each( new Pipe( "upper1" ), new Fields( "line" ), function );
Pipe pipeUpper2 = new Each( new Pipe( "upper2" ), new Fields( "line" ), function );
Pipe splice1 = new HashJoin( pipeLower, new Fields( "num" ), pipeUpper1, new Fields( "num" ), new Fields( "num1", "char1", "num2", "char2" ) );
splice1 = new Each( splice1, new Identity() );
Pipe splice2 = new HashJoin( splice1, new Fields( "num1" ), pipeUpper2, new Fields( "num" ), new Fields( "num1", "char1", "num2", "char2", "num3", "char3" ) );
Map<String, Tap> sources = createHashMap();
sources.put( "lower", new NonTap( new Fields( "offset", "line" ) ) );
NonTap shared = new NonTap( new Fields( "offset", "line" ) );
sources.put( "upper1", shared );
sources.put( "upper2", shared );
Map<String, Tap> sinks = createHashMap();
sinks.put( splice2.getName(), new NonTap( new Fields( "offset", "line" ) ) );
initialize( sources, sinks, splice2 );
}
}
代码示例来源:origin: cwensel/cascading
public JoinAroundJoinRightMostGraphSwapped()
{
Function function = new Insert( new Fields( "num", "char" ), "a", "b" );
Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), function );
Pipe pipeUpper1 = new Each( new Pipe( "upper1" ), new Fields( "line" ), function );
Pipe pipeUpper2 = new Each( new Pipe( "upper2" ), new Fields( "line" ), function );
Pipe splice1 = new HashJoin( pipeLower, new Fields( "num" ), pipeUpper1, new Fields( "num" ), new Fields( "num1", "char1", "num2", "char2" ) );
splice1 = new Each( splice1, new Identity() );
Pipe splice2 = new HashJoin( pipeUpper2, new Fields( "num1" ), splice1, new Fields( "num" ), new Fields( "num1", "char1", "num2", "char2", "num3", "char3" ) );
Map<String, Tap> sources = createHashMap();
sources.put( "lower", new NonTap( new Fields( "offset", "line" ) ) );
NonTap shared = new NonTap( new Fields( "offset", "line" ) );
sources.put( "upper1", shared );
sources.put( "upper2", shared );
Map<String, Tap> sinks = createHashMap();
sinks.put( splice2.getName(), new NonTap( new Fields( "offset", "line" ) ) );
initialize( sources, sinks, splice2 );
}
}
代码示例来源:origin: cwensel/cascading
public HashJoinSameSourceGraph()
{
Function function = new Insert( new Fields( "num", "char" ), "a", "b" );
Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), function );
Pipe pipeUpper1 = new Each( new Pipe( "upper1" ), new Fields( "line" ), function );
Pipe pipeUpper2 = new Each( new Pipe( "upper2" ), new Fields( "line" ), function );
Pipe splice1 = new HashJoin( pipeUpper1, new Fields( "num" ), pipeUpper2, new Fields( "num" ), new Fields( "num1", "char1", "num2", "char2" ) );
splice1 = new Each( splice1, new Identity() );
Pipe splice2 = new HashJoin( pipeLower, new Fields( "num" ), splice1, new Fields( "num1" ), new Fields( "num1", "char1", "num2", "char2", "num3", "char3" ) );
Map<String, Tap> sources = createHashMap();
sources.put( "lower", new NonTap( new Fields( "offset", "line" ) ) );
NonTap shared = new NonTap( new Fields( "offset", "line" ) );
sources.put( "upper1", shared );
sources.put( "upper2", shared );
Map<String, Tap> sinks = createHashMap();
sinks.put( splice2.getName(), new NonTap( new Fields( "offset", "line" ) ) );
initialize( sources, sinks, splice2 );
}
}
代码示例来源:origin: cwensel/cascading
Map<String, Tap> sources = createHashMap();
sources.put( "upper2", new NonTap( new Fields( "offset", "line" ) ) );
Map<String, Tap> sinks = createHashMap();
内容来源于网络,如有侵权,请联系作者删除!