public XPartitionList withPartition(Collection<XPartition> values) { if (values!= null) { getPartition().addAll(values); } return this; }
public static XPartitionList xpartitionListFromPartitionList(String cubeTableName, List<Partition> partitions, List<String> timePartCols) throws HiveException { XPartitionList xPartitionList = new XPartitionList(); xPartitionList.getPartition(); if (partitions != null) { for (Partition partition : partitions) { xPartitionList.getPartition().add(xpartitionFromPartition(cubeTableName, partition, timePartCols)); } } return xPartitionList; }
public String toString() { final ToStringStrategy strategy = new YAMLToStringStrategy(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
/** * Create an instance of {@link XPartitionList } * */ public XPartitionList createXPartitionList() { return new XPartitionList(); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); }
/** * Create an instance of {@link XPartitionList } * */ public XPartitionList createXPartitionList() { return new XPartitionList(); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); }
public XPartitionList withPartition(XPartition... values) { if (values!= null) { for (XPartition value: values) { getPartition().add(value); } } return this; }
public static XPartitionList xpartitionListFromPartitionList(String cubeTableName, List<Partition> partitions, List<String> timePartCols) throws HiveException { XPartitionList xPartitionList = new XPartitionList(); xPartitionList.getPartition(); if (partitions != null) { for (Partition partition : partitions) { xPartitionList.getPartition().add(xpartitionFromPartition(cubeTableName, partition, timePartCols)); } } return xPartitionList; }
public String toString() { final ToStringStrategy strategy = new YAMLToStringStrategy(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public XPartitionList withPartition(XPartition... values) { if (values!= null) { for (XPartition value: values) { getPartition().add(value); } } return this; }
private XPartitionList toXPartitionList(final XPartition... xps) { XPartitionList ret = new XPartitionList(); Collections.addAll(ret.getPartition(), xps); return ret; }
public XPartitionList withPartition(Collection<XPartition> values) { if (values!= null) { getPartition().addAll(values); } return this; }
XPartitionList partList = new XPartitionList(); partList.getPartition().add(createPartition(table, DateUtils.addHours(partDate, 1))); partList.getPartition().add(createPartition(table, DateUtils.addHours(partDate, -300))); Response response = target().path("metastore/facts/").path(table).path("storages/S2/partitions") .queryParam("sessionid", lensSessionId).request(mediaType)
public static List<StoragePartitionDesc> storagePartSpecListFromXPartitionList( final XPartitionList xpartList) { ArrayList<StoragePartitionDesc> ret = new ArrayList<StoragePartitionDesc>(); for (XPartition xpart : xpartList.getPartition()) { ret.add(storagePartSpecFromXPartition(xpart)); } return ret; }
assertEquals(partitions.getPartition().size(), 2); assertEquals(partitions.getPartition().get(0).getLocation(), xp.getLocation()); assertEquals(partitions.getPartition().get(1).getLocation(), xp.getLocation()); assertTrue(partitions.getPartition().get(0).getTimePartitionSpec() == null || partitions.getPartition().get(1).getTimePartitionSpec() == null); XPartition postedPartition, latestPartition; if (partitions.getPartition().get(0).getTimePartitionSpec() == null) { postedPartition = partitions.getPartition().get(1); latestPartition = partitions.getPartition().get(0); } else { postedPartition = partitions.getPartition().get(0); latestPartition = partitions.getPartition().get(1); XPartitionList parts = new XPartitionList(); parts.getPartition().add(xp); parts.getPartition().add(xp2); partAddResult = target().path("metastore/dimtables/").path(table).path("storages/test/partitions") .queryParam("sessionid", lensSessionId).request(mediaType) assertEquals(partitions.getPartition().size(), 0); assertEquals(partitions.getPartition().size(), 2); partitions = partitionsElement.getValue(); assertNotNull(partitions); assertEquals(partitions.getPartition().size(), 0);