Package org.apache.hcatalog.api

Examples of org.apache.hcatalog.api.HCatClient.createTable()


        HCatCreateTableDesc tableDesc = HCatCreateTableDesc
                .create(databaseName, tableName, cols)
                .ifNotExists(true)
                .comments("falcon integration test")
                .build();
        client.createTable(tableDesc);
    }

    public static void createTable(String metaStoreUrl, String databaseName, String tableName,
                                   List<String> partitionKeys) throws Exception {
        HCatClient client = HiveCatalogService.get(metaStoreUrl);
View Full Code Here


                .create(databaseName, tableName, cols)
                .ifNotExists(true)
                .comments("falcon integration test")
                .partCols(new ArrayList<HCatFieldSchema>(partitionSchema))
                .build();
        client.createTable(tableDesc);
    }

    public static void createExternalTable(String metaStoreUrl, String databaseName, String tableName,
                                           List<String> partitionKeys, String externalLocation) throws Exception {
        ArrayList<HCatFieldSchema> cols = new ArrayList<HCatFieldSchema>();
View Full Code Here

                .isTableExternal(true)
                .location(externalLocation)
                .build();

        HCatClient client = HiveCatalogService.get(metaStoreUrl);
        client.createTable(tableDesc);
    }

    public static void alterTable(String metaStoreUrl, String databaseName,
                                  String tableName) throws Exception {
        StringBuilder alterTableDdl = new StringBuilder();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.