Module: Roma::CommandPlugin::PluginOperation
- Includes:
- Roma::CommandPlugin
- Defined in:
- lib/roma/plugin/plugin_debug.rb
Instance Method Summary collapse
Methods included from Roma::CommandPlugin
Instance Method Details
#ev_eval(s) ⇒ Object
DANGER!!
9 10 11 12 13 14 15 |
# File 'lib/roma/plugin/plugin_debug.rb', line 9 def ev_eval(s) cmd = s[1..-1].join(' ') @log.debug("eval(#{cmd})") send_data("#{eval(cmd)}\r\n") rescue Exception =>e send_data("#{e}\r\n") end |
#get_key_info(key) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/roma/plugin/plugin_debug.rb', line 17 def get_key_info(key) d = Digest::SHA1.hexdigest(key).hex % @rttable.hbits vn = @rttable.get_vnode_id(d) nodes = @rttable.search_nodes_for_write(vn) s = sprintf("d = %s 0x%x\r\n",d,d) send_data(s) s = sprintf("vn = %s 0x%x\r\n",vn,vn) send_data(s) send_data("nodes = #{nodes.inspect}\r\n") "END" end |