module Roma::CommandPlugin::PluginOperation

Public Instance Methods

ev_eval(s) click to toggle source

DANGER!!

   # File lib/roma/plugin/plugin_debug.rb
 9 def ev_eval(s)
10   cmd = s[1..-1].join(' ')
11   @log.debug("eval(#{cmd})")
12   send_data("#{eval(cmd)}\r\n")
13 rescue Exception =>e
14   send_data("#{e}\r\n")
15 end
get_key_info(key) click to toggle source
   # File lib/roma/plugin/plugin_debug.rb
17 def get_key_info(key)
18   d = Digest::SHA1.hexdigest(key).hex % @rttable.hbits
19   vn = @rttable.get_vnode_id(d)
20   nodes = @rttable.search_nodes_for_write(vn)
21   s = sprintf("d = %s 0x%x\r\n",d,d)
22   send_data(s)
23   s = sprintf("vn = %s 0x%x\r\n",vn,vn)
24   send_data(s)
25   send_data("nodes = #{nodes.inspect}\r\n")
26   "END"
27 end