You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Gargi-jais11 (via GitHub)" <gi...@apache.org> on 2025/02/12 12:43:21 UTC
[PR] HDDS-12288. Improved the bootsrap logging to indcate the progress [ozone]
Gargi-jais11 opened a new pull request, #7861:
URL: https://github.com/apache/ozone/pull/7861
## What changes were proposed in this pull request?
On Large clusters with 1000s of snapshot, Sometimes bootstrap takes hours together and current log doesn't indicate which snapshot download is under progress. We need to find a way to print progress of bootstrap.
Overall ask in this jira would be to have some logging indicating the progress on bootstrap process.
Fix done :
1. Included om db checkpoint name that is being downloaded in the logs.
2. Printing progress of the download after an interval of 30s .
## What is the link to the Apache JIRA
https://issues.apache.org/jira/projects/HDDS/issues/HDDS-12288
## How was this patch tested?
Verified via stdout of "**TestOzoneManagerSnapshotProvider**" that the logs were printed while downloading the snapshot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1954010356
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -143,8 +144,8 @@ public void downloadSnapshot(String leaderNodeID, File targetFile)
OMNodeDetails leader = peerNodesMap.get(leaderNodeID);
URL omCheckpointUrl = leader.getOMDBCheckpointEndpointUrl(
httpPolicy.isHttpEnabled(), true);
- LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint " +
- "URL: {}", leaderNodeID, omCheckpointUrl);
+ LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint: {} " + "URL: {}",
Review Comment:
nit: concatenation is unnecessary.
```suggestion
LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint: {} URL: {}",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on PR #7861:
URL: https://github.com/apache/ozone/pull/7861#issuecomment-2677443071
Thanks @Gargi-jais11 for the patch, @adoroszlai , @ChenSammi for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "Gargi-jais11 (via GitHub)" <gi...@apache.org>.
Gargi-jais11 commented on PR #7861:
URL: https://github.com/apache/ozone/pull/7861#issuecomment-2655788394
> @Gargi-jais11 Please share text as text, not screenshots. Plain text is easier to
>
> * read (especially for those with visual impairments)
> * reference (e.g. quote)
> * search
>
> It also reduces size to be stored by GitHub.
OK
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7861:
URL: https://github.com/apache/ozone/pull/7861#issuecomment-2655766734
@Gargi-jais11 Please share text as text, not screenshots. Plain text is easier to
- read (especially for those with visual impairments)
- reference (e.g. quote)
- search
It also reduces size to be stored by GitHub.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "Gargi-jais11 (via GitHub)" <gi...@apache.org>.
Gargi-jais11 commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1954128445
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -143,8 +144,8 @@ public void downloadSnapshot(String leaderNodeID, File targetFile)
OMNodeDetails leader = peerNodesMap.get(leaderNodeID);
URL omCheckpointUrl = leader.getOMDBCheckpointEndpointUrl(
httpPolicy.isHttpEnabled(), true);
- LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint " +
- "URL: {}", leaderNodeID, omCheckpointUrl);
+ LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint: {} " + "URL: {}",
+ leaderNodeID, targetFile.getName(), omCheckpointUrl);
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 merged PR #7861:
URL: https://github.com/apache/ozone/pull/7861
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improved the bootsrap logging to indcate the progress [ozone]
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1952865884
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -165,8 +166,27 @@ public void downloadSnapshot(String leaderNodeID, File targetFile)
omCheckpointUrl + ". ErrorCode: " + errorCode);
}
- try (InputStream inputStream = connection.getInputStream()) {
- FileUtils.copyInputStreamToFile(inputStream, targetFile);
+ try (InputStream inputStream = connection.getInputStream();
+ FileOutputStream outputStream = new FileOutputStream(targetFile)) {
Review Comment:
nit : we can extract this logic to a util method
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1967177141
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -22,6 +22,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.FileOutputStream;
import java.net.HttpURLConnection;
Review Comment:
I guess it depends on the kind of changes done on `master` in the meantime. With new checkstyle rules it can get broken in one commit. Sorry I didn't notice that this PR would fail despite having no conflicts.
If in doubt, check out the PR locally, merge `master` into it, then run some quick sanity checks:
```bash
gh pr checkout 7861
git merge --no-commit origin/master
mvn -DskipTests -DskipRecon -DskipShade clean verify
./hadoop-ozone/dev-support/checks/checkstyle.sh
./hadoop-ozone/dev-support/checks/pmd.sh
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improved the bootsrap logging to indcate the progress [ozone]
Posted by "Gargi-jais11 (via GitHub)" <gi...@apache.org>.
Gargi-jais11 commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1952931231
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -165,8 +166,27 @@ public void downloadSnapshot(String leaderNodeID, File targetFile)
omCheckpointUrl + ". ErrorCode: " + errorCode);
}
- try (InputStream inputStream = connection.getInputStream()) {
- FileUtils.copyInputStreamToFile(inputStream, targetFile);
+ try (InputStream inputStream = connection.getInputStream();
+ FileOutputStream outputStream = new FileOutputStream(targetFile)) {
Review Comment:
okay, sure. Will do the required. changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "Gargi-jais11 (via GitHub)" <gi...@apache.org>.
Gargi-jais11 commented on PR #7861:
URL: https://github.com/apache/ozone/pull/7861#issuecomment-2676898088
> LGTM, we can also add more logging on the leader when it creates the tarball and also print the progress of its creation in another jira maybe.
Yaa sure can do the changes in another jira
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1954004594
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -143,8 +144,8 @@ public void downloadSnapshot(String leaderNodeID, File targetFile)
OMNodeDetails leader = peerNodesMap.get(leaderNodeID);
URL omCheckpointUrl = leader.getOMDBCheckpointEndpointUrl(
httpPolicy.isHttpEnabled(), true);
- LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint " +
- "URL: {}", leaderNodeID, omCheckpointUrl);
+ LOG.info("Downloading latest checkpoint from Leader OM {}. Checkpoint: {} " + "URL: {}",
+ leaderNodeID, targetFile.getName(), omCheckpointUrl);
Review Comment:
The indent used in Ozone is 4, instead of default 8.
You can go to Intellij -> settings, Java coding style "Tabs and Indents" to set it to 4.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1967121439
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -22,6 +22,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.FileOutputStream;
import java.net.HttpURLConnection;
Review Comment:
Please don't merge with outdated CI results. Last run, although triggered on Feb 21, was against code from Feb 13, because that's when the last commit was pushed to the PR:
```
HEAD is now at 7062329 Merge 3cb99a2b4539b3f57a1da40118f8673aed7552f3 into 28b9a03204e2238ca9b01f403811f433685a4440
```
https://github.com/apache/ozone/actions/runs/13305097960/job/37592785787#step:2:90
```
commit 28b9a03204e2238ca9b01f403811f433685a4440
Author: Takanobu Asanuma <ta...@apache.org>
AuthorDate: Thu Feb 13 16:28:01 2025 +0900
Commit: GitHub <no...@github.com>
CommitDate: Thu Feb 13 08:28:01 2025 +0100
HDDS-12312. NodeManager log aggregation to Ozone FileSystem fails. (#7856)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12288. Improve bootstrap logging to indicate progress [ozone]
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #7861:
URL: https://github.com/apache/ozone/pull/7861#discussion_r1967138089
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -22,6 +22,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.FileOutputStream;
import java.net.HttpURLConnection;
Review Comment:
Sure , will keep this in mind.
After how many days/commits b/w PR branch & master should one rebase and re-run? Ideally it should be after every new commit in master as any new commit can cause the CI to fail but do we actually follow this i.e re-running CI even if no conflicts reported in the PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org