YUKI Hiroshi
null+****@clear*****
Mon Jun 1 15:01:47 JST 2015
YUKI Hiroshi 2015-06-01 15:01:47 +0900 (Mon, 01 Jun 2015) New Revision: 4587aad3339a3590001b587f5e9b21d73d408233 https://github.com/droonga/droonga-engine/commit/4587aad3339a3590001b587f5e9b21d73d408233 Message: Output more logs for debugging Modified files: lib/droonga/distributed_command_planner.rb lib/droonga/plugins/search/distributed_search_planner.rb Modified: lib/droonga/distributed_command_planner.rb (+11 -1) =================================================================== --- lib/droonga/distributed_command_planner.rb 2015-06-01 14:49:42 +0900 (77088ff) +++ lib/droonga/distributed_command_planner.rb 2015-06-01 15:01:47 +0900 (3d28c50) @@ -15,8 +15,12 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +require "droonga/loggable" + module Droonga class DistributedCommandPlanner + include Loggable + attr_accessor :key REDUCE_SUM = "sum" @@ -38,7 +42,9 @@ module Droonga end def plan - unified_reducers + unified_gatherers + [fixed_processor] + steps = unified_reducers + unified_gatherers + [fixed_processor] + logger.debug("distribution plan", :steps => steps) + steps end def reduce(params=nil) @@ -173,5 +179,9 @@ module Droonga def plan_errors_handling reduce("errors"=> REDUCE_SUM) end + + def log_tag + "distributed_command_planner" + end end end Modified: lib/droonga/plugins/search/distributed_search_planner.rb (+6 -0) =================================================================== --- lib/droonga/plugins/search/distributed_search_planner.rb 2015-06-01 14:49:42 +0900 (d56e3c9) +++ lib/droonga/plugins/search/distributed_search_planner.rb 2015-06-01 15:01:47 +0900 (df35742) @@ -39,9 +39,11 @@ module Droonga ensure_unifiable! + logger.debug("from", :queries => @request) @queries.each do |input_name, query| transform_query(input_name, query) end + logger.debug("to", :queries => @request) broadcast(:body => @request) @@ -99,6 +101,10 @@ module Droonga end end + def log_tag + "distributed_search_planner" + end + class QueryTransformer attr_reader :reducers, :mappers -------------- next part -------------- HTML����������������������������...Download