MCPcopy Create free account

hub / github.com/Yelp/mrjob / functions

Functions4,468 in github.com/Yelp/mrjob

↓ 443 callersMethodmake_runner
(self)
tests/test_emr.py:1457
↓ 409 callersMethodsandbox
Redirect stdin, stdout, and stderr for automated testing. You can set stdin, stdout, and stderr to file objects. By default, they'll
mrjob/job.py:1597
↓ 388 callersMethodget
(self)
tests/mock_boto3/s3.py:282
↓ 380 callersMethodjoin
Join *paths* onto *path* (which may be a URI)
mrjob/fs/base.py:97
↓ 306 callersMethodrun
Entry point for running job from the command-line. This is also the entry point when a mapper or reducer is run by Hadoop Streaming.
mrjob/job.py:602
↓ 299 callersMethodstart
Add the given patcher to this test case's cleanup actions, then start it, and return the mock it returns. Example: mock_turtle = self
tests/sandbox.py:110
↓ 175 callersFunctionopen
(*args, **kwargs)
mrjob/util.py:158
↓ 171 callersMethodmake_pooled_cluster
(self, normalized_instance_hours=None, **kwargs)
tests/test_emr_pooling.py:2222
↓ 171 callersMethodmakefile
(self, path, contents=b'', executable=False)
tests/sandbox.py:157
↓ 165 callersFunctionutc
(*args)
tests/tools/emr/test_audit_usage.py:39
↓ 129 callersMethodcat_output
Stream the job's output, as a stream of ``bytes``. If there are multiple output files, there will be an empty bytestring (``b''``) bet
mrjob/runner.py:512
↓ 106 callersMethodwrite
(self, key, value)
tests/mr_two_step_hadoop_format_job.py:44
↓ 98 callersMethodexists
(self)
tests/mock_google/storage.py:80
↓ 92 callersMethodls
Recursively list all files in the given path. We don't return directories for compatibility with S3 (which has no concept of them)
mrjob/fs/base.py:75
↓ 84 callersMethodadd
Add a path. If *path* hasn't been added before, assign it a name. If *path* is a URI don't add it; just return the URI.
mrjob/setup.py:314
↓ 84 callersMethodassertJoins
(self, cluster_id, job_args, job_class=MRTwoStepJob)
tests/test_emr_pooling.py:169
↓ 80 callersMethodparse_output
Parse the final output of this MRJob (as a stream of byte chunks) into a stream of ``(key, value)``.
mrjob/job.py:1293
↓ 74 callersMethodmake_runner
create a dummy job, and call make_runner() on it. Use this in a with block: with self.make_runner() as runner: ...
tests/mock_boto3/case.py:198
↓ 70 callersMethodassertDoesNotJoin
(self, cluster_id, job_args, job_class=MRTwoStepJob)
tests/test_emr_pooling.py:174
↓ 57 callersMethodadd_mock_s3_data
Update self.mock_s3_fs with a map from bucket name to key name to data.
tests/mock_boto3/case.py:89
↓ 56 callersFunction_validate_param
Check that the param *name* is found in *params*, and if *type* is set, validate that it has the proper type. *type* may also be a tuple (mul
tests/mock_boto3/emr.py:1748
↓ 50 callersMethod_fleet_config
( self, role='MASTER', instance_types=None, weighted_capacities=None, ebs_
tests/test_emr_pooling.py:114
↓ 50 callersMethod_runner_kwargs
If we're building an inline or Spark runner, include mrjob_cls in kwargs.
mrjob/job.py:720
↓ 48 callersFunctionto_lines
Take in data as a sequence of bytes, and yield it, one line at a time. Only breaks lines on ``\\n`` (not ``\\r``), and does not add a trailin
mrjob/util.py:256
↓ 48 callersMethoduri
Get the URI for the given path. If *path* is a URI, just return it.
mrjob/setup.py:332
↓ 45 callersMethodadd_passthru_arg
Function to create options which both the job runner and the job itself respect (we use this for protocols, for example). Use it like
mrjob/job.py:1181
↓ 44 callersMethod_describe_cluster
(self)
mrjob/emr.py:2852
↓ 44 callersMethodget_cluster_id
Get the ID of the cluster our job is running on, or ``None``.
mrjob/emr.py:2388
↓ 41 callersMethodmakedirs
(self, path)
tests/sandbox.py:151
↓ 40 callersMethodread
(self, *args, **kwargs)
tests/test_util.py:292
↓ 39 callersFunctionis_uri
r"""Return True if *uri* is a URI and contains ``://`` (we only care about URIs that can describe files)
mrjob/parse.py:36
↓ 39 callersMethodmake_emr_client
Create a :py:mod:`boto3` EMR client. :return: a :py:class:`botocore.client.EMR` wrapped in a :py:class:`mrjob.retry.RetryWrap
mrjob/emr.py:2829
↓ 38 callersFunction_error
(msg=None)
mrjob/cmd.py:33
↓ 38 callersMethod_test_instance_groups
Run a job with the given option dictionary, and check for for instance, number, and optional bid price for each instance role. Specif
tests/test_emr.py:923
↓ 36 callersMethod_ig_with_ebs_config
Build an instance group request with the given list of EBS device configs. Optionally turn on EBS optimization and specify a different
tests/test_emr_pooling.py:869
↓ 36 callersMethod_spark_submit_args
Build a list of extra args to the spark-submit binary for the given spark or spark_script step.
mrjob/bin.py:915
↓ 35 callersFunctioncmd_line
build a command line that works in a shell.
mrjob/util.py:49
↓ 35 callersMethodlaunch
Launch a job but don't wait for it to finish.
tests/mock_boto3/case.py:211
↓ 33 callersMethodmake_runner
(self, *args)
tests/test_runner.py:977
↓ 33 callersFunctionparse_setup_cmd
Parse a setup/bootstrap command, finding and pulling out Hadoop Distributed Cache-style paths ("hash paths"). :param string cmd: shell comman
mrjob/setup.py:76
↓ 32 callersFunction_validate_param_type
Raise ParamValidationError if *value* isn't an instance of *type*.
tests/mock_boto3/emr.py:1766
↓ 32 callersMethodmake_persistent_cluster
(self)
mrjob/emr.py:2367
↓ 32 callersMethodsetUp
(self)
tests/test_emr.py:1450
↓ 31 callersMethodrun_and_get_cluster
(self, *args)
tests/mock_boto3/case.py:216
↓ 29 callersMethod_get_local_tmp_dir
Create a tmp directory on the local filesystem that will be cleaned up by self.cleanup()
mrjob/runner.py:724
↓ 29 callersMethodpath_to_uri
Get a map from path to URI for all paths that were added, so we can figure out which files we need to upload.
mrjob/setup.py:343
↓ 28 callersFunction_boto3_now
Get a ``datetime`` that's compatible with :py:mod:`boto3`. These are always UTC time, with time zone ``dateutil.tz.tzutc()``.
mrjob/aws.py:270
↓ 28 callersMethoddescription
Return a dictionary representation of this step. See :ref:`steps-format` for examples.
mrjob/step.py:408
↓ 27 callersMethod_cat_file
Yield the contents of the file at *path* as a series of ``bytes``, not necessarily respecting line boundaries.
mrjob/fs/base.py:85
↓ 27 callersFunction_load_yaml_with_clear_tag
Like yaml.safe_load(), but everything with a !clear tag before it will be wrapped in ClearedValue().
mrjob/conf.py:126
↓ 27 callersMethodname
Get the name for a path previously added to this :py:class:`WorkingDirManager`, assigning one as needed. This is primarily for gettin
mrjob/setup.py:418
↓ 27 callersFunctionname_uniquely
Come up with a unique name for *path*. :param names_taken: a dictionary or set of names not to use. :param proposed_name: name to use if it i
mrjob/setup.py:239
↓ 26 callersFunctioncombine_values
Return the last value in *values* that is not ``None``. The default combiner; good for simple values (booleans, strings, numbers).
mrjob/conf.py:378
↓ 26 callersFunctionmrjob_conf_patcher
(substitute_conf=EMPTY_MRJOB_CONF)
tests/sandbox.py:66
↓ 25 callersFunction_fix_clear_tags
Recursively resolve :py:class:`ClearedValue` wrappers so that ``ClearedValue(...)`` can only wrap values in dicts (and in the top-level value
mrjob/conf.py:156
↓ 25 callersMethod_get_steps
Returns ``self._steps``.
mrjob/runner.py:777
↓ 25 callersMethod_test_explicit
(self, m=False, c=False, r=False, **kwargs)
tests/test_step.py:136
↓ 25 callersMethodmkdir
Create the given dir and its subdirs (if they don't already exist). On cloud filesystems (e.g. S3), also create the corresponding buck
mrjob/fs/base.py:111
↓ 25 callersMethodname_to_path
Get a map from name (in the setup directory) to path for all known files/archives, so we can build :option:`-file` and :option:`-archi
mrjob/setup.py:470
↓ 25 callersFunctionrun_job
Run a MRJob and return its output as a dictionary.
tests/job.py:20
↓ 25 callersFunctionto_unicode
Convert ``bytes`` to unicode. Use this if you need to ``print()`` or log bytes of an unknown encoding, or to parse strings out of bytes of un
mrjob/py2.py:161
↓ 24 callersMethod_dest_in_wd_mirror
Return the URI of where to upload *path* so it can appear in the working dir as *name*, or ``None`` if it doesn't need to be uploaded.
mrjob/runner.py:1188
↓ 24 callersMethod_find_hadoop_streaming_jar
Search for the hadoop streaming jar. See :py:meth:`_hadoop_streaming_jar_dirs` for where we search.
mrjob/hadoop.py:234
↓ 24 callersFunctiondump_mrjob_conf
Write out configuration options to a file. Useful if you don't want to bother to figure out YAML. *conf* should look something like this:
mrjob/conf.py:346
↓ 24 callersFunctionversion_gte
Return ``True`` if version >= *cmp_version_str*.
mrjob/compat.py:725
↓ 23 callersMethod_harness_job
( self, job_class, input_bytes=b'', input_paths=(), runner_alias='inline', compression
tests/spark/test_harness.py:134
↓ 23 callersFunctioncombine_dicts
Combine zero or more dictionaries. Values from dicts later in the list take precedence over values earlier in the list. If you pass in ``None
mrjob/conf.py:435
↓ 23 callersMethodput_gcs_multi
(self, gcs_uri_to_data_map)
tests/mock_google/case.py:170
↓ 23 callersMethodwrite
(self, key, value)
mrjob/protocol.py:418
↓ 22 callersMethod_get_step
Helper for run_* methods
mrjob/job.py:738
↓ 21 callersFunction_attempt_to_lock_cluster
Attempt to lock the given pooled cluster using EMR tags. You may optionally include *cluster* (a cluster description) and *when_cluster_descr
mrjob/pool.py:589
↓ 21 callersFunction_boto3_paginate
Yield results from a paginatable API client call. *what* is the name of the field the holds the list of items in each page (e.g. ``'InstanceG
mrjob/aws.py:281
↓ 21 callersMethod_hadoop_args_for_step
Build a list of extra arguments to the hadoop binary. This handles *cmdenv*, *hadoop_extra_args*, *hadoop_input_format*, *hadoop_outp
mrjob/bin.py:265
↓ 21 callersMethodadd_fs
Add a filesystem. :param fs: a :py:class:~mrjob.fs.base.Filesystem to forward calls to. :param name string: Name of this filesystem.
mrjob/fs/composite.py:63
↓ 20 callersMethod_find_cluster
Find a cluster that can host this runner. Prefer clusters with more compute units. Break ties by choosing cluster with longest idle time.
mrjob/emr.py:2636
↓ 20 callersMethodids_of_terminated_clusters
(self)
tests/tools/emr/test_terminate_idle_clusters.py:330
↓ 20 callersMethodmake_mock_file
(self, name, contents='contents')
tests/fs/test_hadoop.py:64
↓ 19 callersMethoderror
(msg)
mrjob/job.py:131
↓ 19 callersMethodget_image_version
Get the version of the AMI that our cluster is running, or ``None``.
mrjob/emr.py:2860
↓ 19 callersMethodincrement_counter
Increment a counter in Hadoop streaming by printing to stderr. :type group: str :param group: counter group :type counter: st
mrjob/job.py:547
↓ 19 callersFunctionsafeeval
Like eval, but with nearly everything in the environment blanked out, so that it's difficult to cause mischief. *globals* and *locals* are op
mrjob/util.py:134
↓ 18 callersFunction_ValidationException
(operation_name, message)
tests/mock_boto3/emr.py:1792
↓ 18 callersMethod_image_version_gte
Check if the requested image version is greater than or equal to *version*. If the *release_label* opt is set, look at that instead.
mrjob/emr.py:576
↓ 18 callersFunction_list_all_steps
Get steps for the runner's cluster as a list (in forward order)
tests/test_emr.py:140
↓ 18 callersMethodget_new_lines
(self)
tests/test_dataproc.py:1328
↓ 18 callersMethodget_output_dir
Find the directory containing the job output. If the job hasn't run yet, returns None
mrjob/runner.py:692
↓ 18 callersFunctionmap_version
Allows you to look up something by version (e.g. which jobconf variable to use, specifying only the versions where that value changed. *versi
mrjob/compat.py:623
↓ 17 callersMethod_cmdenv
(self)
mrjob/emr.py:3097
↓ 17 callersMethod_dir_archive_path
Assign a path for the archive of *dir_path* but don't actually create anything.
mrjob/runner.py:992
↓ 17 callersMethod_get_cluster
(self, cluster_id)
mrjob/dataproc.py:1187
↓ 17 callersMethod_test_instance_groups
Run a job with the given option dictionary, and check for for instance, number, and optional bid price for each instance role. Specif
tests/test_dataproc.py:740
↓ 17 callersMethodadd_mock_emr_cluster
(self, cluster)
tests/mock_boto3/case.py:122
↓ 17 callersMethodcat
cat all files matching **path_glob**, decompressing if necessary This yields bytes, which don't necessarily correspond to lines (see
mrjob/fs/base.py:54
↓ 17 callersMethodget_hadoop_bin
Find the hadoop binary. A list: binary followed by arguments.
mrjob/hadoop.py:212
↓ 17 callersMethodmake_master_file
(self, path, contents)
tests/fs/test_ssh.py:61
↓ 16 callersMethod_num_steps
Get the number of steps (calls :py:meth:`get_steps`).
mrjob/runner.py:840
↓ 16 callersMethod_read_logs
If this is false, we shouldn't attempt to list or cat logs.
mrjob/logs/mixin.py:290
↓ 16 callersMethodassertCantEncode
(self, protocol, key, value)
tests/test_protocol.py:109
↓ 16 callersMethoddu
Get the total size of files matching ``path_glob`` Corresponds roughly to: ``hadoop fs -du path_glob``
mrjob/fs/base.py:68
↓ 16 callersMethodmaybe_terminate_quietly
(self, stdout=None, **kwargs)
tests/tools/emr/test_terminate_idle_clusters.py:338
next →1–100 of 4,468, ranked by callers