gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-24 15:33:05 25 4
gpt4 key购买 nike

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

XPartition.getNonTimePartitionSpec介绍

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

代码示例

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

public static Map<String, String> getFullPartSpecAsMap(XPartition partition) {
  Map<String, String> spec = Maps.newHashMap();
  if (partition.getTimePartitionSpec() != null) {
   for (XTimePartSpecElement timePartSpecElement : partition.getTimePartitionSpec().getPartSpecElement()) {
    spec.put(timePartSpecElement.getKey(), UpdatePeriod.valueOf(partition.getUpdatePeriod().name()).format()
     .format(getDateFromXML(timePartSpecElement.getValue())));
   }
  }
  if (partition.getNonTimePartitionSpec() != null) {
   for (XPartSpecElement partSpecElement : partition.getNonTimePartitionSpec().getPartSpecElement()) {
    spec.put(partSpecElement.getKey(), partSpecElement.getValue());
   }
  }
  return spec;
 }
}

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

public static Map<String, String> getFullPartSpecAsMap(XPartition partition) {
  Map<String, String> spec = Maps.newHashMap();
  if (partition.getTimePartitionSpec() != null) {
   for (XTimePartSpecElement timePartSpecElement : partition.getTimePartitionSpec().getPartSpecElement()) {
    spec.put(timePartSpecElement.getKey(), UpdatePeriod.valueOf(partition.getUpdatePeriod().name()).format()
     .format(getDateFromXML(timePartSpecElement.getValue())));
   }
  }
  if (partition.getNonTimePartitionSpec() != null) {
   for (XPartSpecElement partSpecElement : partition.getNonTimePartitionSpec().getPartSpecElement()) {
    spec.put(partSpecElement.getKey(), partSpecElement.getValue());
   }
  }
  return spec;
 }
}

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

partSpecElement.setKey(entry.getKey());
partSpecElement.setValue(entry.getValue());
xp.getNonTimePartitionSpec().getPartSpecElement().add(partSpecElement);

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

partSpecElement.setKey(entry.getKey());
partSpecElement.setValue(entry.getValue());
xp.getNonTimePartitionSpec().getPartSpecElement().add(partSpecElement);

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

assertEquals(readPartition.getLocation(), xp.getLocation());
assertEquals(readPartition.getTimePartitionSpec(), xp.getTimePartitionSpec());
assertEquals(readPartition.getNonTimePartitionSpec(), xp.getNonTimePartitionSpec());
assertNotNull(readPartition.getFullPartitionSpec());
XTimePartSpecElement timePartSpec = readPartition.getTimePartitionSpec().getPartSpecElement().iterator().next();

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

assertEquals(postedPartition.getNonTimePartitionSpec(), xp.getNonTimePartitionSpec());
assertNotNull(postedPartition.getFullPartitionSpec());
assertNull(latestPartition.getNonTimePartitionSpec());
assertEquals(latestPartition.getFullPartitionSpec().getPartSpecElement().get(0).getValue(),
 "latest");

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

assertEquals(readPartition.getLocation(), xp.getLocation());
assertEquals(readPartition.getTimePartitionSpec(), xp.getTimePartitionSpec());
assertEquals(readPartition.getNonTimePartitionSpec(), xp.getNonTimePartitionSpec());
assertNotNull(readPartition.getFullPartitionSpec());
XTimePartSpecElement timePartSpec = readPartition.getTimePartitionSpec().getPartSpecElement().iterator().next();

代码示例来源: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

public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
    theNonTimePartitionSpec = this.getNonTimePartitionSpec();
    strategy.appendField(locator, this, "nonTimePartitionSpec", buffer, theNonTimePartitionSpec);

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

public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
    theNonTimePartitionSpec = this.getNonTimePartitionSpec();
    strategy.appendField(locator, this, "nonTimePartitionSpec", buffer, theNonTimePartitionSpec);

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

lhsNonTimePartitionSpec = this.getNonTimePartitionSpec();
XPartSpec rhsNonTimePartitionSpec;
rhsNonTimePartitionSpec = that.getNonTimePartitionSpec();
if (!strategy.equals(LocatorUtils.property(thisLocator, "nonTimePartitionSpec", lhsNonTimePartitionSpec), LocatorUtils.property(thatLocator, "nonTimePartitionSpec", rhsNonTimePartitionSpec), lhsNonTimePartitionSpec, rhsNonTimePartitionSpec)) {
  return false;

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

lhsNonTimePartitionSpec = this.getNonTimePartitionSpec();
XPartSpec rhsNonTimePartitionSpec;
rhsNonTimePartitionSpec = that.getNonTimePartitionSpec();
if (!strategy.equals(LocatorUtils.property(thisLocator, "nonTimePartitionSpec", lhsNonTimePartitionSpec), LocatorUtils.property(thatLocator, "nonTimePartitionSpec", rhsNonTimePartitionSpec), lhsNonTimePartitionSpec, rhsNonTimePartitionSpec)) {
  return false;

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

theNonTimePartitionSpec = this.getNonTimePartitionSpec();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nonTimePartitionSpec", theNonTimePartitionSpec), currentHashCode, theNonTimePartitionSpec);

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

theNonTimePartitionSpec = this.getNonTimePartitionSpec();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nonTimePartitionSpec", theNonTimePartitionSpec), currentHashCode, theNonTimePartitionSpec);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com