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

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

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

Utilities.getDefaultNotificationInterval介绍

[英]Gets the default notification interval to send progress updates to the tracker. Useful for operators that may not output data for a while.
[中]获取向跟踪程序发送进度更新的默认通知间隔。适用于可能暂时不输出数据的运算符。

代码示例

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

@Override
protected void initializeOp(Configuration hconf) throws HiveException {
 super.initializeOp(hconf);
 genericUDTF = conf.getGenericUDTF();
 collector = new UDTFCollector(this);
 genericUDTF.setCollector(collector);
 udtfInputOI = (StructObjectInspector) inputObjInspectors[0];
 objToSendToUDTF = new Object[udtfInputOI.getAllStructFieldRefs().size()];
 MapredContext context = MapredContext.get();
 if (context != null) {
  context.setup(genericUDTF);
 }
 StructObjectInspector udtfOutputOI = genericUDTF.initialize(udtfInputOI);
 if (conf.isOuterLV()) {
  outerObj = Arrays.asList(new Object[udtfOutputOI.getAllStructFieldRefs().size()]);
 }
 // Since we're passing the object output by the UDTF directly to the next
 // operator, we can use the same OI.
 outputObjInspector = udtfOutputOI;
 // Set up periodic progress reporting in case the UDTF doesn't output rows
 // for a while
 if (HiveConf.getBoolVar(hconf, HiveConf.ConfVars.HIVEUDTFAUTOPROGRESS)) {
  autoProgressor = new AutoProgressor(this.getClass().getName(), reporter,
    Utilities.getDefaultNotificationInterval(hconf),
    HiveConf.getTimeVar(
      hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT, TimeUnit.MILLISECONDS));
  autoProgressor.go();
 }
}

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

.getBoolVar(hconf, HiveConf.ConfVars.HIVESCRIPTAUTOPROGRESS)) {
autoProgressor = new AutoProgressor(this.getClass().getName(),
  reporter, Utilities.getDefaultNotificationInterval(hconf),
  HiveConf.getTimeVar(
    hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT, TimeUnit.MILLISECONDS));

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

@Override
protected void initializeOp(Configuration hconf) throws HiveException {
 super.initializeOp(hconf);
 genericUDTF = conf.getGenericUDTF();
 collector = new UDTFCollector(this);
 genericUDTF.setCollector(collector);
 udtfInputOI = (StructObjectInspector) inputObjInspectors[0];
 objToSendToUDTF = new Object[udtfInputOI.getAllStructFieldRefs().size()];
 MapredContext context = MapredContext.get();
 if (context != null) {
  context.setup(genericUDTF);
 }
 StructObjectInspector udtfOutputOI = genericUDTF.initialize(udtfInputOI);
 if (conf.isOuterLV()) {
  outerObj = Arrays.asList(new Object[udtfOutputOI.getAllStructFieldRefs().size()]);
 }
 // Since we're passing the object output by the UDTF directly to the next
 // operator, we can use the same OI.
 outputObjInspector = udtfOutputOI;
 // Set up periodic progress reporting in case the UDTF doesn't output rows
 // for a while
 if (HiveConf.getBoolVar(hconf, HiveConf.ConfVars.HIVEUDTFAUTOPROGRESS)) {
  autoProgressor = new AutoProgressor(this.getClass().getName(), reporter,
    Utilities.getDefaultNotificationInterval(hconf),
    HiveConf.getTimeVar(
      hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT, TimeUnit.MILLISECONDS));
  autoProgressor.go();
 }
}

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

.getBoolVar(hconf, HiveConf.ConfVars.HIVESCRIPTAUTOPROGRESS)) {
autoProgressor = new AutoProgressor(this.getClass().getName(),
  reporter, Utilities.getDefaultNotificationInterval(hconf),
  HiveConf.getTimeVar(
    hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT, TimeUnit.MILLISECONDS));

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

@Override
protected void initializeOp(Configuration hconf) throws HiveException {
 conf.getGenericUDTF().setCollector(new UDTFCollector(this));
 // Make an object inspector [] of the arguments to the UDTF
 List<? extends StructField> inputFields =
   ((StandardStructObjectInspector) inputObjInspectors[0]).getAllStructFieldRefs();
 udtfInputOIs = new ObjectInspector[inputFields.size()];
 for (int i = 0; i < inputFields.size(); i++) {
  udtfInputOIs[i] = inputFields.get(i).getFieldObjectInspector();
 }
 objToSendToUDTF = new Object[inputFields.size()];
 StructObjectInspector udtfOutputOI = conf.getGenericUDTF().initialize(
   udtfInputOIs);
 // Since we're passing the object output by the UDTF directly to the next
 // operator, we can use the same OI.
 outputObjInspector = udtfOutputOI;
 // Set up periodic progress reporting in case the UDTF doesn't output rows
 // for a while
 if (HiveConf.getBoolVar(hconf, HiveConf.ConfVars.HIVEUDTFAUTOPROGRESS)) {
  autoProgressor = new AutoProgressor(this.getClass().getName(), reporter,
    Utilities.getDefaultNotificationInterval(hconf),
    HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT) * 1000);
  autoProgressor.go();
 }
 // Initialize the rest of the operator DAG
 super.initializeOp(hconf);
}

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

@Override
protected Collection<Future<?>> initializeOp(Configuration hconf) throws HiveException {
 Collection<Future<?>> result = super.initializeOp(hconf);
 genericUDTF = conf.getGenericUDTF();
 collector = new UDTFCollector(this);
 genericUDTF.setCollector(collector);
 udtfInputOI = (StructObjectInspector) inputObjInspectors[0];
 objToSendToUDTF = new Object[udtfInputOI.getAllStructFieldRefs().size()];
 MapredContext context = MapredContext.get();
 if (context != null) {
  context.setup(genericUDTF);
 }
 StructObjectInspector udtfOutputOI = genericUDTF.initialize(udtfInputOI);
 if (conf.isOuterLV()) {
  outerObj = Arrays.asList(new Object[udtfOutputOI.getAllStructFieldRefs().size()]);
 }
 // Since we're passing the object output by the UDTF directly to the next
 // operator, we can use the same OI.
 outputObjInspector = udtfOutputOI;
 // Set up periodic progress reporting in case the UDTF doesn't output rows
 // for a while
 if (HiveConf.getBoolVar(hconf, HiveConf.ConfVars.HIVEUDTFAUTOPROGRESS)) {
  autoProgressor = new AutoProgressor(this.getClass().getName(), reporter,
    Utilities.getDefaultNotificationInterval(hconf),
    HiveConf.getTimeVar(
      hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT, TimeUnit.MILLISECONDS));
  autoProgressor.go();
 }
 return result;
}

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

.getBoolVar(hconf, HiveConf.ConfVars.HIVESCRIPTAUTOPROGRESS)) {
autoProgressor = new AutoProgressor(this.getClass().getName(),
  reporter, Utilities.getDefaultNotificationInterval(hconf),
  HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT) * 1000);
autoProgressor.go();

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

.getBoolVar(hconf, HiveConf.ConfVars.HIVESCRIPTAUTOPROGRESS)) {
autoProgressor = new AutoProgressor(this.getClass().getName(),
  reporter, Utilities.getDefaultNotificationInterval(hconf),
  HiveConf.getTimeVar(
    hconf, HiveConf.ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT, TimeUnit.MILLISECONDS));

相关文章

微信公众号

最新文章

更多

Utilities类方法