public static void updatePartitionFromXPartition(Partition partition, XPartition xp) throws ClassNotFoundException { partition.getParameters().putAll(mapFromXProperties(xp.getPartitionParameters())); partition.getTPartition().getSd().getSerdeInfo().setParameters(mapFromXProperties(xp.getSerdeParameters())); partition.setLocation(xp.getLocation()); if (xp.getInputFormat() != null) { partition.setInputFormatClass(Class.forName(xp.getInputFormat()).asSubclass(InputFormat.class)); } if (xp.getOutputFormat() != null) { Class<? extends HiveOutputFormat> outputFormatClass = Class.forName(xp.getOutputFormat()).asSubclass(HiveOutputFormat.class); partition.setOutputFormatClass(outputFormatClass); } partition.getParameters().put(MetastoreConstants.PARTITION_UPDATE_PERIOD, xp.getUpdatePeriod().name()); partition.getTPartition().getSd().getSerdeInfo().setSerializationLib(xp.getSerdeClassname()); }
public static void updatePartitionFromXPartition(Partition partition, XPartition xp) throws ClassNotFoundException { partition.getParameters().putAll(mapFromXProperties(xp.getPartitionParameters())); partition.getTPartition().getSd().getSerdeInfo().setParameters(mapFromXProperties(xp.getSerdeParameters())); partition.setLocation(xp.getLocation()); if (xp.getInputFormat() != null) { partition.setInputFormatClass(Class.forName(xp.getInputFormat()).asSubclass(InputFormat.class)); } if (xp.getOutputFormat() != null) { Class<? extends HiveOutputFormat> outputFormatClass = Class.forName(xp.getOutputFormat()).asSubclass(HiveOutputFormat.class); partition.setOutputFormatClass(outputFormatClass); } partition.getParameters().put(MetastoreConstants.PARTITION_UPDATE_PERIOD, xp.getUpdatePeriod().name()); partition.getTPartition().getSd().getSerdeInfo().setSerializationLib(xp.getSerdeClassname()); }
xp.setInputFormat(p.getInputFormatClass().getCanonicalName()); xp.setOutputFormat(p.getOutputFormatClass().getCanonicalName()); xp.getPartitionParameters().getProperty().addAll(xPropertiesFromMap(p.getParameters())); String upParam = p.getParameters().get(MetastoreConstants.PARTITION_UPDATE_PERIOD); xp.setUpdatePeriod(XUpdatePeriod.valueOf(upParam));
xp.setInputFormat(p.getInputFormatClass().getCanonicalName()); xp.setOutputFormat(p.getOutputFormatClass().getCanonicalName()); xp.getPartitionParameters().getProperty().addAll(xPropertiesFromMap(p.getParameters())); String upParam = p.getParameters().get(MetastoreConstants.PARTITION_UPDATE_PERIOD); xp.setUpdatePeriod(XUpdatePeriod.valueOf(upParam));
public static StoragePartitionDesc storagePartSpecFromXPartition( XPartition xpart) { StoragePartitionDesc partDesc = new StoragePartitionDesc( xpart.getFactOrDimensionTableName(), timePartSpecfromXTimePartSpec(xpart.getTimePartitionSpec()), nonTimePartSpecfromXNonTimePartSpec(xpart.getNonTimePartitionSpec()), UpdatePeriod.valueOf(xpart.getUpdatePeriod().name())); partDesc.setPartParams(mapFromXProperties(xpart.getPartitionParameters())); partDesc.setSerdeParams(mapFromXProperties(xpart.getSerdeParameters())); partDesc.setLocation(xpart.getLocation()); partDesc.setInputFormat(xpart.getInputFormat()); partDesc.setOutputFormat(xpart.getOutputFormat()); partDesc.setSerializationLib(xpart.getSerdeClassname()); return partDesc; }
public static StoragePartitionDesc storagePartSpecFromXPartition( XPartition xpart) { StoragePartitionDesc partDesc = new StoragePartitionDesc( xpart.getFactOrDimensionTableName(), timePartSpecfromXTimePartSpec(xpart.getTimePartitionSpec()), nonTimePartSpecfromXNonTimePartSpec(xpart.getNonTimePartitionSpec()), UpdatePeriod.valueOf(xpart.getUpdatePeriod().name())); partDesc.setPartParams(mapFromXProperties(xpart.getPartitionParameters())); partDesc.setSerdeParams(mapFromXProperties(xpart.getSerdeParameters())); partDesc.setLocation(xpart.getLocation()); partDesc.setInputFormat(xpart.getInputFormat()); partDesc.setOutputFormat(xpart.getOutputFormat()); partDesc.setSerializationLib(xpart.getSerdeClassname()); return partDesc; }
thePartitionParameters = this.getPartitionParameters(); strategy.appendField(locator, this, "partitionParameters", buffer, thePartitionParameters);
thePartitionParameters = this.getPartitionParameters(); strategy.appendField(locator, this, "partitionParameters", buffer, thePartitionParameters);
lhsPartitionParameters = this.getPartitionParameters(); XProperties rhsPartitionParameters; rhsPartitionParameters = that.getPartitionParameters(); if (!strategy.equals(LocatorUtils.property(thisLocator, "partitionParameters", lhsPartitionParameters), LocatorUtils.property(thatLocator, "partitionParameters", rhsPartitionParameters), lhsPartitionParameters, rhsPartitionParameters)) { return false;
thePartitionParameters = this.getPartitionParameters(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partitionParameters", thePartitionParameters), currentHashCode, thePartitionParameters);
lhsPartitionParameters = this.getPartitionParameters(); XProperties rhsPartitionParameters; rhsPartitionParameters = that.getPartitionParameters(); if (!strategy.equals(LocatorUtils.property(thisLocator, "partitionParameters", lhsPartitionParameters), LocatorUtils.property(thatLocator, "partitionParameters", rhsPartitionParameters), lhsPartitionParameters, rhsPartitionParameters)) { return false;
thePartitionParameters = this.getPartitionParameters(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partitionParameters", thePartitionParameters), currentHashCode, thePartitionParameters);