HDFS-4780. Use the correct relogin method for services. Contributed by Robert Parker.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1486974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9a43df8e5a
commit
45b9d19f9d
@ -891,6 +891,9 @@ Release 2.0.5-beta - UNRELEASED
|
|||||||
HDFS-4825. webhdfs / httpfs tests broken because of min block size change.
|
HDFS-4825. webhdfs / httpfs tests broken because of min block size change.
|
||||||
(Andrew Wang via suresh)
|
(Andrew Wang via suresh)
|
||||||
|
|
||||||
|
HDFS-4780. Use the correct relogin method for services. (Robert Parker via
|
||||||
|
kihwal)
|
||||||
|
|
||||||
BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
|
BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.
|
HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.
|
||||||
|
@ -251,7 +251,7 @@ public synchronized Token<?> getDelegationToken(final String renewer
|
|||||||
) throws IOException {
|
) throws IOException {
|
||||||
try {
|
try {
|
||||||
//Renew TGT if needed
|
//Renew TGT if needed
|
||||||
ugi.reloginFromKeytab();
|
ugi.checkTGTAndReloginFromKeytab();
|
||||||
return ugi.doAs(new PrivilegedExceptionAction<Token<?>>() {
|
return ugi.doAs(new PrivilegedExceptionAction<Token<?>>() {
|
||||||
@Override
|
@Override
|
||||||
public Token<?> run() throws IOException {
|
public Token<?> run() throws IOException {
|
||||||
@ -704,7 +704,7 @@ public boolean isManaged(Token<?> token) throws IOException {
|
|||||||
public long renew(Token<?> token,
|
public long renew(Token<?> token,
|
||||||
Configuration conf) throws IOException {
|
Configuration conf) throws IOException {
|
||||||
// update the kerberos credentials, if they are coming from a keytab
|
// update the kerberos credentials, if they are coming from a keytab
|
||||||
UserGroupInformation.getLoginUser().reloginFromKeytab();
|
UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab();
|
||||||
// use http to renew the token
|
// use http to renew the token
|
||||||
InetSocketAddress serviceAddr = SecurityUtil.getTokenServiceAddr(token);
|
InetSocketAddress serviceAddr = SecurityUtil.getTokenServiceAddr(token);
|
||||||
return
|
return
|
||||||
|
@ -157,7 +157,7 @@ public Void run() throws Exception {
|
|||||||
|
|
||||||
// We may have lost our ticket since last checkpoint, log in again, just in case
|
// We may have lost our ticket since last checkpoint, log in again, just in case
|
||||||
if (UserGroupInformation.isSecurityEnabled()) {
|
if (UserGroupInformation.isSecurityEnabled()) {
|
||||||
UserGroupInformation.getCurrentUser().reloginFromKeytab();
|
UserGroupInformation.getCurrentUser().checkTGTAndReloginFromKeytab();
|
||||||
}
|
}
|
||||||
|
|
||||||
// issue a HTTP get request to download the new fsimage
|
// issue a HTTP get request to download the new fsimage
|
||||||
|
@ -371,7 +371,7 @@ public void doWork() {
|
|||||||
try {
|
try {
|
||||||
// We may have lost our ticket since last checkpoint, log in again, just in case
|
// We may have lost our ticket since last checkpoint, log in again, just in case
|
||||||
if(UserGroupInformation.isSecurityEnabled())
|
if(UserGroupInformation.isSecurityEnabled())
|
||||||
UserGroupInformation.getCurrentUser().reloginFromKeytab();
|
UserGroupInformation.getCurrentUser().checkTGTAndReloginFromKeytab();
|
||||||
|
|
||||||
long now = Time.now();
|
long now = Time.now();
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ private void doWork() {
|
|||||||
try {
|
try {
|
||||||
// We may have lost our ticket since last checkpoint, log in again, just in case
|
// We may have lost our ticket since last checkpoint, log in again, just in case
|
||||||
if (UserGroupInformation.isSecurityEnabled()) {
|
if (UserGroupInformation.isSecurityEnabled()) {
|
||||||
UserGroupInformation.getCurrentUser().reloginFromKeytab();
|
UserGroupInformation.getCurrentUser().checkTGTAndReloginFromKeytab();
|
||||||
}
|
}
|
||||||
|
|
||||||
long now = now();
|
long now = now();
|
||||||
|
Loading…
Reference in New Issue
Block a user