Package org.apache.hive.hcatalog.api

Examples of org.apache.hive.hcatalog.api.HCatClient


        catch (URISyntaxException e) {
            throw new URIHandlerException(ErrorCode.E0906, uri, e);
        }
        HCatAccessorService hcatService = Services.get().get(HCatAccessorService.class);
        if (!hcatService.isRegisteredForNotification(hcatURI)) {
            HCatClient client = getHCatClient(uri, conf, user);
            try {
                String topic = client.getMessageBusTopicName(hcatURI.getDb(), hcatURI.getTable());
                if (topic == null) {
                    return;
                }
                hcatService.registerForNotification(hcatURI, topic, new HCatMessageHandler(uri.getAuthority()));
            }
View Full Code Here


        return pdmService.removeMissingDependency(hcatURI, actionID);
    }

    @Override
    public Context getContext(URI uri, Configuration conf, String user) throws URIHandlerException {
        HCatClient client = getHCatClient(uri, conf, user);
        return new HCatContext(conf, user, client);
    }
View Full Code Here

        return new HCatContext(conf, user, client);
    }

    @Override
    public boolean exists(URI uri, Context context) throws URIHandlerException {
        HCatClient client = ((HCatContext) context).getHCatClient();
        return exists(uri, client, false);
    }
View Full Code Here

        return exists(uri, client, false);
    }

    @Override
    public boolean exists(URI uri, Configuration conf, String user) throws URIHandlerException {
        HCatClient client = getHCatClient(uri, conf, user);
        return exists(uri, client, true);
    }
View Full Code Here

        throw new UnsupportedOperationException("Creation of partition is not supported for " + uri);
    }

    @Override
    public boolean delete(URI uri, Configuration conf) throws LauncherException {
        HCatClient client = getHCatClient(uri, conf);
        try {
            HCatURI hcatURI = new HCatURI(uri.toString());
            client.dropPartitions(hcatURI.getDb(), hcatURI.getTable(), hcatURI.getPartitionMap(), true);
            System.out.println("Dropped partitions for " + uri);
            return true;
        }
        catch (ConnectionFailureException e) {
            throw new LauncherException("Error trying to drop " + uri, e);
View Full Code Here

TOP

Related Classes of org.apache.hive.hcatalog.api.HCatClient

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.