You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by chenxuying <cx...@163.com> on 2020/10/13 09:22:41 UTC

flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

集群是local Standalone模式,任务可以正常的运行, sink是print,能在Stdout看到数据输出,
但是在任务详情页面没有Bytes Received, Records Received, Bytes Sent , Records Sent等实时数据 都是0

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by 丁浩浩 <18...@163.com>.
如果你的算子全都串在一个节点里面的话,是看不到输入输出的。

> 在 2020年10月13日,下午5:22,chenxuying <cx...@163.com> 写道:
> 
> 集群是local Standalone模式,任务可以正常的运行, sink是print,能在Stdout看到数据输出,
> 但是在任务详情页面没有Bytes Received, Records Received, Bytes Sent , Records Sent等实时数据 都是0


Re:Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by hailongwang <18...@163.com>.
是的,我误写了,sorry。


在 2020-10-13 16:42:49,"丁浩浩" <18...@163.com> 写道:
>source应该是没有输入指标吧
>
>> 在 2020年10月13日,下午5:39,hailongwang <18...@163.com> 写道:
>> 
>> Hi chenxuying,
>> 
>> 
>> 如果你的算子都是 chain 成一个 operator 的话,那么是没有的。因为 Source 没有 输出指标,Sink 没有输出指标,所以 chain在一起是话就没有了。
>> 如果你想要看的话,可以并发设置成不一样,或者显示的调用 disableChain。
>> 
>> 
>> Best,
>> Hailong Wang
>> 
>> 
>> 在 2020-10-13 16:22:41,"chenxuying" <cx...@163.com> 写道:
>>> 集群是local Standalone模式,任务可以正常的运行, sink是print,能在Stdout看到数据输出,
>>> 但是在任务详情页面没有Bytes Received, Records Received, Bytes Sent , Records Sent等实时数据 都是0

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by "cxydevelop@163.com" <cx...@163.com>.
嗯嗯,看到了,才发现还有这个地方可以看



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by zhisheng <zh...@gmail.com>.
想获取到的话其实可以通过 REST API 去如下图的 metrics 处获取作业 source 往下 send
的数据量和速度,不过这个是单个并行度的,可以去将每个并行度的累加起来。

http://zhisheng-blog.oss-cn-hangzhou.aliyuncs.com/2020-10-14-060508.png

[image: image.png]

Best

zhisheng

Kevin Liu <Ke...@outlook.com> 于2020年10月14日周三 上午12:35写道:

> 可以参考 https://blog.csdn.net/weixin_41608066/article/details/108557869
> 。“目前flink
> sql是不支持source/sink并行度配置的,flink sql中各算子并行度默认是根据source的partition数或文件数来决定。”
> 如果想实现在设置 source 时指定并行度,可以参考该文章对源码做些修改。
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by "cxydevelop@163.com" <cx...@163.com>.
好的,谢谢



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by Kevin Liu <Ke...@outlook.com>.
可以参考 https://blog.csdn.net/weixin_41608066/article/details/108557869。“目前flink
sql是不支持source/sink并行度配置的,flink sql中各算子并行度默认是根据source的partition数或文件数来决定。”
如果想实现在设置 source 时指定并行度,可以参考该文章对源码做些修改。



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by "cxydevelop@163.com" <cx...@163.com>.
我好像悟了,试了一下stream api 不同的并行度 ,
source节点的输出其实就是整个job的输入
sink节点的输入就是整个job的输出
flink在统计这些节点的时候 , 是没有统计开头结尾
但是还不知道flinksql如何设置不同的并发



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by caozhen <ca...@163.com>.
我理解:
这个Operator的并行度一样,chain成一个Operator,所以它的头尾就是source和sink,是计算的作业内部的,source输入的不会被统计到,只会统计到source输出到下游Operator的,同理,sink输入的可以统计到,输出的不能被统计到




