- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中gobblin.source.workunit.WorkUnit.getLowWatermark()
方法的一些代码示例,展示了WorkUnit.getLowWatermark()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkUnit.getLowWatermark()
方法的具体详情如下:
包路径:gobblin.source.workunit.WorkUnit
类名称:WorkUnit
方法名:getLowWatermark
[英]Get the low Watermark as a JsonElement.
[中]将低水位线作为JsonElement获取。
代码示例来源:origin: com.linkedin.gobblin/gobblin-api
/**
* Get the low {@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 low watermark in this {@code WorkUnit}.
*/
public <T extends Watermark> T getLowWatermark(Class<T> watermarkClass) {
return getLowWatermark(watermarkClass, GSON);
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-api
/**
* Get the low {@link Watermark}.
*
* @param watermarkClass the watermark class for this {@code WorkUnit}.
* @param gson a {@link Gson} object used to deserialize the watermark.
* @return the low watermark in this {@code WorkUnit}.
*/
public <T extends Watermark> T getLowWatermark(Class<T> watermarkClass, Gson gson) {
JsonElement json = getLowWatermark();
if (json == null) {
return null;
}
return gson.fromJson(json, watermarkClass);
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-api
/**
* Backoff the actual high watermark to the low watermark returned by {@link WorkUnit#getLowWatermark()}.
*/
public void backoffActualHighWatermark() {
JsonElement lowWatermark = this.workUnit.getLowWatermark();
if (lowWatermark == null) {
return;
}
setProp(ConfigurationKeys.WORK_UNIT_STATE_ACTUAL_HIGH_WATER_MARK_KEY, lowWatermark.toString());
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-api
/**
* Get the actual high {@link Watermark}. If the {@code WorkUnitState} does not contain the actual high watermark
* (which may be caused by task failures), the low watermark in the corresponding {@link WorkUnit} will be returned.
*
* @param watermarkClass the watermark class for this {@code WorkUnitState}.
* @param gson a {@link Gson} object used to deserialize the watermark.
* @return the actual high watermark in this {@code WorkUnitState}. null is returned if this {@code WorkUnitState}
* does not contain an actual high watermark, and the corresponding {@code WorkUnit} does not contain a low
* watermark.
*/
public <T extends Watermark> T getActualHighWatermark(Class<T> watermarkClass, Gson gson) {
JsonElement json = getActualHighWatermark();
if (json == null) {
json = this.workUnit.getLowWatermark();
if (json == null) {
return null;
}
}
return gson.fromJson(json, watermarkClass);
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-data-management
/**
* Sets metadata to indicate whether this is the first time this table or partition is being published.
* @param wus to set if this is first publish for this table or partition
*/
public static void setIsFirstPublishMetadata(WorkUnitState wus) {
if (!Boolean.valueOf(wus.getPropAsBoolean(IS_WATERMARK_WORKUNIT_KEY))) {
LongWatermark previousWatermark = wus.getWorkunit().getLowWatermark(LongWatermark.class);
wus.setProp(SlaEventKeys.IS_FIRST_PUBLISH, (null == previousWatermark || previousWatermark.getValue() == 0));
}
}
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-example
long baseRevision = workUnitState.getWorkunit().getLowWatermark(LongWatermark.class, new Gson()).getValue();
if (baseRevision < 0) {
try {
本文整理了Java中gobblin.source.workunit.WorkUnit.getLowWatermark()方法的一些代码示例,展示了WorkUnit.getLowWatermark()的
我是一名优秀的程序员,十分优秀!