Package com.netflix.lipstick.model.operators

Examples of com.netflix.lipstick.model.operators.P2jLOLoad


     * @param node
     * @param lp
     * @throws FrontendException
     */
    public LOLoadJsonAdaptor(LOLoad node, LogicalPlan lp) throws FrontendException {
        super(node, new P2jLOLoad(), lp);
        P2jLOLoad load = (P2jLOLoad) p2j;
        load.setStorageLocation(node.getFileSpec().getFileName());
        String[] funcList = StringUtils.split(node.getFileSpec().getFuncName(), ".");
        load.setStorageFunction(funcList[funcList.length - 1]);
    }
View Full Code Here


        Assert.assertEquals(p2j.getLocation().getFilename(), lro.getLocation().file());
    }

    private void verifyLoadAdaptor(LOLoadJsonAdaptor adaptor, LOLoad lro) {
        Assert.assertTrue(adaptor.getToP2jOperator() instanceof P2jLOLoad);
        P2jLOLoad load = (P2jLOLoad) adaptor.getToP2jOperator();
        Assert.assertEquals(load.getStorageLocation(), lro.getFileSpec().getFileName());
        String[] funcList = StringUtils.split(lro.getFileSpec().getFuncName(), ".");
        Assert.assertEquals(load.getStorageFunction(), funcList[funcList.length - 1]);
    }
View Full Code Here

        // Container for all expected P2j objects
        Set<P2jLogicalRelationalOperator> expectedOps = new HashSet<P2jLogicalRelationalOperator>();

        // Add all expected P2jLOLoad objects
        P2jLOLoad load1 = new P2jLOLoad();
        load1.setAlias("tiny");
        load1.setSuccessors(Lists.newArrayList("tiny_colors", "tiny_colors_cogrp", "tiny_colors_join"));
        P2jLOLoad load2 = new P2jLOLoad();
        load2.setAlias("colors");
        load2.setSuccessors(Lists.newArrayList("tiny_colors", "colors_filtered", "tiny_colors_cogrp", "tiny_colors_join"));
        P2jLOLoad load3 = new P2jLOLoad();
        load3.setAlias("colors2");
        load3.setSuccessors(Lists.newArrayList("tiny_colors_cogrp", "tiny_colors_join"));
        P2jLOLoad load4 = new P2jLOLoad();
        load4.setAlias("colors3");
        load4.setSuccessors(Lists.newArrayList("tiny_colors_join"));

        expectedOps.addAll(Lists.newArrayList(load1, load2, load3, load4));

        // Add all expected P2jLOStore objects
        // Aliases are lost, so use storageLocation instead
View Full Code Here

TOP

Related Classes of com.netflix.lipstick.model.operators.P2jLOLoad

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.