cxydevelop@163.com wrote
> 我用的是flinksql , 不过以我的理解, 一个节点不是应该也有输入输出吗, 想问下这有对应的文档吗
> 详细代码
> StreamExecutionEnvironment env =
> StreamExecutionEnvironment.getExecutionEnvironment();
>         EnvironmentSettings settings =
> EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build();
>         StreamTableEnvironment tableEnvironment =
> StreamTableEnvironment.create(env, settings);
>         tableEnvironment.executeSql("CREATE FUNCTION ColumnWithType AS
> 'com.cxydevelop.flinkdemo_1_11.tablesql.function.udtf.ColumnWithType'");
>         tableEnvironment.executeSql("CREATE TABLE sourceTable (\n" +
>                 "    request_uri STRING,\n" +
>                 "    `time` STRING\n" +
>                 ") WITH (\n" +
>                 "    'connector' = 'sls',\n" +
>                 ...
>                 "    'consumer.beginposition' = 'end_cursor',\n" +
>                 "    'format' = 'sls'\n" +
>                 ")");
>         tableEnvironment.executeSql("CREATE TABLE sinktable (\n" +
>                 "    media_type_id STRING" +
>                 "    , platform STRING\n" +
>                 "    ,game_id STRING\n" +
>                 "    ,agent_id STRING\n" +
>                 "    ,site_id STRING\n" +
>                 "    ,idfa STRING\n" +
>                 "    ,os STRING\n" +
>                 ") WITH (\n" +
>                 "    'connector' = 'print'\n" +
>                 ")");
>         tableEnvironment.executeSql(
>                 "insert into sinktable " +
>                     "select media_type_id, platform, game_id, agent_id,
> site_id, idfa, os " +
>                     "from sourceTable,LATERAL
> TABLE(ColumnWithType(request_uri,'game_id,agent_id,site_id,idfa,os')) " +
>                     "where POSITION('log.gif' in request_uri) > 0");
> 
> 
> 
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/





--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by "cxydevelop@163.com" <cx...@163.com>.
我用的是flinksql , 不过以我的理解, 一个节点不是应该也有输入输出吗, 想问下这有对应的文档吗
详细代码
StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
        EnvironmentSettings settings =
EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build();
        StreamTableEnvironment tableEnvironment =
StreamTableEnvironment.create(env, settings);
        tableEnvironment.executeSql("CREATE FUNCTION ColumnWithType AS
'com.cxydevelop.flinkdemo_1_11.tablesql.function.udtf.ColumnWithType'");
        tableEnvironment.executeSql("CREATE TABLE sourceTable (\n" +
                "    request_uri STRING,\n" +
                "    `time` STRING\n" +
                ") WITH (\n" +
                "    'connector' = 'sls',\n" +
                ...
                "    'consumer.beginposition' = 'end_cursor',\n" +
                "    'format' = 'sls'\n" +
                ")");
        tableEnvironment.executeSql("CREATE TABLE sinktable (\n" +
                "    media_type_id STRING" +
                "    , platform STRING\n" +
                "    ,game_id STRING\n" +
                "    ,agent_id STRING\n" +
                "    ,site_id STRING\n" +
                "    ,idfa STRING\n" +
                "    ,os STRING\n" +
                ") WITH (\n" +
                "    'connector' = 'print'\n" +
                ")");
        tableEnvironment.executeSql(
                "insert into sinktable " +
                    "select media_type_id, platform, game_id, agent_id,
site_id, idfa, os " +
                    "from sourceTable,LATERAL
TABLE(ColumnWithType(request_uri,'game_id,agent_id,site_id,idfa,os')) " +
                    "where POSITION('log.gif' in request_uri) > 0");



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by 丁浩浩 <18...@163.com>.
source应该是没有输入指标吧

> 在 2020年10月13日,下午5:39,hailongwang <18...@163.com> 写道:
> 
> Hi chenxuying,
> 
> 
> 如果你的算子都是 chain 成一个 operator 的话,那么是没有的。因为 Source 没有 输出指标,Sink 没有输出指标,所以 chain在一起是话就没有了。
> 如果你想要看的话,可以并发设置成不一样,或者显示的调用 disableChain。
> 
> 
> Best,
> Hailong Wang
> 
> 
> 在 2020-10-13 16:22:41,"chenxuying" <cx...@163.com> 写道:
>> 集群是local Standalone模式,任务可以正常的运行, sink是print,能在Stdout看到数据输出,
>> 但是在任务详情页面没有Bytes Received, Records Received, Bytes Sent , Records Sent等实时数据 都是0


Re:flink1.11.2webui界面中的任务详情页面获取不到任务的received和sent数据详情

Posted by hailongwang <18...@163.com>.
Hi chenxuying,


如果你的算子都是 chain 成一个 operator 的话,那么是没有的。因为 Source 没有 输出指标,Sink 没有输出指标,所以 chain在一起是话就没有了。
如果你想要看的话,可以并发设置成不一样,或者显示的调用 disableChain。


Best,
Hailong Wang


在 2020-10-13 16:22:41,"chenxuying" <cx...@163.com> 写道:
>集群是local Standalone模式,任务可以正常的运行, sink是print,能在Stdout看到数据输出,
>但是在任务详情页面没有Bytes Received, Records Received, Bytes Sent , Records Sent等实时数据 都是0