-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-7945. Integrate secret keys to SCM snapshot #4549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kerneltime
merged 13 commits into
apache:HDDS-7733-Symmetric-Tokens
from
duongkame:HDDS-7945
May 9, 2023
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ab94790
HDDS-7945: Integrate SecretKey to SCM snapshot
duongkame 19eda8d
Correct javadoc.
duongkame 052c4ec
Fix flaky tests.
duongkame 0e1f29d
Attempt to fix flaky tests.
duongkame 896e076
Attempt to fix flaky tests.
duongkame 9e00188
Trying resolving the failing integ test.
duongkame 8d32e57
revert unhelpful condition.
duongkame 44b2049
Add debug log.
duongkame 37d6b47
Increase snapshot threshold.
duongkame e7ef1f0
Always release SCM port.
duongkame 06672d3
Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/…
duongkame 6b14f52
Refine secret key snapshot test.
duongkame e6c8022
fix checkstyle.
duongkame File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...rc/main/java/org/apache/hadoop/hdds/scm/proxy/SingleSCMSecurityProtocolProxyProvider.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with this | ||
| * work for additional information regarding copyright ownership. The ASF | ||
| * licenses this file to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * <p> | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * <p> | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.apache.hadoop.hdds.scm.proxy; | ||
|
|
||
| import org.apache.hadoop.hdds.conf.ConfigurationSource; | ||
| import org.apache.hadoop.hdds.protocolPB.SCMSecurityProtocolPB; | ||
| import org.apache.hadoop.security.UserGroupInformation; | ||
|
|
||
| /** | ||
| * Proxy provider for | ||
| * {@link org.apache.hadoop.hdds.protocol.SCMSecurityProtocol} against a single | ||
| * SCM node (no fail-over). | ||
| */ | ||
| public class SingleSCMSecurityProtocolProxyProvider | ||
| extends SCMSecurityProtocolFailoverProxyProvider { | ||
| private final String scmNodeId; | ||
|
|
||
| public SingleSCMSecurityProtocolProxyProvider( | ||
| ConfigurationSource conf, | ||
| UserGroupInformation userGroupInformation, | ||
| String scmNodeId) { | ||
| super(conf, userGroupInformation); | ||
| this.scmNodeId = scmNodeId; | ||
| } | ||
|
|
||
| @Override | ||
| public synchronized String getCurrentProxySCMNodeId() { | ||
| return scmNodeId; | ||
| } | ||
|
|
||
| @Override | ||
| public synchronized void performFailover(SCMSecurityProtocolPB currentProxy) { | ||
| // do nothing. | ||
| } | ||
|
|
||
| @Override | ||
| public synchronized void performFailoverToAssignedLeader(String newLeader, | ||
| Exception e) { | ||
| // do nothing. | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.