Re: Flink Web UI display nothing in k8s when use ingress

2020-03-03 文章 LakeShen
In my thought , I think I should config the correct flink jobserver for
flink task

LakeShen  于2020年3月4日周三 下午2:07写道:

> Hi community,
> now we plan to move all flink tasks to k8s cluster. For one flink
> task , we want to see this flink task web ui . First , we create the k8s
> Service to expose 8081 port of jobmanager, then we use ingress controller
> so that we can see it outside.But the flink web like this :
>
> [image: image.png]
>
> The flink web ui images and other info not display , what can I do to
> display flink web info ?
> Thanks to your replay.
>


Flink Web UI display nothing in k8s when use ingress

2020-03-03 文章 LakeShen
Hi community,
now we plan to move all flink tasks to k8s cluster. For one flink
task , we want to see this flink task web ui . First , we create the k8s
Service to expose 8081 port of jobmanager, then we use ingress controller
so that we can see it outside.But the flink web like this :

[image: image.png]

The flink web ui images and other info not display , what can I do to
display flink web info ?
Thanks to your replay.


?????? ????Flink1.10.0????hive??source??????????

2020-03-03 文章 Jun Zhang
??sql??sql??hive??sql??
   
  

 
 
 
 ??2020??03??4?? 13:25??JingsongLeehttps://issues.apache.org/jira/browse/FLINK-16413
FYI


Best,
Jingsong Lee


--
From:JingsongLee 

Re: 使用Flink1.10.0读取hive时source并行度问题

2020-03-03 文章 JingsongLee
Hi jun,

Jira: https://issues.apache.org/jira/browse/FLINK-16413
FYI

Best,
Jingsong Lee


--
From:JingsongLee 
Send Time:2020年3月3日(星期二) 19:06
To:Jun Zhang <825875...@qq.com>; user-zh@flink.apache.org 

Cc:user-zh@flink.apache.org ; like 
Subject:Re: 使用Flink1.10.0读取hive时source并行度问题

Hi jun,

很好的建议~ 这是一个优化点~ 可以建一个JIRA

Best,
Jingsong Lee


--
From:Jun Zhang <825875...@qq.com>
Send Time:2020年3月3日(星期二) 18:45
To:user-zh@flink.apache.org ; JingsongLee 

Cc:user-zh@flink.apache.org ; like 
Subject:回复: 使用Flink1.10.0读取hive时source并行度问题



hi,jinsong:
 我想说一个问题, 我开始了自动推断,比如我设置推断的最大并行度是10,
我有一个类似的sql   select * from  mytable limit 1;
hive表mytable有超过10个文件,如果启动了10个并行度是不是有点浪费呢。
在2020年03月2日 16:38,JingsongLee 写道:
建议使用Batch模式来读取Hive table。

Best,
Jingsong Lee


--
From:like 
Send Time:2020年3月2日(星期一) 16:35
To:lzljs3620...@aliyun.com 
Subject:回复: 使用Flink1.10.0读取hive时source并行度问题


我使用的是 StreamTableEnvironment,确实有碰到这个问题呢。
在2020年3月2日 16:16,JingsongLee 写道:   
 自动推断可能面临资源不足无法启动的问题

理论上不应该呀?Batch作业是可以部分运行的。

Best,
Jingsong Lee

--
From:like 
Send Time:2020年3月2日(星期一) 15:35
To:user-zh@flink.apache.org ; lzljs3620...@aliyun.com 

Subject:回复: 使用Flink1.10.0读取hive时source并行度问题


非常感谢!我尝试关闭自动推断后,已经可以控制source并行度了,自动推断可能面临资源不足无法启动的问题。 


在2020年3月2日 15:18,JingsongLee 写道:   Hi, 

1.10中,Hive source是自动推断并发的,你可以使用以下参数配置到flink-conf.yaml里面来控制并发:
- table.exec.hive.infer-source-parallelism=true (默认使用自动推断)
- table.exec.hive.infer-source-parallelism.max=1000 (自动推断的最大并发)

Sink的并发默认和上游的并发相同,如果有Shuffle,使用配置的统一并发。

Best,
Jingsong Lee


