Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 16th, 2010 | Syntax: None | Size: 0.54 KB | Hits: 50 | Expires: Never
Copy text to clipboard
  1.   public Map<String, String> getLoadMap()
  2.     {
  3.         Map<String, String> map = new HashMap<String, String>();
  4.         for (Map.Entry<InetAddress,Double> entry : StorageLoadBalancer.instance.getLoadInfo().entrySet())
  5.         {
  6.             map.put(entry.getKey().getHostAddress(), FileUtils.stringifyFileSize(entry.getValue()));
  7.         }
  8.         // gossiper doesn't see its own updates, so we need to special-case the local node
  9.         map.put(FBUtilities.getLocalAddress().getHostAddress(), getLoadString());
  10.         return map;
  11.     }