/** * Create an instance of {@link XPartSpec } * */ public XPartSpec createXPartSpec() { return new XPartSpec(); }
public XPartSpec withPartSpecElement(Collection<XPartSpecElement> values) { if (values!= null) { getPartSpecElement().addAll(values); } return this; }
public String toString() { final ToStringStrategy strategy = new YAMLToStringStrategy(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
xp.setUpdatePeriod(XUpdatePeriod.valueOf(upParam)); LinkedHashMap<String, String> partSpec = p.getSpec(); xp.setFullPartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { XPartSpecElement e = new XPartSpecElement(); e.setKey(entry.getKey()); e.setValue(entry.getValue()); xp.getFullPartitionSpec().getPartSpecElement().add(e); xp.setNonTimePartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { if (timePartCols.contains(entry.getKey())) { partSpecElement.setKey(entry.getKey()); partSpecElement.setValue(entry.getValue()); xp.getNonTimePartitionSpec().getPartSpecElement().add(partSpecElement);
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 int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); }
public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
xp.setUpdatePeriod(XUpdatePeriod.valueOf(upParam)); LinkedHashMap<String, String> partSpec = p.getSpec(); xp.setFullPartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { XPartSpecElement e = new XPartSpecElement(); e.setKey(entry.getKey()); e.setValue(entry.getValue()); xp.getFullPartitionSpec().getPartSpecElement().add(e); xp.setNonTimePartitionSpec(new XPartSpec()); for (Map.Entry<String, String> entry : partSpec.entrySet()) { if (timePartCols.contains(entry.getKey())) { partSpecElement.setKey(entry.getKey()); partSpecElement.setValue(entry.getValue()); xp.getNonTimePartitionSpec().getPartSpecElement().add(partSpecElement);
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 int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); }
public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
public XPartSpec withPartSpecElement(XPartSpecElement... values) { if (values!= null) { for (XPartSpecElement value: values) { getPartSpecElement().add(value); } } return this; }
/** * Create an instance of {@link XPartSpec } * */ public XPartSpec createXPartSpec() { return new XPartSpec(); }
public String toString() { final ToStringStrategy strategy = new YAMLToStringStrategy(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public XPartSpec withPartSpecElement(XPartSpecElement... values) { if (values!= null) { for (XPartSpecElement value: values) { getPartSpecElement().add(value); } } return this; }
private XPartition createPartition(String cubeTableName, final List<XTimePartSpecElement> timePartSpecs, String updatePeriod) { XPartition xp = cubeObjectFactory.createXPartition(); xp.setLocation(new Path(new File("target").getAbsolutePath(), "part/test_part").toString()); xp.setFactOrDimensionTableName(cubeTableName); xp.setNonTimePartitionSpec(new XPartSpec()); xp.setTimePartitionSpec(new XTimePartSpec()); xp.setPartitionParameters(new XProperties()); xp.setSerdeParameters(new XProperties()); for (XTimePartSpecElement timePartSpec : timePartSpecs) { xp.getTimePartitionSpec().getPartSpecElement().add(timePartSpec); } if (updatePeriod==null) { xp.setUpdatePeriod(XUpdatePeriod.HOURLY); } else { XUpdatePeriod updatePeriod1=XUpdatePeriod.valueOf(updatePeriod.toUpperCase()); xp.setUpdatePeriod(updatePeriod1); } return xp; }
public XPartSpec withPartSpecElement(Collection<XPartSpecElement> values) { if (values!= null) { getPartSpecElement().addAll(values); } return this; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XPartSpecElement> thePartSpecElement; thePartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); strategy.appendField(locator, this, "partSpecElement", buffer, thePartSpecElement); } return buffer; }
public static Map<String, String> nonTimePartSpecfromXNonTimePartSpec( XPartSpec xnonTimePartSpec) { Map<String, String> nonTimePartSpec = new HashMap<String, String>(); if (xnonTimePartSpec != null && !xnonTimePartSpec.getPartSpecElement().isEmpty()) { for (XPartSpecElement xPart : xnonTimePartSpec.getPartSpecElement()) { nonTimePartSpec.put(xPart.getKey(), xPart.getValue()); } } return nonTimePartSpec; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XPartSpecElement> thePartSpecElement; thePartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); strategy.appendField(locator, this, "partSpecElement", buffer, thePartSpecElement); } return buffer; }