about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-01-16 00:20:27 +0000
committerEric Wong <e@80x24.org>2015-01-16 00:22:51 +0000
commitb1f366f2b764654d0dd1460369531e420b8b988c (patch)
treee8183728237d9dd7a483d476ca599da65138611c
parent80a0fe8ac20a5e3c248a9c377fa09bc7e06487f0 (diff)
downloadmogilefs-client-b1f366f2b764654d0dd1460369531e420b8b988c.tar.gz
This is a deprecated call anyways and no longer supported
by modern versions of the server, so avoid wasting RAM with it.

We will remove this in 4.x
-rw-r--r--lib/mogilefs/admin.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mogilefs/admin.rb b/lib/mogilefs/admin.rb
index eeff6bd..68574ca 100644
--- a/lib/mogilefs/admin.rb
+++ b/lib/mogilefs/admin.rb
@@ -120,6 +120,7 @@ class MogileFS::Admin < MogileFS::Client
   #
   # *** This command no longer works with recent versions of MogileFS ***
   # *** Use mogstats(1) from the MogileFS::Utils package on CPAN ***
+  # *** We will remove this method in 4.x ***
   #
   #   admin.get_stats
   #
@@ -148,9 +149,9 @@ class MogileFS::Admin < MogileFS::Client
       }
     end
 
-    stats.delete 'device' if stats['device'].empty?
-    stats.delete 'file' if stats['file'].empty?
-    stats.delete 'replication' if stats['replication'].empty?
+    %w(device file replication).each do |s|
+      stats.delete(s) if stats[s].empty?
+    end
 
     stats
   end