当前位置: 首页>>代码示例>>Java>>正文


Java Utils.mergeCollection方法代码示例

本文整理汇总了Java中org.apache.pig.impl.util.Utils.mergeCollection方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.mergeCollection方法的具体用法?Java Utils.mergeCollection怎么用?Java Utils.mergeCollection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.pig.impl.util.Utils的用法示例。


在下文中一共展示了Utils.mergeCollection方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doAllSuccessors

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
protected void doAllSuccessors(Operator node,
                               Set<Operator> seen,
                               Collection<Operator> fifo) throws FrontendException {
    if (!seen.contains(node)) {
        // We haven't seen this one before.
        Collection<Operator> succs = Utils.mergeCollection(plan.getSuccessors(node), plan.getSoftLinkSuccessors(node));
        if (succs != null && succs.size() > 0) {
            // Do all our successors before ourself
            for (Operator op : succs) {
                doAllSuccessors(op, seen, fifo);
            }
        }
        // Now do ourself
        seen.add(node);
        fifo.add(node);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:18,代码来源:ReverseDependencyOrderWalker.java

示例2: doAllPredecessors

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
protected void doAllPredecessors(Operator node,
                               Set<Operator> seen,
                               Collection<Operator> fifo) throws FrontendException {
    if (!seen.contains(node)) {
        // We haven't seen this one before.
        Collection<Operator> preds = Utils.mergeCollection(plan.getPredecessors(node), plan.getSoftLinkPredecessors(node));
        if (preds != null && preds.size() > 0) {
            // Do all our predecessors before ourself
            for (Operator op : preds) {
                doAllPredecessors(op, seen, fifo);
            }
        }
        // Now do ourself
        seen.add(node);
        fifo.add(node);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:18,代码来源:DependencyOrderWalker.java

示例3: doAllSuccessors

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
protected void doAllSuccessors(O node,
                               Set<O> seen,
                               Collection<O> fifo) throws VisitorException {
    if (!seen.contains(node)) {
        // We haven't seen this one before.
        Collection<O> succs = Utils.mergeCollection(mPlan.getSuccessors(node), mPlan.getSoftLinkSuccessors(node));
        if (succs != null && succs.size() > 0) {
            // Do all our successors before ourself
            for (O op : succs) {
                doAllSuccessors(op, seen, fifo);
            }
        }
        // Now do ourself
        seen.add(node);
        fifo.add(node);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:18,代码来源:ReverseDependencyOrderWalker.java

示例4: doAllPredecessors

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
protected void doAllPredecessors(O node,
                               Set<O> seen,
                               Collection<O> fifo) throws VisitorException {
    if (!seen.contains(node)) {
        // We haven't seen this one before.
        Collection<O> preds = Utils.mergeCollection(mPlan.getPredecessors(node), mPlan.getSoftLinkPredecessors(node));
        if (preds != null && preds.size() > 0) {
            // Do all our predecessors before ourself
            for (O op : preds) {
                doAllPredecessors(op, seen, fifo);
            }
        }
        // Now do ourself
        seen.add(node);
        fifo.add(node);
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:18,代码来源:DependencyOrderWalker.java

示例5: doAllSuccessors

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
protected void doAllSuccessors(Operator node,
                               Collection<Operator> fifo) throws FrontendException {
    Collection<Operator> succs = Utils.mergeCollection(plan.getSuccessors(node), plan.getSoftLinkSuccessors(node));
    if (succs != null && succs.size() > 0) {
        // Do all our successors before ourself
        for (Operator op : succs) {
            doAllSuccessors(op, fifo);
        }
    }
    // Now do ourself
    fifo.add(node);
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:13,代码来源:ReverseDependencyOrderWalkerWOSeenChk.java

示例6: depthFirst

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
private void depthFirst(Operator node,
                        Collection<Operator> successors,
                        Set<Operator> seen,
                        PlanVisitor visitor) throws FrontendException {
    if (successors == null) return;

    for (Operator suc : successors) {
        if (seen.add(suc)) {
            suc.accept(visitor);
            Collection<Operator> newSuccessors = Utils.mergeCollection(plan.getSuccessors(suc), plan.getSoftLinkSuccessors(suc));
            depthFirst(suc, newSuccessors, seen, visitor);
        }
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:15,代码来源:DepthFirstWalker.java

示例7: depthFirst

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
private void depthFirst(Operator node,
                Collection<Operator> successors,
                Set<Operator> seen, PlanVisitor visitor)
                throws FrontendException {
    if (successors == null) return;
    
    Operator[] sucs = successors.toArray(new Operator[0]);
    for (Operator suc : sucs) {
        if (seen.add(suc)) {
            if (suc instanceof NotExpression)
                ((NOTConversionVisitor) visitor).flip();
            if(suc instanceof AndExpression
                    || suc instanceof NotExpression
                    || suc instanceof OrExpression
            ){
                //visit successors of suc only if they are the boolean operators
                // the NOT conversion should be propagated only for 
                // their successors 
                Collection<Operator> newSuccessors = Utils.mergeCollection(plan.getSuccessors(suc), plan.getSoftLinkSuccessors(suc));
                depthFirst(suc, newSuccessors, seen, visitor);
            }
            suc.accept(visitor);
            if (suc instanceof NotExpression)
                ((NOTConversionVisitor) visitor).flip();
        }
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:28,代码来源:NotConversionVisitor.java

示例8: depthFirst

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void depthFirst(O node,
                        Collection<O> successors,
                        Set<O> seen,
                        PlanVisitor<O, P> visitor) throws VisitorException {
    if (successors == null) return;

    for (O suc : successors) {
        if (seen.add(suc)) {
            suc.visit(visitor);
            Collection<O> newSuccessors = Utils.mergeCollection(mPlan.getSuccessors(suc), mPlan.getSoftLinkSuccessors(suc));
            depthFirst(suc, newSuccessors, seen, visitor);
        }
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:16,代码来源:DepthFirstWalker.java

示例9: depthFirst

import org.apache.pig.impl.util.Utils; //导入方法依赖的package包/类
private void depthFirst(Operator node, Collection<Operator> predecessors, Set<Operator> seen,
        PlanVisitor visitor) throws FrontendException {
    if (predecessors == null)
        return;

    boolean thisBranchFlag = branchFlag;
    for (Operator pred : predecessors) {
        if (seen.add(pred)) {
            branchFlag = thisBranchFlag;
            pred.accept(visitor);
            Collection<Operator> newPredecessors = Utils.mergeCollection(plan.getPredecessors(pred), plan.getSoftLinkPredecessors(pred));
            depthFirst(pred, newPredecessors, seen, visitor);
        }
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:16,代码来源:PreOrderDepthFirstWalker.java


注:本文中的org.apache.pig.impl.util.Utils.mergeCollection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。