File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
impala/impala-sink/src/main/java/com/dtstack/flink/sql/sink/impala Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 77
88import java .io .IOException ;
99import java .security .PrivilegedAction ;
10+ import java .security .PrivilegedExceptionAction ;
1011import java .util .List ;
1112
1213import static org .apache .flink .util .Preconditions .checkNotNull ;
@@ -55,17 +56,17 @@ public ImpalaOutputFormat(
5556 public void open (int taskNumber , int numTasks ) throws IOException {
5657 if (authMech == 1 ) {
5758 UserGroupInformation ugi = KrbUtils .getUgi (principal , keytabPath , krb5confPath );
58- ugi . doAs ( new PrivilegedAction < Object >() {
59- @ Override
60- public Object run () {
61- try {
59+ try {
60+ ugi . doAs ( new PrivilegedExceptionAction < Void >() {
61+ @ Override
62+ public Void run () throws IOException {
6263 openJdbc ();
63- } catch (IOException e ) {
64- e .printStackTrace ();
64+ return null ;
6565 }
66- return null ;
67- }
68- });
66+ });
67+ } catch (InterruptedException e ) {
68+ e .printStackTrace ();
69+ }
6970 } else {
7071 super .open (taskNumber , numTasks );
7172 }
You can’t perform that action at this time.
0 commit comments