         # su -l hive -c "kill `cat /var/run/hive/server2.pid`"
         cmd: 'service hive-server2 stop'
         # code_skipped: 1
-      , (err, started) ->
-        callback err, started
+      , callback
   hive_server2_restart: (ctx, callback) ->
     ctx.log "Hive Server2 restart"
     lifecyle.hive_server2_stop ctx, (err) ->

        # cmd: "su -l #{mapred_user.name} -c \"export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec/ && /usr/lib/hadoop-mapreduce/sbin/mr-jobhistory-daemon.sh --config #{hadoop_conf_dir} stop historyserver\""
        cmd: 'service hadoop-mapreduce-historyserver stop'
        # code_skipped: 1
      , (err, started) ->
        callback err, started
  hive_metastore_status: (ctx, callback) ->
    ctx.execute
      cmd: "service hive-hcatalog-server status"
      code_skipped: [1, 3]
    , (err, stopped) ->
      callback err, stopped
  hive_metastore_start: (ctx, callback) ->
    {hive_metastore_host, hive_metastore_port, hive_metastore_timeout} = ctx.config.ryba
    lifecyle.hive_metastore_status ctx, (err, running) ->

        # cmd: "su -l #{mapred_user.name} -c \"export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec/ && /usr/lib/hadoop-mapreduce/sbin/mr-jobhistory-daemon.sh --config #{hadoop_conf_dir} start historyserver\""
        cmd: 'service hadoop-mapreduce-historyserver start'
        # code_skipped: 1
      , callback
  jhs_stop: (ctx, callback) ->
    lifecyle.jhs_status ctx, (err, running) ->
      return callback err, false if err or not running
      ctx.log "JobHistoryServer stop"
