Skip to content

Commit

Permalink
optimize the code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhisheng17 committed Dec 12, 2022
1 parent b1bfdc3 commit 55ed3cb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


import com.zhisheng.common.utils.ExecutionEnvUtil;
import com.zhisheng.common.utils.StringUtil;
import com.zhisheng.libraries.cep.model.Event;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.api.common.functions.FlatMapFunction;
import org.apache.flink.api.java.utils.ParameterTool;
Expand Down Expand Up @@ -38,7 +38,7 @@ public static void main(String[] args) throws Exception {
.flatMap(new FlatMapFunction<String, Event>() {
@Override
public void flatMap(String s, Collector<Event> collector) throws Exception {
if (StringUtil.isNotEmpty(s)) {
if (StringUtils.isNoneEmpty(s)) {
String[] split = s.split(",");
if (split.length == 2) {
collector.collect(new Event(Integer.valueOf(split[0]), split[1]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.net.URI;

import static com.zhisheng.common.constant.PropertiesConstants.*;
import static com.zhisheng.common.constant.PropertiesConstants.STREAM_CHECKPOINT_INTERVAL;

/**
* Desc: Checkpoint 工具类
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.joda.time.format.DateTimeFormatter;
import org.junit.Assert;
import org.junit.Test;

import java.text.SimpleDateFormat;
import java.util.Date;

Expand Down

0 comments on commit 55ed3cb

Please sign in to comment.