gpt4 book ai didi

org.apache.lens.api.metastore.XPartitionList类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 20:14:40 27 4
gpt4 key购买 nike

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

XPartitionList介绍

[英]Compact data structure for storing List of partitions.

Java class for x_partition_list complex type.

The following schema fragment specifies the expected content contained within this class.

<complexType name="x_partition_list"> 
<complexContent> 
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 
<sequence> 
<element name="partition" type="{uri:lens:cube:0.1}x_partition" maxOccurs="unbounded" minOccurs="0"/> 
</sequence> 
</restriction> 
</complexContent> 
</complexType>

[中]用于存储分区列表的紧凑数据结构。
x_partition_list复杂类型的Java类。
以下架构片段指定了该类中包含的预期内容。

<complexType name="x_partition_list"> 
<complexContent> 
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 
<sequence> 
<element name="partition" type="{uri:lens:cube:0.1}x_partition" maxOccurs="unbounded" minOccurs="0"/> 
</sequence> 
</restriction> 
</complexContent> 
</complexType>

代码示例

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

public XPartitionList withPartition(Collection<XPartition> values) {
  if (values!= null) {
    getPartition().addAll(values);
  }
  return this;
}

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

public static XPartitionList xpartitionListFromPartitionList(String cubeTableName, List<Partition> partitions,
 List<String> timePartCols) throws HiveException {
 XPartitionList xPartitionList = new XPartitionList();
 xPartitionList.getPartition();
 if (partitions != null) {
  for (Partition partition : partitions) {
   xPartitionList.getPartition().add(xpartitionFromPartition(cubeTableName, partition, timePartCols));
  }
 }
 return xPartitionList;
}

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

public String toString() {
  final ToStringStrategy strategy = new YAMLToStringStrategy();
  final StringBuilder buffer = new StringBuilder();
  append(null, buffer, strategy);
  return buffer.toString();
}

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

/**
 * Create an instance of {@link XPartitionList }
 * 
 */
public XPartitionList createXPartitionList() {
  return new XPartitionList();
}

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

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

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

public boolean equals(Object object) {
  final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
  return equals(null, null, object, strategy);
}

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

public int hashCode() {
  final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
  return this.hashCode(null, strategy);
}

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

/**
 * Create an instance of {@link XPartitionList }
 * 
 */
public XPartitionList createXPartitionList() {
  return new XPartitionList();
}

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

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

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

public boolean equals(Object object) {
  final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
  return equals(null, null, object, strategy);
}

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

public int hashCode() {
  final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
  return this.hashCode(null, strategy);
}

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

public XPartitionList withPartition(XPartition... values) {
  if (values!= null) {
    for (XPartition value: values) {
      getPartition().add(value);
    }
  }
  return this;
}

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

public static XPartitionList xpartitionListFromPartitionList(String cubeTableName, List<Partition> partitions,
 List<String> timePartCols) throws HiveException {
 XPartitionList xPartitionList = new XPartitionList();
 xPartitionList.getPartition();
 if (partitions != null) {
  for (Partition partition : partitions) {
   xPartitionList.getPartition().add(xpartitionFromPartition(cubeTableName, partition, timePartCols));
  }
 }
 return xPartitionList;
}

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

public String toString() {
  final ToStringStrategy strategy = new YAMLToStringStrategy();
  final StringBuilder buffer = new StringBuilder();
  append(null, buffer, strategy);
  return buffer.toString();
}

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

public XPartitionList withPartition(XPartition... values) {
  if (values!= null) {
    for (XPartition value: values) {
      getPartition().add(value);
    }
  }
  return this;
}

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

private XPartitionList toXPartitionList(final XPartition... xps) {
 XPartitionList ret = new XPartitionList();
 Collections.addAll(ret.getPartition(), xps);
 return ret;
}

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

public XPartitionList withPartition(Collection<XPartition> values) {
  if (values!= null) {
    getPartition().addAll(values);
  }
  return this;
}

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

XPartitionList partList = new XPartitionList();
partList.getPartition().add(createPartition(table, DateUtils.addHours(partDate, 1)));
partList.getPartition().add(createPartition(table, DateUtils.addHours(partDate, -300)));
Response response = target().path("metastore/facts/").path(table).path("storages/S2/partitions")
    .queryParam("sessionid", lensSessionId).request(mediaType)

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

public static List<StoragePartitionDesc> storagePartSpecListFromXPartitionList(
 final XPartitionList xpartList) {
 ArrayList<StoragePartitionDesc> ret = new ArrayList<StoragePartitionDesc>();
 for (XPartition xpart : xpartList.getPartition()) {
  ret.add(storagePartSpecFromXPartition(xpart));
 }
 return ret;
}

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

assertEquals(partitions.getPartition().size(), 2);
assertEquals(partitions.getPartition().get(0).getLocation(), xp.getLocation());
assertEquals(partitions.getPartition().get(1).getLocation(), xp.getLocation());
assertTrue(partitions.getPartition().get(0).getTimePartitionSpec() == null
 || partitions.getPartition().get(1).getTimePartitionSpec() == null);
XPartition postedPartition, latestPartition;
if (partitions.getPartition().get(0).getTimePartitionSpec() == null) {
 postedPartition = partitions.getPartition().get(1);
 latestPartition = partitions.getPartition().get(0);
} else {
 postedPartition = partitions.getPartition().get(0);
 latestPartition = partitions.getPartition().get(1);
XPartitionList parts = new XPartitionList();
parts.getPartition().add(xp);
parts.getPartition().add(xp2);
partAddResult = target().path("metastore/dimtables/").path(table).path("storages/test/partitions")
 .queryParam("sessionid", lensSessionId).request(mediaType)
assertEquals(partitions.getPartition().size(), 0);
assertEquals(partitions.getPartition().size(), 2);
partitions = partitionsElement.getValue();
assertNotNull(partitions);
assertEquals(partitions.getPartition().size(), 0);

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