gpt4 book ai didi

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

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

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

WorkUnit.getExpectedHighWatermark介绍

[英]Get the expected high Watermark as a JsonElement.
[中]将预期的高水位线作为JsonElement获取。

代码示例

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

/**
 * Get the expected high {@link Watermark}. A default {@link Gson} object will be used to deserialize the watermark.
 *
 * @param watermarkClass the watermark class for this {@code WorkUnit}.
 * @return the expected high watermark in this {@code WorkUnit}.
 */
public <T extends Watermark> T getExpectedHighWatermark(Class<T> watermarkClass) {
 return getExpectedHighWatermark(watermarkClass, GSON);
}

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

/**
 * Get the expected high {@link Watermark}.
 *
 * @param watermarkClass the watermark class for this {@code WorkUnit}.
 * @param gson a {@link Gson} object used to deserialize the watermark.
 * @return the expected high watermark in this {@code WorkUnit}.
 */
public <T extends Watermark> T getExpectedHighWatermark(Class<T> watermarkClass, Gson gson) {
 JsonElement json = getExpectedHighWatermark();
 if (json == null) {
  return null;
 }
 return gson.fromJson(json, watermarkClass);
}

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

@Override
public void setActualHighWatermark(WorkUnitState wus) {
 wus.setActualHighWatermark(wus.getWorkunit().getExpectedHighWatermark(LongWatermark.class));
}

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

/**
 * Sets the actual high watermark by reading the expected high watermark
 * {@inheritDoc}
 * @see gobblin.data.management.conversion.hive.watermarker.HiveSourceWatermarker#setActualHighWatermark(gobblin.configuration.WorkUnitState)
 */
@Override
public void setActualHighWatermark(WorkUnitState wus) {
 if (Boolean.valueOf(wus.getPropAsBoolean(IS_WATERMARK_WORKUNIT_KEY))) {
  wus.setActualHighWatermark(wus.getWorkunit().getExpectedHighWatermark(MultiKeyValueLongWatermark.class));
 } else {
  wus.setActualHighWatermark(wus.getWorkunit().getExpectedHighWatermark(LongWatermark.class));
 }
}

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