repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
DataDog/integrations-core
datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py
OpenMetricsScraperMixin._get_hostname
def _get_hostname(self, hostname, sample, scraper_config): """ If hostname is None, look at label_to_hostname setting """ if ( hostname is None and scraper_config['label_to_hostname'] is not None and scraper_config['label_to_hostname'] in sample[self.S...
python
def _get_hostname(self, hostname, sample, scraper_config): """ If hostname is None, look at label_to_hostname setting """ if ( hostname is None and scraper_config['label_to_hostname'] is not None and scraper_config['label_to_hostname'] in sample[self.S...
[ "def", "_get_hostname", "(", "self", ",", "hostname", ",", "sample", ",", "scraper_config", ")", ":", "if", "(", "hostname", "is", "None", "and", "scraper_config", "[", "'label_to_hostname'", "]", "is", "not", "None", "and", "scraper_config", "[", "'label_to_h...
If hostname is None, look at label_to_hostname setting
[ "If", "hostname", "is", "None", "look", "at", "label_to_hostname", "setting" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py#L519-L533
train
Get the hostname from the label_to_hostname setting.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py
OpenMetricsScraperMixin._submit_gauges_from_histogram
def _submit_gauges_from_histogram(self, metric_name, metric, scraper_config, hostname=None): """ Extracts metrics from a prometheus histogram and sends them as gauges """ for sample in metric.samples: val = sample[self.SAMPLE_VALUE] if not self._is_value_valid(val...
python
def _submit_gauges_from_histogram(self, metric_name, metric, scraper_config, hostname=None): """ Extracts metrics from a prometheus histogram and sends them as gauges """ for sample in metric.samples: val = sample[self.SAMPLE_VALUE] if not self._is_value_valid(val...
[ "def", "_submit_gauges_from_histogram", "(", "self", ",", "metric_name", ",", "metric", ",", "scraper_config", ",", "hostname", "=", "None", ")", ":", "for", "sample", "in", "metric", ".", "samples", ":", "val", "=", "sample", "[", "self", ".", "SAMPLE_VALUE...
Extracts metrics from a prometheus histogram and sends them as gauges
[ "Extracts", "metrics", "from", "a", "prometheus", "histogram", "and", "sends", "them", "as", "gauges" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py#L571-L609
train
Extracts metrics from a prometheus histogram and sends them as gauges.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
zk/datadog_checks/zk/zk.py
ZookeeperCheck.parse_stat
def parse_stat(self, buf): """ `buf` is a readable file-like object returns a tuple: (metrics, tags, mode, version) """ metrics = [] buf.seek(0) # Check the version line to make sure we parse the rest of the # body correctly. Particularly, the Connections...
python
def parse_stat(self, buf): """ `buf` is a readable file-like object returns a tuple: (metrics, tags, mode, version) """ metrics = [] buf.seek(0) # Check the version line to make sure we parse the rest of the # body correctly. Particularly, the Connections...
[ "def", "parse_stat", "(", "self", ",", "buf", ")", ":", "metrics", "=", "[", "]", "buf", ".", "seek", "(", "0", ")", "# Check the version line to make sure we parse the rest of the", "# body correctly. Particularly, the Connections val was added in", "# >= 3.4.4.", "start_l...
`buf` is a readable file-like object returns a tuple: (metrics, tags, mode, version)
[ "buf", "is", "a", "readable", "file", "-", "like", "object", "returns", "a", "tuple", ":", "(", "metrics", "tags", "mode", "version", ")" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/zk/datadog_checks/zk/zk.py#L250-L338
train
Parse the stat command output of the zookeeper stat command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
zk/datadog_checks/zk/zk.py
ZookeeperCheck.parse_mntr
def parse_mntr(self, buf): """ Parse `mntr` command's content. `buf` is a readable file-like object Returns: a tuple (metrics, mode) if mode == 'inactive', metrics will be None """ buf.seek(0) first = buf.readline() # First is version string or error ...
python
def parse_mntr(self, buf): """ Parse `mntr` command's content. `buf` is a readable file-like object Returns: a tuple (metrics, mode) if mode == 'inactive', metrics will be None """ buf.seek(0) first = buf.readline() # First is version string or error ...
[ "def", "parse_mntr", "(", "self", ",", "buf", ")", ":", "buf", ".", "seek", "(", "0", ")", "first", "=", "buf", ".", "readline", "(", ")", "# First is version string or error", "if", "first", "==", "'This ZooKeeper instance is not currently serving requests'", ":"...
Parse `mntr` command's content. `buf` is a readable file-like object Returns: a tuple (metrics, mode) if mode == 'inactive', metrics will be None
[ "Parse", "mntr", "command", "s", "content", ".", "buf", "is", "a", "readable", "file", "-", "like", "object" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/zk/datadog_checks/zk/zk.py#L340-L377
train
Parse the mntr command s content.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
ceph/datadog_checks/ceph/ceph.py
Ceph._osd_pct_used
def _osd_pct_used(self, health): """Take a single health check string, return (OSD name, percentage used)""" # Full string looks like: osd.2 is full at 95% # Near full string: osd.1 is near full at 94% pct = re.compile(r'\d+%').findall(health) osd = re.compile(r'osd.\d+').findall...
python
def _osd_pct_used(self, health): """Take a single health check string, return (OSD name, percentage used)""" # Full string looks like: osd.2 is full at 95% # Near full string: osd.1 is near full at 94% pct = re.compile(r'\d+%').findall(health) osd = re.compile(r'osd.\d+').findall...
[ "def", "_osd_pct_used", "(", "self", ",", "health", ")", ":", "# Full string looks like: osd.2 is full at 95%", "# Near full string: osd.1 is near full at 94%", "pct", "=", "re", ".", "compile", "(", "r'\\d+%'", ")", ".", "findall", "(", "health", ")", "osd", "=", "...
Take a single health check string, return (OSD name, percentage used)
[ "Take", "a", "single", "health", "check", "string", "return", "(", "OSD", "name", "percentage", "used", ")" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/ceph/datadog_checks/ceph/ceph.py#L249-L258
train
Take a single health check string return the OSD name and percentage used
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.add_son_manipulator
def add_son_manipulator(self, manipulator): """Add a new son manipulator to this database. **DEPRECATED** - `add_son_manipulator` is deprecated. .. versionchanged:: 3.0 Deprecated add_son_manipulator. """ warnings.warn("add_son_manipulator is deprecated", ...
python
def add_son_manipulator(self, manipulator): """Add a new son manipulator to this database. **DEPRECATED** - `add_son_manipulator` is deprecated. .. versionchanged:: 3.0 Deprecated add_son_manipulator. """ warnings.warn("add_son_manipulator is deprecated", ...
[ "def", "add_son_manipulator", "(", "self", ",", "manipulator", ")", ":", "warnings", ".", "warn", "(", "\"add_son_manipulator is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "base", "=", "SONManipulator", "(", ")", "def", "method_ove...
Add a new son manipulator to this database. **DEPRECATED** - `add_son_manipulator` is deprecated. .. versionchanged:: 3.0 Deprecated add_son_manipulator.
[ "Add", "a", "new", "son", "manipulator", "to", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L116-L141
train
Adds a son manipulator to this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.incoming_manipulators
def incoming_manipulators(self): """**DEPRECATED**: All incoming SON manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.incoming_manipulators() is deprecated", DeprecationWarning, stacklevel=2) ...
python
def incoming_manipulators(self): """**DEPRECATED**: All incoming SON manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.incoming_manipulators() is deprecated", DeprecationWarning, stacklevel=2) ...
[ "def", "incoming_manipulators", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"Database.incoming_manipulators() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "return", "[", "manipulator", ".", "__class__", ".", "__name__", "...
**DEPRECATED**: All incoming SON manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0
[ "**", "DEPRECATED", "**", ":", "All", "incoming", "SON", "manipulators", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L162-L174
train
Return a list of all incoming SON manipulators.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.incoming_copying_manipulators
def incoming_copying_manipulators(self): """**DEPRECATED**: All incoming SON copying manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.incoming_copying_manipulators() is deprecated", DeprecationWa...
python
def incoming_copying_manipulators(self): """**DEPRECATED**: All incoming SON copying manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.incoming_copying_manipulators() is deprecated", DeprecationWa...
[ "def", "incoming_copying_manipulators", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"Database.incoming_copying_manipulators() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "return", "[", "manipulator", ".", "__class__", ".", ...
**DEPRECATED**: All incoming SON copying manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0
[ "**", "DEPRECATED", "**", ":", "All", "incoming", "SON", "copying", "manipulators", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L177-L189
train
Return a list of all incoming SON copying manipulators.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.outgoing_manipulators
def outgoing_manipulators(self): """**DEPRECATED**: All outgoing SON manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.outgoing_manipulators() is deprecated", DeprecationWarning, stacklevel=2) ...
python
def outgoing_manipulators(self): """**DEPRECATED**: All outgoing SON manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.outgoing_manipulators() is deprecated", DeprecationWarning, stacklevel=2) ...
[ "def", "outgoing_manipulators", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"Database.outgoing_manipulators() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "return", "[", "manipulator", ".", "__class__", ".", "__name__", "...
**DEPRECATED**: All outgoing SON manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0
[ "**", "DEPRECATED", "**", ":", "All", "outgoing", "SON", "manipulators", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L192-L204
train
Return a list of all outgoing SON manipulators.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.outgoing_copying_manipulators
def outgoing_copying_manipulators(self): """**DEPRECATED**: All outgoing SON copying manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.outgoing_copying_manipulators() is deprecated", DeprecationWa...
python
def outgoing_copying_manipulators(self): """**DEPRECATED**: All outgoing SON copying manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0 """ warnings.warn("Database.outgoing_copying_manipulators() is deprecated", DeprecationWa...
[ "def", "outgoing_copying_manipulators", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"Database.outgoing_copying_manipulators() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "return", "[", "manipulator", ".", "__class__", ".", ...
**DEPRECATED**: All outgoing SON copying manipulators. .. versionchanged:: 3.5 Deprecated. .. versionadded:: 2.0
[ "**", "DEPRECATED", "**", ":", "All", "outgoing", "SON", "copying", "manipulators", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L207-L219
train
Return a list of all outgoing SON copying manipulators.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.get_collection
def get_collection(self, name, codec_options=None, read_preference=None, write_concern=None, read_concern=None): """Get a :class:`~pymongo.collection.Collection` with the given name and options. Useful for creating a :class:`~pymongo.collection.Collection` with di...
python
def get_collection(self, name, codec_options=None, read_preference=None, write_concern=None, read_concern=None): """Get a :class:`~pymongo.collection.Collection` with the given name and options. Useful for creating a :class:`~pymongo.collection.Collection` with di...
[ "def", "get_collection", "(", "self", ",", "name", ",", "codec_options", "=", "None", ",", "read_preference", "=", "None", ",", "write_concern", "=", "None", ",", "read_concern", "=", "None", ")", ":", "return", "Collection", "(", "self", ",", "name", ",",...
Get a :class:`~pymongo.collection.Collection` with the given name and options. Useful for creating a :class:`~pymongo.collection.Collection` with different codec options, read preference, and/or write concern from this :class:`Database`. >>> db.read_preference Prima...
[ "Get", "a", ":", "class", ":", "~pymongo", ".", "collection", ".", "Collection", "with", "the", "given", "name", "and", "options", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L257-L298
train
Get a new collection with the given name and options.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._collection_default_options
def _collection_default_options(self, name, **kargs): """Get a Collection instance with the default settings.""" wc = (self.write_concern if self.write_concern.acknowledged else WriteConcern()) return self.get_collection( name, codec_options=DEFAULT_CODEC_OPTIONS, ...
python
def _collection_default_options(self, name, **kargs): """Get a Collection instance with the default settings.""" wc = (self.write_concern if self.write_concern.acknowledged else WriteConcern()) return self.get_collection( name, codec_options=DEFAULT_CODEC_OPTIONS, ...
[ "def", "_collection_default_options", "(", "self", ",", "name", ",", "*", "*", "kargs", ")", ":", "wc", "=", "(", "self", ".", "write_concern", "if", "self", ".", "write_concern", ".", "acknowledged", "else", "WriteConcern", "(", ")", ")", "return", "self"...
Get a Collection instance with the default settings.
[ "Get", "a", "Collection", "instance", "with", "the", "default", "settings", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L300-L307
train
Get a Collection instance with the default settings.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.create_collection
def create_collection(self, name, codec_options=None, read_preference=None, write_concern=None, read_concern=None, **kwargs): """Create a new :class:`~pymongo.collection.Collection` in this database. Normally collection creation is automatic. ...
python
def create_collection(self, name, codec_options=None, read_preference=None, write_concern=None, read_concern=None, **kwargs): """Create a new :class:`~pymongo.collection.Collection` in this database. Normally collection creation is automatic. ...
[ "def", "create_collection", "(", "self", ",", "name", ",", "codec_options", "=", "None", ",", "read_preference", "=", "None", ",", "write_concern", "=", "None", ",", "read_concern", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "name", "in", "sel...
Create a new :class:`~pymongo.collection.Collection` in this database. Normally collection creation is automatic. This method should only be used to specify options on creation. :class:`~pymongo.errors.CollectionInvalid` will be raised if the collection already exists. ...
[ "Create", "a", "new", ":", "class", ":", "~pymongo", ".", "collection", ".", "Collection", "in", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L309-L368
train
Creates a new collection in this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._apply_incoming_manipulators
def _apply_incoming_manipulators(self, son, collection): """Apply incoming manipulators to `son`.""" for manipulator in self.__incoming_manipulators: son = manipulator.transform_incoming(son, collection) return son
python
def _apply_incoming_manipulators(self, son, collection): """Apply incoming manipulators to `son`.""" for manipulator in self.__incoming_manipulators: son = manipulator.transform_incoming(son, collection) return son
[ "def", "_apply_incoming_manipulators", "(", "self", ",", "son", ",", "collection", ")", ":", "for", "manipulator", "in", "self", ".", "__incoming_manipulators", ":", "son", "=", "manipulator", ".", "transform_incoming", "(", "son", ",", "collection", ")", "retur...
Apply incoming manipulators to `son`.
[ "Apply", "incoming", "manipulators", "to", "son", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L370-L374
train
Apply incoming manipulators to son.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._apply_incoming_copying_manipulators
def _apply_incoming_copying_manipulators(self, son, collection): """Apply incoming copying manipulators to `son`.""" for manipulator in self.__incoming_copying_manipulators: son = manipulator.transform_incoming(son, collection) return son
python
def _apply_incoming_copying_manipulators(self, son, collection): """Apply incoming copying manipulators to `son`.""" for manipulator in self.__incoming_copying_manipulators: son = manipulator.transform_incoming(son, collection) return son
[ "def", "_apply_incoming_copying_manipulators", "(", "self", ",", "son", ",", "collection", ")", ":", "for", "manipulator", "in", "self", ".", "__incoming_copying_manipulators", ":", "son", "=", "manipulator", ".", "transform_incoming", "(", "son", ",", "collection",...
Apply incoming copying manipulators to `son`.
[ "Apply", "incoming", "copying", "manipulators", "to", "son", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L376-L380
train
Apply incoming copying manipulators to son.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._fix_incoming
def _fix_incoming(self, son, collection): """Apply manipulators to an incoming SON object before it gets stored. :Parameters: - `son`: the son object going into the database - `collection`: the collection the son object is being saved in """ son = self._apply_incomin...
python
def _fix_incoming(self, son, collection): """Apply manipulators to an incoming SON object before it gets stored. :Parameters: - `son`: the son object going into the database - `collection`: the collection the son object is being saved in """ son = self._apply_incomin...
[ "def", "_fix_incoming", "(", "self", ",", "son", ",", "collection", ")", ":", "son", "=", "self", ".", "_apply_incoming_manipulators", "(", "son", ",", "collection", ")", "son", "=", "self", ".", "_apply_incoming_copying_manipulators", "(", "son", ",", "collec...
Apply manipulators to an incoming SON object before it gets stored. :Parameters: - `son`: the son object going into the database - `collection`: the collection the son object is being saved in
[ "Apply", "manipulators", "to", "an", "incoming", "SON", "object", "before", "it", "gets", "stored", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L382-L391
train
Apply manipulators to an incoming SON object before it gets stored.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._fix_outgoing
def _fix_outgoing(self, son, collection): """Apply manipulators to a SON object as it comes out of the database. :Parameters: - `son`: the son object coming out of the database - `collection`: the collection the son object was saved in """ for manipulator in reversed...
python
def _fix_outgoing(self, son, collection): """Apply manipulators to a SON object as it comes out of the database. :Parameters: - `son`: the son object coming out of the database - `collection`: the collection the son object was saved in """ for manipulator in reversed...
[ "def", "_fix_outgoing", "(", "self", ",", "son", ",", "collection", ")", ":", "for", "manipulator", "in", "reversed", "(", "self", ".", "__outgoing_manipulators", ")", ":", "son", "=", "manipulator", ".", "transform_outgoing", "(", "son", ",", "collection", ...
Apply manipulators to a SON object as it comes out of the database. :Parameters: - `son`: the son object coming out of the database - `collection`: the collection the son object was saved in
[ "Apply", "manipulators", "to", "a", "SON", "object", "as", "it", "comes", "out", "of", "the", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L393-L404
train
Apply manipulators to a SON object as it comes out of the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._command
def _command(self, sock_info, command, slave_ok=False, value=1, check=True, allowable_errors=None, read_preference=ReadPreference.PRIMARY, codec_options=DEFAULT_CODEC_OPTIONS, write_concern=None, parse_write_concern_error=False, **kwargs): """I...
python
def _command(self, sock_info, command, slave_ok=False, value=1, check=True, allowable_errors=None, read_preference=ReadPreference.PRIMARY, codec_options=DEFAULT_CODEC_OPTIONS, write_concern=None, parse_write_concern_error=False, **kwargs): """I...
[ "def", "_command", "(", "self", ",", "sock_info", ",", "command", ",", "slave_ok", "=", "False", ",", "value", "=", "1", ",", "check", "=", "True", ",", "allowable_errors", "=", "None", ",", "read_preference", "=", "ReadPreference", ".", "PRIMARY", ",", ...
Internal command helper.
[ "Internal", "command", "helper", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L406-L428
train
Internal command helper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.command
def command(self, command, value=1, check=True, allowable_errors=None, read_preference=ReadPreference.PRIMARY, codec_options=DEFAULT_CODEC_OPTIONS, **kwargs): """Issue a MongoDB command. Send command `command` to the database and return the response. If `command`...
python
def command(self, command, value=1, check=True, allowable_errors=None, read_preference=ReadPreference.PRIMARY, codec_options=DEFAULT_CODEC_OPTIONS, **kwargs): """Issue a MongoDB command. Send command `command` to the database and return the response. If `command`...
[ "def", "command", "(", "self", ",", "command", ",", "value", "=", "1", ",", "check", "=", "True", ",", "allowable_errors", "=", "None", ",", "read_preference", "=", "ReadPreference", ".", "PRIMARY", ",", "codec_options", "=", "DEFAULT_CODEC_OPTIONS", ",", "*...
Issue a MongoDB command. Send command `command` to the database and return the response. If `command` is an instance of :class:`basestring` (:class:`str` in python 3) then the command {`command`: `value`} will be sent. Otherwise, `command` must be an instance of :class:`dict` an...
[ "Issue", "a", "MongoDB", "command", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L430-L516
train
Issue a MongoDB command to the database and return the response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._list_collections
def _list_collections(self, sock_info, slave_okay, criteria=None): """Internal listCollections helper.""" criteria = criteria or {} cmd = SON([("listCollections", 1), ("cursor", {})]) if criteria: cmd["filter"] = criteria if sock_info.max_wire_version > 2: ...
python
def _list_collections(self, sock_info, slave_okay, criteria=None): """Internal listCollections helper.""" criteria = criteria or {} cmd = SON([("listCollections", 1), ("cursor", {})]) if criteria: cmd["filter"] = criteria if sock_info.max_wire_version > 2: ...
[ "def", "_list_collections", "(", "self", ",", "sock_info", ",", "slave_okay", ",", "criteria", "=", "None", ")", ":", "criteria", "=", "criteria", "or", "{", "}", "cmd", "=", "SON", "(", "[", "(", "\"listCollections\"", ",", "1", ")", ",", "(", "\"curs...
Internal listCollections helper.
[ "Internal", "listCollections", "helper", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L518-L542
train
Internal listCollections helper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.collection_names
def collection_names(self, include_system_collections=True): """Get a list of all the collection names in this database. :Parameters: - `include_system_collections` (optional): if ``False`` list will not include system collections (e.g ``system.indexes``) """ with ...
python
def collection_names(self, include_system_collections=True): """Get a list of all the collection names in this database. :Parameters: - `include_system_collections` (optional): if ``False`` list will not include system collections (e.g ``system.indexes``) """ with ...
[ "def", "collection_names", "(", "self", ",", "include_system_collections", "=", "True", ")", ":", "with", "self", ".", "__client", ".", "_socket_for_reads", "(", "ReadPreference", ".", "PRIMARY", ")", "as", "(", "sock_info", ",", "slave_okay", ")", ":", "wire_...
Get a list of all the collection names in this database. :Parameters: - `include_system_collections` (optional): if ``False`` list will not include system collections (e.g ``system.indexes``)
[ "Get", "a", "list", "of", "all", "the", "collection", "names", "in", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L544-L569
train
Get a list of all the collection names in this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.drop_collection
def drop_collection(self, name_or_collection): """Drop a collection. :Parameters: - `name_or_collection`: the name of a collection to drop or the collection object itself .. note:: The :attr:`~pymongo.database.Database.write_concern` of this database is automat...
python
def drop_collection(self, name_or_collection): """Drop a collection. :Parameters: - `name_or_collection`: the name of a collection to drop or the collection object itself .. note:: The :attr:`~pymongo.database.Database.write_concern` of this database is automat...
[ "def", "drop_collection", "(", "self", ",", "name_or_collection", ")", ":", "name", "=", "name_or_collection", "if", "isinstance", "(", "name", ",", "Collection", ")", ":", "name", "=", "name", ".", "name", "if", "not", "isinstance", "(", "name", ",", "str...
Drop a collection. :Parameters: - `name_or_collection`: the name of a collection to drop or the collection object itself .. note:: The :attr:`~pymongo.database.Database.write_concern` of this database is automatically applied to this operation when using Mon...
[ "Drop", "a", "collection", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L571-L603
train
Drop a collection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.current_op
def current_op(self, include_all=False): """Get information on operations currently running. :Parameters: - `include_all` (optional): if ``True`` also list currently idle operations in the result """ cmd = SON([("currentOp", 1), ("$all", include_all)]) with...
python
def current_op(self, include_all=False): """Get information on operations currently running. :Parameters: - `include_all` (optional): if ``True`` also list currently idle operations in the result """ cmd = SON([("currentOp", 1), ("$all", include_all)]) with...
[ "def", "current_op", "(", "self", ",", "include_all", "=", "False", ")", ":", "cmd", "=", "SON", "(", "[", "(", "\"currentOp\"", ",", "1", ")", ",", "(", "\"$all\"", ",", "include_all", ")", "]", ")", "with", "self", ".", "__client", ".", "_socket_fo...
Get information on operations currently running. :Parameters: - `include_all` (optional): if ``True`` also list currently idle operations in the result
[ "Get", "information", "on", "operations", "currently", "running", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L660-L676
train
Get information on currently running idle operations.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.error
def error(self): """**DEPRECATED**: Get the error if one occurred on the last operation. This method is obsolete: all MongoDB write operations (insert, update, remove, and so on) use the write concern ``w=1`` and report their errors by default. .. versionchanged:: 2.8 ...
python
def error(self): """**DEPRECATED**: Get the error if one occurred on the last operation. This method is obsolete: all MongoDB write operations (insert, update, remove, and so on) use the write concern ``w=1`` and report their errors by default. .. versionchanged:: 2.8 ...
[ "def", "error", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"Database.error() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "error", "=", "self", ".", "command", "(", "\"getlasterror\"", ")", "error_msg", "=", "error...
**DEPRECATED**: Get the error if one occurred on the last operation. This method is obsolete: all MongoDB write operations (insert, update, remove, and so on) use the write concern ``w=1`` and report their errors by default. .. versionchanged:: 2.8 Deprecated.
[ "**", "DEPRECATED", "**", ":", "Get", "the", "error", "if", "one", "occurred", "on", "the", "last", "operation", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L737-L760
train
Get the error message from the last operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.previous_error
def previous_error(self): """**DEPRECATED**: Get the most recent error on this database. This method is obsolete: all MongoDB write operations (insert, update, remove, and so on) use the write concern ``w=1`` and report their errors by default. Only returns errors that have occ...
python
def previous_error(self): """**DEPRECATED**: Get the most recent error on this database. This method is obsolete: all MongoDB write operations (insert, update, remove, and so on) use the write concern ``w=1`` and report their errors by default. Only returns errors that have occ...
[ "def", "previous_error", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"previous_error() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "error", "=", "self", ".", "command", "(", "\"getpreverror\"", ")", "if", "error", ...
**DEPRECATED**: Get the most recent error on this database. This method is obsolete: all MongoDB write operations (insert, update, remove, and so on) use the write concern ``w=1`` and report their errors by default. Only returns errors that have occurred since the last call to ...
[ "**", "DEPRECATED", "**", ":", "Get", "the", "most", "recent", "error", "on", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L779-L799
train
Get the most recent error on this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._create_or_update_user
def _create_or_update_user( self, create, name, password, read_only, **kwargs): """Use a command to create (if create=True) or modify a user. """ opts = {} if read_only or (create and "roles" not in kwargs): warnings.warn("Creating a user with the read_only option...
python
def _create_or_update_user( self, create, name, password, read_only, **kwargs): """Use a command to create (if create=True) or modify a user. """ opts = {} if read_only or (create and "roles" not in kwargs): warnings.warn("Creating a user with the read_only option...
[ "def", "_create_or_update_user", "(", "self", ",", "create", ",", "name", ",", "password", ",", "read_only", ",", "*", "*", "kwargs", ")", ":", "opts", "=", "{", "}", "if", "read_only", "or", "(", "create", "and", "\"roles\"", "not", "in", "kwargs", ")...
Use a command to create (if create=True) or modify a user.
[ "Use", "a", "command", "to", "create", "(", "if", "create", "=", "True", ")", "or", "modify", "a", "user", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L840-L876
train
Use a command to create or update a user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database._legacy_add_user
def _legacy_add_user(self, name, password, read_only, **kwargs): """Uses v1 system to add users, i.e. saving to system.users. """ # Use a Collection with the default codec_options. system_users = self._collection_default_options('system.users') user = system_users.find_one({"user...
python
def _legacy_add_user(self, name, password, read_only, **kwargs): """Uses v1 system to add users, i.e. saving to system.users. """ # Use a Collection with the default codec_options. system_users = self._collection_default_options('system.users') user = system_users.find_one({"user...
[ "def", "_legacy_add_user", "(", "self", ",", "name", ",", "password", ",", "read_only", ",", "*", "*", "kwargs", ")", ":", "# Use a Collection with the default codec_options.", "system_users", "=", "self", ".", "_collection_default_options", "(", "'system.users'", ")"...
Uses v1 system to add users, i.e. saving to system.users.
[ "Uses", "v1", "system", "to", "add", "users", "i", ".", "e", ".", "saving", "to", "system", ".", "users", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L878-L906
train
Adds a user to the system. users collection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.add_user
def add_user(self, name, password=None, read_only=None, **kwargs): """Create user `name` with password `password`. Add a new user with permissions for this :class:`Database`. .. note:: Will change the password if user `name` already exists. :Parameters: - `name`: the name of...
python
def add_user(self, name, password=None, read_only=None, **kwargs): """Create user `name` with password `password`. Add a new user with permissions for this :class:`Database`. .. note:: Will change the password if user `name` already exists. :Parameters: - `name`: the name of...
[ "def", "add_user", "(", "self", ",", "name", ",", "password", "=", "None", ",", "read_only", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "isinstance", "(", "name", ",", "string_type", ")", ":", "raise", "TypeError", "(", "\"name must b...
Create user `name` with password `password`. Add a new user with permissions for this :class:`Database`. .. note:: Will change the password if user `name` already exists. :Parameters: - `name`: the name of the user to create - `password` (optional): the password of the use...
[ "Create", "user", "name", "with", "password", "password", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L908-L966
train
Create a new user with the specified password and read only permissions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.remove_user
def remove_user(self, name): """Remove user `name` from this :class:`Database`. User `name` will no longer have permissions to access this :class:`Database`. :Parameters: - `name`: the name of the user to remove """ try: cmd = SON([("dropUser", nam...
python
def remove_user(self, name): """Remove user `name` from this :class:`Database`. User `name` will no longer have permissions to access this :class:`Database`. :Parameters: - `name`: the name of the user to remove """ try: cmd = SON([("dropUser", nam...
[ "def", "remove_user", "(", "self", ",", "name", ")", ":", "try", ":", "cmd", "=", "SON", "(", "[", "(", "\"dropUser\"", ",", "name", ")", "]", ")", "# Don't send {} as writeConcern.", "if", "self", ".", "write_concern", ".", "acknowledged", "and", "self", ...
Remove user `name` from this :class:`Database`. User `name` will no longer have permissions to access this :class:`Database`. :Parameters: - `name`: the name of the user to remove
[ "Remove", "user", "name", "from", "this", ":", "class", ":", "Database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L968-L989
train
Removes a user from this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.authenticate
def authenticate(self, name=None, password=None, source=None, mechanism='DEFAULT', **kwargs): """**DEPRECATED**: Authenticate to use this database. Authentication lasts for the life of the underlying client instance, or until :meth:`logout` is called. Raises :class...
python
def authenticate(self, name=None, password=None, source=None, mechanism='DEFAULT', **kwargs): """**DEPRECATED**: Authenticate to use this database. Authentication lasts for the life of the underlying client instance, or until :meth:`logout` is called. Raises :class...
[ "def", "authenticate", "(", "self", ",", "name", "=", "None", ",", "password", "=", "None", ",", "source", "=", "None", ",", "mechanism", "=", "'DEFAULT'", ",", "*", "*", "kwargs", ")", ":", "if", "name", "is", "not", "None", "and", "not", "isinstanc...
**DEPRECATED**: Authenticate to use this database. Authentication lasts for the life of the underlying client instance, or until :meth:`logout` is called. Raises :class:`TypeError` if (required) `name`, (optional) `password`, or (optional) `source` is not an instance of :class:`basestr...
[ "**", "DEPRECATED", "**", ":", "Authenticate", "to", "use", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L991-L1077
train
Authenticate to use this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.logout
def logout(self): """**DEPRECATED**: Deauthorize use of this database.""" warnings.warn("Database.logout() is deprecated", DeprecationWarning, stacklevel=2) # Sockets will be deauthenticated as they are used. self.client._purge_credentials(self.name)
python
def logout(self): """**DEPRECATED**: Deauthorize use of this database.""" warnings.warn("Database.logout() is deprecated", DeprecationWarning, stacklevel=2) # Sockets will be deauthenticated as they are used. self.client._purge_credentials(self.name)
[ "def", "logout", "(", "self", ")", ":", "warnings", ".", "warn", "(", "\"Database.logout() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "# Sockets will be deauthenticated as they are used.", "self", ".", "client", ".", "_purge_credentia...
**DEPRECATED**: Deauthorize use of this database.
[ "**", "DEPRECATED", "**", ":", "Deauthorize", "use", "of", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L1079-L1085
train
Deauthorize use of this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
Database.eval
def eval(self, code, *args): """**DEPRECATED**: Evaluate a JavaScript expression in MongoDB. :Parameters: - `code`: string representation of JavaScript code to be evaluated - `args` (optional): additional positional arguments are passed to the `code` being ev...
python
def eval(self, code, *args): """**DEPRECATED**: Evaluate a JavaScript expression in MongoDB. :Parameters: - `code`: string representation of JavaScript code to be evaluated - `args` (optional): additional positional arguments are passed to the `code` being ev...
[ "def", "eval", "(", "self", ",", "code", ",", "*", "args", ")", ":", "warnings", ".", "warn", "(", "\"Database.eval() is deprecated\"", ",", "DeprecationWarning", ",", "stacklevel", "=", "2", ")", "if", "not", "isinstance", "(", "code", ",", "Code", ")", ...
**DEPRECATED**: Evaluate a JavaScript expression in MongoDB. :Parameters: - `code`: string representation of JavaScript code to be evaluated - `args` (optional): additional positional arguments are passed to the `code` being evaluated .. warning:: the eval c...
[ "**", "DEPRECATED", "**", ":", "Evaluate", "a", "JavaScript", "expression", "in", "MongoDB", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L1111-L1130
train
Evaluate a JavaScript expression in MongoDB.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/database.py
SystemJS.list
def list(self): """Get a list of the names of the functions stored in this database.""" return [x["_id"] for x in self._db.system.js.find(projection=["_id"])]
python
def list(self): """Get a list of the names of the functions stored in this database.""" return [x["_id"] for x in self._db.system.js.find(projection=["_id"])]
[ "def", "list", "(", "self", ")", ":", "return", "[", "x", "[", "\"_id\"", "]", "for", "x", "in", "self", ".", "_db", ".", "system", ".", "js", ".", "find", "(", "projection", "=", "[", "\"_id\"", "]", ")", "]" ]
Get a list of the names of the functions stored in this database.
[ "Get", "a", "list", "of", "the", "names", "of", "the", "functions", "stored", "in", "this", "database", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/database.py#L1181-L1183
train
Get a list of the names of the functions stored in this database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/son_manipulator.py
ObjectIdShuffler.transform_incoming
def transform_incoming(self, son, collection): """Move _id to the front if it's there. """ if not "_id" in son: return son transformed = SON({"_id": son["_id"]}) transformed.update(son) return transformed
python
def transform_incoming(self, son, collection): """Move _id to the front if it's there. """ if not "_id" in son: return son transformed = SON({"_id": son["_id"]}) transformed.update(son) return transformed
[ "def", "transform_incoming", "(", "self", ",", "son", ",", "collection", ")", ":", "if", "not", "\"_id\"", "in", "son", ":", "return", "son", "transformed", "=", "SON", "(", "{", "\"_id\"", ":", "son", "[", "\"_id\"", "]", "}", ")", "transformed", ".",...
Move _id to the front if it's there.
[ "Move", "_id", "to", "the", "front", "if", "it", "s", "there", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/son_manipulator.py#L110-L117
train
Move _id to the front if it s there.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/son_manipulator.py
AutoReference.transform_incoming
def transform_incoming(self, son, collection): """Replace embedded documents with DBRefs. """ def transform_value(value): if isinstance(value, collections.MutableMapping): if "_id" in value and "_ns" in value: return DBRef(value["_ns"], transform_...
python
def transform_incoming(self, son, collection): """Replace embedded documents with DBRefs. """ def transform_value(value): if isinstance(value, collections.MutableMapping): if "_id" in value and "_ns" in value: return DBRef(value["_ns"], transform_...
[ "def", "transform_incoming", "(", "self", ",", "son", ",", "collection", ")", ":", "def", "transform_value", "(", "value", ")", ":", "if", "isinstance", "(", "value", ",", "collections", ".", "MutableMapping", ")", ":", "if", "\"_id\"", "in", "value", "and...
Replace embedded documents with DBRefs.
[ "Replace", "embedded", "documents", "with", "DBRefs", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/son_manipulator.py#L153-L172
train
Transform incoming Son to DBRefs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
datadog_checks_dev/datadog_checks/dev/subprocess.py
run_command
def run_command(command, capture=None, check=False, encoding='utf-8', shell=False, env=None): """This function provides a convenient API wrapping subprocess.Popen. Captured output is guaranteed not to deadlock, but will still reside in memory in the end. :param command: The command to run in a subprocess. ...
python
def run_command(command, capture=None, check=False, encoding='utf-8', shell=False, env=None): """This function provides a convenient API wrapping subprocess.Popen. Captured output is guaranteed not to deadlock, but will still reside in memory in the end. :param command: The command to run in a subprocess. ...
[ "def", "run_command", "(", "command", ",", "capture", "=", "None", ",", "check", "=", "False", ",", "encoding", "=", "'utf-8'", ",", "shell", "=", "False", ",", "env", "=", "None", ")", ":", "if", "shell", "==", "'detect'", ":", "shell", "=", "NEED_S...
This function provides a convenient API wrapping subprocess.Popen. Captured output is guaranteed not to deadlock, but will still reside in memory in the end. :param command: The command to run in a subprocess. :type command: ``str`` or ``list`` of ``str`` :param capture: The method of output capture: ...
[ "This", "function", "provides", "a", "convenient", "API", "wrapping", "subprocess", ".", "Popen", ".", "Captured", "output", "is", "guaranteed", "not", "to", "deadlock", "but", "will", "still", "reside", "in", "memory", "in", "the", "end", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/datadog_checks_dev/datadog_checks/dev/subprocess.py#L19-L81
train
Runs a command in a specific way.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py
HDFSNameNode._hdfs_namenode_metrics
def _hdfs_namenode_metrics(self, beans, metrics, tags): """ Get HDFS namenode metrics from JMX """ bean = next(iter(beans)) bean_name = bean.get('name') if bean_name != bean_name: raise Exception("Unexpected bean name {}".format(bean_name)) for metri...
python
def _hdfs_namenode_metrics(self, beans, metrics, tags): """ Get HDFS namenode metrics from JMX """ bean = next(iter(beans)) bean_name = bean.get('name') if bean_name != bean_name: raise Exception("Unexpected bean name {}".format(bean_name)) for metri...
[ "def", "_hdfs_namenode_metrics", "(", "self", ",", "beans", ",", "metrics", ",", "tags", ")", ":", "bean", "=", "next", "(", "iter", "(", "beans", ")", ")", "bean_name", "=", "bean", ".", "get", "(", "'name'", ")", "if", "bean_name", "!=", "bean_name",...
Get HDFS namenode metrics from JMX
[ "Get", "HDFS", "namenode", "metrics", "from", "JMX" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py#L107-L129
train
Get HDFS namenode metrics from JMX bean
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py
HDFSNameNode._set_metric
def _set_metric(self, metric_name, metric_type, value, tags=None): """ Set a metric """ if metric_type == self.GAUGE: self.gauge(metric_name, value, tags=tags) else: self.log.error('Metric type "{}" unknown'.format(metric_type))
python
def _set_metric(self, metric_name, metric_type, value, tags=None): """ Set a metric """ if metric_type == self.GAUGE: self.gauge(metric_name, value, tags=tags) else: self.log.error('Metric type "{}" unknown'.format(metric_type))
[ "def", "_set_metric", "(", "self", ",", "metric_name", ",", "metric_type", ",", "value", ",", "tags", "=", "None", ")", ":", "if", "metric_type", "==", "self", ".", "GAUGE", ":", "self", ".", "gauge", "(", "metric_name", ",", "value", ",", "tags", "=",...
Set a metric
[ "Set", "a", "metric" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py#L131-L138
train
Set a metric in the cache.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py
HDFSNameNode._rest_request_to_json
def _rest_request_to_json(self, instance, url, object_path, query_params, tags=None): """ Query the given URL and return the JSON response """ if object_path: url = self._join_url_dir(url, object_path) # Add query_params as arguments if query_params: ...
python
def _rest_request_to_json(self, instance, url, object_path, query_params, tags=None): """ Query the given URL and return the JSON response """ if object_path: url = self._join_url_dir(url, object_path) # Add query_params as arguments if query_params: ...
[ "def", "_rest_request_to_json", "(", "self", ",", "instance", ",", "url", ",", "object_path", ",", "query_params", ",", "tags", "=", "None", ")", ":", "if", "object_path", ":", "url", "=", "self", ".", "_join_url_dir", "(", "url", ",", "object_path", ")", ...
Query the given URL and return the JSON response
[ "Query", "the", "given", "URL", "and", "return", "the", "JSON", "response" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py#L140-L218
train
Perform a REST request to the given URL and return the JSON response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py
HDFSNameNode._join_url_dir
def _join_url_dir(cls, url, *args): """ Join a URL with multiple directories """ for path in args: url = url.rstrip('/') + '/' url = urljoin(url, path.lstrip('/')) return url
python
def _join_url_dir(cls, url, *args): """ Join a URL with multiple directories """ for path in args: url = url.rstrip('/') + '/' url = urljoin(url, path.lstrip('/')) return url
[ "def", "_join_url_dir", "(", "cls", ",", "url", ",", "*", "args", ")", ":", "for", "path", "in", "args", ":", "url", "=", "url", ".", "rstrip", "(", "'/'", ")", "+", "'/'", "url", "=", "urljoin", "(", "url", ",", "path", ".", "lstrip", "(", "'/...
Join a URL with multiple directories
[ "Join", "a", "URL", "with", "multiple", "directories" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/hdfs_namenode/datadog_checks/hdfs_namenode/hdfs_namenode.py#L221-L230
train
Join a URL with multiple directories
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_maybe_add_read_preference
def _maybe_add_read_preference(spec, read_preference): """Add $readPreference to spec when appropriate.""" mode = read_preference.mode tag_sets = read_preference.tag_sets max_staleness = read_preference.max_staleness # Only add $readPreference if it's something other than primary to avoid # prob...
python
def _maybe_add_read_preference(spec, read_preference): """Add $readPreference to spec when appropriate.""" mode = read_preference.mode tag_sets = read_preference.tag_sets max_staleness = read_preference.max_staleness # Only add $readPreference if it's something other than primary to avoid # prob...
[ "def", "_maybe_add_read_preference", "(", "spec", ",", "read_preference", ")", ":", "mode", "=", "read_preference", ".", "mode", "tag_sets", "=", "read_preference", ".", "tag_sets", "max_staleness", "=", "read_preference", ".", "max_staleness", "# Only add $readPreferen...
Add $readPreference to spec when appropriate.
[ "Add", "$readPreference", "to", "spec", "when", "appropriate", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L72-L90
train
Add readPreference to spec when appropriate.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_convert_write_result
def _convert_write_result(operation, command, result): """Convert a legacy write result to write commmand format.""" # Based on _merge_legacy from bulk.py affected = result.get("n", 0) res = {"ok": 1, "n": affected} errmsg = result.get("errmsg", result.get("err", "")) if errmsg: # The w...
python
def _convert_write_result(operation, command, result): """Convert a legacy write result to write commmand format.""" # Based on _merge_legacy from bulk.py affected = result.get("n", 0) res = {"ok": 1, "n": affected} errmsg = result.get("errmsg", result.get("err", "")) if errmsg: # The w...
[ "def", "_convert_write_result", "(", "operation", ",", "command", ",", "result", ")", ":", "# Based on _merge_legacy from bulk.py", "affected", "=", "result", ".", "get", "(", "\"n\"", ",", "0", ")", "res", "=", "{", "\"ok\"", ":", "1", ",", "\"n\"", ":", ...
Convert a legacy write result to write commmand format.
[ "Convert", "a", "legacy", "write", "result", "to", "write", "commmand", "format", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L99-L135
train
Convert a legacy write result to write commmand format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_gen_explain_command
def _gen_explain_command( coll, spec, projection, skip, limit, batch_size, options, read_concern): """Generate an explain command document.""" cmd = _gen_find_command( coll, spec, projection, skip, limit, batch_size, options) if read_concern.level: return SON([('explain', cmd...
python
def _gen_explain_command( coll, spec, projection, skip, limit, batch_size, options, read_concern): """Generate an explain command document.""" cmd = _gen_find_command( coll, spec, projection, skip, limit, batch_size, options) if read_concern.level: return SON([('explain', cmd...
[ "def", "_gen_explain_command", "(", "coll", ",", "spec", ",", "projection", ",", "skip", ",", "limit", ",", "batch_size", ",", "options", ",", "read_concern", ")", ":", "cmd", "=", "_gen_find_command", "(", "coll", ",", "spec", ",", "projection", ",", "ski...
Generate an explain command document.
[ "Generate", "an", "explain", "command", "document", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L161-L169
train
Generate an explain command document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_gen_find_command
def _gen_find_command(coll, spec, projection, skip, limit, batch_size, options, read_concern=DEFAULT_READ_CONCERN, collation=None): """Generate a find command document.""" cmd = SON([('find', coll)]) if '$query' in spec: cmd.update([(_MODIFIERS[key], val) ...
python
def _gen_find_command(coll, spec, projection, skip, limit, batch_size, options, read_concern=DEFAULT_READ_CONCERN, collation=None): """Generate a find command document.""" cmd = SON([('find', coll)]) if '$query' in spec: cmd.update([(_MODIFIERS[key], val) ...
[ "def", "_gen_find_command", "(", "coll", ",", "spec", ",", "projection", ",", "skip", ",", "limit", ",", "batch_size", ",", "options", ",", "read_concern", "=", "DEFAULT_READ_CONCERN", ",", "collation", "=", "None", ")", ":", "cmd", "=", "SON", "(", "[", ...
Generate a find command document.
[ "Generate", "a", "find", "command", "document", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L172-L206
train
Generate a find command document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_gen_get_more_command
def _gen_get_more_command(cursor_id, coll, batch_size, max_await_time_ms): """Generate a getMore command document.""" cmd = SON([('getMore', cursor_id), ('collection', coll)]) if batch_size: cmd['batchSize'] = batch_size if max_await_time_ms is not None: cmd['maxTimeMS'] =...
python
def _gen_get_more_command(cursor_id, coll, batch_size, max_await_time_ms): """Generate a getMore command document.""" cmd = SON([('getMore', cursor_id), ('collection', coll)]) if batch_size: cmd['batchSize'] = batch_size if max_await_time_ms is not None: cmd['maxTimeMS'] =...
[ "def", "_gen_get_more_command", "(", "cursor_id", ",", "coll", ",", "batch_size", ",", "max_await_time_ms", ")", ":", "cmd", "=", "SON", "(", "[", "(", "'getMore'", ",", "cursor_id", ")", ",", "(", "'collection'", ",", "coll", ")", "]", ")", "if", "batch...
Generate a getMore command document.
[ "Generate", "a", "getMore", "command", "document", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L209-L217
train
Generate a getMore command document.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
__last_error
def __last_error(namespace, args): """Data to send to do a lastError. """ cmd = SON([("getlasterror", 1)]) cmd.update(args) splitns = namespace.split('.', 1) return query(0, splitns[0] + '.$cmd', 0, -1, cmd, None, DEFAULT_CODEC_OPTIONS)
python
def __last_error(namespace, args): """Data to send to do a lastError. """ cmd = SON([("getlasterror", 1)]) cmd.update(args) splitns = namespace.split('.', 1) return query(0, splitns[0] + '.$cmd', 0, -1, cmd, None, DEFAULT_CODEC_OPTIONS)
[ "def", "__last_error", "(", "namespace", ",", "args", ")", ":", "cmd", "=", "SON", "(", "[", "(", "\"getlasterror\"", ",", "1", ")", "]", ")", "cmd", ".", "update", "(", "args", ")", "splitns", "=", "namespace", ".", "split", "(", "'.'", ",", "1", ...
Data to send to do a lastError.
[ "Data", "to", "send", "to", "do", "a", "lastError", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L359-L366
train
Get the last error from the last error in a namespace
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
__pack_message
def __pack_message(operation, data): """Takes message data and adds a message header based on the operation. Returns the resultant message string. """ request_id = _randint() message = struct.pack("<i", 16 + len(data)) message += struct.pack("<i", request_id) message += _ZERO_32 # response...
python
def __pack_message(operation, data): """Takes message data and adds a message header based on the operation. Returns the resultant message string. """ request_id = _randint() message = struct.pack("<i", 16 + len(data)) message += struct.pack("<i", request_id) message += _ZERO_32 # response...
[ "def", "__pack_message", "(", "operation", ",", "data", ")", ":", "request_id", "=", "_randint", "(", ")", "message", "=", "struct", ".", "pack", "(", "\"<i\"", ",", "16", "+", "len", "(", "data", ")", ")", "message", "+=", "struct", ".", "pack", "("...
Takes message data and adds a message header based on the operation. Returns the resultant message string.
[ "Takes", "message", "data", "and", "adds", "a", "message", "header", "based", "on", "the", "operation", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L369-L379
train
Takes message data and adds a message header based on the operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
insert
def insert(collection_name, docs, check_keys, safe, last_error_args, continue_on_error, opts): """Get an **insert** message.""" options = 0 if continue_on_error: options += 1 data = struct.pack("<i", options) data += bson._make_c_string(collection_name) encoded = [bson.BSON.en...
python
def insert(collection_name, docs, check_keys, safe, last_error_args, continue_on_error, opts): """Get an **insert** message.""" options = 0 if continue_on_error: options += 1 data = struct.pack("<i", options) data += bson._make_c_string(collection_name) encoded = [bson.BSON.en...
[ "def", "insert", "(", "collection_name", ",", "docs", ",", "check_keys", ",", "safe", ",", "last_error_args", ",", "continue_on_error", ",", "opts", ")", ":", "options", "=", "0", "if", "continue_on_error", ":", "options", "+=", "1", "data", "=", "struct", ...
Get an **insert** message.
[ "Get", "an", "**", "insert", "**", "message", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L382-L402
train
Get an insert message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
update
def update(collection_name, upsert, multi, spec, doc, safe, last_error_args, check_keys, opts): """Get an **update** message. """ options = 0 if upsert: options += 1 if multi: options += 2 data = _ZERO_32 data += bson._make_c_string(collection_name) data += st...
python
def update(collection_name, upsert, multi, spec, doc, safe, last_error_args, check_keys, opts): """Get an **update** message. """ options = 0 if upsert: options += 1 if multi: options += 2 data = _ZERO_32 data += bson._make_c_string(collection_name) data += st...
[ "def", "update", "(", "collection_name", ",", "upsert", ",", "multi", ",", "spec", ",", "doc", ",", "safe", ",", "last_error_args", ",", "check_keys", ",", "opts", ")", ":", "options", "=", "0", "if", "upsert", ":", "options", "+=", "1", "if", "multi",...
Get an **update** message.
[ "Get", "an", "**", "update", "**", "message", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L407-L430
train
Get an update message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
query
def query(options, collection_name, num_to_skip, num_to_return, query, field_selector, opts, check_keys=False): """Get a **query** message. """ data = struct.pack("<I", options) data += bson._make_c_string(collection_name) data += struct.pack("<i", num_to_skip) data += struct.pack("<i"...
python
def query(options, collection_name, num_to_skip, num_to_return, query, field_selector, opts, check_keys=False): """Get a **query** message. """ data = struct.pack("<I", options) data += bson._make_c_string(collection_name) data += struct.pack("<i", num_to_skip) data += struct.pack("<i"...
[ "def", "query", "(", "options", ",", "collection_name", ",", "num_to_skip", ",", "num_to_return", ",", "query", ",", "field_selector", ",", "opts", ",", "check_keys", "=", "False", ")", ":", "data", "=", "struct", ".", "pack", "(", "\"<I\"", ",", "options"...
Get a **query** message.
[ "Get", "a", "**", "query", "**", "message", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L435-L451
train
Get a **query** message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
delete
def delete(collection_name, spec, safe, last_error_args, opts, flags=0): """Get a **delete** message. `opts` is a CodecOptions. `flags` is a bit vector that may contain the SingleRemove flag or not: http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-delete """ ...
python
def delete(collection_name, spec, safe, last_error_args, opts, flags=0): """Get a **delete** message. `opts` is a CodecOptions. `flags` is a bit vector that may contain the SingleRemove flag or not: http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-delete """ ...
[ "def", "delete", "(", "collection_name", ",", "spec", ",", "safe", ",", "last_error_args", ",", "opts", ",", "flags", "=", "0", ")", ":", "data", "=", "_ZERO_32", "data", "+=", "bson", ".", "_make_c_string", "(", "collection_name", ")", "data", "+=", "st...
Get a **delete** message. `opts` is a CodecOptions. `flags` is a bit vector that may contain the SingleRemove flag or not: http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-delete
[ "Get", "a", "**", "delete", "**", "message", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L468-L489
train
Get a **delete** message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
kill_cursors
def kill_cursors(cursor_ids): """Get a **killCursors** message. """ data = _ZERO_32 data += struct.pack("<i", len(cursor_ids)) for cursor_id in cursor_ids: data += struct.pack("<q", cursor_id) return __pack_message(2007, data)
python
def kill_cursors(cursor_ids): """Get a **killCursors** message. """ data = _ZERO_32 data += struct.pack("<i", len(cursor_ids)) for cursor_id in cursor_ids: data += struct.pack("<q", cursor_id) return __pack_message(2007, data)
[ "def", "kill_cursors", "(", "cursor_ids", ")", ":", "data", "=", "_ZERO_32", "data", "+=", "struct", ".", "pack", "(", "\"<i\"", ",", "len", "(", "cursor_ids", ")", ")", "for", "cursor_id", "in", "cursor_ids", ":", "data", "+=", "struct", ".", "pack", ...
Get a **killCursors** message.
[ "Get", "a", "**", "killCursors", "**", "message", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L492-L499
train
Get a ** killCursors** message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_do_batched_write_command
def _do_batched_write_command(namespace, operation, command, docs, check_keys, opts, ctx): """Execute a batch of insert, update, or delete commands. """ max_bson_size = ctx.max_bson_size max_write_batch_size = ctx.max_write_batch_size # Max BSON object size + 16k - 2 by...
python
def _do_batched_write_command(namespace, operation, command, docs, check_keys, opts, ctx): """Execute a batch of insert, update, or delete commands. """ max_bson_size = ctx.max_bson_size max_write_batch_size = ctx.max_write_batch_size # Max BSON object size + 16k - 2 by...
[ "def", "_do_batched_write_command", "(", "namespace", ",", "operation", ",", "command", ",", "docs", ",", "check_keys", ",", "opts", ",", "ctx", ")", ":", "max_bson_size", "=", "ctx", ".", "max_bson_size", "max_write_batch_size", "=", "ctx", ".", "max_write_batc...
Execute a batch of insert, update, or delete commands.
[ "Execute", "a", "batch", "of", "insert", "update", "or", "delete", "commands", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L706-L814
train
Execute a batch of insert update or delete commands.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_Query.as_command
def as_command(self): """Return a find command document for this query. Should be called *after* get_message. """ if '$explain' in self.spec: self.name = 'explain' return _gen_explain_command( self.coll, self.spec, self.fields, self.ntoskip, ...
python
def as_command(self): """Return a find command document for this query. Should be called *after* get_message. """ if '$explain' in self.spec: self.name = 'explain' return _gen_explain_command( self.coll, self.spec, self.fields, self.ntoskip, ...
[ "def", "as_command", "(", "self", ")", ":", "if", "'$explain'", "in", "self", ".", "spec", ":", "self", ".", "name", "=", "'explain'", "return", "_gen_explain_command", "(", "self", ".", "coll", ",", "self", ".", "spec", ",", "self", ".", "fields", ","...
Return a find command document for this query. Should be called *after* get_message.
[ "Return", "a", "find", "command", "document", "for", "this", "query", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L244-L258
train
Return a command document for this query.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_Query.get_message
def get_message(self, set_slave_ok, is_mongos, use_cmd=False): """Get a query message, possibly setting the slaveOk bit.""" if set_slave_ok: # Set the slaveOk bit. flags = self.flags | 4 else: flags = self.flags ns = _UJOIN % (self.db, self.coll) ...
python
def get_message(self, set_slave_ok, is_mongos, use_cmd=False): """Get a query message, possibly setting the slaveOk bit.""" if set_slave_ok: # Set the slaveOk bit. flags = self.flags | 4 else: flags = self.flags ns = _UJOIN % (self.db, self.coll) ...
[ "def", "get_message", "(", "self", ",", "set_slave_ok", ",", "is_mongos", ",", "use_cmd", "=", "False", ")", ":", "if", "set_slave_ok", ":", "# Set the slaveOk bit.", "flags", "=", "self", ".", "flags", "|", "4", "else", ":", "flags", "=", "self", ".", "...
Get a query message, possibly setting the slaveOk bit.
[ "Get", "a", "query", "message", "possibly", "setting", "the", "slaveOk", "bit", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L260-L291
train
Get a message from the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_GetMore.as_command
def as_command(self): """Return a getMore command document for this query.""" return _gen_get_more_command(self.cursor_id, self.coll, self.ntoreturn, self.max_await_time_ms), self.db
python
def as_command(self): """Return a getMore command document for this query.""" return _gen_get_more_command(self.cursor_id, self.coll, self.ntoreturn, self.max_await_time_ms), self.db
[ "def", "as_command", "(", "self", ")", ":", "return", "_gen_get_more_command", "(", "self", ".", "cursor_id", ",", "self", ".", "coll", ",", "self", ".", "ntoreturn", ",", "self", ".", "max_await_time_ms", ")", ",", "self", ".", "db" ]
Return a getMore command document for this query.
[ "Return", "a", "getMore", "command", "document", "for", "this", "query", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L311-L315
train
Return a getMore command document for this query.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_GetMore.get_message
def get_message(self, dummy0, dummy1, use_cmd=False): """Get a getmore message.""" ns = _UJOIN % (self.db, self.coll) if use_cmd: ns = _UJOIN % (self.db, "$cmd") spec = self.as_command()[0] return query(0, ns, 0, -1, spec, None, self.codec_options) ...
python
def get_message(self, dummy0, dummy1, use_cmd=False): """Get a getmore message.""" ns = _UJOIN % (self.db, self.coll) if use_cmd: ns = _UJOIN % (self.db, "$cmd") spec = self.as_command()[0] return query(0, ns, 0, -1, spec, None, self.codec_options) ...
[ "def", "get_message", "(", "self", ",", "dummy0", ",", "dummy1", ",", "use_cmd", "=", "False", ")", ":", "ns", "=", "_UJOIN", "%", "(", "self", ".", "db", ",", "self", ".", "coll", ")", "if", "use_cmd", ":", "ns", "=", "_UJOIN", "%", "(", "self",...
Get a getmore message.
[ "Get", "a", "getmore", "message", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L317-L328
train
Get a getmore message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_BulkWriteContext.legacy_write
def legacy_write(self, request_id, msg, max_doc_size, acknowledged, docs): """A proxy for SocketInfo.legacy_write that handles event publishing. """ if self.publish: duration = datetime.datetime.now() - self.start_time cmd = self._start(request_id, docs) start...
python
def legacy_write(self, request_id, msg, max_doc_size, acknowledged, docs): """A proxy for SocketInfo.legacy_write that handles event publishing. """ if self.publish: duration = datetime.datetime.now() - self.start_time cmd = self._start(request_id, docs) start...
[ "def", "legacy_write", "(", "self", ",", "request_id", ",", "msg", ",", "max_doc_size", ",", "acknowledged", ",", "docs", ")", ":", "if", "self", ".", "publish", ":", "duration", "=", "datetime", ".", "datetime", ".", "now", "(", ")", "-", "self", ".",...
A proxy for SocketInfo.legacy_write that handles event publishing.
[ "A", "proxy", "for", "SocketInfo", ".", "legacy_write", "that", "handles", "event", "publishing", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L542-L571
train
A proxy for SocketInfo. legacy_write that handles event publishing.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_BulkWriteContext.write_command
def write_command(self, request_id, msg, docs): """A proxy for SocketInfo.write_command that handles event publishing. """ if self.publish: duration = datetime.datetime.now() - self.start_time self._start(request_id, docs) start = datetime.datetime.now() ...
python
def write_command(self, request_id, msg, docs): """A proxy for SocketInfo.write_command that handles event publishing. """ if self.publish: duration = datetime.datetime.now() - self.start_time self._start(request_id, docs) start = datetime.datetime.now() ...
[ "def", "write_command", "(", "self", ",", "request_id", ",", "msg", ",", "docs", ")", ":", "if", "self", ".", "publish", ":", "duration", "=", "datetime", ".", "datetime", ".", "now", "(", ")", "-", "self", ".", "start_time", "self", ".", "_start", "...
A proxy for SocketInfo.write_command that handles event publishing.
[ "A", "proxy", "for", "SocketInfo", ".", "write_command", "that", "handles", "event", "publishing", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L573-L592
train
A proxy for SocketInfo. write_command that handles event publishing.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_BulkWriteContext._start
def _start(self, request_id, docs): """Publish a CommandStartedEvent.""" cmd = self.command.copy() cmd[self.field] = docs self.listeners.publish_command_start( cmd, self.db_name, request_id, self.sock_info.address, self.op_id) return cmd
python
def _start(self, request_id, docs): """Publish a CommandStartedEvent.""" cmd = self.command.copy() cmd[self.field] = docs self.listeners.publish_command_start( cmd, self.db_name, request_id, self.sock_info.address, self.op_id) return cmd
[ "def", "_start", "(", "self", ",", "request_id", ",", "docs", ")", ":", "cmd", "=", "self", ".", "command", ".", "copy", "(", ")", "cmd", "[", "self", ".", "field", "]", "=", "docs", "self", ".", "listeners", ".", "publish_command_start", "(", "cmd",...
Publish a CommandStartedEvent.
[ "Publish", "a", "CommandStartedEvent", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L594-L601
train
Publish a CommandStartedEvent.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_BulkWriteContext._succeed
def _succeed(self, request_id, reply, duration): """Publish a CommandSucceededEvent.""" self.listeners.publish_command_success( duration, reply, self.name, request_id, self.sock_info.address, self.op_id)
python
def _succeed(self, request_id, reply, duration): """Publish a CommandSucceededEvent.""" self.listeners.publish_command_success( duration, reply, self.name, request_id, self.sock_info.address, self.op_id)
[ "def", "_succeed", "(", "self", ",", "request_id", ",", "reply", ",", "duration", ")", ":", "self", ".", "listeners", ".", "publish_command_success", "(", "duration", ",", "reply", ",", "self", ".", "name", ",", "request_id", ",", "self", ".", "sock_info",...
Publish a CommandSucceededEvent.
[ "Publish", "a", "CommandSucceededEvent", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L603-L607
train
Publish a CommandSucceededEvent.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/message.py
_BulkWriteContext._fail
def _fail(self, request_id, failure, duration): """Publish a CommandFailedEvent.""" self.listeners.publish_command_failure( duration, failure, self.name, request_id, self.sock_info.address, self.op_id)
python
def _fail(self, request_id, failure, duration): """Publish a CommandFailedEvent.""" self.listeners.publish_command_failure( duration, failure, self.name, request_id, self.sock_info.address, self.op_id)
[ "def", "_fail", "(", "self", ",", "request_id", ",", "failure", ",", "duration", ")", ":", "self", ".", "listeners", ".", "publish_command_failure", "(", "duration", ",", "failure", ",", "self", ".", "name", ",", "request_id", ",", "self", ".", "sock_info"...
Publish a CommandFailedEvent.
[ "Publish", "a", "CommandFailedEvent", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/message.py#L609-L613
train
Publish a CommandFailedEvent.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/objectid.py
_machine_bytes
def _machine_bytes(): """Get the machine portion of an ObjectId. """ machine_hash = hashlib.md5() if PY3: # gethostname() returns a unicode string in python 3.x # while update() requires a byte string. machine_hash.update(socket.gethostname().encode()) else: # Calling...
python
def _machine_bytes(): """Get the machine portion of an ObjectId. """ machine_hash = hashlib.md5() if PY3: # gethostname() returns a unicode string in python 3.x # while update() requires a byte string. machine_hash.update(socket.gethostname().encode()) else: # Calling...
[ "def", "_machine_bytes", "(", ")", ":", "machine_hash", "=", "hashlib", ".", "md5", "(", ")", "if", "PY3", ":", "# gethostname() returns a unicode string in python 3.x", "# while update() requires a byte string.", "machine_hash", ".", "update", "(", "socket", ".", "geth...
Get the machine portion of an ObjectId.
[ "Get", "the", "machine", "portion", "of", "an", "ObjectId", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/objectid.py#L35-L46
train
Get the machine portion of an ObjectId.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/objectid.py
ObjectId.from_datetime
def from_datetime(cls, generation_time): """Create a dummy ObjectId instance with a specific generation time. This method is useful for doing range queries on a field containing :class:`ObjectId` instances. .. warning:: It is not safe to insert a document containing an Objec...
python
def from_datetime(cls, generation_time): """Create a dummy ObjectId instance with a specific generation time. This method is useful for doing range queries on a field containing :class:`ObjectId` instances. .. warning:: It is not safe to insert a document containing an Objec...
[ "def", "from_datetime", "(", "cls", ",", "generation_time", ")", ":", "if", "generation_time", ".", "utcoffset", "(", ")", "is", "not", "None", ":", "generation_time", "=", "generation_time", "-", "generation_time", ".", "utcoffset", "(", ")", "timestamp", "="...
Create a dummy ObjectId instance with a specific generation time. This method is useful for doing range queries on a field containing :class:`ObjectId` instances. .. warning:: It is not safe to insert a document containing an ObjectId generated using this method. This met...
[ "Create", "a", "dummy", "ObjectId", "instance", "with", "a", "specific", "generation", "time", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/objectid.py#L113-L145
train
Create a dummy ObjectId instance with a specific generation time.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/objectid.py
ObjectId.is_valid
def is_valid(cls, oid): """Checks if a `oid` string is valid or not. :Parameters: - `oid`: the object id to validate .. versionadded:: 2.3 """ if not oid: return False try: ObjectId(oid) return True except (InvalidI...
python
def is_valid(cls, oid): """Checks if a `oid` string is valid or not. :Parameters: - `oid`: the object id to validate .. versionadded:: 2.3 """ if not oid: return False try: ObjectId(oid) return True except (InvalidI...
[ "def", "is_valid", "(", "cls", ",", "oid", ")", ":", "if", "not", "oid", ":", "return", "False", "try", ":", "ObjectId", "(", "oid", ")", "return", "True", "except", "(", "InvalidId", ",", "TypeError", ")", ":", "return", "False" ]
Checks if a `oid` string is valid or not. :Parameters: - `oid`: the object id to validate .. versionadded:: 2.3
[ "Checks", "if", "a", "oid", "string", "is", "valid", "or", "not", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/objectid.py#L148-L163
train
Checks if a oid string is valid or not.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/objectid.py
ObjectId.__generate
def __generate(self): """Generate a new value for this ObjectId. """ # 4 bytes current time oid = struct.pack(">i", int(time.time())) # 3 bytes machine oid += ObjectId._machine_bytes # 2 bytes pid oid += struct.pack(">H", os.getpid() % 0xFFFF) ...
python
def __generate(self): """Generate a new value for this ObjectId. """ # 4 bytes current time oid = struct.pack(">i", int(time.time())) # 3 bytes machine oid += ObjectId._machine_bytes # 2 bytes pid oid += struct.pack(">H", os.getpid() % 0xFFFF) ...
[ "def", "__generate", "(", "self", ")", ":", "# 4 bytes current time", "oid", "=", "struct", ".", "pack", "(", "\">i\"", ",", "int", "(", "time", ".", "time", "(", ")", ")", ")", "# 3 bytes machine", "oid", "+=", "ObjectId", ".", "_machine_bytes", "# 2 byte...
Generate a new value for this ObjectId.
[ "Generate", "a", "new", "value", "for", "this", "ObjectId", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/objectid.py#L165-L183
train
Generate a new value for this ObjectId.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/objectid.py
ObjectId.__validate
def __validate(self, oid): """Validate and use the given id for this ObjectId. Raises TypeError if id is not an instance of (:class:`basestring` (:class:`str` or :class:`bytes` in python 3), ObjectId) and InvalidId if it is not a valid ObjectId. :Parameters: -...
python
def __validate(self, oid): """Validate and use the given id for this ObjectId. Raises TypeError if id is not an instance of (:class:`basestring` (:class:`str` or :class:`bytes` in python 3), ObjectId) and InvalidId if it is not a valid ObjectId. :Parameters: -...
[ "def", "__validate", "(", "self", ",", "oid", ")", ":", "if", "isinstance", "(", "oid", ",", "ObjectId", ")", ":", "self", ".", "__id", "=", "oid", ".", "binary", "# bytes or unicode in python 2, str in python 3", "elif", "isinstance", "(", "oid", ",", "stri...
Validate and use the given id for this ObjectId. Raises TypeError if id is not an instance of (:class:`basestring` (:class:`str` or :class:`bytes` in python 3), ObjectId) and InvalidId if it is not a valid ObjectId. :Parameters: - `oid`: a valid ObjectId
[ "Validate", "and", "use", "the", "given", "id", "for", "this", "ObjectId", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/objectid.py#L185-L209
train
Validate and use the given id for this ObjectId.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._get_master_address
def _get_master_address(self, instance): """ Get the master address from the instance configuration """ master_address = instance.get(MASTER_ADDRESS) if master_address is None: master_address = instance.get(DEPRECATED_MASTER_ADDRESS) if master_address: ...
python
def _get_master_address(self, instance): """ Get the master address from the instance configuration """ master_address = instance.get(MASTER_ADDRESS) if master_address is None: master_address = instance.get(DEPRECATED_MASTER_ADDRESS) if master_address: ...
[ "def", "_get_master_address", "(", "self", ",", "instance", ")", ":", "master_address", "=", "instance", ".", "get", "(", "MASTER_ADDRESS", ")", "if", "master_address", "is", "None", ":", "master_address", "=", "instance", ".", "get", "(", "DEPRECATED_MASTER_ADD...
Get the master address from the instance configuration
[ "Get", "the", "master", "address", "from", "the", "instance", "configuration" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L232-L249
train
Get the master address from the instance configuration
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._get_request_url
def _get_request_url(self, instance, url): """ Get the request address, build with proxy if necessary """ parsed = urlparse(url) _url = url if not (parsed.netloc and parsed.scheme) and is_affirmative(instance.get('spark_proxy_enabled', False)): master_address...
python
def _get_request_url(self, instance, url): """ Get the request address, build with proxy if necessary """ parsed = urlparse(url) _url = url if not (parsed.netloc and parsed.scheme) and is_affirmative(instance.get('spark_proxy_enabled', False)): master_address...
[ "def", "_get_request_url", "(", "self", ",", "instance", ",", "url", ")", ":", "parsed", "=", "urlparse", "(", "url", ")", "_url", "=", "url", "if", "not", "(", "parsed", ".", "netloc", "and", "parsed", ".", "scheme", ")", "and", "is_affirmative", "(",...
Get the request address, build with proxy if necessary
[ "Get", "the", "request", "address", "build", "with", "proxy", "if", "necessary" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L251-L263
train
Get the request address build with proxy if necessary
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._get_running_apps
def _get_running_apps(self, instance, requests_config): """ Determine what mode was specified """ tags = instance.get('tags', []) if tags is None: tags = [] master_address = self._get_master_address(instance) # Get the cluster name from the instance co...
python
def _get_running_apps(self, instance, requests_config): """ Determine what mode was specified """ tags = instance.get('tags', []) if tags is None: tags = [] master_address = self._get_master_address(instance) # Get the cluster name from the instance co...
[ "def", "_get_running_apps", "(", "self", ",", "instance", ",", "requests_config", ")", ":", "tags", "=", "instance", ".", "get", "(", "'tags'", ",", "[", "]", ")", "if", "tags", "is", "None", ":", "tags", "=", "[", "]", "master_address", "=", "self", ...
Determine what mode was specified
[ "Determine", "what", "mode", "was", "specified" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L265-L302
train
Get the running apps from the instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._standalone_init
def _standalone_init(self, spark_master_address, pre_20_mode, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for the running Spark applications """ metrics_json = self._rest_request_to_json( spark_master_address, SPARK_MASTER_STATE_PATH,...
python
def _standalone_init(self, spark_master_address, pre_20_mode, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for the running Spark applications """ metrics_json = self._rest_request_to_json( spark_master_address, SPARK_MASTER_STATE_PATH,...
[ "def", "_standalone_init", "(", "self", ",", "spark_master_address", ",", "pre_20_mode", ",", "requests_config", ",", "tags", ")", ":", "metrics_json", "=", "self", ".", "_rest_request_to_json", "(", "spark_master_address", ",", "SPARK_MASTER_STATE_PATH", ",", "SPARK_...
Return a dictionary of {app_id: (app_name, tracking_url)} for the running Spark applications
[ "Return", "a", "dictionary", "of", "{", "app_id", ":", "(", "app_name", "tracking_url", ")", "}", "for", "the", "running", "Spark", "applications" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L304-L348
train
Initialize the standalone application list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._mesos_init
def _mesos_init(self, instance, master_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. """ running_apps = {} metrics_json = self._rest_request_to_json( master_address, MESOS_MASTER_APP_PAT...
python
def _mesos_init(self, instance, master_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. """ running_apps = {} metrics_json = self._rest_request_to_json( master_address, MESOS_MASTER_APP_PAT...
[ "def", "_mesos_init", "(", "self", ",", "instance", ",", "master_address", ",", "requests_config", ",", "tags", ")", ":", "running_apps", "=", "{", "}", "metrics_json", "=", "self", ".", "_rest_request_to_json", "(", "master_address", ",", "MESOS_MASTER_APP_PATH",...
Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications.
[ "Return", "a", "dictionary", "of", "{", "app_id", ":", "(", "app_name", "tracking_url", ")", "}", "for", "running", "Spark", "applications", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L350-L385
train
Initialize Spark applications.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._yarn_init
def _yarn_init(self, rm_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. """ running_apps = self._yarn_get_running_spark_apps(rm_address, requests_config, tags) # Report success after gathering all met...
python
def _yarn_init(self, rm_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. """ running_apps = self._yarn_get_running_spark_apps(rm_address, requests_config, tags) # Report success after gathering all met...
[ "def", "_yarn_init", "(", "self", ",", "rm_address", ",", "requests_config", ",", "tags", ")", ":", "running_apps", "=", "self", ".", "_yarn_get_running_spark_apps", "(", "rm_address", ",", "requests_config", ",", "tags", ")", "# Report success after gathering all met...
Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications.
[ "Return", "a", "dictionary", "of", "{", "app_id", ":", "(", "app_name", "tracking_url", ")", "}", "for", "running", "Spark", "applications", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L387-L401
train
Initialize Spark applications and return a dictionary of Spark application IDs and tracking URLs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._get_standalone_app_url
def _get_standalone_app_url(self, app_id, spark_master_address, requests_config, tags): """ Return the application URL from the app info page on the Spark master. Due to a bug, we need to parse the HTML manually because we cannot fetch JSON data from HTTP interface. """ a...
python
def _get_standalone_app_url(self, app_id, spark_master_address, requests_config, tags): """ Return the application URL from the app info page on the Spark master. Due to a bug, we need to parse the HTML manually because we cannot fetch JSON data from HTTP interface. """ a...
[ "def", "_get_standalone_app_url", "(", "self", ",", "app_id", ",", "spark_master_address", ",", "requests_config", ",", "tags", ")", ":", "app_page", "=", "self", ".", "_rest_request", "(", "spark_master_address", ",", "SPARK_MASTER_APP_PATH", ",", "SPARK_STANDALONE_S...
Return the application URL from the app info page on the Spark master. Due to a bug, we need to parse the HTML manually because we cannot fetch JSON data from HTTP interface.
[ "Return", "the", "application", "URL", "from", "the", "app", "info", "page", "on", "the", "Spark", "master", ".", "Due", "to", "a", "bug", "we", "need", "to", "parse", "the", "HTML", "manually", "because", "we", "cannot", "fetch", "JSON", "data", "from",...
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L403-L422
train
Get the standalone application URL from the Spark master.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._yarn_get_running_spark_apps
def _yarn_get_running_spark_apps(self, rm_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. The `app_id` returned is that of the YARN application. This will eventually be mapped into a Spark application ID. ...
python
def _yarn_get_running_spark_apps(self, rm_address, requests_config, tags): """ Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. The `app_id` returned is that of the YARN application. This will eventually be mapped into a Spark application ID. ...
[ "def", "_yarn_get_running_spark_apps", "(", "self", ",", "rm_address", ",", "requests_config", ",", "tags", ")", ":", "metrics_json", "=", "self", ".", "_rest_request_to_json", "(", "rm_address", ",", "YARN_APPS_PATH", ",", "YARN_SERVICE_CHECK", ",", "requests_config"...
Return a dictionary of {app_id: (app_name, tracking_url)} for running Spark applications. The `app_id` returned is that of the YARN application. This will eventually be mapped into a Spark application ID.
[ "Return", "a", "dictionary", "of", "{", "app_id", ":", "(", "app_name", "tracking_url", ")", "}", "for", "running", "Spark", "applications", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L424-L454
train
Get a dictionary of running Spark applications.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._get_spark_app_ids
def _get_spark_app_ids(self, running_apps, requests_config, tags): """ Traverses the Spark application master in YARN to get a Spark application ID. Return a dictionary of {app_id: (app_name, tracking_url)} for Spark applications """ spark_apps = {} for app_id, (app_name...
python
def _get_spark_app_ids(self, running_apps, requests_config, tags): """ Traverses the Spark application master in YARN to get a Spark application ID. Return a dictionary of {app_id: (app_name, tracking_url)} for Spark applications """ spark_apps = {} for app_id, (app_name...
[ "def", "_get_spark_app_ids", "(", "self", ",", "running_apps", ",", "requests_config", ",", "tags", ")", ":", "spark_apps", "=", "{", "}", "for", "app_id", ",", "(", "app_name", ",", "tracking_url", ")", "in", "iteritems", "(", "running_apps", ")", ":", "r...
Traverses the Spark application master in YARN to get a Spark application ID. Return a dictionary of {app_id: (app_name, tracking_url)} for Spark applications
[ "Traverses", "the", "Spark", "application", "master", "in", "YARN", "to", "get", "a", "Spark", "application", "ID", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L456-L475
train
Get a dictionary of Spark application IDs and tracking URLs for each Spark application.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._spark_job_metrics
def _spark_job_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each Spark job. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): base_url = self._get_request_url(instance, tracking_url) response = self._re...
python
def _spark_job_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each Spark job. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): base_url = self._get_request_url(instance, tracking_url) response = self._re...
[ "def", "_spark_job_metrics", "(", "self", ",", "instance", ",", "running_apps", ",", "addl_tags", ",", "requests_config", ")", ":", "for", "app_id", ",", "(", "app_name", ",", "tracking_url", ")", "in", "iteritems", "(", "running_apps", ")", ":", "base_url", ...
Get metrics for each Spark job.
[ "Get", "metrics", "for", "each", "Spark", "job", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L477-L497
train
Get metrics for each Spark job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._spark_executor_metrics
def _spark_executor_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each Spark executor. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): base_url = self._get_request_url(instance, tracking_url) response ...
python
def _spark_executor_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each Spark executor. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): base_url = self._get_request_url(instance, tracking_url) response ...
[ "def", "_spark_executor_metrics", "(", "self", ",", "instance", ",", "running_apps", ",", "addl_tags", ",", "requests_config", ")", ":", "for", "app_id", ",", "(", "app_name", ",", "tracking_url", ")", "in", "iteritems", "(", "running_apps", ")", ":", "base_ur...
Get metrics for each Spark executor.
[ "Get", "metrics", "for", "each", "Spark", "executor", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L521-L542
train
Get metrics for each Spark executor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._spark_rdd_metrics
def _spark_rdd_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each Spark RDD. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): base_url = self._get_request_url(instance, tracking_url) response = self._re...
python
def _spark_rdd_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each Spark RDD. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): base_url = self._get_request_url(instance, tracking_url) response = self._re...
[ "def", "_spark_rdd_metrics", "(", "self", ",", "instance", ",", "running_apps", ",", "addl_tags", ",", "requests_config", ")", ":", "for", "app_id", ",", "(", "app_name", ",", "tracking_url", ")", "in", "iteritems", "(", "running_apps", ")", ":", "base_url", ...
Get metrics for each Spark RDD.
[ "Get", "metrics", "for", "each", "Spark", "RDD", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L544-L562
train
Get metrics for each Spark RDD.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._spark_streaming_statistics_metrics
def _spark_streaming_statistics_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each application streaming statistics. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): try: base_url = self._get_request...
python
def _spark_streaming_statistics_metrics(self, instance, running_apps, addl_tags, requests_config): """ Get metrics for each application streaming statistics. """ for app_id, (app_name, tracking_url) in iteritems(running_apps): try: base_url = self._get_request...
[ "def", "_spark_streaming_statistics_metrics", "(", "self", ",", "instance", ",", "running_apps", ",", "addl_tags", ",", "requests_config", ")", ":", "for", "app_id", ",", "(", "app_name", ",", "tracking_url", ")", "in", "iteritems", "(", "running_apps", ")", ":"...
Get metrics for each application streaming statistics.
[ "Get", "metrics", "for", "each", "application", "streaming", "statistics", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L564-L590
train
Get metrics for each application streaming statistics.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._set_metric
def _set_metric(self, metric_name, metric_type, value, tags=None): """ Set a metric """ if tags is None: tags = [] if metric_type == GAUGE: self.gauge(metric_name, value, tags=tags) elif metric_type == COUNT: self.count(metric_name, val...
python
def _set_metric(self, metric_name, metric_type, value, tags=None): """ Set a metric """ if tags is None: tags = [] if metric_type == GAUGE: self.gauge(metric_name, value, tags=tags) elif metric_type == COUNT: self.count(metric_name, val...
[ "def", "_set_metric", "(", "self", ",", "metric_name", ",", "metric_type", ",", "value", ",", "tags", "=", "None", ")", ":", "if", "tags", "is", "None", ":", "tags", "=", "[", "]", "if", "metric_type", "==", "GAUGE", ":", "self", ".", "gauge", "(", ...
Set a metric
[ "Set", "a", "metric" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L605-L618
train
Set a metric in the log.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._rest_request
def _rest_request(self, url, object_path, service_name, requests_config, tags, *args, **kwargs): """ Query the given URL and return the response """ service_check_tags = ['url:%s' % self._get_url_base(url)] + tags if object_path: url = self._join_url_dir(url, object_...
python
def _rest_request(self, url, object_path, service_name, requests_config, tags, *args, **kwargs): """ Query the given URL and return the response """ service_check_tags = ['url:%s' % self._get_url_base(url)] + tags if object_path: url = self._join_url_dir(url, object_...
[ "def", "_rest_request", "(", "self", ",", "url", ",", "object_path", ",", "service_name", ",", "requests_config", ",", "tags", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "service_check_tags", "=", "[", "'url:%s'", "%", "self", ".", "_get_url_base...
Query the given URL and return the response
[ "Query", "the", "given", "URL", "and", "return", "the", "response" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L620-L691
train
Perform a request to Spark and return the response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._rest_request_to_json
def _rest_request_to_json(self, address, object_path, service_name, requests_config, tags, *args, **kwargs): """ Query the given URL and return the JSON response """ response = self._rest_request(address, object_path, service_name, requests_config, tags, *args, **kwargs) try: ...
python
def _rest_request_to_json(self, address, object_path, service_name, requests_config, tags, *args, **kwargs): """ Query the given URL and return the JSON response """ response = self._rest_request(address, object_path, service_name, requests_config, tags, *args, **kwargs) try: ...
[ "def", "_rest_request_to_json", "(", "self", ",", "address", ",", "object_path", ",", "service_name", ",", "requests_config", ",", "tags", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "response", "=", "self", ".", "_rest_request", "(", "address", "...
Query the given URL and return the JSON response
[ "Query", "the", "given", "URL", "and", "return", "the", "JSON", "response" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L693-L711
train
Query the given URL and return the JSON response
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
spark/datadog_checks/spark/spark.py
SparkCheck._get_url_base
def _get_url_base(cls, url): """ Return the base of a URL """ s = urlsplit(url) return urlunsplit([s.scheme, s.netloc, '', '', ''])
python
def _get_url_base(cls, url): """ Return the base of a URL """ s = urlsplit(url) return urlunsplit([s.scheme, s.netloc, '', '', ''])
[ "def", "_get_url_base", "(", "cls", ",", "url", ")", ":", "s", "=", "urlsplit", "(", "url", ")", "return", "urlunsplit", "(", "[", "s", ".", "scheme", ",", "s", ".", "netloc", ",", "''", ",", "''", ",", "''", "]", ")" ]
Return the base of a URL
[ "Return", "the", "base", "of", "a", "URL" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/spark/datadog_checks/spark/spark.py#L725-L730
train
Return the base of a URL.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
cisco_aci/datadog_checks/cisco_aci/helpers.py
parse_capacity_tags
def parse_capacity_tags(dn): """ This parses tags from a dn designator. They look like this: topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min """ tags = [] pod = get_pod_from_dn(dn) if pod: tags.append("fabric_pod_id:{}".format(pod)) node = get_node_from_dn(dn) ...
python
def parse_capacity_tags(dn): """ This parses tags from a dn designator. They look like this: topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min """ tags = [] pod = get_pod_from_dn(dn) if pod: tags.append("fabric_pod_id:{}".format(pod)) node = get_node_from_dn(dn) ...
[ "def", "parse_capacity_tags", "(", "dn", ")", ":", "tags", "=", "[", "]", "pod", "=", "get_pod_from_dn", "(", "dn", ")", "if", "pod", ":", "tags", ".", "append", "(", "\"fabric_pod_id:{}\"", ".", "format", "(", "pod", ")", ")", "node", "=", "get_node_f...
This parses tags from a dn designator. They look like this: topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min
[ "This", "parses", "tags", "from", "a", "dn", "designator", ".", "They", "look", "like", "this", ":", "topology", "/", "pod", "-", "1", "/", "node", "-", "101", "/", "sys", "/", "phys", "-", "[", "eth1", "/", "6", "]", "/", "CDeqptMacsectxpkts5min" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/cisco_aci/datadog_checks/cisco_aci/helpers.py#L16-L29
train
This parses the tags from a dn designator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
cisco_aci/datadog_checks/cisco_aci/helpers.py
get_event_tags_from_dn
def get_event_tags_from_dn(dn): """ This grabs the event tags from the dn designator. They look like this: uni/tn-DataDog/ap-DtDg-AP1-EcommerceApp/epg-DtDg-Ecomm/HDl2IngrPktsAg1h """ tags = [] node = get_node_from_dn(dn) if node: tags.append("node:" + node) app = get_app_from_dn(...
python
def get_event_tags_from_dn(dn): """ This grabs the event tags from the dn designator. They look like this: uni/tn-DataDog/ap-DtDg-AP1-EcommerceApp/epg-DtDg-Ecomm/HDl2IngrPktsAg1h """ tags = [] node = get_node_from_dn(dn) if node: tags.append("node:" + node) app = get_app_from_dn(...
[ "def", "get_event_tags_from_dn", "(", "dn", ")", ":", "tags", "=", "[", "]", "node", "=", "get_node_from_dn", "(", "dn", ")", "if", "node", ":", "tags", ".", "append", "(", "\"node:\"", "+", "node", ")", "app", "=", "get_app_from_dn", "(", "dn", ")", ...
This grabs the event tags from the dn designator. They look like this: uni/tn-DataDog/ap-DtDg-AP1-EcommerceApp/epg-DtDg-Ecomm/HDl2IngrPktsAg1h
[ "This", "grabs", "the", "event", "tags", "from", "the", "dn", "designator", ".", "They", "look", "like", "this", ":", "uni", "/", "tn", "-", "DataDog", "/", "ap", "-", "DtDg", "-", "AP1", "-", "EcommerceApp", "/", "epg", "-", "DtDg", "-", "Ecomm", ...
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/cisco_aci/datadog_checks/cisco_aci/helpers.py#L98-L122
train
Returns a list of event tags from a DN.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
cisco_aci/datadog_checks/cisco_aci/helpers.py
get_hostname_from_dn
def get_hostname_from_dn(dn): """ This parses the hostname from a dn designator. They look like this: topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min """ pod = get_pod_from_dn(dn) node = get_node_from_dn(dn) if pod and node: return "pod-{}-node-{}".format(pod, node) ...
python
def get_hostname_from_dn(dn): """ This parses the hostname from a dn designator. They look like this: topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min """ pod = get_pod_from_dn(dn) node = get_node_from_dn(dn) if pod and node: return "pod-{}-node-{}".format(pod, node) ...
[ "def", "get_hostname_from_dn", "(", "dn", ")", ":", "pod", "=", "get_pod_from_dn", "(", "dn", ")", "node", "=", "get_node_from_dn", "(", "dn", ")", "if", "pod", "and", "node", ":", "return", "\"pod-{}-node-{}\"", ".", "format", "(", "pod", ",", "node", "...
This parses the hostname from a dn designator. They look like this: topology/pod-1/node-101/sys/phys-[eth1/6]/CDeqptMacsectxpkts5min
[ "This", "parses", "the", "hostname", "from", "a", "dn", "designator", ".", "They", "look", "like", "this", ":", "topology", "/", "pod", "-", "1", "/", "node", "-", "101", "/", "sys", "/", "phys", "-", "[", "eth1", "/", "6", "]", "/", "CDeqptMacsect...
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/cisco_aci/datadog_checks/cisco_aci/helpers.py#L125-L135
train
This parses the hostname from a dn designator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
cisco_aci/datadog_checks/cisco_aci/helpers.py
get_attributes
def get_attributes(obj): """ the json objects look like this: { "objType": { "attributes": { ... } } It always has the attributes nested below the object type This helper provides a way of getting at the attributes """ if not obj or type(obj) is not dict: re...
python
def get_attributes(obj): """ the json objects look like this: { "objType": { "attributes": { ... } } It always has the attributes nested below the object type This helper provides a way of getting at the attributes """ if not obj or type(obj) is not dict: re...
[ "def", "get_attributes", "(", "obj", ")", ":", "if", "not", "obj", "or", "type", "(", "obj", ")", "is", "not", "dict", ":", "return", "{", "}", "keys", "=", "list", "(", "obj", ".", "keys", "(", ")", ")", "if", "len", "(", "keys", ")", ">", "...
the json objects look like this: { "objType": { "attributes": { ... } } It always has the attributes nested below the object type This helper provides a way of getting at the attributes
[ "the", "json", "objects", "look", "like", "this", ":", "{", "objType", ":", "{", "attributes", ":", "{", "...", "}", "}", "It", "always", "has", "the", "attributes", "nested", "below", "the", "object", "type", "This", "helper", "provides", "a", "way", ...
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/cisco_aci/datadog_checks/cisco_aci/helpers.py#L153-L190
train
helper function to get the attributes of the object
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
cisco_aci/datadog_checks/cisco_aci/helpers.py
check_metric_can_be_zero
def check_metric_can_be_zero(metric_name, metric_value, json_attributes): """ When a counter is reset, don't send a zero because it will look bad on the graphs This checks if the zero makes sense or not """ if "last" in metric_name.lower(): return True if not metric_value: return...
python
def check_metric_can_be_zero(metric_name, metric_value, json_attributes): """ When a counter is reset, don't send a zero because it will look bad on the graphs This checks if the zero makes sense or not """ if "last" in metric_name.lower(): return True if not metric_value: return...
[ "def", "check_metric_can_be_zero", "(", "metric_name", ",", "metric_value", ",", "json_attributes", ")", ":", "if", "\"last\"", "in", "metric_name", ".", "lower", "(", ")", ":", "return", "True", "if", "not", "metric_value", ":", "return", "False", "try", ":",...
When a counter is reset, don't send a zero because it will look bad on the graphs This checks if the zero makes sense or not
[ "When", "a", "counter", "is", "reset", "don", "t", "send", "a", "zero", "because", "it", "will", "look", "bad", "on", "the", "graphs", "This", "checks", "if", "the", "zero", "makes", "sense", "or", "not" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/cisco_aci/datadog_checks/cisco_aci/helpers.py#L193-L210
train
Check if a metric value is zero
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
datadog_checks_dev/datadog_checks/dev/tooling/commands/create.py
create
def create(ctx, name, integration_type, location, non_interactive, quiet, dry_run): """Create scaffolding for a new integration.""" repo_choice = ctx.obj['repo_choice'] root = resolve_path(location) if location else get_root() path_sep = os.path.sep integration_dir = os.path.join(root, normalize_pa...
python
def create(ctx, name, integration_type, location, non_interactive, quiet, dry_run): """Create scaffolding for a new integration.""" repo_choice = ctx.obj['repo_choice'] root = resolve_path(location) if location else get_root() path_sep = os.path.sep integration_dir = os.path.join(root, normalize_pa...
[ "def", "create", "(", "ctx", ",", "name", ",", "integration_type", ",", "location", ",", "non_interactive", ",", "quiet", ",", "dry_run", ")", ":", "repo_choice", "=", "ctx", ".", "obj", "[", "'repo_choice'", "]", "root", "=", "resolve_path", "(", "locatio...
Create scaffolding for a new integration.
[ "Create", "scaffolding", "for", "a", "new", "integration", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/datadog_checks_dev/datadog_checks/dev/tooling/commands/create.py#L95-L139
train
Create a new scaffolding for a new integration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
datadog_checks_base/datadog_checks/base/utils/containers.py
freeze
def freeze(o): """ Freezes any mutable object including dictionaries and lists for hashing. Accepts nested dictionaries. """ if isinstance(o, (tuple, list)): return tuple(sorted(freeze(e) for e in o)) if isinstance(o, dict): return tuple(sorted((k, freeze(v)) for k, v in iterite...
python
def freeze(o): """ Freezes any mutable object including dictionaries and lists for hashing. Accepts nested dictionaries. """ if isinstance(o, (tuple, list)): return tuple(sorted(freeze(e) for e in o)) if isinstance(o, dict): return tuple(sorted((k, freeze(v)) for k, v in iterite...
[ "def", "freeze", "(", "o", ")", ":", "if", "isinstance", "(", "o", ",", "(", "tuple", ",", "list", ")", ")", ":", "return", "tuple", "(", "sorted", "(", "freeze", "(", "e", ")", "for", "e", "in", "o", ")", ")", "if", "isinstance", "(", "o", "...
Freezes any mutable object including dictionaries and lists for hashing. Accepts nested dictionaries.
[ "Freezes", "any", "mutable", "object", "including", "dictionaries", "and", "lists", "for", "hashing", ".", "Accepts", "nested", "dictionaries", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/datadog_checks_base/datadog_checks/base/utils/containers.py#L7-L21
train
Freezes any mutable object including dictionaries and lists for hashing.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/decimal128.py
_decimal_to_128
def _decimal_to_128(value): """Converts a decimal.Decimal to BID (high bits, low bits). :Parameters: - `value`: An instance of decimal.Decimal """ with decimal.localcontext(_DEC128_CTX) as ctx: value = ctx.create_decimal(value) if value.is_infinite(): return _NINF if value.is...
python
def _decimal_to_128(value): """Converts a decimal.Decimal to BID (high bits, low bits). :Parameters: - `value`: An instance of decimal.Decimal """ with decimal.localcontext(_DEC128_CTX) as ctx: value = ctx.create_decimal(value) if value.is_infinite(): return _NINF if value.is...
[ "def", "_decimal_to_128", "(", "value", ")", ":", "with", "decimal", ".", "localcontext", "(", "_DEC128_CTX", ")", "as", "ctx", ":", "value", "=", "ctx", ".", "create_decimal", "(", "value", ")", "if", "value", ".", "is_infinite", "(", ")", ":", "return"...
Converts a decimal.Decimal to BID (high bits, low bits). :Parameters: - `value`: An instance of decimal.Decimal
[ "Converts", "a", "decimal", ".", "Decimal", "to", "BID", "(", "high", "bits", "low", "bits", ")", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/decimal128.py#L107-L153
train
Converts a decimal. Decimal to BID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/decimal128.py
Decimal128.to_decimal
def to_decimal(self): """Returns an instance of :class:`decimal.Decimal` for this :class:`Decimal128`. """ high = self.__high low = self.__low sign = 1 if (high & _SIGN) else 0 if (high & _SNAN) == _SNAN: return decimal.Decimal((sign, (), 'N')) ...
python
def to_decimal(self): """Returns an instance of :class:`decimal.Decimal` for this :class:`Decimal128`. """ high = self.__high low = self.__low sign = 1 if (high & _SIGN) else 0 if (high & _SNAN) == _SNAN: return decimal.Decimal((sign, (), 'N')) ...
[ "def", "to_decimal", "(", "self", ")", ":", "high", "=", "self", ".", "__high", "low", "=", "self", ".", "__low", "sign", "=", "1", "if", "(", "high", "&", "_SIGN", ")", "else", "0", "if", "(", "high", "&", "_SNAN", ")", "==", "_SNAN", ":", "re...
Returns an instance of :class:`decimal.Decimal` for this :class:`Decimal128`.
[ "Returns", "an", "instance", "of", ":", "class", ":", "decimal", ".", "Decimal", "for", "this", ":", "class", ":", "Decimal128", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/decimal128.py#L266-L307
train
Returns an instance of decimal. Decimal for thisCOOKIE.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/bson/decimal128.py
Decimal128.from_bid
def from_bid(cls, value): """Create an instance of :class:`Decimal128` from Binary Integer Decimal string. :Parameters: - `value`: 16 byte string (128-bit IEEE 754-2008 decimal floating point in Binary Integer Decimal (BID) format). """ if not isinstance(va...
python
def from_bid(cls, value): """Create an instance of :class:`Decimal128` from Binary Integer Decimal string. :Parameters: - `value`: 16 byte string (128-bit IEEE 754-2008 decimal floating point in Binary Integer Decimal (BID) format). """ if not isinstance(va...
[ "def", "from_bid", "(", "cls", ",", "value", ")", ":", "if", "not", "isinstance", "(", "value", ",", "bytes", ")", ":", "raise", "TypeError", "(", "\"value must be an instance of bytes\"", ")", "if", "len", "(", "value", ")", "!=", "16", ":", "raise", "V...
Create an instance of :class:`Decimal128` from Binary Integer Decimal string. :Parameters: - `value`: 16 byte string (128-bit IEEE 754-2008 decimal floating point in Binary Integer Decimal (BID) format).
[ "Create", "an", "instance", "of", ":", "class", ":", "Decimal128", "from", "Binary", "Integer", "Decimal", "string", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/bson/decimal128.py#L310-L322
train
Create an instance of Decimal128 from binary integer value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
ibm_mq/datadog_checks/ibm_mq/config.py
IBMMQConfig._compile_tag_re
def _compile_tag_re(self): """ Compile regex strings from queue_tag_re option and return list of compiled regex/tag pairs """ queue_tag_list = [] for regex_str, tags in iteritems(self._queue_tag_re): try: queue_tag_list.append([re.compile(regex_str), [...
python
def _compile_tag_re(self): """ Compile regex strings from queue_tag_re option and return list of compiled regex/tag pairs """ queue_tag_list = [] for regex_str, tags in iteritems(self._queue_tag_re): try: queue_tag_list.append([re.compile(regex_str), [...
[ "def", "_compile_tag_re", "(", "self", ")", ":", "queue_tag_list", "=", "[", "]", "for", "regex_str", ",", "tags", "in", "iteritems", "(", "self", ".", "_queue_tag_re", ")", ":", "try", ":", "queue_tag_list", ".", "append", "(", "[", "re", ".", "compile"...
Compile regex strings from queue_tag_re option and return list of compiled regex/tag pairs
[ "Compile", "regex", "strings", "from", "queue_tag_re", "option", "and", "return", "list", "of", "compiled", "regex", "/", "tag", "pairs" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/ibm_mq/datadog_checks/ibm_mq/config.py#L78-L88
train
Compile regex strings from queue_tag_re option and return list of compiled regex / tag pairs
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/ismaster.py
_get_server_type
def _get_server_type(doc): """Determine the server type from an ismaster response.""" if not doc.get('ok'): return SERVER_TYPE.Unknown if doc.get('isreplicaset'): return SERVER_TYPE.RSGhost elif doc.get('setName'): if doc.get('hidden'): return SERVER_TYPE.RSOther ...
python
def _get_server_type(doc): """Determine the server type from an ismaster response.""" if not doc.get('ok'): return SERVER_TYPE.Unknown if doc.get('isreplicaset'): return SERVER_TYPE.RSGhost elif doc.get('setName'): if doc.get('hidden'): return SERVER_TYPE.RSOther ...
[ "def", "_get_server_type", "(", "doc", ")", ":", "if", "not", "doc", ".", "get", "(", "'ok'", ")", ":", "return", "SERVER_TYPE", ".", "Unknown", "if", "doc", ".", "get", "(", "'isreplicaset'", ")", ":", "return", "SERVER_TYPE", ".", "RSGhost", "elif", ...
Determine the server type from an ismaster response.
[ "Determine", "the", "server", "type", "from", "an", "ismaster", "response", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/ismaster.py#L24-L45
train
Determine the server type from an ismaster response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
tokumx/datadog_checks/tokumx/vendor/pymongo/ismaster.py
IsMaster.all_hosts
def all_hosts(self): """List of hosts, passives, and arbiters known to this server.""" return set(imap(common.clean_node, itertools.chain( self._doc.get('hosts', []), self._doc.get('passives', []), self._doc.get('arbiters', []))))
python
def all_hosts(self): """List of hosts, passives, and arbiters known to this server.""" return set(imap(common.clean_node, itertools.chain( self._doc.get('hosts', []), self._doc.get('passives', []), self._doc.get('arbiters', []))))
[ "def", "all_hosts", "(", "self", ")", ":", "return", "set", "(", "imap", "(", "common", ".", "clean_node", ",", "itertools", ".", "chain", "(", "self", ".", "_doc", ".", "get", "(", "'hosts'", ",", "[", "]", ")", ",", "self", ".", "_doc", ".", "g...
List of hosts, passives, and arbiters known to this server.
[ "List", "of", "hosts", "passives", "and", "arbiters", "known", "to", "this", "server", "." ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/tokumx/datadog_checks/tokumx/vendor/pymongo/ismaster.py#L77-L82
train
List of hosts passives and arbiters known to this server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
gitlab_runner/datadog_checks/gitlab_runner/gitlab_runner.py
GitlabRunnerCheck._create_gitlab_runner_prometheus_instance
def _create_gitlab_runner_prometheus_instance(self, instance, init_config): """ Set up the gitlab_runner instance so it can be used in OpenMetricsBaseCheck """ # Mapping from Prometheus metrics names to Datadog ones # For now it's a 1:1 mapping allowed_metrics = init_conf...
python
def _create_gitlab_runner_prometheus_instance(self, instance, init_config): """ Set up the gitlab_runner instance so it can be used in OpenMetricsBaseCheck """ # Mapping from Prometheus metrics names to Datadog ones # For now it's a 1:1 mapping allowed_metrics = init_conf...
[ "def", "_create_gitlab_runner_prometheus_instance", "(", "self", ",", "instance", ",", "init_config", ")", ":", "# Mapping from Prometheus metrics names to Datadog ones", "# For now it's a 1:1 mapping", "allowed_metrics", "=", "init_config", ".", "get", "(", "'allowed_metrics'", ...
Set up the gitlab_runner instance so it can be used in OpenMetricsBaseCheck
[ "Set", "up", "the", "gitlab_runner", "instance", "so", "it", "can", "be", "used", "in", "OpenMetricsBaseCheck" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/gitlab_runner/datadog_checks/gitlab_runner/gitlab_runner.py#L62-L87
train
Create a gitlab_runner instance for the Prometheus check.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
hdfs_datanode/datadog_checks/hdfs_datanode/hdfs_datanode.py
HDFSDataNode._get_jmx_data
def _get_jmx_data(self, instance, jmx_address, tags): """ Get namenode beans data from JMX endpoint """ response = self._rest_request_to_json( instance, jmx_address, self.JMX_PATH, {'qry': self.HDFS_DATANODE_BEAN_NAME}, tags=tags ) beans = response.get('beans'...
python
def _get_jmx_data(self, instance, jmx_address, tags): """ Get namenode beans data from JMX endpoint """ response = self._rest_request_to_json( instance, jmx_address, self.JMX_PATH, {'qry': self.HDFS_DATANODE_BEAN_NAME}, tags=tags ) beans = response.get('beans'...
[ "def", "_get_jmx_data", "(", "self", ",", "instance", ",", "jmx_address", ",", "tags", ")", ":", "response", "=", "self", ".", "_rest_request_to_json", "(", "instance", ",", "jmx_address", ",", "self", ".", "JMX_PATH", ",", "{", "'qry'", ":", "self", ".", ...
Get namenode beans data from JMX endpoint
[ "Get", "namenode", "beans", "data", "from", "JMX", "endpoint" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/hdfs_datanode/datadog_checks/hdfs_datanode/hdfs_datanode.py#L69-L77
train
Get namenode beans data from JMX endpoint
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
DataDog/integrations-core
hdfs_datanode/datadog_checks/hdfs_datanode/hdfs_datanode.py
HDFSDataNode._hdfs_datanode_metrics
def _hdfs_datanode_metrics(self, beans, tags): """ Process HDFS Datanode metrics from given beans """ # Only get the first bean bean = next(iter(beans)) bean_name = bean.get('name') self.log.debug("Bean name retrieved: {}".format(bean_name)) for metric, ...
python
def _hdfs_datanode_metrics(self, beans, tags): """ Process HDFS Datanode metrics from given beans """ # Only get the first bean bean = next(iter(beans)) bean_name = bean.get('name') self.log.debug("Bean name retrieved: {}".format(bean_name)) for metric, ...
[ "def", "_hdfs_datanode_metrics", "(", "self", ",", "beans", ",", "tags", ")", ":", "# Only get the first bean", "bean", "=", "next", "(", "iter", "(", "beans", ")", ")", "bean_name", "=", "bean", ".", "get", "(", "'name'", ")", "self", ".", "log", ".", ...
Process HDFS Datanode metrics from given beans
[ "Process", "HDFS", "Datanode", "metrics", "from", "given", "beans" ]
ebd41c873cf9f97a8c51bf9459bc6a7536af8acd
https://github.com/DataDog/integrations-core/blob/ebd41c873cf9f97a8c51bf9459bc6a7536af8acd/hdfs_datanode/datadog_checks/hdfs_datanode/hdfs_datanode.py#L79-L92
train
Process HDFS Datanode metrics from given beans and tags
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...