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


Java LogicalPlan.size方法代码示例

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


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

示例1: test1

import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void test1() throws FrontendException {
    String query = "A = load 'x' as ( u:int, v:long, w:bytearray); " + 
                   "B = load 'y' as ( u:int, v:int, z:long); " +
                   "C = union onschema A, B; " +
                   "D = store C into 'output';";
    LogicalPlan plan = generateLogicalPlan( query );
    if( plan != null ) {
        int nodeCount = plan.size();
        UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
        visitor.visit();
        System.out.println( "Plan after setter: " + plan.toString() );
        Assert.assertEquals( nodeCount + 2, plan.size() );
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:16,代码来源:TestUnionOnSchemaSetter.java

示例2: test2

import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void test2() throws FrontendException {
    String query = "A = load 'x' as ( u:int, v:long, w:bytearray); " + 
                   "B = load 'y' as ( u:int, v:int, w:bytearray); " +
                   "C = union onschema A, B; " +
                   "D = store C into 'output';";
    LogicalPlan plan = generateLogicalPlan( query );
    if( plan != null ) {
        int nc = plan.size();
        UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
        visitor.visit();
        System.out.println( "Plan after setter: " + plan.toString() );
        Assert.assertEquals( nc + 1, plan.size() );
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:16,代码来源:TestUnionOnSchemaSetter.java

示例3: test3

import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void test3() throws FrontendException {
    String query = "A = load 'x' as ( u:int, v:long, w:bytearray); " + 
                   "B = load 'y' as ( u:int, v:long, w:bytearray); " +
                   "C = union onschema A, B; " +
                   "D = store C into 'output';";
    LogicalPlan plan = generateLogicalPlan( query );
    if( plan != null ) {
        int nc = plan.size();
        UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
        visitor.visit();
        System.out.println( "Plan after setter: " + plan.toString() );
        Assert.assertEquals( nc, plan.size() );
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:16,代码来源:TestUnionOnSchemaSetter.java

示例4: testMergeCompatibleSchema

import org.apache.pig.newplan.logical.relational.LogicalPlan; //导入方法依赖的package包/类
@Test
public void testMergeCompatibleSchema() throws FrontendException {
    String query = "A = load 'x' as ( u:int, v:long, w:int); " + 
                   "B = load 'y' as ( u:int, v:long, w:long); " +
                   "C = union onschema A, B; " +
                   "D = store C into 'output';";
    LogicalPlan plan = generateLogicalPlan( query );
    if( plan != null ) {
        int nc = plan.size();
        UnionOnSchemaSetter visitor = new UnionOnSchemaSetter( plan );
        visitor.visit();
        System.out.println( "Plan after setter: " + plan.toString() );
        Assert.assertEquals( nc+1, plan.size() ); // ForEach inserted before union
    }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:16,代码来源:TestUnionOnSchemaSetter.java


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