gpt4 book ai didi

gobblin.source.workunit.WorkUnit.createEmpty()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 07:49:05 27 4
gpt4 key购买 nike

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

WorkUnit.createEmpty介绍

[英]Factory method.
[中]

代码示例

代码示例来源:origin: com.linkedin.gobblin/gobblin-api

/**
 * Default constructor used for deserialization.
 */
public WorkUnitState() {
 this.workUnit = WorkUnit.createEmpty();
 this.jobState = new State();
 // Not available on deserialization
 this.taskBroker = null;
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-api

@Override
public void readFields(DataInput in)
  throws IOException {
 int numWorkUnits = in.readInt();
 for (int i = 0; i < numWorkUnits; i++) {
  WorkUnit workUnit = WorkUnit.createEmpty();
  workUnit.readFields(in);
  this.workUnits.add(workUnit);
 }
 super.readFields(in);
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

@Override
 public void map(LongWritable key, Text value, Context context)
   throws IOException, InterruptedException {
  WorkUnit workUnit = (value.toString().endsWith(MULTI_WORK_UNIT_FILE_EXTENSION) ? MultiWorkUnit.createEmpty()
    : WorkUnit.createEmpty());
  SerializationUtils.deserializeState(this.fs, new Path(value.toString()), workUnit);
  if (workUnit instanceof MultiWorkUnit) {
   List<WorkUnit> flattenedWorkUnits =
     JobLauncherUtils.flattenWorkUnits(((MultiWorkUnit) workUnit).getWorkUnits());
   this.workUnits.addAll(flattenedWorkUnits);
  } else {
   this.workUnits.add(workUnit);
  }
 }
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

WorkUnit wu = WorkUnit.createEmpty();
try {
 wu.readFields(workUnitFileCloser.register(new DataInputStream(fs.open(status.getPath()))));

代码示例来源:origin: com.linkedin.gobblin/gobblin-data-management

WorkUnit watermarkWorkunit = WorkUnit.createEmpty();
watermarkWorkunit.setProp(IS_WATERMARK_WORKUNIT_KEY, true);
watermarkWorkunit.setProp(ConfigurationKeys.DATASET_URN_KEY, tableKey);

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