public APIResult addPartitionsToDimensionTable(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) .post(Entity.xml(new GenericEntity<JAXBElement<XPartitionList>>(objFact.createXPartitionList(partitions)){}))); }
public APIResult addPartitionsToFactTable(String fact, String storage, XPartitionList partitions) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(fact) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XPartitionList>>(objFact.createXPartitionList(partitions)){}))); }
public APIResult addPartitionsToDimensionTable(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) .post(Entity.xml(new GenericEntity<JAXBElement<XPartitionList>>(objFact.createXPartitionList(partitions)){}))); }
public APIResult addPartitionsToFactTable(String fact, String storage, XPartitionList partitions) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(fact) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XPartitionList>>(objFact.createXPartitionList(partitions)){}))); }
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 updatePartitionsOfFactTable(String fact, String storage, XPartitionList partitions) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(fact) .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 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 updatePartitionsOfFactTable(String fact, String storage, XPartitionList partitions) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("facts").path(fact) .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)){}))); }
/** * Get all partition of the dimension table in the specified storage; can be filtered * * @param sessionid The sessionid in which user is working * @param dimension The dimension table name * @param storage The storage name * @param filter The filter for partitions, string representation of the filter for ex: x < "xxx" and y > * "yyy" * @return JAXB representation of {@link XPartitionList} containing {@link XPartition} objects */ @GET @Path("/dimtables/{dimTableName}/storages/{storage}/partitions") public JAXBElement<XPartitionList> getAllPartitionsOfDimStorage(@QueryParam("sessionid") LensSessionHandle sessionid, @PathParam("dimTableName") String dimension, @PathParam("storage") String storage, @QueryParam("filter") String filter) throws LensException { checkSessionId(sessionid); return X_CUBE_OBJECT_FACTORY .createXPartitionList(getSvc().getAllPartitionsOfDimTableStorage(sessionid, dimension, storage, filter)); }
/** * Get all partitions of the fact table in the specified storage; can be filtered as well. * * @param sessionid The sessionid in which user is working * @param factName The fact table name * @param storage The storage name * @param filter The filter for partitions, string representation of the filter for ex: x < "xxx" and y > * "yyy" * @return JAXB representation of {@link XPartitionList} containing {@link XPartition} objects */ @GET @Path("/facts/{factName}/storages/{storage}/partitions") public JAXBElement<XPartitionList> getAllPartitionsOfFactStorageByFilter( @QueryParam("sessionid") LensSessionHandle sessionid, @PathParam("factName") String factName, @PathParam("storage") String storage, @QueryParam("filter") String filter) throws LensException { if (filter == null || filter.isEmpty()) { throw new LensException(NO_PARTITION_FILTER.getLensErrorInfo()); } checkSessionId(sessionid); return X_CUBE_OBJECT_FACTORY .createXPartitionList(getSvc().getAllPartitionsOfFactStorage(sessionid, factName, storage, filter)); }
partAddResult = target().path("metastore/facts/").path(table).path("storages/S1/partitions") .queryParam("sessionid", lensSessionId).request(mediaType).post( Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>(cubeObjectFactory.createXPartitionList(parts)) { }, mediaType), APIResult.class); assertEquals(partAddResult.getStatus(), Status.PARTIAL);
.queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>( cubeObjectFactory.createXPartitionList(parts)){}, mediaType), APIResult.class); assertEquals(partAddResult.getStatus(), Status.PARTIAL); .queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity( new GenericEntity<JAXBElement<XPartitionList>>(cubeObjectFactory.createXPartitionList(toXPartitionList(xp))) {}, mediaType)); assertXMLError(resp, mediaType); .queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity( new GenericEntity<JAXBElement<XPartitionList>>(cubeObjectFactory.createXPartitionList(toXPartitionList(xp))) {}, mediaType), .queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>( cubeObjectFactory.createXPartitionList(toXPartitionList(xp))){}, mediaType), APIResult.class); assertSuccess(partAddResult);
.queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>( cubeObjectFactory.createXPartitionList(partList)) { }, mediaType)); partAddResult = response.readEntity(APIResult.class);
.queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>( cubeObjectFactory.createXPartitionList(parts)){}, mediaType), APIResult.class); assertEquals(partAddResult.getStatus(), Status.PARTIAL); .queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>(cubeObjectFactory .createXPartitionList(toXPartitionList(xp))) { }, mediaType)); assertXMLError(resp, mediaType); .queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>(cubeObjectFactory .createXPartitionList(toXPartitionList(xp2))){}, mediaType)); assertEquals(response.getStatus(), 400); partAddResult = response.readEntity(APIResult.class); .queryParam("sessionid", lensSessionId).request(mediaType) .post(Entity.entity(new GenericEntity<JAXBElement<XPartitionList>>(cubeObjectFactory .createXPartitionList(toXPartitionList(xp))) { }, mediaType), APIResult.class);