org.apache.hadoop.hive.metastore.api.Partition.isSetValues()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(86)

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

Partition.isSetValues介绍

[英]Returns true if field values is set (has been assigned a value) and false otherwise
[中]如果设置了字段值(已赋值),则返回true,否则返回false

代码示例

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

List<Object> list = new ArrayList<Object>();
boolean present_values = true && (isSetValues());
list.add(present_values);
if (present_values)

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

PartValEqWrapperLite(Partition partition) {
 this.values = partition.isSetValues()? partition.getValues() : null;
 if (partition.getSd() != null) {
  this.location = partition.getSd().getLocation();
 }
}

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

lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues());
if (lastComparison != 0) {
 return lastComparison;
if (isSetValues()) {
 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values);
 if (lastComparison != 0) {

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

TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetValues()) {
 optionals.set(0);
if (struct.isSetValues()) {

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

return isSetValues();
case DB_NAME:
 return isSetDbName();

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

if (other.isSetValues()) {
 List<String> __this__values = new ArrayList<String>(other.values);
 this.values = __this__values;

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

return false;
boolean this_present_values = true && this.isSetValues();
boolean that_present_values = true && that.isSetValues();
if (this_present_values || that_present_values) {
 if (!(this_present_values && that_present_values))

代码示例来源:origin: Netflix/metacat

@Override
public int hashCode() {
  return partition.isSetValues() ? partition.getValues().hashCode() : 0;
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

@Override
public int hashCode() {
 return partition.isSetValues() ? partition.getValues().hashCode() : 0;
}

代码示例来源:origin: org.apache.hive/hive-standalone-metastore

@Override
public int hashCode() {
 return partition.isSetValues() ? partition.getValues().hashCode() : 0;
}

代码示例来源:origin: org.spark-project.hive/hive-metastore

@Override
public int hashCode() {
 return partition.isSetValues() ? partition.getValues().hashCode() : 0;
}

代码示例来源:origin: com.netflix.metacat/metacat-connector-hive

@Override
public int hashCode() {
  return partition.isSetValues() ? partition.getValues().hashCode() : 0;
}

代码示例来源:origin: org.spark-project.hive/hive-metastore

@Override
 public boolean equals(Object obj) {
  if (this == obj) return true;
  if (obj == null || !(obj instanceof PartValEqWrapper)) return false;
  Partition p1 = this.partition, p2 = ((PartValEqWrapper)obj).partition;
  if (!p1.isSetValues() || !p2.isSetValues()) return p1.isSetValues() == p2.isSetValues();
  if (p1.getValues().size() != p2.getValues().size()) return false;
  for (int i = 0; i < p1.getValues().size(); ++i) {
   String v1 = p1.getValues().get(i), v2 = p2.getValues().get(i);
   if ((v1 == null && v2 != null) || !v1.equals(v2)) return false;
  }
  return true;
 }
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

@Override
 public boolean equals(Object obj) {
  if (this == obj) return true;
  if (obj == null || !(obj instanceof PartValEqWrapper)) return false;
  Partition p1 = this.partition, p2 = ((PartValEqWrapper)obj).partition;
  if (!p1.isSetValues() || !p2.isSetValues()) return p1.isSetValues() == p2.isSetValues();
  if (p1.getValues().size() != p2.getValues().size()) return false;
  for (int i = 0; i < p1.getValues().size(); ++i) {
   String v1 = p1.getValues().get(i), v2 = p2.getValues().get(i);
   if ((v1 == null && v2 != null) || !v1.equals(v2)) return false;
  }
  return true;
 }
}

代码示例来源:origin: Netflix/metacat

@Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || !(obj instanceof PartValEqWrapper)) {
      return false;
    }
    final Partition p1 = this.partition;
    final Partition p2 = ((PartValEqWrapper) obj).partition;
    if (!p1.isSetValues() || !p2.isSetValues()) {
      return p1.isSetValues() == p2.isSetValues();
    }
    if (p1.getValues().size() != p2.getValues().size()) {
      return false;
    }
    for (int i = 0; i < p1.getValues().size(); ++i) {
      final String v1 = p1.getValues().get(i);
      final String v2 = p2.getValues().get(i);
      if (!Objects.equals(v1, v2)) {
        return false;
      }
    }
    return true;
  }
}

代码示例来源:origin: com.netflix.metacat/metacat-connector-hive

@Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || !(obj instanceof PartValEqWrapper)) {
      return false;
    }
    final Partition p1 = this.partition;
    final Partition p2 = ((PartValEqWrapper) obj).partition;
    if (!p1.isSetValues() || !p2.isSetValues()) {
      return p1.isSetValues() == p2.isSetValues();
    }
    if (p1.getValues().size() != p2.getValues().size()) {
      return false;
    }
    for (int i = 0; i < p1.getValues().size(); ++i) {
      final String v1 = p1.getValues().get(i);
      final String v2 = p2.getValues().get(i);
      if (!Objects.equals(v1, v2)) {
        return false;
      }
    }
    return true;
  }
}

代码示例来源:origin: org.spark-project.hive/hive-metastore

public PartValEqWrapperLite(Partition partition) {
 this.values = partition.isSetValues()? partition.getValues() : null;
 this.location = partition.getSd().getLocation();
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public PartValEqWrapperLite(Partition partition) {
 this.values = partition.isSetValues()? partition.getValues() : null;
 this.location = partition.getSd().getLocation();
}

代码示例来源:origin: org.apache.hive/hive-standalone-metastore

PartValEqWrapperLite(Partition partition) {
 this.values = partition.isSetValues()? partition.getValues() : null;
 this.location = partition.getSd().getLocation();
}

代码示例来源:origin: org.apache.hadoop.hive/hive-metastore

/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
 if (field == null) {
  throw new IllegalArgumentException();
 }
 switch (field) {
 case VALUES:
  return isSetValues();
 case DB_NAME:
  return isSetDbName();
 case TABLE_NAME:
  return isSetTableName();
 case CREATE_TIME:
  return isSetCreateTime();
 case LAST_ACCESS_TIME:
  return isSetLastAccessTime();
 case SD:
  return isSetSd();
 case PARAMETERS:
  return isSetParameters();
 case PRIVILEGES:
  return isSetPrivileges();
 }
 throw new IllegalStateException();
}

相关文章

微信公众号

最新文章

更多

Partition类方法