Package cascading.scheme.hadoop

Examples of cascading.scheme.hadoop.TextLine


    }

  @Test
  public void testCopyConfig() throws Exception
    {
    Tap source = new Lfs( new TextLine(), "input/path" );
    Tap sink = new Hfs( new TextLine(), "output/path", true );

    Pipe pipe = new Pipe( "test" );

    Configuration conf = ( (BaseHadoopPlatform) getPlatform() ).getConfiguration();
View Full Code Here


    collector.close();

    Pipe inPipe = new Pipe("in");
    Pipe p = new Each(inPipe, new Fields("value"), new ExpandProto(Example.Person.class), new Fields("id", "name", "email", "position"));

    Hfs sink = new Hfs(new TextLine(), "/tmp/output");
    new HadoopFlowConnector().connect(inTap, sink, p).complete();

    TupleEntryIterator iter = sink.openForRead(new HadoopFlowProcess());
    List<Tuple> results = new ArrayList<Tuple>();
    while (iter.hasNext()) {
View Full Code Here

  public void testLeftJoinLargeLHS() throws Exception {
    Map<String, Tap> sources = new HashMap<String, Tap>();
    sources.put("lhs", this.lhsStore);
    sources.put("rhs", this.rhsStore);

    Tap sink = new Hfs(new TextLine(), getTestRoot() + "/output");

    Pipe lhsPipe = new Pipe("lhs");
    Pipe rhsPipe = new Pipe("rhs");

    Pipe joined = new BloomJoin(lhsPipe, new Fields("key"), rhsPipe, new Fields("key"), new Fields("key", "key2", "lhs-value", "key-copy", "key2-copy", "rhs-value"), new LeftJoin());
View Full Code Here

  public void testRightJoinLargeRHS() throws Exception {
    Map<String, Tap> sources = new HashMap<String, Tap>();
    sources.put("lhs", this.lhsStore);
    sources.put("rhs", this.rhsStore);

    Tap sink = new Hfs(new TextLine(), getTestRoot() + "/output");

    Pipe lhsPipe = new Pipe("lhs");
    Pipe rhsPipe = new Pipe("rhs");

    Pipe joined = new BloomJoin(rhsPipe, new Fields("key"), lhsPipe, new Fields("key"), new Fields("key", "key2", "lhs-value", "key-copy", "key2-copy", "rhs-value"), new RightJoin(), BloomAssembly.CoGroupOrder.LARGE_RHS);
View Full Code Here

  @Test
  public void testBlackHoleWarning() throws IOException {

    FileSystemHelper.safeMkdirs(FileSystemHelper.getFS(), new Path(getTestRoot() + "/input"));
    Tap input = new Hfs(new TextLine(), getTestRoot() + "/input");
    Tap output = new Hfs(new TextLine(), getTestRoot() + "/output", SinkMode.REPLACE);
    Pipe removeAll = new Pipe("remove all");
    removeAll = new Each(removeAll, new RemoveAll());

    Flow flow = CascadingUtil.get().getFlowConnector().connect(input, output, removeAll);
    flow.complete();
View Full Code Here

    }

  @Override
  public FileType getFileTypeFor( String identifier )
    {
    return new Hfs( new TextLine(), identifier, SinkMode.KEEP );
    }
View Full Code Here

    }

  @Override
  public FileType getFileTypeFor( String identifier )
    {
    return new Hfs( new TextLine(), identifier, SinkMode.KEEP );
    }
View Full Code Here

TOP

Related Classes of cascading.scheme.hadoop.TextLine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.