Package org.apache.oozie.service

Examples of org.apache.oozie.service.PartitionDependencyManagerService


        String fullDeps = newHCatDependency1 + CoordELFunctions.INSTANCE_SEPARATOR + newHCatDependency2;
        String actionId = addInitRecords(fullDeps);
        checkCoordAction(actionId, fullDeps, CoordinatorAction.Status.WAITING);

        PartitionDependencyManagerService pdms = Services.get().get(PartitionDependencyManagerService.class);
        pdms.addMissingDependency(hcatUri1, actionId);
        pdms.addMissingDependency(hcatUri2, actionId);

        pdms.partitionAvailable("hcat.server.com:5080", "mydb", "clicks",
                getPartitionMap("src=search;datastamp=12;region=us"));
        Collection<String> availableURIs = pdms.getAvailableDependencyURIs(actionId);
        assertEquals(1, availableURIs.size());
        assertTrue(availableURIs.contains(newHCatDependency2));

        new CoordActionUpdatePushMissingDependency(actionId).call();

        checkCoordAction(actionId, newHCatDependency1, CoordinatorAction.Status.WAITING);

        // second partition available

        pdms.partitionAvailable("hcat.server.com:5080", "mydb", "clicks",
                getPartitionMap("src=search;datastamp=11;region=us"));
        availableURIs = pdms.getAvailableDependencyURIs(actionId);
        assertEquals(1, availableURIs.size());
        assertTrue(availableURIs.contains(newHCatDependency1));

        new CoordActionUpdatePushMissingDependency(actionId).call();

        checkCoordAction(actionId, "", CoordinatorAction.Status.READY);
        assertNull(pdms.getAvailableDependencyURIs(actionId));

    }
View Full Code Here


            }
            finally {
                closeQuietly(client, true);
            }
        }
        PartitionDependencyManagerService pdmService = Services.get().get(PartitionDependencyManagerService.class);
        pdmService.addMissingDependency(hcatURI, actionID);
    }
View Full Code Here

            hcatURI = new HCatURI(uri);
        }
        catch (URISyntaxException e) {
            throw new RuntimeException(e); // Unexpected at this point
        }
        PartitionDependencyManagerService pdmService = Services.get().get(PartitionDependencyManagerService.class);
        return pdmService.removeMissingDependency(hcatURI, actionID);
    }
View Full Code Here

        String pushMissingDeps = coordAction.getPushMissingDependencies();
        if (pushMissingDeps == null || pushMissingDeps.length() == 0) {
            LOG.info("Nothing to check. Empty push missing dependency");
        }
        else {
            PartitionDependencyManagerService pdms = Services.get().get(PartitionDependencyManagerService.class);
            Collection<String> availDepList = pdms.getAvailableDependencyURIs(actionId);
            if (availDepList == null || availDepList.size() == 0) {
                LOG.info("There are no available dependencies");
                if (isTimeout()) { // Poll and check as one last try
                    queue(new CoordPushDependencyCheckXCommand(coordAction.getId()), 100);
                }
View Full Code Here

TOP

Related Classes of org.apache.oozie.service.PartitionDependencyManagerService

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.