-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-2240. Command line tool for OM Admin #9
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
Conversation
|
@anuengineer , @elek , @dineshchitlangia, |
|
@hanishakoneru Thank you very much for the update. |
...ne/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
Outdated
Show resolved
Hide resolved
|
@anuengineer, @elek , can you please take a look at the new patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So today when a client connects to the OM -- it connect reads to get ServiceList, without this API we cannot communicate to Ozone. So Why would this info be an independent API, since in my mind this info is needed by the clients to communicate to OM, since the leader needs to be discovered.
if that is true, then admin command can use the same API do discover the state right ? do we need a new API in the RPC layer? Perhaps I am missing something here, Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The client connects to an OM and submits a getServiceList request. If this OM is not the leader, then the client tries a different OM. This all happens through OMFailoverProxyProvider.
Currently, the getServiceList API is only used to discover the SCM address. It does not return the list of OMs in the cluster.
But based on which OM serves the getServiceList request, we can presume it to be the leader. We do not need a new request type.
f52a9d5 to
5aae791
Compare
|
Updated the patch to remove new OMRequest. |
|
There is a compile failure, @hanishakoneru please take a look when you get a chance, thanks |
|
/retest |
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
Outdated
Show resolved
Hide resolved
|
@anuengineer, I fixed the compile failure. Please take a look when you get a chance. Thanks. |
The same exception shows up when I'm running the same command on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, why are these log level being setting here and why it is set INFO, and also NativeCodeLoader to ERROR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the settings which were set for SCM Cli. I will update the root logger to WARN. We can probably keep the NativeCodeLoader to Error so that the "Unable to load native-hadoop library for your platform" warning is not displayed always.
bharatviswa504
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. One minor comment in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name this service-id, instead of --om-service-id, as anyway this command is used ozone admin om --getserviceroles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line missing, for newly added files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry did not understand this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the latest CI run, this doesn't seem to be an issue.
@hanishakoneru He meant that one of the checkstyle rule is that any source file must have an empty new line as its last line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Newline at end of the file. I think there is no checkstyle rule for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bharatviswa504 I just downloaded the patch and confirmed the new line at EOF is there. So no changes are needed.
2de0989 to
9298f88
Compare
9298f88 to
f56ad22
Compare
|
Thanks for the reviews @smengcl and @bharatviswa504 . |
|
Thanks @hanishakoneru . The command is working as expected now. lgtm +1. Pending @bharatviswa504 's comments. bash-4.2$ ozone admin om getserviceroles
Missing required option '--service-id=<omServiceId>'
Usage: ozone admin om getserviceroles [-hV] -id=<omServiceId>
List all OMs and their respective Ratis server roles
-h, --help Show this help message and exit.
-id, --service-id=<omServiceId>
OM Service ID
-V, --version Print version information and exit.
bash-4.2$ ozone admin om getserviceroles --service-id=id1
om1 : FOLLOWER
om3 : FOLLOWER
om2 : LEADER
bash-4.2$ ozone admin om getserviceroles -id=id1
om1 : FOLLOWER
om3 : FOLLOWER
om2 : LEADER |
|
Hi All, Thank you all for an extensive code review of this patch. If we are all in Sync and there are no issues left outstanding, is it okay for me to commit this ? I am +1 on this patch, and it does look very good to me. But I will wait for signal from others. Thanks |
dineshchitlangia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for merge. Thanks @hanishakoneru for the work and everyone for the reviews.
|
Thank you all for carefully reviewing multiple iterations of this patch! 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM (with one minor comment of adding a new line at end of newly added files). This can be taken care of during commit.
|
Thank You everyone for the reviews and @hanishakoneru for the contribution. |
|
Thank you all for the reviews. |
HDDS-4186: Adjust RetryPolicy of SCMConnectionManager for SCM/Recon
# This is the 1st commit message: Initial Commit # This is the commit message apache#2: more slight changes # This is the commit message apache#3: changes++ # This is the commit message apache#4: getExecutorService Changes # This is the commit message apache#5: applyTransaction() Changes # This is the commit message apache#6: changes++ # This is the commit message apache#7: TestOzoneManagerLock changes # This is the commit message apache#8: add changes # This is the commit message apache#9: add more minor changes # This is the commit message apache#10: add config to ozone-default.xml # This is the commit message apache#11: minor changes # This is the commit message apache#12: change modulo logic # This is the commit message apache#13: changes # This is the commit message apache#14: changes++ # This is the commit message apache#15: add changes++ # This is the commit message apache#16: minor changes # This is the commit message apache#17: Changes (to be reverted) # This is the commit message apache#18: Changes 09/05
…h Ozone ListStatusLight API (apache#9) Cherry picked: e96e314 Conflict files: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientWithKeyLatestVersion.java hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java Change-Id: I90e813e03fcc661f66ff8800b1b73ca227a389b2
A command line tool (ozone omha) to get information related to OM HA.
This Jira proposes to add the getServiceState option for OM HA which lists all the OMs in the service and their corresponding Ratis server roles (LEADER/ FOLLOWER).
We can later add more options to this tool.
Migrated from apache/hadoop#1586