HDFS-4982. JournalNode should relogin from keytab before fetching logs from other JNs. Contributed by Todd Lipcon.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1502682 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b47df4e3b9
commit
0880be20ac
@ -270,6 +270,9 @@ Release 2.1.1-beta - UNRELEASED
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HDFS-4982. JournalNode should relogin from keytab before fetching logs
|
||||
from other JNs (todd)
|
||||
|
||||
Release 2.1.0-beta - 2013-07-02
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -57,6 +57,7 @@
|
||||
import org.apache.hadoop.io.IOUtils;
|
||||
import org.apache.hadoop.ipc.Server;
|
||||
import org.apache.hadoop.security.SecurityUtil;
|
||||
import org.apache.hadoop.security.UserGroupInformation;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Charsets;
|
||||
@ -855,6 +856,11 @@ private File syncLog(RequestInfo reqInfo,
|
||||
new PrivilegedExceptionAction<Void>() {
|
||||
@Override
|
||||
public Void run() throws IOException {
|
||||
// We may have lost our ticket since last checkpoint, log in again, just in case
|
||||
if (UserGroupInformation.isSecurityEnabled()) {
|
||||
UserGroupInformation.getCurrentUser().checkTGTAndReloginFromKeytab();
|
||||
}
|
||||
|
||||
boolean success = false;
|
||||
try {
|
||||
TransferFsImage.doGetUrl(url, localPaths, storage, true);
|
||||
|
Loading…
Reference in New Issue
Block a user