HADOOP-17388. AbstractS3ATokenIdentifier to issue date in UTC. (#2477)
Followup to HADOOP-17379. Contributed by Jungtaek Lim.
This commit is contained in:
parent
8fa699b53f
commit
f3c629c27e
@ -24,7 +24,6 @@
|
|||||||
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.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 @@ protected AbstractS3ATokenIdentifier(final Text kind) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user