/** * Create an instance of {@link HivePartitionDto } * */ public HivePartitionDto createHivePartitionDto() { return new HivePartitionDto(); }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public static HivePartitionDto.Builder<Void> copyExcept(final HivePartitionDto _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); }
public Object clone() { return copyTo(createNewInstance()); }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String thePath; thePath = this.getPath(); strategy.appendField(locator, this, "path", buffer, thePath, (this.path!= null)); } { List<String> thePartitionValues; thePartitionValues = (((this.partitionValues!= null)&&(!this.partitionValues.isEmpty()))?this.getPartitionValues():null); strategy.appendField(locator, this, "partitionValues", buffer, thePartitionValues, ((this.partitionValues!= null)&&(!this.partitionValues.isEmpty()))); } return buffer; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof HivePartitionDto) { final HivePartitionDto copy = ((HivePartitionDto) draftCopy); if (pathShouldBeCopiedAndSet == Boolean.TRUE) { String sourcePath; sourcePath = this.getPath(); String copyPath = ((String) strategy.copy(LocatorUtils.property(locator, "path", sourcePath), sourcePath, (this.path!= null))); copy.setPath(copyPath); } else { if (pathShouldBeCopiedAndSet == Boolean.FALSE) { if (partitionValuesShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourcePartitionValues; sourcePartitionValues = (((this.partitionValues!= null)&&(!this.partitionValues.isEmpty()))?this.getPartitionValues():null); @SuppressWarnings("unchecked") List<String> copyPartitionValues = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "partitionValues", sourcePartitionValues), sourcePartitionValues, ((this.partitionValues!= null)&&(!this.partitionValues.isEmpty())))); copy.partitionValues = null; if (copyPartitionValues!= null) { List<String> uniquePartitionValuesl = copy.getPartitionValues(); uniquePartitionValuesl.addAll(copyPartitionValues);
Assert.isTrue(hivePartition.getPath().equals(partitionPath), String.format( "Found two different locations for the same Hive partition. Storage: {%s}, business object data: {%s}, " + "S3 key prefix: {%s}, path[1]: {%s}, path[2]: {%s}", storageName, businessObjectDataHelper.businessObjectDataEntityAltKeyToString(businessObjectDataEntity), s3KeyPrefix, hivePartition.getPath(), partitionPath)); linkedHashMap.put(partitionValues, new HivePartitionDto(partitionPath, partitionValues));
public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); }
public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
expectedHivePartitions = Arrays.asList(HivePartitionDto.builder().withPath("").withPartitionValues(Arrays.asList(PARTITION_VALUE)).build()); resultHivePartitions = hive13DdlGenerator .getHivePartitions(businessObjectDataKey, autoDiscoverableSubPartitionColumns, TEST_S3_KEY_PREFIX, storageFilePaths, businessObjectDataEntity, storageFilePaths = getStorageFilePaths(Arrays.asList("/COLUMN1=111/COLUMN2=222/file.dat", "/column1=aa/column2=bb/")); expectedHivePartitions = Arrays .asList(HivePartitionDto.builder().withPath("/COLUMN1=111/COLUMN2=222").withPartitionValues(Arrays.asList(PARTITION_VALUE, "111", "222")).build(), HivePartitionDto.builder().withPath("/column1=aa/column2=bb").withPartitionValues(Arrays.asList(PARTITION_VALUE, "aa", "bb")).build()); resultHivePartitions = hive13DdlGenerator .getHivePartitions(businessObjectDataKey, autoDiscoverableSubPartitionColumns, TEST_S3_KEY_PREFIX, storageFilePaths, businessObjectDataEntity,
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String thePath; thePath = this.getPath(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "path", thePath), currentHashCode, thePath, (this.path!= null)); } { List<String> thePartitionValues; thePartitionValues = (((this.partitionValues!= null)&&(!this.partitionValues.isEmpty()))?this.getPartitionValues():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partitionValues", thePartitionValues), currentHashCode, thePartitionValues, ((this.partitionValues!= null)&&(!this.partitionValues.isEmpty()))); } return currentHashCode; }
Assert.isTrue(hivePartition.getPath().equals(partitionPath), String.format( "Found two different locations for the same Hive partition. Storage: {%s}, business object data: {%s}, " + "S3 key prefix: {%s}, path[1]: {%s}, path[2]: {%s}", storageName, businessObjectDataHelper.businessObjectDataEntityAltKeyToString(businessObjectDataEntity), s3KeyPrefix, hivePartition.getPath(), partitionPath)); linkedHashMap.put(partitionValues, new HivePartitionDto(partitionPath, partitionValues));
public static<_B >HivePartitionDto.Builder<_B> copyOf(final HivePartitionDto _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final HivePartitionDto.Builder<_B> _newBuilder = new HivePartitionDto.Builder<_B>(null, null, false); _other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse); return _newBuilder; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final HivePartitionDto that = ((HivePartitionDto) object); { String lhsPath; lhsPath = this.getPath(); String rhsPath; rhsPath = that.getPath(); if (!strategy.equals(LocatorUtils.property(thisLocator, "path", lhsPath), LocatorUtils.property(thatLocator, "path", rhsPath), lhsPath, rhsPath, (this.path!= null), (that.path!= null))) { return false; } } { List<String> lhsPartitionValues; lhsPartitionValues = (((this.partitionValues!= null)&&(!this.partitionValues.isEmpty()))?this.getPartitionValues():null); List<String> rhsPartitionValues; rhsPartitionValues = (((that.partitionValues!= null)&&(!that.partitionValues.isEmpty()))?that.getPartitionValues():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "partitionValues", lhsPartitionValues), LocatorUtils.property(thatLocator, "partitionValues", rhsPartitionValues), lhsPartitionValues, rhsPartitionValues, ((this.partitionValues!= null)&&(!this.partitionValues.isEmpty())), ((that.partitionValues!= null)&&(!that.partitionValues.isEmpty())))) { return false; } } return true; }
public Object createNewInstance() { return new HivePartitionDto(); }
public static<_B >HivePartitionDto.Builder<_B> copyOf(final HivePartitionDto _other) { final HivePartitionDto.Builder<_B> _newBuilder = new HivePartitionDto.Builder<_B>(null, null, false); _other.copyTo(_newBuilder); return _newBuilder; }
public static HivePartitionDto.Builder<Void> copyOnly(final HivePartitionDto _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); }
String partitionValue = hivePartition.getPartitionValues().get(i); partitionKeyValuePairs.add(String.format("`%s`='%s'", partitionColumnName, partitionValue)); StringUtils.isNotBlank(hivePartition.getPath()) ? hivePartition.getPath() : ""));
@Override public HivePartitionDto build() { if (_storedValue == null) { return this.init(new HivePartitionDto()); } else { return ((HivePartitionDto) _storedValue); } }