Package org.apache.falcon

Examples of org.apache.falcon.FalconException


            LOG.info("Destroying service : " + service.getClass().getName());
            try {
                service.destroy();
            } catch (Throwable t) {
                LOG.fatal("Failed to destroy service " + service.getClass().getName(), t);
                throw new FalconException(t);
            }
            LOG.info("Service destroyed : " + service.getClass().getName());
        }
    }
View Full Code Here


        try {
            HCatClient client = get(catalogUrl);
            HCatTable table = client.getTable(database, tableName);
            return !table.getTabletype().equals("MANAGED_TABLE");
        } catch (HCatException e) {
            throw new FalconException(e);
        }
    }
View Full Code Here

                catalogPartitionList.add(partition);
            }

            return catalogPartitionList;
        } catch (HCatException e) {
            throw new FalconException(e);
        }
    }
View Full Code Here

        try {
            HCatClient client = get(catalogUrl);
            client.dropPartitions(database, tableName, partitions, true);
        } catch (HCatException e) {
            throw new FalconException(e);
        }

        return true;
    }
View Full Code Here

        try {
            HCatClient client = get(catalogUrl);
            HCatPartition hCatPartition = client.getPartition(database, tableName, partitionSpec);
            return createCatalogPartition(hCatPartition);
        } catch (HCatException e) {
            throw new FalconException(e);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public <T> T evaluateFullExpression(String expression, Class<T> clazz) throws FalconException {
        try {
            return (T) EVALUATOR.evaluate(expression, clazz, RESOLVER, RESOLVER);
        } catch (ELException e) {
            throw new FalconException("Unable to evaluate " + expression, e);
        }
    }
View Full Code Here

    public synchronized void register(FalconService service)
        throws FalconException {

        if (services.containsKey(service.getName())) {
            throw new FalconException("Service " + service.getName() + " already registered");
        } else {
            services.put(service.getName(), service);
        }
    }
View Full Code Here

        return services.values().iterator();
    }

    public FalconService init(String serviceName) throws FalconException {
        if (isRegistered(serviceName)) {
            throw new FalconException("Service is already initialized " + serviceName);
        }
        FalconService service = ReflectionUtils.getInstance(serviceName + ".impl");
        register(service);
        return service;
    }
View Full Code Here

                "falcon.cleanup.service.frequency", "days(1)");
        try {
            return (Long) evaluator.evaluate("${" + delay + "}", Long.class,
                    resolver, resolver);
        } catch (ELException e) {
            throw new FalconException("Exception in EL evaluation", e);
        }
    }
View Full Code Here

        return StartupProperties.get().containsKey(CATALOG_SERVICE);
    }

    public static AbstractCatalogService getCatalogService() throws FalconException {
        if (!isEnabled()) {
            throw new FalconException(
                "Catalog integration is not enabled in falcon. Implementation is missing: " + CATALOG_SERVICE);
        }

        return ReflectionUtils.getInstance(CATALOG_SERVICE);
    }
View Full Code Here

TOP

Related Classes of org.apache.falcon.FalconException

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.