Package org.openquark.cal.machine

Examples of org.openquark.cal.machine.StatusListener$Status$Entity


    @Override
    public void handleRerun(String cluster, String entityType, String entityName,
                            String nominalTime, String runId, String wfId, long msgReceivedTime) {
        try {
            Entity entity = getEntity(entityType, entityName);
            Retry retry = getRetry(entity);

            if (retry == null) {
                LOG.warn("Retry not configured for entity:" + entityType + "("
                        + entity.getName() + "), ignoring failed retries");
                return;
            }

            int attempts = retry.getAttempts();
            Frequency delay = retry.getDelay();
View Full Code Here


        String[] pathGroups = falconInPaths.split("#");
        String[] inputFeeds = falconInputFeeds.split("#");
        String[] inputFeedStorageTypes = falconInputFeedStorageTypes.split("#");

        Map<String, Long> computedMetrics = new LinkedHashMap<String, Long>();
        Entity entity = EntityUtil.getEntity(message.getEntityType(), message.getEntityName());
        if (EntityUtil.getLateProcess(entity) != null) {
            List<String> lateFeed = new ArrayList<String>();
            for (LateInput li : EntityUtil.getLateProcess(entity).getLateInputs()) {
                lateFeed.add(li.getInput());
            }
View Full Code Here

                    for (FileStatus file : files) {
                        String fileName = file.getPath().getName();
                        String encodedEntityName = fileName.substring(0, fileName.length() - 4); // drop
                        // ".xml"
                        String entityName = URLDecoder.decode(encodedEntityName, UTF_8);
                        Entity entity = restore(type, entityName);
                        entityMap.put(entityName, entity);
                        onAdd(entity, true);
                    }
                }
            }
View Full Code Here

    private synchronized void updateInternal(EntityType type, Entity entity) throws FalconException {
        try {
            if (get(type, entity.getName()) != null) {
                persist(type, entity);
                ConcurrentHashMap<String, Entity> entityMap = dictionary.get(type);
                Entity oldEntity = entityMap.get(entity.getName());
                onChange(oldEntity, entity);
                entityMap.put(entity.getName(), entity);
            } else {
                throw new FalconException(entity.toShortString() + " doesn't exist");
            }
View Full Code Here

    public boolean remove(EntityType type, String name) throws FalconException {
        Map<String, Entity> entityMap = dictionary.get(type);
        if (entityMap.containsKey(name)) {
            try {
                archive(type, name);
                Entity entity = entityMap.get(name);
                onRemove(entity);
                entityMap.remove(name);
            } catch (IOException e) {
                throw new StoreAccessException(e);
            }
View Full Code Here

    public EntityList(Entity[] elements) {
        int len = elements.length;
        EntityElement[] items = new EntityElement[len];
        for (int i = 0; i < len; i++) {
            Entity e = elements[i];
            EntityElement o = new EntityElement();
            o.type = e.getEntityType().name().toLowerCase();
            o.name = e.getName();
            o.status = null;
            items[i] = o;
        }
        this.elements = items;
    }
View Full Code Here

    public EntityList(Entity[] dependentEntities, Entity entity) {
        int len = dependentEntities.length;
        EntityElement[] items = new EntityElement[len];
        for (int i = 0; i < len; i++) {
            Entity e = dependentEntities[i];
            EntityElement o = new EntityElement();
            o.type = e.getEntityType().name().toLowerCase();
            o.name = e.getName();
            o.status = null;
            o.tag = getEntityTag(e, entity);
            items[i] = o;
        }
        this.elements = items;
View Full Code Here

    }

    private Entity getEntity(HttpServletRequest request, String type) {
        try {
            request.getInputStream().reset();
            Entity entity = deserializeEntity(request, EntityType.valueOf(type.toUpperCase()));
            request.getInputStream().reset();
            return entity;
        } catch (Exception e) {
            throw FalconWebException.newException(e, Response.Status.BAD_REQUEST);
        }
View Full Code Here

                GenericAlert.instrumentFailedInstance(cluster, entityType,
                        entityName, nominalTime, workflowId, workflowUser, runId, operation,
                        SchemaHelper.formatDateUTC(startTime), "", "", duration);

            } else if (status.equalsIgnoreCase("SUCCEEDED")) {
                Entity entity = EntityUtil.getEntity(entityType, entityName);
                //late data handling not applicable for feed retention action
                if (!operation.equalsIgnoreCase("DELETE") && EntityUtil.getLateProcess(entity) != null) {
                    latedataHandler.handleRerun(cluster, entityType, entityName,
                        nominalTime, runId, workflowId, workflowUser,
                        System.currentTimeMillis());
View Full Code Here

        checkColo(colo);
        checkType(type);
        try {
            validateNotEmpty("entityName", entity);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            Entity entityObject = EntityUtil.getEntity(type, entity);
            return wfEngine.getRunningInstances(entityObject);
        } catch (Throwable e) {
            LOG.error("Failed to get running instances", e);
            throw FalconWebException.newInstanceException(e, Response.Status.BAD_REQUEST);
        }
View Full Code Here

TOP

Related Classes of org.openquark.cal.machine.StatusListener$Status$Entity

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.