package com.zdjizhi.etl.connection; import com.alibaba.fastjson.util.TypeUtils; import com.zdjizhi.utils.json.TypeUtil; import org.apache.flink.api.common.functions.MapFunction; import java.util.Map; public class SketchTimeMapFunction implements MapFunction, Map> { @Override public Map map(Map value) throws Exception { value.put("sketch_start_time", TypeUtil.coverMSToS(value.get("sketch_start_time"))); value.put("sketch_sessions", TypeUtils.castToLong(value.get("sketch_sessions"))); value.put("sketch_packets", TypeUtils.castToLong(value.get("sketch_packets"))); value.put("sketch_bytes", TypeUtils.castToLong(value.get("sketch_bytes"))); return value; } }