--
From:like 
Send Time:2020年3月2日(星期一) 14:58
To:user-zh@flink.apache.org 
Subject:使用Flink1.10.0读取hive时source并行度问题

hi,大家好

 我使用flink1.10.0读取hive表,启动时设置了全局的并行度,但是在读取的时候,发现sink并行度是受约束的,
而source的并行度不受此约束,会根据source的大小改变,大的时候并行度大到1000,请问一下怎么处理这个并行度呢?  

Re: CliFrontend 未优先加载用户jar包中的class

2020-03-03 文章 tison
也是一种 hack 的方法,不过社区肯定不能在 master 上这么搞就是了(x

Best,
tison.


aven.wu  于2020年3月3日周二 下午4:44写道:

> 感谢回答
> 后来我查了Flink run脚本的classpath设置,我修改了脚本将我的jar包指定在flink classpath的最前面得以解决问题
>
> Best
> Aven
>
> 发件人: tison
> 发送时间: 2020年3月3日 14:16
> 收件人: user-zh
> 主题: Re: CliFrontend 未优先加载用户jar包中的class
>
>
> https://github.com/apache/flink/commit/0f30c263eebd2fc3ecbeae69a4ce9477e1d5d774
>
> Best,
> tison.
>
>
> tison  于2020年3月3日周二 下午2:13写道:
>
> > 1.9.2 和 1.10 上已经修复此问题,修改可参考
> >
> > https://issues.apache.org/jira/browse/FLINK-13749
> >
> > Best,
> > tison.
> >
> >
> > aven.wu  于2020年3月3日周二 下午2:04写道:
> >
> >> 组件版本 Hadoop 2.7.3,flink 1.9.1 ,elasticsearch6.5。
> >> 该问题的起源是因为程序我的用户程序用Jackson,并依赖了Elasticsearch rest client
> >> ,在Yarn集群上提交任务的时候出现了如下异常:
> >> java.lang.NoSuchFieldError: FAIL_ON_SYMBOL_HASH_OVERFLOW
> >> at
> >>
> org.elasticsearch.common.xcontent.json.JsonXContent.(JsonXContent.java:57)
> >> 后上网查询后推论有可能是jackson版本问题,于是打印了类加载路径:
> >> --main class jackson class load before
> >> run--
> >> file:/usr/**/hadoop/lib/jackson-databind-2.2.3.jar
> >> 果然是从hadoop的classpath下加载了2.2.3版本
> >>
> >> 之后查看flink run命令入口程序
> >> CliFrontend#bulidProgram line 799
> >> PackagedProgram#PackagedProgram line 221
> >> JobWithJars#BuildUserCodeClassLoad line 142
> >> return FlinkUserCodeClassLoaders.parentFirst(urls, parent);
> >> 默认使用parentFirst,根据官方文档里面描述的反向类加载,应该是首先从classpath下加载Class,而不是从user
> >> jar包中加载类。
> >> 请问如何修改此处的类加载顺序,优先从user jar 中加载class
> >>
> >> Best
> >> Aven
> >>
> >>
>
>


????Java????????????????

2020-03-03 文章 claylin
hi all??Java??


https://s2.ax1x.com/2020/03/03/34yyvT.png



https://s2.ax1x.com/2020/03/03/34y5P1.png
??

Re: 使用Flink1.10.0读取hive时source并行度问题

2020-03-03 文章 JingsongLee
Hi jun,

很好的建议~ 这是一个优化点~ 可以建一个JIRA

Best,
Jingsong Lee


--
From:Jun Zhang <825875...@qq.com>
Send Time:2020年3月3日(星期二) 18:45
To:user-zh@flink.apache.org ; JingsongLee 

Cc:user-zh@flink.apache.org ; like 
Subject:回复: 使用Flink1.10.0读取hive时source并行度问题


 
hi,jinsong:
 我想说一个问题, 我开始了自动推断,比如我设置推断的最大并行度是10,
我有一个类似的sql   select * from  mytable limit 1;
hive表mytable有超过10个文件,如果启动了10个并行度是不是有点浪费呢。
在2020年03月2日 16:38,JingsongLee 写道:
建议使用Batch模式来读取Hive table。

Best,
Jingsong Lee


--
From:like 
Send Time:2020年3月2日(星期一) 16:35
To:lzljs3620...@aliyun.com 
Subject:回复: 使用Flink1.10.0读取hive时source并行度问题


我使用的是 StreamTableEnvironment,确实有碰到这个问题呢。
在2020年3月2日 16:16,JingsongLee 写道:   
 自动推断可能面临资源不足无法启动的问题

理论上不应该呀?Batch作业是可以部分运行的。

Best,
Jingsong Lee

--
From:like 
Send Time:2020年3月2日(星期一) 15:35
To:user-zh@flink.apache.org ; lzljs3620...@aliyun.com 

Subject:回复: 使用Flink1.10.0读取hive时source并行度问题


非常感谢!我尝试关闭自动推断后,已经可以控制source并行度了,自动推断可能面临资源不足无法启动的问题。 


在2020年3月2日 15:18,JingsongLee 写道:   Hi, 

1.10中,Hive source是自动推断并发的,你可以使用以下参数配置到flink-conf.yaml里面来控制并发:
- table.exec.hive.infer-source-parallelism=true (默认使用自动推断)
- table.exec.hive.infer-source-parallelism.max=1000 (自动推断的最大并发)

Sink的并发默认和上游的并发相同,如果有Shuffle,使用配置的统一并发。

Best,
Jingsong Lee


--
From:like 
Send Time:2020年3月2日(星期一) 14:58
To:user-zh@flink.apache.org 
Subject:使用Flink1.10.0读取hive时source并行度问题

hi,大家好

 我使用flink1.10.0读取hive表,启动时设置了全局的并行度,但是在读取的时候,发现sink并行度是受约束的,
而source的并行度不受此约束,会根据source的大小改变,大的时候并行度大到1000,请问一下怎么处理这个并行度呢?  

Re: Hive Source With Kerberos认证问题

2020-03-03 文章 Rui Li
datanucleus是在HMS端使用的,如果没有datanucleus会报错的话说明你的代码在尝试创建embedded
metastore。这是预期的行为么?我理解你们应该是有一个远端的HMS,然后希望HiveCatalog去连接这个HMS吧?

On Tue, Mar 3, 2020 at 4:00 PM 叶贤勋  wrote:

> hive conf应该是对的,前面UserGroupInfomation登录时都是成功的。
> datanucleus的依赖不加的话,会报claas not found等异常。
> 1、java.lang.ClassNotFoundException:
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory
> 2、Caused by: org.datanucleus.exceptions.NucleusUserException: There is no
> available StoreManager of type "rdbms". Please make sure you have specified
> "datanucleus.storeManagerType" correctly and that all relevant plugins are
> in the CLASSPATH
>
>
> 叶贤勋
> yxx_c...@163.com
>
> 
> 签名由 网易邮箱大师  定制
>
> 在2020年03月2日 11:50,Rui Li  写道:
>
> 从你贴的log来看似乎是创建了embedded metastore。可以检查一下HiveCatalog是不是读到了不正确的hive
> conf?另外你贴的maven的这些依赖都打到你flink作业的jar里了么?像datanucleus的依赖应该是不需要的。
>
> On Sat, Feb 29, 2020 at 10:42 PM 叶贤勋  wrote:
>
> Hi 李锐,感谢你的回复。
> 前面的问题通过设置yarn.resourcemanager.principal,已经解决。
> 但是现在出现另外一个问题,请帮忙看看。
>
>
> 背景:flink任务还是source带有kerberos的hive,相同代码在本地进行测试是能通过kerberos认证,并且能够查询和插入数据到hive。但是任务提交到集群就报kerberos认证失败的错误。
> Flink:1.9.1, flink-1.9.1/lib/有flink-dist_2.11-1.9.1.jar,
> flink-shaded-hadoop-2-uber-2.7.5-7.0.jar,log4j-1.2.17.jar,
> slf4j-log4j12-1.7.15.jar
> Hive:2.1.1
> flink任务主要依赖的jar:
> [INFO] +- org.apache.flink:flink-table-api-java:jar:flink-1.9.1:compile
> [INFO] |  +- org.apache.flink:flink-table-common:jar:flink-1.9.1:compile
> [INFO] |  |  \- org.apache.flink:flink-core:jar:flink-1.9.1:compile
> [INFO] |  | +-
> org.apache.flink:flink-annotations:jar:flink-1.9.1:compile
> [INFO] |  | +-
> org.apache.flink:flink-metrics-core:jar:flink-1.9.1:compile
> [INFO] |  | \- com.esotericsoftware.kryo:kryo:jar:2.24.0:compile
> [INFO] |  |+- com.esotericsoftware.minlog:minlog:jar:1.2:compile
> [INFO] |  |\- org.objenesis:objenesis:jar:2.1:compile
> [INFO] |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
> [INFO] |  \- org.apache.flink:force-shading:jar:1.9.1:compile
> [INFO] +-
> org.apache.flink:flink-table-planner-blink_2.11:jar:flink-1.9.1:compile
> [INFO] |  +-
> org.apache.flink:flink-table-api-scala_2.11:jar:flink-1.9.1:compile
> [INFO] |  |  +- org.scala-lang:scala-reflect:jar:2.11.12:compile
> [INFO] |  |  \- org.scala-lang:scala-compiler:jar:2.11.12:compile
> [INFO] |  +-
> org.apache.flink:flink-table-api-java-bridge_2.11:jar:flink-1.9.1:compile
> [INFO] |  |  +- org.apache.flink:flink-java:jar:flink-1.9.1:compile
> [INFO] |  |  \-
> org.apache.flink:flink-streaming-java_2.11:jar:1.9.1:compile
> [INFO] |  +-
> org.apache.flink:flink-table-api-scala-bridge_2.11:jar:flink-1.9.1:compile
> [INFO] |  |  \- org.apache.flink:flink-scala_2.11:jar:flink-1.9.1:compile
> [INFO] |  +-
> org.apache.flink:flink-table-runtime-blink_2.11:jar:flink-1.9.1:compile
> [INFO] |  |  +- org.codehaus.janino:janino:jar:3.0.9:compile
> [INFO] |  |  \- org.apache.calcite.avatica:avatica-core:jar:1.15.0:compile
> [INFO] |  \- org.reflections:reflections:jar:0.9.10:compile
> [INFO] +- org.apache.flink:flink-table-planner_2.11:jar:flink-1.9.1:compile
> [INFO] +- org.apache.commons:commons-lang3:jar:3.9:compile
> [INFO] +- com.typesafe.akka:akka-actor_2.11:jar:2.5.21:compile
> [INFO] |  +- org.scala-lang:scala-library:jar:2.11.8:compile
> [INFO] |  +- com.typesafe:config:jar:1.3.3:compile
> [INFO] |  \-
> org.scala-lang.modules:scala-java8-compat_2.11:jar:0.7.0:compile
> [INFO] +- org.apache.flink:flink-sql-client_2.11:jar:1.9.1:compile
> [INFO] |  +- org.apache.flink:flink-clients_2.11:jar:1.9.1:compile
> [INFO] |  |  \- org.apache.flink:flink-optimizer_2.11:jar:1.9.1:compile
> [INFO] |  +- org.apache.flink:flink-streaming-scala_2.11:jar:1.9.1:compile
> [INFO] |  +- log4j:log4j:jar:1.2.17:compile
> [INFO] |  \- org.apache.flink:flink-shaded-jackson:jar:2.9.8-7.0:compile
> [INFO] +- org.apache.flink:flink-json:jar:1.9.1:compile
> [INFO] +- org.apache.flink:flink-csv:jar:1.9.1:compile
> [INFO] +- org.apache.flink:flink-hbase_2.11:jar:1.9.1:compile
> [INFO] +- org.apache.hbase:hbase-server:jar:2.2.1:compile
> [INFO] |  +-
> org.apache.hbase.thirdparty:hbase-shaded-protobuf:jar:2.2.1:compile
> [INFO] |  +-
> org.apache.hbase.thirdparty:hbase-shaded-netty:jar:2.2.1:compile
> [INFO] |  +-
> org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:jar:2.2.1:compile
> [INFO] |  |  \-
> com.google.errorprone:error_prone_annotations:jar:2.3.3:compile
> [INFO] |  +- org.apache.hbase:hbase-common:jar:2.2.1:compile
> [INFO] |  |  \-
> com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile
> [INFO] |  +- org.apache.hbase:hbase-http:jar:2.2.1:compile
> [INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.3.27.v20190418:compile
> [INFO] |  |  +-
> 

?????? ????Flink1.10.0????hive??source??????????

2020-03-03 文章 Jun Zhang
hi??jinsong??

 
  ??10??
??sql  select * from mytable limit 1;
hive??mytable??10??10??
 ??2020??03??2?? 16:38??JingsongLee

回复: Hive Source With Kerberos认证问题

2020-03-03 文章 叶贤勋
这是我和flink社区沟通的记录,你可以看下。


| |
叶贤勋
|
|
yxx_c...@163.com
|
签名由网易邮箱大师定制


在2020年03月3日 16:00,叶贤勋 写道:
hive conf应该是对的,前面UserGroupInfomation登录时都是成功的。
datanucleus的依赖不加的话,会报claas not found等异常。
1、java.lang.ClassNotFoundException: 
org.datanucleus.api.jdo.JDOPersistenceManagerFactory
2、Caused by: org.datanucleus.exceptions.NucleusUserException: There is no 
available StoreManager of type "rdbms". Please make sure you have specified 
"datanucleus.storeManagerType" correctly and that all relevant plugins are in 
the CLASSPATH



| |
叶贤勋
|
|
yxx_c...@163.com
|
签名由网易邮箱大师定制


在2020年03月2日 11:50,Rui Li 写道:
从你贴的log来看似乎是创建了embedded metastore。可以检查一下HiveCatalog是不是读到了不正确的hive
conf?另外你贴的maven的这些依赖都打到你flink作业的jar里了么?像datanucleus的依赖应该是不需要的。

On Sat, Feb 29, 2020 at 10:42 PM 叶贤勋  wrote:

Hi 李锐,感谢你的回复。
前面的问题通过设置yarn.resourcemanager.principal,已经解决。
但是现在出现另外一个问题,请帮忙看看。

背景:flink任务还是source带有kerberos的hive,相同代码在本地进行测试是能通过kerberos认证,并且能够查询和插入数据到hive。但是任务提交到集群就报kerberos认证失败的错误。
Flink:1.9.1, flink-1.9.1/lib/有flink-dist_2.11-1.9.1.jar,
flink-shaded-hadoop-2-uber-2.7.5-7.0.jar,log4j-1.2.17.jar,
slf4j-log4j12-1.7.15.jar
Hive:2.1.1
flink任务主要依赖的jar:
[INFO] +- org.apache.flink:flink-table-api-java:jar:flink-1.9.1:compile
[INFO] |  +- org.apache.flink:flink-table-common:jar:flink-1.9.1:compile
[INFO] |  |  \- org.apache.flink:flink-core:jar:flink-1.9.1:compile
[INFO] |  | +-
org.apache.flink:flink-annotations:jar:flink-1.9.1:compile
[INFO] |  | +-
org.apache.flink:flink-metrics-core:jar:flink-1.9.1:compile
[INFO] |  | \- com.esotericsoftware.kryo:kryo:jar:2.24.0:compile
[INFO] |  |+- com.esotericsoftware.minlog:minlog:jar:1.2:compile
[INFO] |  |\- org.objenesis:objenesis:jar:2.1:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  \- org.apache.flink:force-shading:jar:1.9.1:compile
[INFO] +-
org.apache.flink:flink-table-planner-blink_2.11:jar:flink-1.9.1:compile
[INFO] |  +-
org.apache.flink:flink-table-api-scala_2.11:jar:flink-1.9.1:compile
[INFO] |  |  +- org.scala-lang:scala-reflect:jar:2.11.12:compile
[INFO] |  |  \- org.scala-lang:scala-compiler:jar:2.11.12:compile
[INFO] |  +-
org.apache.flink:flink-table-api-java-bridge_2.11:jar:flink-1.9.1:compile
[INFO] |  |  +- org.apache.flink:flink-java:jar:flink-1.9.1:compile
[INFO] |  |  \-
org.apache.flink:flink-streaming-java_2.11:jar:1.9.1:compile
[INFO] |  +-
org.apache.flink:flink-table-api-scala-bridge_2.11:jar:flink-1.9.1:compile
[INFO] |  |  \- org.apache.flink:flink-scala_2.11:jar:flink-1.9.1:compile
[INFO] |  +-
org.apache.flink:flink-table-runtime-blink_2.11:jar:flink-1.9.1:compile
[INFO] |  |  +- org.codehaus.janino:janino:jar:3.0.9:compile
[INFO] |  |  \- org.apache.calcite.avatica:avatica-core:jar:1.15.0:compile
[INFO] |  \- org.reflections:reflections:jar:0.9.10:compile
[INFO] +- org.apache.flink:flink-table-planner_2.11:jar:flink-1.9.1:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] +- com.typesafe.akka:akka-actor_2.11:jar:2.5.21:compile
[INFO] |  +- org.scala-lang:scala-library:jar:2.11.8:compile
[INFO] |  +- com.typesafe:config:jar:1.3.3:compile
[INFO] |  \-
org.scala-lang.modules:scala-java8-compat_2.11:jar:0.7.0:compile
[INFO] +- org.apache.flink:flink-sql-client_2.11:jar:1.9.1:compile
[INFO] |  +- org.apache.flink:flink-clients_2.11:jar:1.9.1:compile
[INFO] |  |  \- org.apache.flink:flink-optimizer_2.11:jar:1.9.1:compile
[INFO] |  +- org.apache.flink:flink-streaming-scala_2.11:jar:1.9.1:compile
[INFO] |  +- log4j:log4j:jar:1.2.17:compile
[INFO] |  \- org.apache.flink:flink-shaded-jackson:jar:2.9.8-7.0:compile
[INFO] +- org.apache.flink:flink-json:jar:1.9.1:compile
[INFO] +- org.apache.flink:flink-csv:jar:1.9.1:compile
[INFO] +- org.apache.flink:flink-hbase_2.11:jar:1.9.1:compile
[INFO] +- org.apache.hbase:hbase-server:jar:2.2.1:compile
[INFO] |  +-
org.apache.hbase.thirdparty:hbase-shaded-protobuf:jar:2.2.1:compile
[INFO] |  +-
org.apache.hbase.thirdparty:hbase-shaded-netty:jar:2.2.1:compile
[INFO] |  +-
org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:jar:2.2.1:compile
[INFO] |  |  \-
com.google.errorprone:error_prone_annotations:jar:2.3.3:compile
[INFO] |  +- org.apache.hbase:hbase-common:jar:2.2.1:compile
[INFO] |  |  \-
com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile
[INFO] |  +- org.apache.hbase:hbase-http:jar:2.2.1:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.3.27.v20190418:compile
[INFO] |  |  +-
org.eclipse.jetty:jetty-util-ajax:jar:9.3.27.v20190418:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.3.27.v20190418:compile
[INFO] |  |  +-
org.eclipse.jetty:jetty-security:jar:9.3.27.v20190418:compile
[INFO] |  |  +- org.glassfish.jersey.core:jersey-server:jar:2.25.1:compile
[INFO] |  |  |  +-
org.glassfish.jersey.core:jersey-common:jar:2.25.1:compile
[INFO] |  |  |  |  +-
org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.25.1:compile
[INFO] |  |  |  |  \-
org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] |  |  |  +-

