Package com.netflix.lipstick.model.operators

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


     * @param node the LOStore object to convert to P2jLOStore
     * @param lp the logical plan containing node
     * @throws FrontendException
     */
    public LOStoreJsonAdaptor(LOStore node, LogicalPlan lp) throws FrontendException {
        super(node, new P2jLOStore(), lp);
        P2jLOStore store = (P2jLOStore) p2j;
        store.setStorageLocation(node.getFileSpec().getFileName());
        String[] funcList = StringUtils.split(node.getFileSpec().getFuncName(), ".");
        store.setStorageFunction(funcList[funcList.length - 1]);
    }
View Full Code Here


        Assert.assertEquals(load.getStorageFunction(), funcList[funcList.length - 1]);
    }

    private void verifyStoreAdaptor(LOStoreJsonAdaptor adaptor, LOStore lro) {
        Assert.assertTrue(adaptor.getToP2jOperator() instanceof P2jLOStore);
        P2jLOStore store = (P2jLOStore) adaptor.getToP2jOperator();
        Assert.assertEquals(store.getStorageLocation(), lro.getFileSpec().getFileName());
        String[] funcList = StringUtils.split(lro.getFileSpec().getFuncName(), ".");
        Assert.assertEquals(store.getStorageFunction(), funcList[funcList.length - 1]);
    }
View Full Code Here

     */
    protected P2jLogicalRelationalOperator getOpForStore(POStore pop) {
        FileSpec pofs = pop.getSFile();
        for (Entry<String, P2jLogicalRelationalOperator> entry : p2jMap.entrySet()) {
            if (entry.getValue() instanceof P2jLOStore) {
                P2jLOStore store = (P2jLOStore) entry.getValue();
                if (store.getStorageLocation().equals(pofs.getFileName())
                    && pofs.getFuncName().endsWith(store.getStorageFunction())) {
                    return store;
                }
            }
        }
        return null;
View Full Code Here

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

        // Add all expected P2jLOStore objects
        // Aliases are lost, so use storageLocation instead
        P2jLOStore store1 = new P2jLOStore();
        store1.setStorageLocation("file://" + System.getProperty("user.dir") + "/test_out_cogrp");
        store1.setPredecessors(Lists.newArrayList("out"));
        P2jLOStore store2 = new P2jLOStore();
        store2.setStorageLocation("file://" + System.getProperty("user.dir") + "/test_out_join");
        store2.setPredecessors(Lists.newArrayList("tiny_colors_join"));
        P2jLOStore store3 = new P2jLOStore();
        store3.setStorageLocation("file://" + System.getProperty("user.dir") + "/test_out_tiny_colors");
        store3.setPredecessors(Lists.newArrayList("tiny_colors"));

        expectedOps.addAll(Lists.newArrayList(store1, store2, store3));

        // Add all expected P2jLOJoin objects
        P2jLOJoin join1 = new P2jLOJoin();
View Full Code Here

TOP

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

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.