org.apache.hadoop.hive.ql.exec.Utilities.isSchemaEvolutionEnabled()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(74)

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

Utilities.isSchemaEvolutionEnabled介绍

暂无

代码示例

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

if (Utilities.isSchemaEvolutionEnabled(job, true) && job.get(IOConstants.SCHEMA_EVOLUTION_COLUMNS) != null &&
  job.get(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES) != null) {
 return;

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

private boolean needConversion(PartitionDesc partitionDesc) {
 boolean isAcid = AcidUtils.isTablePropertyTransactional(partitionDesc.getTableDesc().getProperties());
 if (Utilities.isSchemaEvolutionEnabled(job, isAcid) && Utilities.isInputFileFormatSelfDescribing(partitionDesc)) {
  return false;
 }
 return needConversion(partitionDesc.getTableDesc(), Arrays.asList(partitionDesc));
}

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

private boolean needConversion(PartitionDesc partitionDesc) {
 boolean isAcid = AcidUtils.isTablePropertyTransactional(partitionDesc.getTableDesc().getProperties());
 if (Utilities.isSchemaEvolutionEnabled(job, isAcid) && Utilities.isInputFileFormatSelfDescribing(partitionDesc)) {
  return false;
 }
 return needConversion(partitionDesc.getTableDesc(), Arrays.asList(partitionDesc));
}

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

StructObjectInspector partRawRowObjectInspector;
boolean isAcid = AcidUtils.isTablePropertyTransactional(tableDesc.getProperties());
if (Utilities.isSchemaEvolutionEnabled(hconf, isAcid) && Utilities.isInputFileFormatSelfDescribing(pd)) {
 Deserializer tblDeserializer = tableDesc.getDeserializer(hconf);
 partRawRowObjectInspector = (StructObjectInspector) tblDeserializer.getObjectInspector();

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

StructObjectInspector partRawRowObjectInspector;
boolean isAcid = AcidUtils.isTablePropertyTransactional(tableDesc.getProperties());
if (Utilities.isSchemaEvolutionEnabled(hconf, isAcid) && Utilities.isInputFileFormatSelfDescribing(pd)) {
 Deserializer tblDeserializer = tableDesc.getDeserializer(hconf);
 partRawRowObjectInspector = (StructObjectInspector) tblDeserializer.getObjectInspector();

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

if (Utilities.isSchemaEvolutionEnabled(hconf, isAcid) && Utilities.isInputFileFormatSelfDescribing(pd)) {
 partRawRowObjectInspector = tableRowOI;
} else {

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

if (Utilities.isSchemaEvolutionEnabled(hconf, isAcid) && Utilities.isInputFileFormatSelfDescribing(pd)) {
 partRawRowObjectInspector = tableRowOI;
} else {

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

Preconditions.checkState(Utilities.isSchemaEvolutionEnabled(hconf, isAcid));

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

Preconditions.checkState(Utilities.isSchemaEvolutionEnabled(hconf, isAcid));

代码示例来源:origin: dremio/dremio-oss

/**
  * Helper method which sets config to read transactional (ACID) tables. Prerequisite is <i>job</i>
  * contains the table properties.
  * @param job
  */
 public static void addACIDPropertiesIfNeeded(final JobConf job) {
  if (!AcidUtils.isTablePropertyTransactional(job)) {
   return;
  }

  AcidUtils.setTransactionalTableScan(job, true);

  // Add ACID related properties
  if (Utilities.isSchemaEvolutionEnabled(job, true) &&
    job.get(IOConstants.SCHEMA_EVOLUTION_COLUMNS) != null &&
    job.get(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES) != null) {
   // If the schema evolution columns and types are already set, then there is no additional conf to set.
   return;
  }

  // Get them from table properties and set them as schema evolution properties
  job.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS, job.get(serdeConstants.LIST_COLUMNS));
  job.set(IOConstants.SCHEMA_EVOLUTION_COLUMNS_TYPES, job.get(serdeConstants.LIST_COLUMN_TYPES));

 }
}

相关文章

微信公众号

最新文章

更多

Utilities类方法