回复: CliFrontend 未优先加载用户jar包中的class

2020-03-03 文章 aven . wu
感谢回答
后来我查了Flink run脚本的classpath设置,我修改了脚本将我的jar包指定在flink classpath的最前面得以解决问题

Best
Aven

发件人: tison
发送时间: 2020年3月3日 14:16
收件人: user-zh
主题: Re: CliFrontend 未优先加载用户jar包中的class

https://github.com/apache/flink/commit/0f30c263eebd2fc3ecbeae69a4ce9477e1d5d774

Best,
tison.


tison  于2020年3月3日周二 下午2:13写道:

> 1.9.2 和 1.10 上已经修复此问题,修改可参考
>
> https://issues.apache.org/jira/browse/FLINK-13749
>
> Best,
> tison.
>
>
> aven.wu  于2020年3月3日周二 下午2:04写道:
>
>> 组件版本 Hadoop 2.7.3,flink 1.9.1 ,elasticsearch6.5。
>> 该问题的起源是因为程序我的用户程序用Jackson,并依赖了Elasticsearch rest client
>> ,在Yarn集群上提交任务的时候出现了如下异常:
>> java.lang.NoSuchFieldError: FAIL_ON_SYMBOL_HASH_OVERFLOW
>> at
>> org.elasticsearch.common.xcontent.json.JsonXContent.(JsonXContent.java:57)
>> 后上网查询后推论有可能是jackson版本问题,于是打印了类加载路径:
>> --main class jackson class load before
>> run--
>> file:/usr/**/hadoop/lib/jackson-databind-2.2.3.jar
>> 果然是从hadoop的classpath下加载了2.2.3版本
>>
>> 之后查看flink run命令入口程序
>> CliFrontend#bulidProgram line 799
>> PackagedProgram#PackagedProgram line 221
>> JobWithJars#BuildUserCodeClassLoad line 142
>> return FlinkUserCodeClassLoaders.parentFirst(urls, parent);
>> 默认使用parentFirst,根据官方文档里面描述的反向类加载,应该是首先从classpath下加载Class,而不是从user
>> jar包中加载类。
>> 请问如何修改此处的类加载顺序,优先从user jar 中加载class
>>
>> Best
>> Aven
>>
>>



