This commit is contained in:
Jacob Freck 2018-01-08 12:31:47 -08:00 коммит произвёл GitHub
Родитель 510e2ec635
Коммит 7e9bf9c383
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -157,6 +157,8 @@ def submit_application(spark_client, cluster_id, application, wait: bool = False
affinity_id=cluster.master_node_id),
command_line=helpers.wrap_commands_in_shell(cmd),
resource_files=resource_files,
constraints=batch_models.TaskConstraints(
max_task_retry_count=application.max_retry_count),
user_identity=batch_models.UserIdentity(
auto_user=batch_models.AutoUserSpecification(
scope=batch_models.AutoUserScope.task,

Просмотреть файл

@ -109,7 +109,8 @@ class Application:
driver_memory=None,
executor_memory=None,
driver_cores=None,
executor_cores=None):
executor_cores=None,
max_retry_count=None):
self.name = name
self.application = application
self.application_args = application_args
@ -124,6 +125,7 @@ class Application:
self.executor_memory = executor_memory
self.driver_cores = driver_cores
self.executor_cores = executor_cores
self.max_retry_count = max_retry_count
class ApplicationLog():

Просмотреть файл

@ -59,7 +59,11 @@ def setup_parser(parser: argparse.ArgumentParser):
parser.add_argument('--executor-cores',
help='Number of cores per executor. (Default: All \
available cores on the worker')
available cores on the worker)')
parser.add_argument('--max-retry-count',
help='Number of times the Spark job may be retried \
if there is a failure')
parser.add_argument('app',
help='App jar OR python file to execute. Use absolute \
@ -131,7 +135,8 @@ def execute(args: typing.NamedTuple):
driver_memory=args.driver_memory,
executor_memory=args.executor_memory,
driver_cores=args.driver_cores,
executor_cores=args.executor_cores
executor_cores=args.executor_cores,
max_retry_count=args.max_retry_count
),
wait=False
)

Просмотреть файл

@ -270,8 +270,10 @@ Find some samples and getting stated tutorial in the `examples/sdk/` directory o
Cores for driver (Default: 1).
- executor_cores: str
Number of cores per executor. (Default: All available cores on the worker
Number of cores per executor. (Default: All available cores on the worker)
- max_retry_count: int
Number of times the Spark job may be retried if there is a failure
- `ApplicationLog`