MCPcopy Create free account

hub / github.com/Yelp/mrjob / functions

Functions4,468 in github.com/Yelp/mrjob

↓ 9 callersFunctionparse_gcs_uri
Parse a GCS URI into (bucket, key) >>> parse_gcs_uri("gs://walrus/tmp/") ('walrus', 'tmp/') If ``uri`` is not a GCS URI, raise a ValueEr
mrjob/fs/gcs.py:313
↓ 9 callersFunctionparse_s3_uri
Parse an S3 URI into (bucket, key) >>> parse_s3_uri('s3://walrus/tmp/') ('walrus', 'tmp/') If ``uri`` is not an S3 URI, raise a ValueErr
mrjob/parse.py:52
↓ 9 callersMethodpick_protocols
Pick the protocol classes to use for reading and writing for the given step. :type step_num: int :param step_num: which step
mrjob/job.py:1052
↓ 9 callersMethodsetUp
(self)
tests/test_dataproc.py:1945
↓ 9 callersMethodterminate_job_flows
(self, JobFlowIds)
tests/mock_boto3/emr.py:1481
↓ 8 callersMethod_add_hadoop_bin_for_envvar
Add a fake "Hadoop" binary to its own subdirectory of ``self.tmp_dir``, and set *os.environ[envvar]* to point at it. You can use *dirn
tests/fs/test_hadoop.py:225
↓ 8 callersFunction_alphabetize_actions
Alphabetize arg parser actions for the sake of nicer help printouts.
mrjob/options.py:1741
↓ 8 callersFunction_extract_tags
Pull the tags from a cluster, as a dict.
mrjob/pool.py:55
↓ 8 callersFunction_fix_traceback
(s)
mrjob/dataproc.py:1352
↓ 8 callersMethod_launch
Set up files and then launch our job on EMR.
mrjob/emr.py:726
↓ 8 callersMethod_list_jobs
(self, cluster_name=None, state_matcher=None)
mrjob/dataproc.py:1208
↓ 8 callersFunction_match_emr_bootstrap_stderr_path
If *path* corresponds to a bootstrap stderr file, return a dict with the keys *action_num* (an 0-indexed int) and *node_id*. Otherwise return
mrjob/logs/bootstrap.py:80
↓ 8 callersFunction_parse_port_range_list
(range_list_str)
mrjob/parse.py:98
↓ 8 callersFunction_parse_task_syslog
Parse an error out of a syslog file (or a Spark stderr file). Returns a dict, possibly containing the following keys: check_stdout:
mrjob/logs/task.py:339
↓ 8 callersFunction_parse_yarn_history_log
Collect useful info from a YARN history file, dealing gracefully with unexpected data structures. This returns a dictionary which may contain
mrjob/logs/history.py:143
↓ 8 callersMethod_should_bootstrap_spark
Return *bootstrap_spark* option if set; otherwise return true if our job has Spark steps.
mrjob/emr.py:2200
↓ 8 callersMethod_spark_master
(self)
mrjob/emr.py:1393
↓ 8 callersMethod_stream_task_log_dirs
Get lists of directories to look for the task logs in.
mrjob/emr.py:1957
↓ 8 callersFunction_subdivide_interval_by_date
Convert a time interval to a map from :py:class:`datetime.date` to the number of seconds within the interval on that date. *start* and *end*
mrjob/tools/emr/audit_usage.py:518
↓ 8 callersFunction_subdivide_interval_by_hour
Convert a time interval to a map from hours (represented as :py:class:`datetime.datetime` for the start of the hour) to the number of seconds
mrjob/tools/emr/audit_usage.py:549
↓ 8 callersMethod_task_log_interpretation
Helper for :py:meth:`_interpret_task_logs`
mrjob/dataproc.py:891
↓ 8 callersMethod_test_main_call
(self, module, cmd_name)
tests/test_cmd.py:44
↓ 8 callersMethod_upload_local_files
(self)
mrjob/runner.py:1155
↓ 8 callersMethodadd_file_arg
Add a command-line option that sends an external file (e.g. a SQLite DB) to Hadoop:: def configure_args(self): s
mrjob/job.py:1131
↓ 8 callersMethodadd_worker
(self)
tests/fs/test_ssh.py:51
↓ 8 callersMethodassertCantDecode
(self, protocol, data)
tests/test_protocol.py:112
↓ 8 callersMethodassertMethodsEqual
(self, fs, gs)
tests/test_job.py:312
↓ 8 callersFunctioncombine_jobconfs
Like combine_dicts(), but non-string values are converted to Java-readable string (e.g. True becomes 'true'). Keys whose value is None are bla
mrjob/conf.py:510
↓ 8 callersFunctiondecompress
Take a *readable* which supports the ``.read()`` method correponding to the given path and returns an iterator that yields chunks of bytes, po
mrjob/cat.py:78
↓ 8 callersMethodget_job_key
Get the unique key for the job run by this runner. This has the format ``label.owner.date.time.microseconds``
mrjob/runner.py:686
↓ 8 callersMethodget_spark_submit_bin
Return the location of the ``spark-submit`` binary, searching for it if necessary.
mrjob/bin.py:871
↓ 8 callersMethodinvoke_hadoop
Run the given hadoop command, raising an exception on non-zero return code. This only works for commands whose output we don't care ab
mrjob/fs/hadoop.py:140
↓ 8 callersFunctionis_s3_uri
Return True if *uri* can be parsed into an S3 URI, False otherwise.
mrjob/parse.py:43
↓ 8 callersFunctionmock_ssh_file
Create a directory at ``path`` relative to the temp directory for ``host``, where ``path`` is a POSIX path. Returns the path of the resulting
tests/mockssh.py:67
↓ 8 callersMethodread
(self, line)
mrjob/protocol.py:406
↓ 8 callersMethodsetUp
(self)
tests/test_hadoop.py:1295
↓ 8 callersFunctionwrite_conversion_record
(writer, url, content)
tests/examples/test_mr_phone_to_url.py:57
↓ 7 callersMethod_add_input_files_for_upload
If there is an upload manager, add input files to it.
mrjob/runner.py:1149
↓ 7 callersMethod_address_of_master
Get the address of the master node so we can SSH to it
mrjob/emr.py:2865
↓ 7 callersMethod_applications
Returns applications (*applications* option) as a set. Adds in ``Hadoop`` and ``Spark`` as needed.
mrjob/emr.py:2208
↓ 7 callersMethod_build_step
(self, step_num)
mrjob/emr.py:1332
↓ 7 callersFunction_client_error_status
Get the HTTP status for the given ClientError
mrjob/aws.py:226
↓ 7 callersFunction_filter_by_role
(opt_names, *cloud_roles)
mrjob/options.py:1484
↓ 7 callersMethod_get_cluster_config
(self, *args)
tests/test_dataproc.py:914
↓ 7 callersMethod_get_streaming_jar_and_step_arg_prefix
(self)
mrjob/emr.py:1449
↓ 7 callersMethod_hadoop_log_dirs
Yield all possible places to look for hadoop logs.
mrjob/hadoop.py:288
↓ 7 callersMethod_has_spark_application
Does this runner have "Spark" in its *applications* option?
mrjob/emr.py:3020
↓ 7 callersMethod_has_spark_install_bootstrap_action
Does it look like this runner has a spark bootstrap install action set? (Anything ending in "/install-spark" counts.)
mrjob/emr.py:3014
↓ 7 callersFunction_id_part
Get the ith part of some container ID, e.g. container_1567013493699_0003_01_000002. If *id* is None or too short, return
mrjob/logs/ids.py:88
↓ 7 callersFunction_log_probable_cause_of_failure
Log "probable cause of failure" log message.
mrjob/logs/errors.py:138
↓ 7 callersMethod_logs_needed_to_pick_error
We don't need all the logs when interpreting Spark steps
mrjob/logs/mixin.py:140
↓ 7 callersFunction_merge_and_sort_errors
Merge errors from one or more lists of errors and then return them, sorted by recency. We allow None in place of an error list.
mrjob/logs/errors.py:101
↓ 7 callersFunction_parse_indented_counters
Parse counters in the indented format output/logged by the Hadoop binary. Takes input as lines (should not include log record stuff) and
mrjob/logs/step.py:367
↓ 7 callersFunction_percent
Return what percentage *x* is of *total*, or *default* if *total* is zero.
mrjob/tools/emr/audit_usage.py:802
↓ 7 callersFunction_pool_name
(cluster)
mrjob/pool.py:60
↓ 7 callersMethod_project_id_and_region
(self)
mrjob/dataproc.py:1251
↓ 7 callersMethod_python_bin
Python binary used for everything other than invoking the job. For running job tasks (e.g. ``--mapper``, ``--spark``), we use :py:met
mrjob/bin.py:169
↓ 7 callersMethod_sh_bin
The sh binary and any arguments, as a list. Override this if, for example, a runner needs different default values depending on circum
mrjob/bin.py:755
↓ 7 callersMethod_spark_executors_have_own_wd
Do spark executors have a working directory different from the one *spark-submit* was run in? (True on everything but local.)
mrjob/runner.py:902
↓ 7 callersMethod_stream_history_log_dirs
Yield lists of directories to look for the history log in.
mrjob/emr.py:1930
↓ 7 callersMethod_task_python_bin
Python binary used to invoke job with ``--mapper``, ``--reducer``, ``--spark``, etc.
mrjob/bin.py:185
↓ 7 callersMethod_test_cloud_tmp_cleanup
(self, mode, tmp_len, log_len)
tests/test_emr.py:284
↓ 7 callersMethod_test_cloud_tmp_cleanup
(self, mode, tmp_len)
tests/test_dataproc.py:267
↓ 7 callersMethod_test_environment_variable
Check if we can find the hadoop binary from *envvar*
tests/fs/test_hadoop.py:262
↓ 7 callersMethod_wd_mirror
A directory to upload files belonging to :py:attr:`_working_dir_mgr`. This will be a subdir of ``self._upload_mgr.prefix`, if it exist
mrjob/runner.py:1167
↓ 7 callersFunction_wrap_aws_client
Wrap a given boto3 Client object so that it can retry when throttled.
mrjob/aws.py:258
↓ 7 callersMethodadd_container_exit
(self, container_id, returncode=143)
tests/test_dataproc.py:1684
↓ 7 callersFunctioncombine_envs
Combine zero or more dictionaries containing environment variables. Environment variable values may be wrapped in :py:class:`ClearedValue`. E
mrjob/conf.py:457
↓ 7 callersMethodget_cluster
(self, *args)
tests/test_emr.py:3115
↓ 7 callersFunctionget_mock_dir
Get a directory within $MOCK_HADOOP_TMP, creating it if it doesn't already exist. Takes optional *environ* keyword arg (defaults to ``os.envi
tests/mockhadoop.py:117
↓ 7 callersMethodinstalled_spark_application
(self, cluster, name='Spark')
tests/test_emr.py:3131
↓ 7 callersMethodopts_for_conf
(self, name, conf)
tests/test_runner.py:636
↓ 7 callersMethodparse_ssh_args
(self, ssh_args)
tests/test_emr.py:4829
↓ 7 callersMethodran_spark_bootstrap_action
( self, cluster, uri=_3_X_SPARK_BOOTSTRAP_ACTION)
tests/test_emr.py:3125
↓ 7 callersMethodread
(self, amt=None)
tests/mock_boto3/s3.py:388
↓ 7 callersFunctionshlex_split
Wrapper around shlex.split(), but convert to str if Python version < 2.7.3 when unicode support was added.
mrjob/util.py:238
↓ 7 callersFunctionwhich
Like the UNIX which command: search in *path* for the executable named *cmd*. *path* defaults to :envvar:`PATH`. Returns ``None`` if no such e
mrjob/util.py:369
↓ 7 callersFunctionwith_pct
(usage)
mrjob/tools/emr/audit_usage.py:658
↓ 6 callersMethod_add_bootstrap_files_for_upload
Add files needed by the bootstrap script to self._upload_mgr. Create the master bootstrap script if necessary.
mrjob/dataproc.py:491
↓ 6 callersMethod_assert_cloud_hadoop_version
(self, image_version, hadoop_version)
tests/test_dataproc.py:407
↓ 6 callersMethod_assert_never_installs_python3
(self, *args)
tests/test_emr.py:3040
↓ 6 callersMethod_bootstrap_python
Return a (possibly empty) list of parsed commands (in the same format as returned by parse_setup_cmd())
mrjob/emr.py:2170
↓ 6 callersMethod_check_region_matches_endpoint
(self, region)
tests/mock_google/dataproc.py:132
↓ 6 callersMethod_cleanup_cluster
(self)
mrjob/emr.py:988
↓ 6 callersMethod_create_dir_archive
Helper for :py:meth:`archive_dir`
mrjob/runner.py:1014
↓ 6 callersMethod_create_mrjob_zip
Make a zip of the mrjob library, without .pyc or .pyo files, This will also set ``self._mrjob_zip_path`` and return it. Typically cal
mrjob/bin.py:503
↓ 6 callersFunction_default_to
Helper function; set the given attribute to *value* if it's None.
mrjob/options.py:84
↓ 6 callersMethod_env_and_runner
(self, *args)
tests/test_bin.py:1627
↓ 6 callersMethod_env_for_step
(self, step_num)
mrjob/hadoop.py:511
↓ 6 callersMethod_failed_task_container_ids
Stream container IDs of failed tasks, in reverse order.
mrjob/dataproc.py:930
↓ 6 callersFunction_get_reason
Get state change reason message.
mrjob/emr.py:3239
↓ 6 callersMethod_interpret_step_logs
Hook for interpreting step logs. Unlike with most runners, you may call this multiple times and it will continue to parse the step lo
mrjob/dataproc.py:781
↓ 6 callersMethod_ls
Helper method for :py:meth:`ls`; yields tuples of ``(uri, key)`` where *key* is the corresponding boto3 s3.ObjectSummary.
mrjob/fs/s3.py:122
↓ 6 callersFunction_ls_logs
Return a list matches against log files. Used to implement ``_ls_*_logs()`` functions. This yields dictionaries with ``path`` set to matching
mrjob/logs/wrap.py:42
↓ 6 callersMethod_make_launcher
Make a launcher, add a mock runner (``launcher.mock_runner``), and set it up so that ``launcher.make_runner().__enter__()`` returns ``
tests/test_job.py:1819
↓ 6 callersFunction_match_emr_step_stderr_path
Match path of a step stderr log, optionally filtering by *step_id*. If there is a match, return a dict with the keys *step_id* and *timestamp
mrjob/logs/step.py:130
↓ 6 callersFunction_mock_upload_mgr
()
tests/test_bin.py:76
↓ 6 callersMethod_non_option_kwargs
Keyword arguments to runner constructor that can't be set in mrjob.conf. These should match the (named) arguments to :py:meth
mrjob/job.py:188
↓ 6 callersFunction_parse_pre_yarn_history_records
r"""Yield records from the given sequence of lines. For example, a line like this: Task TASKID="task_201512311928_0001_m_000003" \ TASK_T
mrjob/logs/history.py:336
↓ 6 callersFunction_pick_counters
Pick counters from a dictionary possibly containing step and history interpretations.
mrjob/logs/counters.py:36
← previousnext →201–300 of 4,468, ranked by callers