回复: Hive Source With Kerberos认证问题

2020-03-03 文章 叶贤勋
hive conf应该是对的,前面UserGroupInfomation登录时都是成功的。
datanucleus的依赖不加的话,会报claas not found等异常。
1、java.lang.ClassNotFoundException: 
org.datanucleus.api.jdo.JDOPersistenceManagerFactory
2、Caused by: org.datanucleus.exceptions.NucleusUserException: There is no 
available StoreManager of type "rdbms". Please make sure you have specified 
"datanucleus.storeManagerType" correctly and that all relevant plugins are in 
the CLASSPATH



| |
叶贤勋
|
|
yxx_c...@163.com
|
签名由网易邮箱大师定制


在2020年03月2日 11:50,Rui Li 写道:
从你贴的log来看似乎是创建了embedded metastore。可以检查一下HiveCatalog是不是读到了不正确的hive
conf?另外你贴的maven的这些依赖都打到你flink作业的jar里了么?像datanucleus的依赖应该是不需要的。

On Sat, Feb 29, 2020 at 10:42 PM 叶贤勋  wrote:

Hi 李锐,感谢你的回复。
前面的问题通过设置yarn.resourcemanager.principal,已经解决。
但是现在出现另外一个问题,请帮忙看看。

背景:flink任务还是source带有kerberos的hive,相同代码在本地进行测试是能通过kerberos认证,并且能够查询和插入数据到hive。但是任务提交到集群就报kerberos认证失败的错误。
Flink:1.9.1, flink-1.9.1/lib/有flink-dist_2.11-1.9.1.jar,
flink-shaded-hadoop-2-uber-2.7.5-7.0.jar,log4j-1.2.17.jar,
slf4j-log4j12-1.7.15.jar
Hive:2.1.1
flink任务主要依赖的jar:
[INFO] +- org.apache.flink:flink-table-api-java:jar:flink-1.9.1:compile
[INFO] |  +- org.apache.flink:flink-table-common:jar:flink-1.9.1:compile
[INFO] |  |  \- org.apache.flink:flink-core:jar:flink-1.9.1:compile
[INFO] |  | +-
org.apache.flink:flink-annotations:jar:flink-1.9.1:compile
[INFO] |  | +-
org.apache.flink:flink-metrics-core:jar:flink-1.9.1:compile
[INFO] |  | \- com.esotericsoftware.kryo:kryo:jar:2.24.0:compile
[INFO] |  |+- com.esotericsoftware.minlog:minlog:jar:1.2:compile
[INFO] |  |\- org.objenesis:objenesis:jar:2.1:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  \- org.apache.flink:force-shading:jar:1.9.1:compile
[INFO] +-
org.apache.flink:flink-table-planner-blink_2.11:jar:flink-1.9.1:compile
[INFO] |  +-
org.apache.flink:flink-table-api-scala_2.11:jar:flink-1.9.1:compile
[INFO] |  |  +- org.scala-lang:scala-reflect:jar:2.11.12:compile
[INFO] |  |  \- org.scala-lang:scala-compiler:jar:2.11.12:compile
[INFO] |  +-
org.apache.flink:flink-table-api-java-bridge_2.11:jar:flink-1.9.1:compile
[INFO] |  |  +- org.apache.flink:flink-java:jar:flink-1.9.1:compile
[INFO] |  |  \-
org.apache.flink:flink-streaming-java_2.11:jar:1.9.1:compile
[INFO] |  +-
org.apache.flink:flink-table-api-scala-bridge_2.11:jar:flink-1.9.1:compile
[INFO] |  |  \- org.apache.flink:flink-scala_2.11:jar:flink-1.9.1:compile
[INFO] |  +-
org.apache.flink:flink-table-runtime-blink_2.11:jar:flink-1.9.1:compile
[INFO] |  |  +- org.codehaus.janino:janino:jar:3.0.9:compile
[INFO] |  |  \- org.apache.calcite.avatica:avatica-core:jar:1.15.0:compile
[INFO] |  \- org.reflections:reflections:jar:0.9.10:compile
[INFO] +- org.apache.flink:flink-table-planner_2.11:jar:flink-1.9.1:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] +- com.typesafe.akka:akka-actor_2.11:jar:2.5.21:compile
[INFO] |  +- org.scala-lang:scala-library:jar:2.11.8:compile
[INFO] |  +- com.typesafe:config:jar:1.3.3:compile
[INFO] |  \-
org.scala-lang.modules:scala-java8-compat_2.11:jar:0.7.0:compile
[INFO] +- org.apache.flink:flink-sql-client_2.11:jar:1.9.1:compile
[INFO] |  +- org.apache.flink:flink-clients_2.11:jar:1.9.1:compile
[INFO] |  |  \- org.apache.flink:flink-optimizer_2.11:jar:1.9.1:compile
[INFO] |  +- org.apache.flink:flink-streaming-scala_2.11:jar:1.9.1:compile
[INFO] |  +- log4j:log4j:jar:1.2.17:compile
[INFO] |  \- org.apache.flink:flink-shaded-jackson:jar:2.9.8-7.0:compile
[INFO] +- org.apache.flink:flink-json:jar:1.9.1:compile
[INFO] +- org.apache.flink:flink-csv:jar:1.9.1:compile
[INFO] +- org.apache.flink:flink-hbase_2.11:jar:1.9.1:compile
[INFO] +- org.apache.hbase:hbase-server:jar:2.2.1:compile
[INFO] |  +-
org.apache.hbase.thirdparty:hbase-shaded-protobuf:jar:2.2.1:compile
[INFO] |  +-
org.apache.hbase.thirdparty:hbase-shaded-netty:jar:2.2.1:compile
[INFO] |  +-
org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:jar:2.2.1:compile
[INFO] |  |  \-
com.google.errorprone:error_prone_annotations:jar:2.3.3:compile
[INFO] |  +- org.apache.hbase:hbase-common:jar:2.2.1:compile
[INFO] |  |  \-
com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile
[INFO] |  +- org.apache.hbase:hbase-http:jar:2.2.1:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.3.27.v20190418:compile
[INFO] |  |  +-
org.eclipse.jetty:jetty-util-ajax:jar:9.3.27.v20190418:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.3.27.v20190418:compile
[INFO] |  |  +-
org.eclipse.jetty:jetty-security:jar:9.3.27.v20190418:compile
[INFO] |  |  +- org.glassfish.jersey.core:jersey-server:jar:2.25.1:compile
[INFO] |  |  |  +-
org.glassfish.jersey.core:jersey-common:jar:2.25.1:compile
[INFO] |  |  |  |  +-
org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.25.1:compile
[INFO] |  |  |  |  \-
org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] |  |  |  +-
org.glassfish.jersey.core:jersey-client:jar:2.25.1:compile
[INFO] |  |  |  +-