org.apache.hadoop.hive.ql.metadata.Hive.getMetaConf()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(176)

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

Hive.getMetaConf介绍

暂无

代码示例

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

/**
 * This constructor is used for partitioned CTAS. Basically we pass the name of
 * partitioned columns, which will all be dynamic partitions since the binding
 * is done after executing the query in the CTAS.
 */
public DynamicPartitionCtx(List<String> partColNames, String defaultPartName,
  int maxParts) throws SemanticException {
 this.partSpec = new LinkedHashMap<>();
 this.spNames = new ArrayList<>();
 this.dpNames = new ArrayList<>();
 for (String colName : partColNames) {
  this.partSpec.put(colName, null);
  this.dpNames.add(colName);
 }
 this.numBuckets = 0;
 this.maxPartsPerNode = maxParts;
 this.defaultPartName = defaultPartName;
 this.numDPCols = dpNames.size();
 this.numSPCols = spNames.size();
 this.spPath = null;
 String confVal;
 try {
  confVal = Hive.get().getMetaConf(ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN.varname);
 } catch (HiveException e) {
  throw new SemanticException(e);
 }
 this.whiteListPattern = confVal == null || confVal.isEmpty() ? null : Pattern.compile(confVal);
}

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

public DynamicPartitionCtx(Map<String, String> partSpec, String defaultPartName,
  int maxParts) throws SemanticException {
 this.partSpec = partSpec;
 this.spNames = new ArrayList<String>();
 this.dpNames = new ArrayList<String>();
 this.numBuckets = 0;
 this.maxPartsPerNode = maxParts;
 this.defaultPartName = defaultPartName;
 for (Map.Entry<String, String> me: partSpec.entrySet()) {
  if (me.getValue() == null) {
   dpNames.add(me.getKey());
  } else {
   spNames.add(me.getKey());
  }
 }
 this.numDPCols = dpNames.size();
 this.numSPCols = spNames.size();
 if (this.numSPCols > 0) {
  this.spPath = Warehouse.makeDynamicPartName(partSpec);
 } else {
  this.spPath = null;
 }
 String confVal;
 try {
  confVal = Hive.get().getMetaConf(ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN.varname);
 } catch (HiveException e) {
  throw new SemanticException(e);
 }
 this.whiteListPattern = confVal == null || confVal.isEmpty() ? null : Pattern.compile(confVal);
}

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

public DynamicPartitionCtx(Table tbl, Map<String, String> partSpec, String defaultPartName,
  int maxParts) throws SemanticException {
 this.partSpec = partSpec;
 this.spNames = new ArrayList<String>();
 this.dpNames = new ArrayList<String>();
 this.numBuckets = 0;
 this.maxPartsPerNode = maxParts;
 this.defaultPartName = defaultPartName;
 for (Map.Entry<String, String> me: partSpec.entrySet()) {
  if (me.getValue() == null) {
   dpNames.add(me.getKey());
  } else {
   spNames.add(me.getKey());
  }
 }
 this.numDPCols = dpNames.size();
 this.numSPCols = spNames.size();
 if (this.numSPCols > 0) {
  this.spPath = Warehouse.makeDynamicPartName(partSpec);
 } else {
  this.spPath = null;
 }
 String confVal;
 try {
  confVal = Hive.get().getMetaConf(ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN.varname);
 } catch (HiveException e) {
  throw new SemanticException(e);
 }
 this.whiteListPattern = confVal == null || confVal.isEmpty() ? null : Pattern.compile(confVal);
}

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

String var = varname.substring(METACONF_PREFIX.length());
Hive hive = Hive.get(ss.getConf());
String value = hive.getMetaConf(var);
if (value != null) {
 ss.out.println(METACONF_PREFIX + var + "=" + value);

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

String var = varname.substring(METACONF_PREFIX.length());
Hive hive = Hive.get(ss.getConf());
String value = hive.getMetaConf(var);
if (value != null) {
 ss.out.println(METACONF_PREFIX + var + "=" + value);

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

String var = varname.substring(METACONF_PREFIX.length());
Hive hive = Hive.get(ss.getConf());
String value = hive.getMetaConf(var);
if (value != null) {
 ss.out.println(METACONF_PREFIX + var + "=" + value);

相关文章

Hive类方法