HADOOP-17493. Revert name of DELEGATION_TOKENS_ISSUED constant/statistic (#2649)

Follow-on to HADOOP-16830/HADOOP-17271.

Contributed by Steve Loughran.
This commit is contained in:
Steve Loughran 2021-01-27 16:39:29 +00:00 committed by GitHub
parent 7c4ef42837
commit 28cc912a5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 9 deletions

View File

@ -325,9 +325,6 @@ public final class StoreStatisticNames {
public static final String STORE_IO_THROTTLE_RATE public static final String STORE_IO_THROTTLE_RATE
= "store_io_throttle_rate"; = "store_io_throttle_rate";
public static final String DELEGATION_TOKEN_ISSUED
= "delegation_token_issued";
public static final String MULTIPART_UPLOAD_INSTANTIATED public static final String MULTIPART_UPLOAD_INSTANTIATED
= "multipart_instantiated"; = "multipart_instantiated";

View File

@ -494,8 +494,8 @@ public enum Statistic {
/* /*
* Delegation Token Operations. * Delegation Token Operations.
*/ */
DELEGATION_TOKEN_ISSUED( DELEGATION_TOKENS_ISSUED(
StoreStatisticNames.DELEGATION_TOKEN_ISSUED, StoreStatisticNames.DELEGATION_TOKENS_ISSUED,
"Count of delegation tokens issued", "Count of delegation tokens issued",
TYPE_DURATION), TYPE_DURATION),

View File

@ -45,7 +45,7 @@ import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.service.ServiceOperations; import org.apache.hadoop.service.ServiceOperations;
import org.apache.hadoop.util.DurationInfo; import org.apache.hadoop.util.DurationInfo;
import static org.apache.hadoop.fs.s3a.Statistic.DELEGATION_TOKEN_ISSUED; import static org.apache.hadoop.fs.s3a.Statistic.DELEGATION_TOKENS_ISSUED;
import static org.apache.hadoop.fs.statistics.impl.IOStatisticsBinding.trackDuration; import static org.apache.hadoop.fs.statistics.impl.IOStatisticsBinding.trackDuration;
import static org.apache.hadoop.thirdparty.com.google.common.base.Preconditions.checkArgument; import static org.apache.hadoop.thirdparty.com.google.common.base.Preconditions.checkArgument;
import static org.apache.hadoop.thirdparty.com.google.common.base.Preconditions.checkState; import static org.apache.hadoop.thirdparty.com.google.common.base.Preconditions.checkState;
@ -431,7 +431,7 @@ public class S3ADelegationTokens extends AbstractDTService {
try(DurationInfo ignored = new DurationInfo(LOG, DURATION_LOG_AT_INFO, try(DurationInfo ignored = new DurationInfo(LOG, DURATION_LOG_AT_INFO,
"Creating New Delegation Token", tokenBinding.getKind())) { "Creating New Delegation Token", tokenBinding.getKind())) {
Token<AbstractS3ATokenIdentifier> token = trackDuration(stats, Token<AbstractS3ATokenIdentifier> token = trackDuration(stats,
DELEGATION_TOKEN_ISSUED.getSymbol(), () -> DELEGATION_TOKENS_ISSUED.getSymbol(), () ->
tokenBinding.createDelegationToken(rolePolicy, tokenBinding.createDelegationToken(rolePolicy,
encryptionSecrets, renewer)); encryptionSecrets, renewer));
if (token != null) { if (token != null) {

View File

@ -214,7 +214,7 @@ public class ITestSessionDelegationInFileystem extends AbstractDelegationIT {
S3ATestUtils.MetricDiff invocationDiff = new S3ATestUtils.MetricDiff(fs, S3ATestUtils.MetricDiff invocationDiff = new S3ATestUtils.MetricDiff(fs,
Statistic.INVOCATION_GET_DELEGATION_TOKEN); Statistic.INVOCATION_GET_DELEGATION_TOKEN);
S3ATestUtils.MetricDiff issueDiff = new S3ATestUtils.MetricDiff(fs, S3ATestUtils.MetricDiff issueDiff = new S3ATestUtils.MetricDiff(fs,
Statistic.DELEGATION_TOKEN_ISSUED); Statistic.DELEGATION_TOKENS_ISSUED);
Token<AbstractS3ATokenIdentifier> token = Token<AbstractS3ATokenIdentifier> token =
requireNonNull(fs.getDelegationToken(""), requireNonNull(fs.getDelegationToken(""),
"no token from filesystem " + fs); "no token from filesystem " + fs);
@ -371,7 +371,7 @@ public class ITestSessionDelegationInFileystem extends AbstractDelegationIT {
S3ATestUtils.MetricDiff issueDiff = new S3ATestUtils.MetricDiff( S3ATestUtils.MetricDiff issueDiff = new S3ATestUtils.MetricDiff(
delegatedFS, delegatedFS,
Statistic.DELEGATION_TOKEN_ISSUED); Statistic.DELEGATION_TOKENS_ISSUED);
// verify that the FS returns the existing token when asked // verify that the FS returns the existing token when asked
// so that chained deployments will work // so that chained deployments will work