public XPartitionList withPartition(XPartition... values) { if (values!= null) { for (XPartition value: values) { getPartition().add(value); } } return this; }
public XPartitionList withPartition(Collection<XPartition> values) { if (values!= null) { getPartition().addAll(values); } return this; }
public XPartitionList withPartition(XPartition... values) { if (values!= null) { for (XPartition value: values) { getPartition().add(value); } } return this; }
public XPartitionList withPartition(Collection<XPartition> values) { if (values!= null) { getPartition().addAll(values); } return this; }
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; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XPartition> thePartition; thePartition = (((this.partition!= null)&&(!this.partition.isEmpty()))?this.getPartition():null); strategy.appendField(locator, this, "partition", buffer, thePartition); } return buffer; }
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 static List<StoragePartitionDesc> storagePartSpecListFromXPartitionList( final XPartitionList xpartList) { ArrayList<StoragePartitionDesc> ret = new ArrayList<StoragePartitionDesc>(); for (XPartition xpart : xpartList.getPartition()) { ret.add(storagePartSpecFromXPartition(xpart)); } return ret; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XPartition> thePartition; thePartition = (((this.partition!= null)&&(!this.partition.isEmpty()))?this.getPartition():null); strategy.appendField(locator, this, "partition", buffer, thePartition); } return buffer; }
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 List<XPartition> getAllPartitionsOfDimensionTable(String dimTblName, String storage, String filter) { WebTarget target = getMetastoreWebTarget(); JAXBElement<XPartitionList> partList = target.path("dimtables").path(dimTblName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("filter", filter) .request(MediaType.APPLICATION_XML) .get(new GenericType<JAXBElement<XPartitionList>>() { }); return partList.getValue().getPartition(); }
public List<XPartition> getPartitionsOfFactTable(String factName, String storage, String filter) { WebTarget target = getMetastoreWebTarget(); JAXBElement<XPartitionList> elements = target.path("facts").path(factName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("filter", filter) .request(MediaType.APPLICATION_XML) .get(new GenericType<JAXBElement<XPartitionList>>() { }); return elements.getValue().getPartition(); }
public List<XPartition> getPartitionsOfFactTable(String factName, String storage, String filter) { WebTarget target = getMetastoreWebTarget(); JAXBElement<XPartitionList> elements = target.path("facts").path(factName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("filter", filter) .request(MediaType.APPLICATION_XML) .get(new GenericType<JAXBElement<XPartitionList>>() { }); return elements.getValue().getPartition(); }
public List<XPartition> getAllPartitionsOfDimensionTable(String dimTblName, String storage, String filter) { WebTarget target = getMetastoreWebTarget(); JAXBElement<XPartitionList> partList = target.path("dimtables").path(dimTblName) .path("storages").path(storage).path("partitions") .queryParam("sessionid", this.connection.getSessionHandle()) .queryParam("filter", filter) .request(MediaType.APPLICATION_XML) .get(new GenericType<JAXBElement<XPartitionList>>() { }); return partList.getValue().getPartition(); }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<XPartition> thePartition; thePartition = (((this.partition!= null)&&(!this.partition.isEmpty()))?this.getPartition():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partition", thePartition), currentHashCode, thePartition); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<XPartition> thePartition; thePartition = (((this.partition!= null)&&(!this.partition.isEmpty()))?this.getPartition():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partition", thePartition), currentHashCode, thePartition); } return currentHashCode; }
private void checkNonNullPartitionList(XPartitionList partitions) { checkNonNullArgs("Partition List is null", partitions); checkNonNullArgs("One partition is null", partitions.getPartition().toArray()); }
private XPartitionList toXPartitionList(final XPartition... xps) { XPartitionList ret = new XPartitionList(); Collections.addAll(ret.getPartition(), xps); return ret; }
private void createDimTablePartitions(String fileName, String dimTable, String storage) throws JAXBException, IOException { XPartitionList partitionList = (XPartitionList) SampleMetastore.readFromXML(fileName); for (XPartition partition : partitionList.getPartition()) { String partLocation = partition.getLocation(); if (!partLocation.startsWith("/")) { partition.setLocation("file://" + System.getProperty("lens.home") + "/" + partLocation); } } result = metaClient.addPartitionsToDimensionTable(dimTable, storage, partitionList); if (result.getStatus().equals(APIResult.Status.FAILED)) { System.err.println("Adding partitions from:" + fileName + " failed"); retCode = 1; } else { System.out.println("Added partitions from:" + fileName); } }
private void createFactPartitions(String fileName, String fact, String storage) throws JAXBException, IOException { XPartitionList partitionList = (XPartitionList) SampleMetastore.readFromXML(fileName); for (XPartition partition : partitionList.getPartition()) { String partLocation = partition.getLocation(); if (!partLocation.startsWith("/")) { partition.setLocation("file://" + System.getProperty("lens.home") + "/" + partLocation); } } result = metaClient.addPartitionsToFactTable(fact, storage, partitionList); if (result.getStatus().equals(APIResult.Status.FAILED)) { System.err.println("Adding partitions from:" + fileName + " failed"); retCode = 1; } else { System.out.println("Added partitions from:" + fileName); } }