You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ga...@apache.org on 2022/05/04 14:49:23 UTC

[hadoop] branch trunk updated: HDFS-16564. Use uint32_t for hdfs_find (#4245)

This is an automated email from the ASF dual-hosted git repository.

gaurava pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d346be9bd2d HDFS-16564. Use uint32_t for hdfs_find (#4245)
d346be9bd2d is described below

commit d346be9bd2d45d0b17ecf0c2b9d8466f00b47e0d
Author: Gautham B A <ga...@gmail.com>
AuthorDate: Wed May 4 20:19:08 2022 +0530

    HDFS-16564. Use uint32_t for hdfs_find (#4245)
    
    * hdfs_find uses u_int32_t type for
      storing the value for the max-depth
      command line argument.
    * The type u_int32_t isn't standard,
      isn't available on Windows and thus
      breaks cross-platform compatibility.
      We need to replace this with uint32_t
      which is available on all platforms since
      it's part of the C++ standard.
---
 .../src/main/native/libhdfspp/tools/hdfs-find/hdfs-find.cc             | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tools/hdfs-find/hdfs-find.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tools/hdfs-find/hdfs-find.cc
index a149d05c139..ee1a04019f2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tools/hdfs-find/hdfs-find.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tools/hdfs-find/hdfs-find.cc
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+#include <cstdint>
 #include <future>
 #include <iostream>
 #include <memory>
@@ -40,7 +41,7 @@ bool Find::Initialize() {
       "If provided, all results will be matching the NAME pattern otherwise, "
       "the implicit '*' will be used NAME allows wild-cards");
   add_options(
-      "max-depth,m", po::value<u_int32_t>(),
+      "max-depth,m", po::value<uint32_t>(),
       "If provided, the maximum depth to recurse after the end of the path is "
       "reached will be limited by MAX_DEPTH otherwise, the maximum depth to "
       "recurse is unbound MAX_DEPTH can be set to 0 for pure globbing and "


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org