0
我已经从Git Hub克隆了Cascading for the Impatient
。如何在Windows上使用Eclipse执行级联应用程序
我运行了gradle
命令来创建一个jar文件。
没有Hadoop cluster
是否有可能使用Eclipse来运行程序?
我是否必须设置任何额外的配置才能从Eclipse运行Cascading
应用程序?
我已经从Git Hub克隆了Cascading for the Impatient
。如何在Windows上使用Eclipse执行级联应用程序
我运行了gradle
命令来创建一个jar文件。
没有Hadoop cluster
是否有可能使用Eclipse来运行程序?
我是否必须设置任何额外的配置才能从Eclipse运行Cascading
应用程序?
当我们从eclipse或使用本地文件系统运行级联程序时,我们需要使用LocalFlowConnector
。
示例代码:
Properties properties = new Properties();
AppProps.setApplicationJarClass(properties, TestCascading.class);
FlowConnector flowConnector = new LocalFlowConnector();
// create the source tap
FileTap inTap = new FileTap(new TextLine(), "C://Users//rain.txt");
// create the sink tap
FileTap outTap = new FileTap(new TextLine(), "C://Users//out.txt");
// specify a pipe to connect the taps
Pipe copyPipe = new Pipe("copy");
// connect the taps, pipes, etc., into a flow
FlowDef flowDef = FlowDef.flowDef().addSource(copyPipe, inTap).addTailSink(copyPipe, outTap);
// run the flow
Flow flow = flowConnector.connect(flowDef);
flow.complete();