DaveTeng0 commented on code in PR #6574:
URL: https://github.com/apache/ozone/pull/6574#discussion_r1583984050
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java:
##########
@@ -61,4 +71,33 @@ public OzoneConfiguration getOzoneConf() {
public static void main(String[] argv) throws Exception {
new OzoneRepair().run(argv);
}
+
+ @Override
+ public int execute(String[] argv) {
+ String currentUser = getSystemUserName();
+ boolean shouldProceed = true;
+ if (!currentUser.equals(OZONE_DEFAULT_USER)) {
+ String s = getConsoleReadLineWithFormat(currentUser, OZONE_DEFAULT_USER);
+ shouldProceed = Boolean.parseBoolean(s) || "y".equalsIgnoreCase(s);
+ }
+ if (!shouldProceed) {
+ System.out.println("Aborting command.");
+ return 1;
+ }
+ System.out.println("Run as user: " + currentUser);
+
+ TracingUtil.initTracing("shell", createOzoneConfiguration());
+ String spanName = "ozone repair " + String.join(" ", argv);
+ return TracingUtil.executeInNewSpan(spanName,
+ () -> super.execute(argv));
Review Comment:
Yeah makes sense! removed tracing.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]