[jira] [Commented] (FLINK-18443) The operator name select: (ip, ts, count, environment.access AS access, environment.brand AS brand, sid, params.adid AS adid, eventid) exceeded the 80 characters lengt

2020-07-07 Thread mzz (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-18443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153207#comment-17153207
 ] 

mzz commented on FLINK-18443:
-

I replaced Types with DataTypes, the problem has solved

> The operator name select: (ip, ts, count, environment.access AS access, 
> environment.brand AS brand, sid, params.adid AS adid, eventid) exceeded the 
> 80 characters length limit and was truncated
> 
>
> Key: FLINK-18443
> URL: https://issues.apache.org/jira/browse/FLINK-18443
> Project: Flink
>  Issue Type: Bug
>  Components: API / DataStream
>Affects Versions: 1.9.0
>Reporter: mzz
>Priority: Major
>
> *Schema:*
> {code:java}
> .withSchema(new Schema()
>  .field("ip", Types.STRING())
>  .field("ts", Types.STRING())
>  .field("procTime", Types.SQL_TIMESTAMP).proctime()
>  .field("environment", schemaEnvironment)
>  .field("advs", ObjectArrayTypeInfo.getInfoFor(new Array[Row](0).getClass, 
>   Types.ROW(Array("count","sid", "eventid","params"), 
>   Array[TypeInformation[_]](Types.STRING(),Types.STRING(), 
>   
> Types.STRING(),Types.ROW(Array("adid","adtype","ecpm"),Array[TypeInformation[_]]
>  (Types.STRING(),Types.STRING(),Types.STRING()))
> )
> {code}
> *when execute this sql*:
> {code:java}
> val sql =
>   """
> |SELECT
> |ip,
> |ts,
> |params.ad,
> |params.adtype,
> |eventid,
> |procTime
> |FROM aggs_test
> |CROSS JOIN UNNEST(advs) AS t (`count`,sid, eventid,params)
> |""".stripMargin
> {code}
> *I got a warning,and the console keeps brushing this warning,no normal 
> printout*
> {code:java}
> 09:38:38,694 WARN  org.apache.flink.metrics.MetricGroup   
>- The operator name correlate: table(explode($cor0.advs)), select: ip, ts, 
> procTime, advs, sid, eventid, params exceeded the 80 characters length limit 
> and was truncated.
> {code}
> *But after I change it to this way, although I occasionally brush this Warn, 
> it can be output normally。I change the 'params' type from Types.ROW to 
> Types.STRING*。
> {code:java}
>  .field("advs", ObjectArrayTypeInfo.getInfoFor(new Array[Row](0).getClass, 
> Types.ROW(Array("count", "sid", "eventid", "params"),
>   Array[TypeInformation[_]](Types.STRING(), Types.STRING(), 
> Types.STRING(), Types.STRING()
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-18443) The operator name select: (ip, ts, count, environment.access AS access, environment.brand AS brand, sid, params.adid AS adid, eventid) exceeded the 80 characters lengt

2020-06-28 Thread mzz (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-18443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17147494#comment-17147494
 ] 

mzz commented on FLINK-18443:
-

I tried to read the source code,But it didn't help me。Because of the parameter 
METRICS_OPERATOR_NAME_MAX_LENGTH  is final。

{code:java}
static final int METRICS_OPERATOR_NAME_MAX_LENGTH = 80;
public OperatorMetricGroup getOrAddOperator(OperatorID operatorID, String name) 
{
if (name != null && name.length() > 
METRICS_OPERATOR_NAME_MAX_LENGTH) {
LOG.warn("The operator name {} exceeded the {} 
characters length limit and was truncated.", name, 
METRICS_OPERATOR_NAME_MAX_LENGTH);
name = name.substring(0, 
METRICS_OPERATOR_NAME_MAX_LENGTH);
}
OperatorMetricGroup operator = new 
OperatorMetricGroup(this.registry, this, operatorID, name);
// unique OperatorIDs only exist in streaming, so we have to 
rely on the name for batch operators
final String key = operatorID + name;

synchronized (this) {
OperatorMetricGroup previous = operators.put(key, 
operator);
if (previous == null) {
// no operator group so far
return operator;
} else {
// already had an operator group. restore that 
one.
operators.put(key, previous);
return previous;
}
}
}

{code}



> The operator name select: (ip, ts, count, environment.access AS access, 
> environment.brand AS brand, sid, params.adid AS adid, eventid) exceeded the 
> 80 characters length limit and was truncated
> 
>
> Key: FLINK-18443
> URL: https://issues.apache.org/jira/browse/FLINK-18443
> Project: Flink
>  Issue Type: Bug
>  Components: API / DataStream
>Affects Versions: 1.9.0
>Reporter: mzz
>Priority: Major
>
> *Schema:*
> {code:java}
> .withSchema(new Schema()
>  .field("ip", Types.STRING())
>  .field("ts", Types.STRING())
>  .field("procTime", Types.SQL_TIMESTAMP).proctime()
>  .field("environment", schemaEnvironment)
>  .field("advs", ObjectArrayTypeInfo.getInfoFor(new Array[Row](0).getClass, 
>   Types.ROW(Array("count","sid", "eventid","params"), 
>   Array[TypeInformation[_]](Types.STRING(),Types.STRING(), 
>   
> Types.STRING(),Types.ROW(Array("adid","adtype","ecpm"),Array[TypeInformation[_]]
>  (Types.STRING(),Types.STRING(),Types.STRING()))
> )
> {code}
> *when execute this sql*:
> {code:java}
> val sql =
>   """
> |SELECT
> |ip,
> |ts,
> |params.ad,
> |params.adtype,
> |eventid,
> |procTime
> |FROM aggs_test
> |CROSS JOIN UNNEST(advs) AS t (`count`,sid, eventid,params)
> |""".stripMargin
> {code}
> *I got a warning,and the console keeps brushing this warning,no normal 
> printout*
> {code:java}
> 09:38:38,694 WARN  org.apache.flink.metrics.MetricGroup   
>- The operator name correlate: table(explode($cor0.advs)), select: ip, ts, 
> procTime, advs, sid, eventid, params exceeded the 80 characters length limit 
> and was truncated.
> {code}
> *But after I change it to this way, although I occasionally brush this Warn, 
> it can be output normally。I change the 'params' type from Types.ROW to 
> Types.STRING*。
> {code:java}
>  .field("advs", ObjectArrayTypeInfo.getInfoFor(new Array[Row](0).getClass, 
> Types.ROW(Array("count", "sid", "eventid", "params"),
>   Array[TypeInformation[_]](Types.STRING(), Types.STRING(), 
> Types.STRING(), Types.STRING()
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)