org.apache.lens.api.metastore.XPartition.getInputFormat()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(59)

本文整理了Java中org.apache.lens.api.metastore.XPartition.getInputFormat()方法的一些代码示例,展示了XPartition.getInputFormat()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPartition.getInputFormat()方法的具体详情如下:
包路径:org.apache.lens.api.metastore.XPartition
类名称:XPartition
方法名:getInputFormat

XPartition.getInputFormat介绍

[英]Gets the value of the inputFormat property.
[中]获取inputFormat属性的值。

代码示例

代码示例来源:origin: apache/lens

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());
}

代码示例来源:origin: org.apache.lens/lens-cube

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());
}

代码示例来源:origin: org.apache.lens/lens-cube

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;
}

代码示例来源:origin: apache/lens

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;
}

代码示例来源:origin: org.apache.lens/lens-api

theInputFormat = this.getInputFormat();
strategy.appendField(locator, this, "inputFormat", buffer, theInputFormat);

代码示例来源:origin: apache/lens

theInputFormat = this.getInputFormat();
strategy.appendField(locator, this, "inputFormat", buffer, theInputFormat);

代码示例来源:origin: org.apache.lens/lens-api

lhsInputFormat = this.getInputFormat();
String rhsInputFormat;
rhsInputFormat = that.getInputFormat();
if (!strategy.equals(LocatorUtils.property(thisLocator, "inputFormat", lhsInputFormat), LocatorUtils.property(thatLocator, "inputFormat", rhsInputFormat), lhsInputFormat, rhsInputFormat)) {
  return false;

代码示例来源:origin: apache/lens

lhsInputFormat = this.getInputFormat();
String rhsInputFormat;
rhsInputFormat = that.getInputFormat();
if (!strategy.equals(LocatorUtils.property(thisLocator, "inputFormat", lhsInputFormat), LocatorUtils.property(thatLocator, "inputFormat", rhsInputFormat), lhsInputFormat, rhsInputFormat)) {
  return false;

代码示例来源:origin: apache/lens

theInputFormat = this.getInputFormat();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "inputFormat", theInputFormat), currentHashCode, theInputFormat);

代码示例来源:origin: org.apache.lens/lens-api

theInputFormat = this.getInputFormat();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "inputFormat", theInputFormat), currentHashCode, theInputFormat);

相关文章