HADOOP-17388. AbstractS3ATokenIdentifier to issue date in UTC. (#2477)

Followup to HADOOP-17379.

Contributed by Jungtaek Lim.

Change-Id: I7b2fce36028d297c1e095499691a08caba92d9fd
This commit is contained in:
Jungtaek Lim 2020-11-20 19:38:42 +09:00 committed by Steve Loughran
parent e24a6b550e
commit 401cadbac5
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0

View File

@ -24,7 +24,6 @@ import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.IOException;
import java.net.URI;
import java.time.Clock;
import java.util.Objects;
import java.util.UUID;
@ -32,6 +31,7 @@ import org.apache.hadoop.io.Text;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.security.token.delegation.web.DelegationTokenIdentifier;
import org.apache.hadoop.util.Time;
import static java.util.Objects.requireNonNull;
@ -170,9 +170,7 @@ public abstract class AbstractS3ATokenIdentifier
}
private void initializeIssueDate() {
Clock clock = Clock.systemDefaultZone();
long now = clock.millis();
setIssueDate(now);
setIssueDate(Time.now());
}
public String getBucket() {