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

Followup to HADOOP-17379.

Contributed by Jungtaek Lim.
This commit is contained in:
Jungtaek Lim 2020-11-20 19:38:42 +09:00 committed by GitHub
parent 8fa699b53f
commit f3c629c27e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

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