-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-8704. [Snapshot] Add CLI to list SnapDiff jobs #4824
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
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
73464d9
List snapdiff job
xBis7 1a08076
listAll option
xBis7 4b323eb
resolving conflicts and merging with master
xBis7 03e3754
code improvements - cleanup
xBis7 c8ddff7
parameterized test
xBis7 bdb1482
resolving conflicts and merging with master
xBis7 0f172fe
resolving conflicts with master
xBis7 faac5af
check for snapshots before listing
xBis7 8929948
cleanup - parameterized test refactor
xBis7 d15074e
resolve test conflicts and merge with master
xBis7 59c9eba
findbugs and rat
xBis7 031b216
Mocked SnapshotDiffManager generated null SnapDiff dir under OzoneMan…
xBis7 03281c3
extra line removed
xBis7 17cbf48
Merge remote-tracking branch 'origin/master' into HDDS-8704
xBis7 02fe7d5
simplify list diff job command
xBis7 43e3dcb
update snapshot-sh.robot
xBis7 d9db35b
Merge remote-tracking branch 'origin/master' into HDDS-8704
xBis7 69f4dfc
OzoneSnapshotDiff class to hide internal fields
xBis7 4eabfbf
Merge remote-tracking branch 'origin/master' into HDDS-8704
xBis7 d88ae0b
javadoc cleanup
xBis7 8571df1
resolving conflicts and merging into master
xBis7 29bca98
cleanup
xBis7 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
74 changes: 74 additions & 0 deletions
74
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneSnapshotDiff.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,74 @@ | ||
| /** | ||
| * 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.ozone.client; | ||
|
|
||
| import org.apache.hadoop.ozone.om.helpers.SnapshotDiffJob; | ||
| import org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse.JobStatus; | ||
|
|
||
| /** | ||
| * A class that encapsulates SnapshotDiffJob. | ||
| */ | ||
| public class OzoneSnapshotDiff { | ||
|
|
||
| private final String volumeName; | ||
| private final String bucketName; | ||
| private final String fromSnapshot; | ||
| private final String toSnapshot; | ||
| private final JobStatus jobStatus; | ||
|
|
||
| public OzoneSnapshotDiff(String volumeName, | ||
| String bucketName, | ||
| String fromSnapshot, | ||
| String toSnapshot, | ||
| JobStatus jobStatus) { | ||
| this.volumeName = volumeName; | ||
| this.bucketName = bucketName; | ||
| this.fromSnapshot = fromSnapshot; | ||
| this.toSnapshot = toSnapshot; | ||
| this.jobStatus = jobStatus; | ||
| } | ||
|
|
||
| public String getVolumeName() { | ||
| return volumeName; | ||
| } | ||
|
|
||
| public String getBucketName() { | ||
| return bucketName; | ||
| } | ||
|
|
||
| public String getFromSnapshot() { | ||
| return fromSnapshot; | ||
| } | ||
|
|
||
| public String getToSnapshot() { | ||
| return toSnapshot; | ||
| } | ||
|
|
||
| public JobStatus getJobStatus() { | ||
| return jobStatus; | ||
| } | ||
|
|
||
| public static OzoneSnapshotDiff fromSnapshotDiffJob( | ||
| SnapshotDiffJob snapshotDiffJob) { | ||
| return new OzoneSnapshotDiff( | ||
| snapshotDiffJob.getVolume(), | ||
| snapshotDiffJob.getBucket(), | ||
| snapshotDiffJob.getFromSnapshot(), | ||
| snapshotDiffJob.getToSnapshot(), | ||
| snapshotDiffJob.getStatus()); | ||
| } | ||
| } |
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.