Browse Source

HDFS-9753. libhdfs++: Client fails to pass TokenProto from LocatedBlockProto to server when reading a block. Contributed by James Clampffer.

James 9 years ago
parent
commit
2cd7ab5e94

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc

@@ -191,7 +191,7 @@ void FileHandleImpl::AsyncPreadSome(
 
 
   // This is where we will put the logic for re-using a DN connection; we can
   // This is where we will put the logic for re-using a DN connection; we can
   //    steal the FileHandle's dn and put it back when we're done
   //    steal the FileHandle's dn and put it back when we're done
-  std::shared_ptr<DataNodeConnection> dn = CreateDataNodeConnection(io_service_, chosen_dn, nullptr /*token*/);
+  std::shared_ptr<DataNodeConnection> dn = CreateDataNodeConnection(io_service_, chosen_dn, &block->blocktoken());
   std::string dn_id = dn->uuid_;
   std::string dn_id = dn->uuid_;
   std::string client_name = client_name_;
   std::string client_name = client_name_;