[ https://issues.apache.org/jira/browse/HDFS-16462?focusedWorklogId=730111&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-730111 ]
ASF GitHub Bot logged work on HDFS-16462: ----------------------------------------- Author: ASF GitHub Bot Created on: 20/Feb/22 07:08 Start Date: 20/Feb/22 07:08 Worklog Time Spent: 10m Work Description: GauthamBanasandra opened a new pull request #4003: URL: https://github.com/apache/hadoop/pull/4003 <!-- Thanks for sending a pull request! 1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute 2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'. --> ### Description of PR The source files for `hdfs_get` uses `getopt` for parsing the command line arguments. getopt is available only on Linux and thus, isn't cross platform. We need to replace getopt with `boost::program_options` to make these tools cross platform. `hdfs_get` has the same functionality as `hdfs_copyToLocal`. Thus, we're reusing the same to implement `hdfs_get`. ### How was this patch tested? Given that `hdfs_get` has the same functionality as `hdfs_copyToLocal`, we've implemented `hdfs::tools::Get` by deriving from `hdfs::tools::CopyToLocal`. Since we've already tested `hdfs::tools::CopyToLocal` for functional correctness, we don't need to do any additional testing to validate the same for `hdfs::tools::Get`. However, we do ensure that the correct tool name shows up for `hdfs_copyToLocal` and `hdfs_get`. ## hdfs_copyToLocal ```bash $ ./hdfs_copyToLocal -h ``` ![image](https://user-images.githubusercontent.com/10280768/154832281-ac4e52fa-c799-4f52-ac63-dca8797da2b9.png) ## hdfs_get ```bash $ ./hdfs_get -h ``` ![image](https://user-images.githubusercontent.com/10280768/154832302-05e0b5d3-c96f-4dd4-ad3e-d2074aaa5fcc.png) ### For code changes: - [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 730111) Remaining Estimate: 0h Time Spent: 10m > Make HDFS get tool cross platform > --------------------------------- > > Key: HDFS-16462 > URL: https://issues.apache.org/jira/browse/HDFS-16462 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs-client, libhdfs++, tools > Affects Versions: 3.4.0 > Environment: Centos 7, Centos 8, Debian 10, Ubuntu Focal > Reporter: Gautham Banasandra > Assignee: Gautham Banasandra > Priority: Major > Labels: libhdfscpp > Time Spent: 10m > Remaining Estimate: 0h > > The source files for *hdfs_get* uses *getopt* for parsing the command line > arguments. getopt is available only on Linux and thus, isn't cross platform. > We need to replace getopt with *boost::program_options* to make these tools > cross platform. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org