From 9925340ad780c9bd3f5701be2c141e7e97968080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=EC=9D=80?= Date: Sat, 25 Nov 2023 14:53:04 +0900 Subject: [PATCH 1/3] get ugi instance --- src/main/java/io/confluent/connect/hdfs/DataWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/confluent/connect/hdfs/DataWriter.java b/src/main/java/io/confluent/connect/hdfs/DataWriter.java index 26ee8bb06..2a8f08b05 100644 --- a/src/main/java/io/confluent/connect/hdfs/DataWriter.java +++ b/src/main/java/io/confluent/connect/hdfs/DataWriter.java @@ -274,7 +274,7 @@ private void configureKerberosAuthentication(Configuration hadoopConfiguration) hostname ); UserGroupInformation.loginUserFromKeytab(principal, connectorConfig.connectHdfsKeytab()); - final UserGroupInformation ugi = UserGroupInformation.getLoginUser(); + final UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI(principal, connectorConfig.connectHdfsKeytab()) log.info("Login as: " + ugi.getUserName()); isRunning = true; From 12c93c33cfbe97f45080da4fd8fa13b5227e76c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=EC=9D=80?= Date: Sat, 25 Nov 2023 14:53:18 +0900 Subject: [PATCH 2/3] get ugi instance --- src/main/java/io/confluent/connect/hdfs/DataWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/confluent/connect/hdfs/DataWriter.java b/src/main/java/io/confluent/connect/hdfs/DataWriter.java index 2a8f08b05..63c65d938 100644 --- a/src/main/java/io/confluent/connect/hdfs/DataWriter.java +++ b/src/main/java/io/confluent/connect/hdfs/DataWriter.java @@ -274,7 +274,7 @@ private void configureKerberosAuthentication(Configuration hadoopConfiguration) hostname ); UserGroupInformation.loginUserFromKeytab(principal, connectorConfig.connectHdfsKeytab()); - final UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI(principal, connectorConfig.connectHdfsKeytab()) + final UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI(principal, connectorConfig.connectHdfsKeytab()); log.info("Login as: " + ugi.getUserName()); isRunning = true; From 50756bad4f39e193d78b62d8d48d517c8987dd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=EC=9D=80?= Date: Tue, 5 Mar 2024 10:53:16 +0900 Subject: [PATCH 3/3] Modify check style --- src/main/java/io/confluent/connect/hdfs/DataWriter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/confluent/connect/hdfs/DataWriter.java b/src/main/java/io/confluent/connect/hdfs/DataWriter.java index 63c65d938..09ac84bee 100644 --- a/src/main/java/io/confluent/connect/hdfs/DataWriter.java +++ b/src/main/java/io/confluent/connect/hdfs/DataWriter.java @@ -274,7 +274,10 @@ private void configureKerberosAuthentication(Configuration hadoopConfiguration) hostname ); UserGroupInformation.loginUserFromKeytab(principal, connectorConfig.connectHdfsKeytab()); - final UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI(principal, connectorConfig.connectHdfsKeytab()); + final UserGroupInformation ugi = UserGroupInformation.loginUserFromKeytabAndReturnUGI( + principal, + connectorConfig.connectHdfsKeytab() + ); log.info("Login as: " + ugi.getUserName()); isRunning = true;