public XFlattenedColumns getQueryableFields(String tableName, boolean flattened) { WebTarget target = getMetastoreWebTarget(); JAXBElement<XFlattenedColumns> fields = target.path("flattened").path(tableName) .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("add_chains", flattened) .request(MediaType.APPLICATION_XML).get(new GenericType<JAXBElement<XFlattenedColumns>>() { }); return fields.getValue(); }
public XDimensionTable getDimensionTable(String table) { WebTarget target = getMetastoreWebTarget(); JAXBElement<XDimensionTable> result = target.path("dimtables").path(table) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(new GenericType<JAXBElement<XDimensionTable>>() { }); return result.getValue(); }
public List<String> getAllStoragesOfFactTable(String factName) { WebTarget target = getMetastoreWebTarget(); StringList storageList = target.path("facts").path(factName).path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return storageList.getElements(); }
public List<String> getAllStoragesOfDimTable(String dimTblName) { WebTarget target = getMetastoreWebTarget(); StringList list = target.path("dimtables").path(dimTblName).path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return list.getElements(); }
public Date getLatestDateOfCube(String cubeName, String timePartition) { return getMetastoreWebTarget().path("cubes").path(cubeName).path("latestdate") .queryParam("timeDimension", timePartition) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(DateTime.class).getDate(); }
public List<String> getAlldatabases() { WebTarget target = getMetastoreWebTarget(); StringList databases = target.path("databases") .queryParam("sessionid", connection.getSessionHandle()) .request().get(StringList.class); return databases.getElements(); }
public APIResult dropPartitionsOfFactTable(String factName, String storage, String filter) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(factName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("filter", filter) .request(MediaType.APPLICATION_XML) .delete()); }
public APIResult dropAllPartitionsOfDimensionTable(String dimTblName, String storage, String filter) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("dimtables").path(dimTblName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("filter", filter) .request(MediaType.APPLICATION_XML) .delete()); }
public List<String> getAllDimensionTables(String dimensionName) { if (dimensionName == null) { return getAllDimensionTables(); } WebTarget target = getMetastoreWebTarget(); StringList dimtables; dimtables = target.path("dimensions").path(dimensionName).path("dimtables") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return dimtables.getElements(); }
public APIResult createDatabase(String database, boolean ignoreIfExists) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("databases") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("ignoreIfExisting", ignoreIfExists) .request(MediaType.APPLICATION_XML) .post(Entity.xml(database))); }
public APIResult dropFactTable(String factName, boolean cascade) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(factName) .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("cascade", cascade) .request(MediaType.APPLICATION_XML) .delete()); }
public APIResult dropAllStoragesOfFactTable(String factName) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(factName).path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .delete()); }
public APIResult dropSegmentation(String segName) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("segmentations").path(segName) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .delete()); }
public APIResult dropCube(String cubeName) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("cubes").path(cubeName) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML).delete()); }
public APIResult addStorageToFactTable(String factname, XStorageTableElement storage) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(factname).path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XStorageTableElement>>( objFact.createXStorageTableElement(storage)){}))); }
public APIResult dropAllStorages() { WebTarget target = getMetastoreWebTarget(); return translate(target.path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .delete()); }
public APIResult updatePartitionsOfDimensionTable(String dimTblName, String storage, XPartitionList partitions) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("dimtables").path(dimTblName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .put(Entity.xml(new GenericEntity<JAXBElement<XPartitionList>>(objFact.createXPartitionList(partitions)){}))); }
public APIResult createCube(XCube cube) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("cubes") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XCube>>(objFact.createXCube(cube)){}))); }
public APIResult createCube(XCube cube) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("cubes") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XCube>>(objFact.createXCube(cube)){}))); }
public APIResult updateCube(String cubeName, XCube cube) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("cubes").path(cubeName) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .put(Entity.xml(new GenericEntity<JAXBElement<XCube>>(objFact.createXCube(cube)){}))); }