Repository: hive Updated Branches: refs/heads/branch-2 c634b6813 -> d15bbe5e7
HIVE-16927: LLAP: Slider takes down all daemons when some daemons fail repeatedly (Prasanth Jayachandran reviewed by Siddharth Seth) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d15bbe5e Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d15bbe5e Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d15bbe5e Branch: refs/heads/branch-2 Commit: d15bbe5e7d8f1eeecd90f2961a389348450a831a Parents: c634b68 Author: Prasanth Jayachandran <prasan...@apache.org> Authored: Fri Sep 29 11:39:50 2017 -0700 Committer: Prasanth Jayachandran <prasan...@apache.org> Committed: Fri Sep 29 11:39:50 2017 -0700 ---------------------------------------------------------------------- .../hadoop/hive/llap/cli/LlapOptionsProcessor.java | 16 ++++++++++++++++ llap-server/src/main/resources/package.py | 8 +++++++- llap-server/src/main/resources/templates.py | 5 ++++- 3 files changed, 27 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/d15bbe5e/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapOptionsProcessor.java ---------------------------------------------------------------------- diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapOptionsProcessor.java b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapOptionsProcessor.java index aa09083..d01598c 100644 --- a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapOptionsProcessor.java +++ b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapOptionsProcessor.java @@ -69,6 +69,9 @@ public class LlapOptionsProcessor { public static final String OPTION_SLIDER_DEFAULT_KEYTAB = "slider-default-keytab"; public static final String OPTION_OUTPUT_DIR = "output"; public static final String OPTION_START = "startImmediately"; + public static final String OPTION_HEALTH_PERCENT = "health-percent"; + public static final String OPTION_HEALTH_TIME_WINDOW_SECS = "health-time-window-secs"; + public static final String OPTION_HEALTH_INIT_DELAY_SECS = "health-init-delay-secs"; public static class LlapOptions { private final int instances; @@ -233,6 +236,19 @@ public class LlapOptionsProcessor { .withDescription("Slider placement policy; see slider documentation at https://slider.incubator.apache.org/docs/placement.html." + " 4 means anti-affinity (the default; unnecessary if LLAP is going to take more than half of the YARN capacity of a node), 0 is normal.").create()); + options.addOption(OptionBuilder.hasArg().withArgName(OPTION_HEALTH_PERCENT).withLongOpt(OPTION_HEALTH_PERCENT) + .withDescription("Percentage of running containers after which LLAP application is considered healthy" + + " (Default: 80)").create()); + + options.addOption(OptionBuilder.hasArg().withArgName(OPTION_HEALTH_INIT_DELAY_SECS) + .withLongOpt(OPTION_HEALTH_INIT_DELAY_SECS) + .withDescription("Delay in seconds after which health percentage is monitored (Default: 400)").create()); + + options.addOption(OptionBuilder.hasArg().withArgName(OPTION_HEALTH_TIME_WINDOW_SECS) + .withLongOpt(OPTION_HEALTH_TIME_WINDOW_SECS) + .withDescription("Time window in seconds (after initial delay) for which LLAP application is allowed to be in " + + "unhealthy state before being killed (Default: 300)").create()); + options.addOption(OptionBuilder.hasArg().withArgName(OPTION_EXECUTORS).withLongOpt(OPTION_EXECUTORS) .withDescription("executor per instance").create('e')); http://git-wip-us.apache.org/repos/asf/hive/blob/d15bbe5e/llap-server/src/main/resources/package.py ---------------------------------------------------------------------- diff --git a/llap-server/src/main/resources/package.py b/llap-server/src/main/resources/package.py index 8a378ef..40084bb 100644 --- a/llap-server/src/main/resources/package.py +++ b/llap-server/src/main/resources/package.py @@ -92,6 +92,9 @@ def main(args): parser.add_argument("--slider-principal", default="") parser.add_argument("--slider-default-keytab", dest='slider_default_keytab', action='store_true') parser.add_argument("--slider-placement", type=int, default=4) + parser.add_argument("--health-percent", type=int, default=80) + parser.add_argument("--health-time-window-secs", type=int, default=300) + parser.add_argument("--health-init-delay-secs", type=int, default=400) parser.set_defaults(slider_default_keytab=False) parser.add_argument("--startImmediately", dest='start_immediately', action='store_true') parser.add_argument("--javaChild", dest='java_child', action='store_true') @@ -158,7 +161,10 @@ def main(args): "slider_keytab_dir" : slider_keytab_dir, "slider_keytab" : slider_keytab, "slider_principal" : slider_principal, - "placement" : args.slider_placement + "placement" : args.slider_placement, + "health_percent": args.health_percent, + "health_time_window": args.health_time_window_secs, + "health_init_delay": args.health_init_delay_secs } if not exists(output): http://git-wip-us.apache.org/repos/asf/hive/blob/d15bbe5e/llap-server/src/main/resources/templates.py ---------------------------------------------------------------------- diff --git a/llap-server/src/main/resources/templates.py b/llap-server/src/main/resources/templates.py index aedebcf..3d747a2 100644 --- a/llap-server/src/main/resources/templates.py +++ b/llap-server/src/main/resources/templates.py @@ -116,7 +116,10 @@ resources = """ "yarn.component.instances": "%(instances)d", "yarn.resource.normalization.enabled": "false", "yarn.memory": "%(container.mb)d", - "yarn.component.placement.policy" : "%(placement)d" + "yarn.component.placement.policy" : "%(placement)d", + "yarn.container.health.threshold.percent": "%(health_percent)d", + "yarn.container.health.threshold.window.secs": "%(health_time_window)d", + "yarn.container.health.threshold.init.delay.secs": "%(health_init_delay)d" } } }