gpt4 book ai didi

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

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

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

WorkUnit.contains介绍

暂无

代码示例

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

/**
 * Get the low {@link Watermark} as a {@link JsonElement}.
 *
 * @return a {@link JsonElement} representing the low {@link Watermark} or
 *         {@code null} if the low {@link Watermark} is not set.
 */
public JsonElement getLowWatermark() {
 if (!contains(ConfigurationKeys.WATERMARK_INTERVAL_VALUE_KEY)) {
  return null;
 }
 return JSON_PARSER.parse(getProp(ConfigurationKeys.WATERMARK_INTERVAL_VALUE_KEY)).getAsJsonObject()
   .get(WatermarkInterval.LOW_WATERMARK_TO_JSON_KEY);
}

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

@Override
public boolean contains(String key) {
 return super.contains(key) || this.workUnit.contains(key) || this.jobState.contains(key);
}

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

@Override
 public boolean apply(WorkUnit workUnit) {
  if (workUnit instanceof MultiWorkUnit) {
   Preconditions.checkArgument(!workUnit.contains(ConfigurationKeys.WORK_UNIT_SKIP_KEY),
     "Error: MultiWorkUnit cannot be skipped");
   for (WorkUnit wu : ((MultiWorkUnit) workUnit).getWorkUnits()) {
    Preconditions.checkArgument(!wu.contains(ConfigurationKeys.WORK_UNIT_SKIP_KEY),
      "Error: MultiWorkUnit cannot contain skipped WorkUnit");
   }
  }
  if (workUnit.getPropAsBoolean(ConfigurationKeys.WORK_UNIT_SKIP_KEY, false)) {
   WorkUnitState workUnitState = new WorkUnitState(workUnit, this.jobState);
   workUnitState.setWorkingState(WorkUnitState.WorkingState.SKIPPED);
   this.jobState.addSkippedTaskState(new TaskState(workUnitState));
   return false;
  }
  return true;
 }
}

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

private static void computeAndSetWorkUnitGuid(WorkUnit workUnit)
  throws IOException {
 Guid guid = Guid.fromStrings(workUnit.contains(ConfigurationKeys.CONVERTER_CLASSES_KEY) ? workUnit
   .getProp(ConfigurationKeys.CONVERTER_CLASSES_KEY) : "");
 setWorkUnitGuid(workUnit, guid.append(deserializeCopyEntity(workUnit)));
}

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