    001/*
    002 * Copyright (c) 2007-2017 Xplenty, Inc. All Rights Reserved.
    003 *
    004 * Project and contact information: http://www.cascading.org/
    005 *
    006 * This file is part of the Cascading project.
    007 *
    008 * Licensed under the Apache License, Version 2.0 (the "License");
    009 * you may not use this file except in compliance with the License.
    010 * You may obtain a copy of the License at
    011 *
    012 *     http://www.apache.org/licenses/LICENSE-2.0
    013 *
    014 * Unless required by applicable law or agreed to in writing, software
    015 * distributed under the License is distributed on an "AS IS" BASIS,
    016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    017 * See the License for the specific language governing permissions and
    018 * limitations under the License.
    019 */
    020
    021package cascading.pipe;
    022
    023import java.beans.ConstructorProperties;
    024
    025/**
    026 * The Merge Pipe allows for multiple branches, with the same fields to be spliced back into a single stream.
    027 * <p/>
    028 * The behavior is similar to the {@link GroupBy} merging features, but Merge does not perform any grouping or
    029 * sorting on keys. Thus, when using a MapReduce platform, no Reducer is required.
    030 * <p/>
    031 * Merge is non-blocking and performs no processing. Any number of branches and merges may be performed in a
    032 * {@link cascading.flow.Flow} without triggering any additional MapReduce jobs on the Hadoop platform.
    033 * <p/>
    034 * Unlike {@link HashJoin}, no preference need be made for left-hand or right-hand sided-ness of streams in relation
    035 * to their sizes.
    036 *
    037 * @see GroupBy
    038 */
    039public class Merge extends Splice
    040  {
    041  /**
    042   * Constructor Merge creates a new Merge instance.
    043   *
    044   * @param pipes
    045   */
    046  @ConstructorProperties({"pipes"})
    047  public Merge( Pipe... pipes )
    048    {
    049    super( null, pipes );
    050    }
    051
    052  /**
    053   * Constructor Merge creates a new Merge instance.
    054   *
    055   * @param name
    056   * @param pipes
    057   */
    058  @ConstructorProperties({"name", "pipes"})
    059  public Merge( String name, Pipe... pipes )
    060    {
    061    super( name, pipes );
    062    }
    063  }