HDFS-10898: libhdfs++: Make log levels consistent.  Contributed by James 
Clampffer


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e45df4eb
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e45df4eb
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e45df4eb

Branch: refs/heads/HDFS-12996
Commit: e45df4ebaea1b3dbe044a2c726d431702d911c35
Parents: ef2904d
Author: James <j...@apache.org>
Authored: Wed Oct 5 13:55:59 2016 -0400
Committer: Hanisha Koneru <hanishakon...@apache.org>
Committed: Mon Mar 26 11:11:03 2018 -0700

----------------------------------------------------------------------
 .../src/main/native/libhdfspp/lib/fs/filehandle.cc  | 10 +++++-----
 .../src/main/native/libhdfspp/lib/fs/filesystem.cc  | 16 ++++++++--------
 2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e45df4eb/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
 
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
index 8f1a82c..03c517b 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
@@ -50,7 +50,7 @@ FileHandleImpl::FileHandleImpl(const std::string & 
cluster_name,
 void FileHandleImpl::PositionRead(
     void *buf, size_t buf_size, uint64_t offset,
     const std::function<void(const Status &, size_t)> &handler) {
-  LOG_TRACE(kFileHandle, << "FileHandleImpl::PositionRead("
+  LOG_DEBUG(kFileHandle, << "FileHandleImpl::PositionRead("
                          << FMT_THIS_ADDR << ", buf=" << buf
                          << ", buf_size=" << buf_size << ") called");
 
@@ -76,7 +76,7 @@ void FileHandleImpl::PositionRead(
 }
 
 Status FileHandleImpl::PositionRead(void *buf, size_t buf_size, off_t offset, 
size_t *bytes_read) {
-  LOG_TRACE(kFileHandle, << "FileHandleImpl::[sync]PositionRead("
+  LOG_DEBUG(kFileHandle, << "FileHandleImpl::[sync]PositionRead("
                          << FMT_THIS_ADDR << ", buf=" << buf
                          << ", buf_size=" << buf_size
                          << ", offset=" << offset << ") called");
@@ -104,7 +104,7 @@ Status FileHandleImpl::PositionRead(void *buf, size_t 
buf_size, off_t offset, si
 }
 
 Status FileHandleImpl::Read(void *buf, size_t buf_size, size_t *bytes_read) {
-  LOG_TRACE(kFileHandle, << "FileHandleImpl::Read("
+  LOG_DEBUG(kFileHandle, << "FileHandleImpl::Read("
                          << FMT_THIS_ADDR << ", buf=" << buf
                          << ", buf_size=" << buf_size << ") called");
 
@@ -118,7 +118,7 @@ Status FileHandleImpl::Read(void *buf, size_t buf_size, 
size_t *bytes_read) {
 }
 
 Status FileHandleImpl::Seek(off_t *offset, std::ios_base::seekdir whence) {
-  LOG_TRACE(kFileHandle, << "FileHandleImpl::Seek("
+  LOG_DEBUG(kFileHandle, << "FileHandleImpl::Seek("
                          << ", offset=" << *offset << ", ...) called");
 
   if(cancel_state_->is_canceled()) {
@@ -173,7 +173,7 @@ void FileHandleImpl::AsyncPreadSome(
   using ::hadoop::hdfs::DatanodeInfoProto;
   using ::hadoop::hdfs::LocatedBlockProto;
 
-  LOG_TRACE(kFileHandle, << "FileHandleImpl::AsyncPreadSome("
+  LOG_DEBUG(kFileHandle, << "FileHandleImpl::AsyncPreadSome("
                          << FMT_THIS_ADDR << ", ...) called");
 
   if(cancel_state_->is_canceled()) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e45df4eb/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
 
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
index aa6f4ba..72b30e5 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
@@ -281,15 +281,15 @@ int FileSystemImpl::AddWorkerThread() {
 void FileSystemImpl::Open(
     const std::string &path,
     const std::function<void(const Status &, FileHandle *)> &handler) {
-  LOG_INFO(kFileSystem, << "FileSystemImpl::Open("
+  LOG_DEBUG(kFileSystem, << "FileSystemImpl::Open("
                                  << FMT_THIS_ADDR << ", path="
                                  << path << ") called");
 
   nn_.GetBlockLocations(path, 0, std::numeric_limits<int64_t>::max(), [this, 
path, handler](const Status &stat, std::shared_ptr<const struct FileInfo> 
file_info) {
     if(!stat.ok()) {
-      LOG_INFO(kFileSystem, << "FileSystemImpl::Open failed to get block 
locations. status=" << stat.ToString());
+      LOG_DEBUG(kFileSystem, << "FileSystemImpl::Open failed to get block 
locations. status=" << stat.ToString());
       if(stat.get_server_exception_type() == Status::kStandbyException) {
-        LOG_INFO(kFileSystem, << "Operation not allowed on standby datanode");
+        LOG_DEBUG(kFileSystem, << "Operation not allowed on standby datanode");
       }
     }
     handler(stat, stat.ok() ? new FileHandleImpl(cluster_name_, path, 
&io_service_->io_service(), client_name_, file_info, bad_node_tracker_, 
event_handlers_)
@@ -299,7 +299,7 @@ void FileSystemImpl::Open(
 
 Status FileSystemImpl::Open(const std::string &path,
                                          FileHandle **handle) {
-  LOG_INFO(kFileSystem, << "FileSystemImpl::[sync]Open("
+  LOG_DEBUG(kFileSystem, << "FileSystemImpl::[sync]Open("
                                  << FMT_THIS_ADDR << ", path="
                                  << path << ") called");
 
@@ -652,7 +652,7 @@ void FileSystemImpl::GetListingShim(const Status &stat, 
const std::vector<StatIn
 void FileSystemImpl::GetListing(
     const std::string &path,
     const std::function<bool(const Status &, const std::vector<StatInfo> &, 
bool)> &handler) {
-  LOG_INFO(kFileSystem, << "FileSystemImpl::GetListing("
+  LOG_DEBUG(kFileSystem, << "FileSystemImpl::GetListing("
                                  << FMT_THIS_ADDR << ", path="
                                  << path << ") called");
 
@@ -665,7 +665,7 @@ void FileSystemImpl::GetListing(
 }
 
 Status FileSystemImpl::GetListing(const std::string &path, 
std::vector<StatInfo> * stat_infos) {
-  LOG_INFO(kFileSystem, << "FileSystemImpl::[sync]GetListing("
+  LOG_DEBUG(kFileSystem, << "FileSystemImpl::[sync]GetListing("
                                  << FMT_THIS_ADDR << ", path="
                                  << path << ") called");
 
@@ -997,7 +997,7 @@ void FileSystemImpl::FindShim(const Status &stat, const 
std::vector<StatInfo> &
 void FileSystemImpl::Find(
     const std::string &path, const std::string &name, const uint32_t maxdepth,
     const std::function<bool(const Status &, const std::vector<StatInfo> &, 
bool)> &handler) {
-  LOG_INFO(kFileSystem, << "FileSystemImpl::Find("
+  LOG_DEBUG(kFileSystem, << "FileSystemImpl::Find("
                                  << FMT_THIS_ADDR << ", path="
                                  << path << ", name="
                                  << name << ") called");
@@ -1015,7 +1015,7 @@ void FileSystemImpl::Find(
 }
 
 Status FileSystemImpl::Find(const std::string &path, const std::string &name, 
const uint32_t maxdepth, std::vector<StatInfo> * stat_infos) {
-  LOG_INFO(kFileSystem, << "FileSystemImpl::[sync]Find("
+  LOG_DEBUG(kFileSystem, << "FileSystemImpl::[sync]Find("
                                  << FMT_THIS_ADDR << ", path="
                                  << path << ", name="
                                  << name << ") called");


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

Reply via email to