Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15947

Replace deprecated protobuf APIs

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Some protobuf APIs are soon going to get deprecated and must be replaced with newer ones. One of the warnings are reported due to the issue is as follows -

      [ 48%] Building CXX object main/native/libhdfspp/tests/CMakeFiles/rpc_engine_test.dir/rpc_engine_test.cc.o
      /mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc: In function β€˜std::pair<boost::system::error_code, std::__cxx11::basic_string<char> > RpcResponse(const hadoop::common::RpcResponseHeaderProto&, const string&, const boost::system::error_code&)’:
      /mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc:92:56: warning: β€˜int google::protobuf::MessageLite::ByteSize() const’ is deprecated: Please use ByteSizeLong() instead [-Wdeprecated-declarations]
         92 |       pbio::CodedOutputStream::VarintSize32(h.ByteSize()) +
            |                                                        ^
      In file included from /usr/local/include/google/protobuf/generated_enum_util.h:36,
                       from /usr/local/include/google/protobuf/map.h:49,
                       from /usr/local/include/google/protobuf/generated_message_table_driven.h:34,
                       from /mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/out/build/WSL-GCC-Debug/main/native/libhdfspp/tests/test.pb.h:26,
                       from /mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/rpc_engine_test.cc:22:
      /usr/local/include/google/protobuf/message_lite.h:408:7: note: declared here
        408 |   int ByteSize() const { return internal::ToIntSize(ByteSizeLong()); }
            |       ^~~~~~~~
      

      Attachments

        Issue Links

          Activity

            People

              gaurava Gautham Banasandra
              gaurava Gautham Banasandra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m