[ 
https://issues.apache.org/jira/browse/YARN-9477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833686#comment-16833686
 ] 

Szilard Nemeth commented on YARN-9477:
--------------------------------------

Hi [~pbacsko]!

Thanks for this patch!
The test classes look good in overall, here are some minor comments:

1. In TestVEDeviceDiscoverer#setupTestDirectory: Please assert the result of 
{code:java}
f.mkdirs()
{code}
If the return value is false in any case, the execution of the tests should 
stop right away.

2. Since you are only using the field named "commandExecutorProvider" in the 
setup method, you can declare it as a local variable.

3. I think the name of testDetectMultipleOnlineDevice should be 
testDetectMultipleOnlineDevices (plural)

4. In testDetectMultipleOnlineDevice: You could replace 
{code:java}
Collections.sort(devicesList, DEVICE_COMPARATOR);
{code}
 with 
{code:java}
devicesList.sort(DEVICE_COMPARATOR);
{code}





> Implement VE discovery using libudev
> ------------------------------------
>
>                 Key: YARN-9477
>                 URL: https://issues.apache.org/jira/browse/YARN-9477
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Peter Bacsko
>            Assignee: Peter Bacsko
>            Priority: Major
>         Attachments: YARN-9477-001.patch, YARN-9477-002.patch, 
> YARN-9477-POC.patch, YARN-9477-POC2.patch, YARN-9477-POC3.patch
>
>
> Right now we have a Python script which is able to discover VE cards using 
> pyudev: https://pyudev.readthedocs.io/en/latest/
> Java does not officially support libudev. There are some projects on Github 
> (example: https://github.com/Zubnix/udev-java-bindings) but they're not 
> available as Maven artifacts.
> However it's not that difficult to create a minimal layer around libudev 
> using JNA. We don't have to wrap every function, we need to call 4-5 methods.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to