answer
stringlengths 15
1.25M
|
|---|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CloudWatch Reference — boto v2.33.0</title>
<link rel="stylesheet" href="../_static/boto.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var <API key> = {
URL_ROOT: '../',
VERSION: 'HEAD',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="boto v2.33.0" href="../index.html" />
<link rel="next" title="Cognito Identity" href="cognito-identity.html" />
<link rel="prev" title="CloudTrail" href="cloudtrail.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="cognito-identity.html" title="Cognito Identity"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="cloudtrail.html" title="CloudTrail"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">boto v2.33.0</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="<API key>">
<h1>CloudWatch Reference<a class="headerlink" href="
<div class="section" id="module-boto.ec2.cloudwatch">
<span id="boto-ec2-cloudwatch"></span><h2>boto.ec2.cloudwatch<a class="headerlink" href="
<p>This module provides an interface to the Elastic Compute Cloud (EC2)
CloudWatch service from AWS.</p>
<dl class="class">
<dt id="boto.ec2.cloudwatch.<API key>">
<em class="property">class </em><tt class="descclassname">boto.ec2.cloudwatch.</tt><tt class="descname"><API key></tt><big>(</big><em>aws_access_key_id=None</em>, <em><API key>=None</em>, <em>is_secure=True</em>, <em>port=None</em>, <em>proxy=None</em>, <em>proxy_port=None</em>, <em>proxy_user=None</em>, <em>proxy_pass=None</em>, <em>debug=0</em>, <em><API key>=None</em>, <em>region=None</em>, <em>path='/'</em>, <em>security_token=None</em>, <em>validate_certs=True</em>, <em>profile_name=None</em><big>)</big><a class="headerlink" href="
<dd><p>Init method to create a new connection to EC2 Monitoring Service.</p>
<p>B{Note:} The host argument is overridden by the host specified in the
boto configuration file.</p>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.<API key>.APIVersion">
<tt class="descname">APIVersion</tt><em class="property"> = '2010-08-01'</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><em class="property"> = 'monitoring.us-east-1.amazonaws.com'</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.<API key>.DefaultRegionName">
<tt class="descname">DefaultRegionName</tt><em class="property"> = 'us-east-1'</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>dimension</em>, <em>params</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.build_list_params">
<tt class="descname">build_list_params</tt><big>(</big><em>params</em>, <em>items</em>, <em>label</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.build_put_params">
<tt class="descname">build_put_params</tt><big>(</big><em>params</em>, <em>name</em>, <em>value=None</em>, <em>timestamp=None</em>, <em>unit=None</em>, <em>dimensions=None</em>, <em>statistics=None</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.create_alarm">
<tt class="descname">create_alarm</tt><big>(</big><em>alarm</em><big>)</big><a class="headerlink" href="
<dd><p>Creates or updates an alarm and associates it with the specified Amazon
CloudWatch metric. Optionally, this operation can associate one or more
Amazon Simple Notification Service resources with the alarm.</p>
<p>When this operation creates an alarm, the alarm state is immediately
set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is
set appropriately. Any actions associated with the StateValue is then
executed.</p>
<p>When updating an existing alarm, its StateValue is left unchanged.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarm</strong> (<a class="reference internal" href="#boto.ec2.cloudwatch.alarm.MetricAlarm" title="boto.ec2.cloudwatch.alarm.MetricAlarm"><em>boto.ec2.cloudwatch.alarm.MetricAlarm</em></a>) – MetricAlarm object.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.delete_alarms">
<tt class="descname">delete_alarms</tt><big>(</big><em>alarms</em><big>)</big><a class="headerlink" href="
<dd><p>Deletes all specified alarms. In the event of an error, no
alarms are deleted.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarms</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) – List of alarm names.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>alarm_name=None</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>max_records=None</em>, <em>history_item_type=None</em>, <em>next_token=None</em><big>)</big><a class="headerlink" href="
<dd><p>Retrieves history for the specified alarm. Filter alarms by date range
or item type. If an alarm name is not specified, Amazon CloudWatch
returns histories for all of the owner’s alarms.</p>
<p>Amazon CloudWatch retains the history of deleted alarms for a period of
six weeks. If an alarm has been deleted, its history can still be
queried.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>alarm_name</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The name of the alarm.</li>
<li><strong>start_date</strong> (<a class="reference external" href="http://docs.python.org/library/datetime.html#module-datetime" title="(in Python v2.7)"><em>datetime</em></a>) – The starting date to retrieve alarm history.</li>
<li><strong>end_date</strong> (<a class="reference external" href="http://docs.python.org/library/datetime.html#module-datetime" title="(in Python v2.7)"><em>datetime</em></a>) – The starting date to retrieve alarm history.</li>
<li><strong>history_item_type</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The type of alarm histories to retreive
(ConfigurationUpdate | StateUpdate | Action)</li>
<li><strong>max_records</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – The maximum number of alarm descriptions
to retrieve.</li>
<li><strong>next_token</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The token returned by a previous call to indicate
that there is more data.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:rtype list</p>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.describe_alarms">
<tt class="descname">describe_alarms</tt><big>(</big><em>action_prefix=None</em>, <em>alarm_name_prefix=None</em>, <em>alarm_names=None</em>, <em>max_records=None</em>, <em>state_value=None</em>, <em>next_token=None</em><big>)</big><a class="headerlink" href="
<dd><p>Retrieves alarms with the specified names. If no name is specified, all
alarms for the user are returned. Alarms can be retrieved by using only
a prefix for the alarm name, the alarm state, or a prefix for any
action.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>action_name</strong> – The action name prefix.</li>
<li><strong>alarm_name_prefix</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The alarm name prefix. AlarmNames cannot
be specified if this parameter is specified.</li>
<li><strong>alarm_names</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) – A list of alarm names to retrieve information for.</li>
<li><strong>max_records</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – The maximum number of alarm descriptions
to retrieve.</li>
<li><strong>state_value</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The state value to be used in matching alarms.</li>
<li><strong>next_token</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The token returned by a previous call to
indicate that there is more data.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:rtype list</p>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>metric_name</em>, <em>namespace</em>, <em>period=None</em>, <em>statistic=None</em>, <em>dimensions=None</em>, <em>unit=None</em><big>)</big><a class="headerlink" href="
<dd><p>Retrieves all alarms for a single metric. Specify a statistic, period,
or unit to filter the set of alarms further.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>metric_name</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The name of the metric</li>
<li><strong>namespace</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The namespace of the metric.</li>
<li><strong>period</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – The period in seconds over which the statistic
is applied.</li>
<li><strong>statistic</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The statistic for the metric.</li>
<li><strong>dimension_filters</strong> – A dictionary containing name/value
pairs that will be used to filter the results. The key in
the dictionary is the name of a Dimension. The value in
the dictionary is either a scalar value of that Dimension
name that you want to filter on, a list of values to
filter on or None if you want all metrics with that
Dimension name.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:rtype list</p>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>alarm_names</em><big>)</big><a class="headerlink" href="
<dd><p>Disables actions for the specified alarms.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarms</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) – List of alarm names.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>alarm_names</em><big>)</big><a class="headerlink" href="
<dd><p>Enables actions for the specified alarms.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarms</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) – List of alarm names.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>period</em>, <em>start_time</em>, <em>end_time</em>, <em>metric_name</em>, <em>namespace</em>, <em>statistics</em>, <em>dimensions=None</em>, <em>unit=None</em><big>)</big><a class="headerlink" href="
<dd><p>Get time-series data for one or more statistics of a given metric.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>period</strong> (<em>integer</em>) – The granularity, in seconds, of the returned datapoints.
Period must be at least 60 seconds and must be a multiple
of 60. The default value is 60.</li>
<li><strong>start_time</strong> (<a class="reference external" href="http://docs.python.org/library/datetime.html#module-datetime" title="(in Python v2.7)"><em>datetime</em></a>) – The time stamp to use for determining the
first datapoint to return. The value specified is
inclusive; results include datapoints with the time stamp
specified.</li>
<li><strong>end_time</strong> (<a class="reference external" href="http://docs.python.org/library/datetime.html#module-datetime" title="(in Python v2.7)"><em>datetime</em></a>) – The time stamp to use for determining the
last datapoint to return. The value specified is
exclusive; results will include datapoints up to the time
stamp specified.</li>
<li><strong>metric_name</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The metric name.</li>
<li><strong>namespace</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The metric’s namespace.</li>
<li><strong>statistics</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) – A list of statistics names Valid values:
Average | Sum | SampleCount | Maximum | Minimum</li>
<li><strong>dimensions</strong> (<a class="reference external" href="http://docs.python.org/library/stdtypes.html#dict" title="(in Python v2.7)"><em>dict</em></a>) – A dictionary of dimension key/values where
the key is the dimension name and the value
is either a scalar value or an iterator
of values to be associated with that
dimension.</li>
<li><strong>unit</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The unit for the metric. Value values are:
Seconds | Microseconds | Milliseconds | Bytes | Kilobytes |
Megabytes | Gigabytes | Terabytes | Bits | Kilobits |
Megabits | Gigabits | Terabits | Percent | Count |
Bytes/Second | Kilobytes/Second | Megabytes/Second |
Gigabytes/Second | Terabytes/Second | Bits/Second |
Kilobits/Second | Megabits/Second | Gigabits/Second |
Terabits/Second | Count/Second | None</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.list_metrics">
<tt class="descname">list_metrics</tt><big>(</big><em>next_token=None</em>, <em>dimensions=None</em>, <em>metric_name=None</em>, <em>namespace=None</em><big>)</big><a class="headerlink" href="
<dd><p>Returns a list of the valid metrics for which there is recorded
data available.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>next_token</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – A maximum of 500 metrics will be returned
at one time. If more results are available, the ResultSet
returned will contain a non-Null next_token attribute.
Passing that token as a parameter to list_metrics will
retrieve the next page of metrics.</li>
<li><strong>dimensions</strong> (<a class="reference external" href="http://docs.python.org/library/stdtypes.html#dict" title="(in Python v2.7)"><em>dict</em></a>) – A dictionary containing name/value
pairs that will be used to filter the results. The key in
the dictionary is the name of a Dimension. The value in
the dictionary is either a scalar value of that Dimension
name that you want to filter on or None if you want all
metrics with that Dimension name. To be included in the
result a metric must contain all specified dimensions,
although the metric may contain additional dimensions beyond
the requested metrics. The Dimension names, and values must
be strings between 1 and 250 characters long. A maximum of
10 dimensions are allowed.</li>
<li><strong>metric_name</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – The name of the Metric to filter against. If None,
all Metric names will be returned.</li>
<li><strong>namespace</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – A Metric namespace to filter against (e.g. AWS/EC2).
If None, Metrics from all namespaces will be returned.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.put_metric_alarm">
<tt class="descname">put_metric_alarm</tt><big>(</big><em>alarm</em><big>)</big><a class="headerlink" href="
<dd><p>Creates or updates an alarm and associates it with the specified Amazon
CloudWatch metric. Optionally, this operation can associate one or more
Amazon Simple Notification Service resources with the alarm.</p>
<p>When this operation creates an alarm, the alarm state is immediately
set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is
set appropriately. Any actions associated with the StateValue is then
executed.</p>
<p>When updating an existing alarm, its StateValue is left unchanged.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarm</strong> (<a class="reference internal" href="#boto.ec2.cloudwatch.alarm.MetricAlarm" title="boto.ec2.cloudwatch.alarm.MetricAlarm"><em>boto.ec2.cloudwatch.alarm.MetricAlarm</em></a>) – MetricAlarm object.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.put_metric_data">
<tt class="descname">put_metric_data</tt><big>(</big><em>namespace</em>, <em>name</em>, <em>value=None</em>, <em>timestamp=None</em>, <em>unit=None</em>, <em>dimensions=None</em>, <em>statistics=None</em><big>)</big><a class="headerlink" href="
<dd><p>Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch
associates the data points with the specified metric. If the specified
metric does not exist, Amazon CloudWatch creates the metric. If a list
is specified for some, but not all, of the arguments, the remaining
arguments are repeated a corresponding number of times.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>namespace</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – The namespace of the metric.</li>
<li><strong>name</strong> (<em>str or list</em>) – The name of the metric.</li>
<li><strong>value</strong> (<em>float or list</em>) – The value for the metric.</li>
<li><strong>timestamp</strong> (<em>datetime or list</em>) – The time stamp used for the metric. If not specified,
the default value is set to the time the metric data was received.</li>
<li><strong>unit</strong> (<em>string or list</em>) – The unit of the metric. Valid Values: Seconds |
Microseconds | Milliseconds | Bytes | Kilobytes |
Megabytes | Gigabytes | Terabytes | Bits | Kilobits |
Megabits | Gigabits | Terabits | Percent | Count |
Bytes/Second | Kilobytes/Second | Megabytes/Second |
Gigabytes/Second | Terabytes/Second | Bits/Second |
Kilobits/Second | Megabits/Second | Gigabits/Second |
Terabits/Second | Count/Second | None</li>
<li><strong>dimensions</strong> (<a class="reference external" href="http://docs.python.org/library/stdtypes.html#dict" title="(in Python v2.7)"><em>dict</em></a>) – Add extra name value pairs to associate
with the metric, i.e.:
{‘name1’: value1, ‘name2’: (value2, value3)}</li>
<li><strong>statistics</strong> (<em>dict or list</em>) – <p>Use a statistic set instead of a value, for example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span><span class="s">'maximum'</span><span class="p">:</span> <span class="mi">30</span><span class="p">,</span> <span class="s">'minimum'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s">'samplecount'</span><span class="p">:</span> <span class="mi">100</span><span class="p">,</span> <span class="s">'sum'</span><span class="p">:</span> <span class="mi">10000</span><span class="p">}</span>
</pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.set_alarm_state">
<tt class="descname">set_alarm_state</tt><big>(</big><em>alarm_name</em>, <em>state_reason</em>, <em>state_value</em>, <em>state_reason_data=None</em><big>)</big><a class="headerlink" href="
<dd><p>Temporarily sets the state of an alarm. When the updated StateValue
differs from the previous value, the action configured for the
appropriate state is invoked. This is not a permanent change. The next
periodic alarm check (in about a minute) will set the alarm to its
actual state.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>alarm_name</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – Descriptive name for alarm.</li>
<li><strong>state_reason</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – Human readable reason.</li>
<li><strong>state_value</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – OK | ALARM | INSUFFICIENT_DATA</li>
<li><strong>state_reason_data</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – Reason string (will be jsonified).</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.<API key>.update_alarm">
<tt class="descname">update_alarm</tt><big>(</big><em>alarm</em><big>)</big><a class="headerlink" href="
<dd><p>Creates or updates an alarm and associates it with the specified Amazon
CloudWatch metric. Optionally, this operation can associate one or more
Amazon Simple Notification Service resources with the alarm.</p>
<p>When this operation creates an alarm, the alarm state is immediately
set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is
set appropriately. Any actions associated with the StateValue is then
executed.</p>
<p>When updating an existing alarm, its StateValue is left unchanged.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarm</strong> (<a class="reference internal" href="#boto.ec2.cloudwatch.alarm.MetricAlarm" title="boto.ec2.cloudwatch.alarm.MetricAlarm"><em>boto.ec2.cloudwatch.alarm.MetricAlarm</em></a>) – MetricAlarm object.</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="boto.ec2.cloudwatch.connect_to_region">
<tt class="descclassname">boto.ec2.cloudwatch.</tt><tt class="descname">connect_to_region</tt><big>(</big><em>region_name</em>, <em>**kw_params</em><big>)</big><a class="headerlink" href="
<dd><p>Given a valid region name, return a
<a class="reference internal" href="#boto.ec2.cloudwatch.<API key>" title="boto.ec2.cloudwatch.<API key>"><tt class="xref py py-class docutils literal"><span class="pre">boto.ec2.cloudwatch.<API key></span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>region_name</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – The name of the region to connect to.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">boto.ec2.<API key></span></tt> or <tt class="docutils literal"><span class="pre">None</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A connection to the given region, or None if an invalid region
name is given</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="boto.ec2.cloudwatch.regions">
<tt class="descclassname">boto.ec2.cloudwatch.</tt><tt class="descname">regions</tt><big>(</big><big>)</big><a class="headerlink" href="
<dd><p>Get all available regions for the CloudWatch service.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A list of <tt class="xref py py-class docutils literal"><span class="pre">boto.RegionInfo</span></tt> instances</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-boto.ec2.cloudwatch.datapoint">
<span id="<API key>"></span><h2>boto.ec2.cloudwatch.datapoint<a class="headerlink" href="
<dl class="class">
<dt id="boto.ec2.cloudwatch.datapoint.Datapoint">
<em class="property">class </em><tt class="descclassname">boto.ec2.cloudwatch.datapoint.</tt><tt class="descname">Datapoint</tt><big>(</big><em>connection=None</em><big>)</big><a class="headerlink" href="
<dd><dl class="method">
<dt id="boto.ec2.cloudwatch.datapoint.Datapoint.endElement">
<tt class="descname">endElement</tt><big>(</big><em>name</em>, <em>value</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.datapoint.Datapoint.startElement">
<tt class="descname">startElement</tt><big>(</big><em>name</em>, <em>attrs</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-boto.ec2.cloudwatch.metric">
<span id="<API key>"></span><h2>boto.ec2.cloudwatch.metric<a class="headerlink" href="
<dl class="class">
<dt id="boto.ec2.cloudwatch.metric.Metric">
<em class="property">class </em><tt class="descclassname">boto.ec2.cloudwatch.metric.</tt><tt class="descname">Metric</tt><big>(</big><em>connection=None</em><big>)</big><a class="headerlink" href="
<dd><dl class="attribute">
<dt id="boto.ec2.cloudwatch.metric.Metric.Statistics">
<tt class="descname">Statistics</tt><em class="property"> = ['Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount']</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.metric.Metric.Units">
<tt class="descname">Units</tt><em class="property"> = ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', 'Count', 'Bytes/Second', 'Kilobytes/Second', 'Megabytes/Second', 'Gigabytes/Second', 'Terabytes/Second', 'Bits/Second', 'Kilobits/Second', 'Megabits/Second', 'Gigabits/Second', 'Terabits/Second', 'Count/Second', None]</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.metric.Metric.create_alarm">
<tt class="descname">create_alarm</tt><big>(</big><em>name</em>, <em>comparison</em>, <em>threshold</em>, <em>period</em>, <em>evaluation_periods</em>, <em>statistic</em>, <em>enabled=True</em>, <em>description=None</em>, <em>dimensions=None</em>, <em>alarm_actions=None</em>, <em>ok_actions=None</em>, <em><API key>=None</em>, <em>unit=None</em><big>)</big><a class="headerlink" href="
<dd><p>Creates or updates an alarm and associates it with this metric.
Optionally, this operation can associate one or more
Amazon Simple Notification Service resources with the alarm.</p>
<p>When this operation creates an alarm, the alarm state is immediately
set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is
set appropriately. Any actions associated with the StateValue is then
executed.</p>
<p>When updating an existing alarm, its StateValue is left unchanged.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>alarm</strong> (<a class="reference internal" href="#boto.ec2.cloudwatch.alarm.MetricAlarm" title="boto.ec2.cloudwatch.alarm.MetricAlarm"><em>boto.ec2.cloudwatch.alarm.MetricAlarm</em></a>) – MetricAlarm object.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.metric.Metric.describe_alarms">
<tt class="descname">describe_alarms</tt><big>(</big><em>period=None</em>, <em>statistic=None</em>, <em>dimensions=None</em>, <em>unit=None</em><big>)</big><a class="headerlink" href="
<dd><p>Retrieves all alarms for this metric. Specify a statistic, period,
or unit to filter the set of alarms further.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>period</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – The period in seconds over which the statistic
is applied.</li>
<li><strong>statistic</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The statistic for the metric.</li>
<li><strong>dimension_filters</strong> – A dictionary containing name/value
pairs that will be used to filter the results. The key in
the dictionary is the name of a Dimension. The value in
the dictionary is either a scalar value of that Dimension
name that you want to filter on, a list of values to
filter on or None if you want all metrics with that
Dimension name.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:rtype list</p>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.metric.Metric.endElement">
<tt class="descname">endElement</tt><big>(</big><em>name</em>, <em>value</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.metric.Metric.query">
<tt class="descname">query</tt><big>(</big><em>start_time</em>, <em>end_time</em>, <em>statistics</em>, <em>unit=None</em>, <em>period=60</em><big>)</big><a class="headerlink" href="
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>start_time</strong> (<a class="reference external" href="http://docs.python.org/library/datetime.html#module-datetime" title="(in Python v2.7)"><em>datetime</em></a>) – The time stamp to use for determining the
first datapoint to return. The value specified is
inclusive; results include datapoints with the time stamp
specified.</li>
<li><strong>end_time</strong> (<a class="reference external" href="http://docs.python.org/library/datetime.html#module-datetime" title="(in Python v2.7)"><em>datetime</em></a>) – The time stamp to use for determining the
last datapoint to return. The value specified is
exclusive; results will include datapoints up to the time
stamp specified.</li>
<li><strong>statistics</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#list" title="(in Python v2.7)"><em>list</em></a>) – A list of statistics names Valid values:
Average | Sum | SampleCount | Maximum | Minimum</li>
<li><strong>unit</strong> (<a class="reference external" href="http://docs.python.org/library/string.html#module-string" title="(in Python v2.7)"><em>string</em></a>) – The unit for the metric. Value values are:
Seconds | Microseconds | Milliseconds | Bytes | Kilobytes |
Megabytes | Gigabytes | Terabytes | Bits | Kilobits |
Megabits | Gigabits | Terabits | Percent | Count |
Bytes/Second | Kilobytes/Second | Megabytes/Second |
Gigabytes/Second | Terabytes/Second | Bits/Second |
Kilobits/Second | Megabits/Second | Gigabits/Second |
Terabits/Second | Count/Second | None</li>
<li><strong>period</strong> (<em>integer</em>) – The granularity, in seconds, of the returned datapoints.
Period must be at least 60 seconds and must be a multiple
of 60. The default value is 60.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.metric.Metric.startElement">
<tt class="descname">startElement</tt><big>(</big><em>name</em>, <em>attrs</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-boto.ec2.cloudwatch.alarm">
<span id="<API key>"></span><h2>boto.ec2.cloudwatch.alarm<a class="headerlink" href="
<dl class="class">
<dt id="boto.ec2.cloudwatch.alarm.AlarmHistoryItem">
<em class="property">class </em><tt class="descclassname">boto.ec2.cloudwatch.alarm.</tt><tt class="descname">AlarmHistoryItem</tt><big>(</big><em>connection=None</em><big>)</big><a class="headerlink" href="
<dd><dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.AlarmHistoryItem.endElement">
<tt class="descname">endElement</tt><big>(</big><em>name</em>, <em>value</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.AlarmHistoryItem.startElement">
<tt class="descname">startElement</tt><big>(</big><em>name</em>, <em>attrs</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm">
<em class="property">class </em><tt class="descclassname">boto.ec2.cloudwatch.alarm.</tt><tt class="descname">MetricAlarm</tt><big>(</big><em>connection=None</em>, <em>name=None</em>, <em>metric=None</em>, <em>namespace=None</em>, <em>statistic=None</em>, <em>comparison=None</em>, <em>threshold=None</em>, <em>period=None</em>, <em>evaluation_periods=None</em>, <em>unit=None</em>, <em>description=''</em>, <em>dimensions=None</em>, <em>alarm_actions=None</em>, <em><API key>=None</em>, <em>ok_actions=None</em><big>)</big><a class="headerlink" href="
<dd><p>Creates a new Alarm.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Name of alarm.</li>
<li><strong>metric</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Name of alarm’s associated metric.</li>
<li><strong>namespace</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – The namespace for the alarm’s metric.</li>
<li><strong>statistic</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – The statistic to apply to the alarm’s associated
metric.
Valid values: SampleCount|Average|Sum|Minimum|Maximum</li>
<li><strong>comparison</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Comparison used to compare statistic with threshold.
Valid values: >= | > | < | <=</li>
<li><strong>threshold</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – The value against which the specified statistic
is compared.</li>
<li><strong>period</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – The period in seconds over which teh specified
statistic is applied.</li>
<li><strong>evaluation_periods</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – The number of periods over which data is
compared to the specified threshold.</li>
<li><strong>unit</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Allowed Values are:
Seconds|Microseconds|Milliseconds,
Bytes|Kilobytes|Megabytes|Gigabytes|Terabytes,
Bits|Kilobits|Megabits|Gigabits|Terabits,
Percent|Count|
Bytes/Second|Kilobytes/Second|Megabytes/Second|
Gigabytes/Second|Terabytes/Second,
Bits/Second|Kilobits/Second|Megabits/Second,
Gigabits/Second|Terabits/Second|Count/Second|None</li>
<li><strong>description</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Description of MetricAlarm</li>
<li><strong>dimensions</strong> (<a class="reference external" href="http://docs.python.org/library/stdtypes.html#dict" title="(in Python v2.7)"><em>dict</em></a>) – <p>A dictionary of dimension key/values where
the key is the dimension name and the value
is either a scalar value or an iterator
of values to be associated with that
dimension.
Example: {</p>
<blockquote>
<div>‘InstanceId’: [‘i-0123456’, ‘i-0123457’],
‘LoadBalancerName’: ‘test-lb’</div></blockquote>
<p>}</p>
</li>
<li><strong>alarm_actions</strong> (<em>list of strs</em>) – A list of the ARNs of the actions to take in
ALARM state</li>
<li><strong><API key></strong> (<em>list of strs</em>) – A list of the ARNs of the actions to
take in INSUFFICIENT_DATA state</li>
<li><strong>ok_actions</strong> (<em>list of strs</em>) – A list of the ARNs of the actions to take in OK state</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.ALARM">
<tt class="descname">ALARM</tt><em class="property"> = 'ALARM'</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.INSUFFICIENT_DATA">
<tt class="descname">INSUFFICIENT_DATA</tt><em class="property"> = 'INSUFFICIENT_DATA'</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="attribute">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.OK">
<tt class="descname">OK</tt><em class="property"> = 'OK'</em><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.add_alarm_action">
<tt class="descname">add_alarm_action</tt><big>(</big><em>action_arn=None</em><big>)</big><a class="headerlink" href="
<dd><p>Adds an alarm action, represented as an SNS topic, to this alarm.
What do do when alarm is triggered.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>action_arn</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – SNS topics to which notification should be
sent if the alarm goes to state ALARM.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.<API key>">
<tt class="descname"><API key></tt><big>(</big><em>action_arn=None</em><big>)</big><a class="headerlink" href="
<dd><p>Adds an insufficient_data action, represented as an SNS topic, to
this alarm. What to do when the insufficient_data state is reached.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>action_arn</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – SNS topics to which notification should be
sent if the alarm goes to state INSUFFICIENT_DATA.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.add_ok_action">
<tt class="descname">add_ok_action</tt><big>(</big><em>action_arn=None</em><big>)</big><a class="headerlink" href="
<dd><p>Adds an ok action, represented as an SNS topic, to this alarm. What
to do when the ok state is reached.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>action_arn</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – SNS topics to which notification should be
sent if the alarm goes to state INSUFFICIENT_DATA.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.delete">
<tt class="descname">delete</tt><big>(</big><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.describe_history">
<tt class="descname">describe_history</tt><big>(</big><em>start_date=None</em>, <em>end_date=None</em>, <em>max_records=None</em>, <em>history_item_type=None</em>, <em>next_token=None</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.disable_actions">
<tt class="descname">disable_actions</tt><big>(</big><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.enable_actions">
<tt class="descname">enable_actions</tt><big>(</big><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.endElement">
<tt class="descname">endElement</tt><big>(</big><em>name</em>, <em>value</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.set_state">
<tt class="descname">set_state</tt><big>(</big><em>value</em>, <em>reason</em>, <em>data=None</em><big>)</big><a class="headerlink" href="
<dd><p>Temporarily sets the state of an alarm.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>value</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – OK | ALARM | INSUFFICIENT_DATA</li>
<li><strong>reason</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Reason alarm set (human readable).</li>
<li><strong>data</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Reason data (will be jsonified).</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.startElement">
<tt class="descname">startElement</tt><big>(</big><em>name</em>, <em>attrs</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarm.update">
<tt class="descname">update</tt><big>(</big><big>)</big><a class="headerlink" href="
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarms">
<em class="property">class </em><tt class="descclassname">boto.ec2.cloudwatch.alarm.</tt><tt class="descname">MetricAlarms</tt><big>(</big><em>connection=None</em><big>)</big><a class="headerlink" href="
<dd><p>Parses a list of MetricAlarms.</p>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarms.endElement">
<tt class="descname">endElement</tt><big>(</big><em>name</em>, <em>value</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
<dl class="method">
<dt id="boto.ec2.cloudwatch.alarm.MetricAlarms.startElement">
<tt class="descname">startElement</tt><big>(</big><em>name</em>, <em>attrs</em>, <em>connection</em><big>)</big><a class="headerlink" href="
<dd></dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="<API key>">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">CloudWatch Reference</a><ul>
<li><a class="reference internal" href="#module-boto.ec2.cloudwatch">boto.ec2.cloudwatch</a></li>
<li><a class="reference internal" href="#module-boto.ec2.cloudwatch.datapoint">boto.ec2.cloudwatch.datapoint</a></li>
<li><a class="reference internal" href="#module-boto.ec2.cloudwatch.metric">boto.ec2.cloudwatch.metric</a></li>
<li><a class="reference internal" href="#module-boto.ec2.cloudwatch.alarm">boto.ec2.cloudwatch.alarm</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="cloudtrail.html"
title="previous chapter">CloudTrail</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="cognito-identity.html"
title="next chapter">Cognito Identity</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/ref/cloudwatch.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script><div><a href="boto.pdf">PDF Version</a></div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="cognito-identity.html" title="Cognito Identity"
>next</a> |</li>
<li class="right" >
<a href="cloudtrail.html" title="CloudTrail"
>previous</a> |</li>
<li><a href="../index.html">boto v2.33.0</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2009,2010, Mitch Garnaat.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>
</html>
|
import pytest
from api.base.settings.defaults import API_BASE
from framework.auth.core import Auth
from osf.models import AbstractNode, NodeLog
from osf.utils import permissions
from osf.utils.sanitize import strip_html
from osf_tests.factories import (
NodeFactory,
ProjectFactory,
OSFGroupFactory,
RegistrationFactory,
AuthUserFactory,
PrivateLinkFactory,
)
from tests.base import fake
@pytest.fixture()
def user():
return AuthUserFactory()
@pytest.mark.django_db
class <API key>:
@pytest.fixture()
def private_project(self, user):
private_project = ProjectFactory()
private_project.add_contributor(
user,
permissions=permissions.WRITE
)
private_project.save()
return private_project
@pytest.fixture()
def component(self, user, private_project):
return NodeFactory(parent=private_project, creator=user)
@pytest.fixture()
def pointer(self):
return ProjectFactory()
@pytest.fixture()
def private_project_url(self, private_project):
return '/{}nodes/{}/children/'.format(API_BASE, private_project._id)
@pytest.fixture()
def public_project(self, user):
return ProjectFactory(is_public=True, creator=user)
@pytest.fixture()
def public_component(self, user, public_project):
return NodeFactory(parent=public_project, creator=user, is_public=True)
@pytest.fixture()
def public_project_url(self, user, public_project):
return '/{}nodes/{}/children/'.format(API_BASE, public_project._id)
@pytest.fixture()
def view_only_link(self, private_project):
view_only_link = PrivateLinkFactory(name='node_view_only_link')
view_only_link.nodes.add(private_project)
view_only_link.save()
return view_only_link
def <API key>(
self, app, public_component,
public_project_url):
# <API key>
res = app.get(public_project_url)
assert res.status_code == 200
assert res.content_type == 'application/vnd.api+json'
assert len(res.json['data']) == 1
assert res.json['data'][0]['id'] == public_component._id
# <API key>
non_contrib = AuthUserFactory()
res = app.get(public_project_url, auth=non_contrib.auth)
assert res.status_code == 200
assert res.content_type == 'application/vnd.api+json'
assert len(res.json['data']) == 1
assert res.json['data'][0]['id'] == public_component._id
def <API key>(
self, app, user, component, private_project, private_project_url):
# <API key>
res = app.get(private_project_url, expect_errors=True)
assert res.status_code == 401
assert 'detail' in res.json['errors'][0]
# <API key>
non_contrib = AuthUserFactory()
res = app.get(
private_project_url,
auth=non_contrib.auth,
expect_errors=True)
assert res.status_code == 403
assert 'detail' in res.json['errors'][0]
# <API key>
res = app.get(private_project_url, auth=user.auth)
assert res.status_code == 200
assert res.content_type == 'application/vnd.api+json'
assert len(res.json['data']) == 1
assert res.json['data'][0]['id'] == component._id
# <API key>
group_mem = AuthUserFactory()
group = OSFGroupFactory(creator=group_mem)
private_project.add_osf_group(group, permissions.ADMIN)
res = app.get(private_project_url, auth=group_mem.auth)
assert res.status_code == 200
assert len(res.json['data']) == 1
assert res.json['data'][0]['id'] == component._id
def <API key>(
self, app, user, component, private_project_url):
res = app.get(private_project_url, auth=user.auth)
assert len(res.json['data']) == 1
def <API key>(
self, app, user, component, private_project, private_project_url):
NodeFactory(parent=private_project)
res = app.get(private_project_url, auth=user.auth)
assert len(res.json['data']) == 1
def <API key>(
self, app, user, public_project, public_component,
component, public_project_url):
child_project = NodeFactory(parent=public_project, creator=user)
child_project.save()
res = app.get(public_project_url, auth=user.auth)
assert res.status_code == 200
ids = [node['id'] for node in res.json['data']]
assert child_project._id in ids
assert 2 == len(ids)
child_project.is_deleted = True
child_project.save()
res = app.get(public_project_url, auth=user.auth)
assert res.status_code == 200
ids = [node['id'] for node in res.json['data']]
assert child_project._id not in ids
assert 1 == len(ids)
def <API key>(
self, app, user, public_project, public_component,
public_project_url):
pointed_to = ProjectFactory(is_public=True)
public_project.add_pointer(
pointed_to,
auth=Auth(public_project.creator)
)
res = app.get(public_project_url, auth=user.auth)
ids = [node['id'] for node in res.json['data']]
assert public_component._id in ids # sanity check
assert pointed_to._id not in ids
# Duplicates returned in child count
def <API key>(self, app, user, public_project,
private_project, public_project_url):
user_2 = AuthUserFactory()
# Adding a child component
child = NodeFactory(parent=public_project, creator=user, is_public=True, category='software')
child.add_contributor(user_2, permissions.WRITE, save=True)
# Adding a grandchild
NodeFactory(parent=child, creator=user, is_public=True)
# Adding a node link
public_project.add_pointer(
private_project,
auth=Auth(public_project.creator)
)
# Assert NodeChildrenList returns one result
res = app.get(public_project_url, auth=user.auth)
assert len(res.json['data']) == 1
assert res.json['data'][0]['id'] == child._id
project_url = '/{}nodes/{}/?related_counts=children'.format(API_BASE, public_project._id)
res = app.get(project_url, auth=user.auth)
assert res.status_code == 200
# Verifying related_counts match direct children count (grandchildren not included, pointers not included)
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 1
def <API key>(self, app, user, public_project):
parent = ProjectFactory(creator=user, is_public=False)
user_2 = AuthUserFactory()
parent.add_contributor(user_2, permissions.ADMIN)
child = NodeFactory(parent=parent, creator=user_2, is_public=False, category='software')
NodeFactory(parent=child, creator=user_2, is_public=False)
# child has one component. `user` can view due to implict admin perms
component_url = '/{}nodes/{}/children/'.format(API_BASE, child._id, auth=user.auth)
res = app.get(component_url, auth=user.auth)
assert len(res.json['data']) == 1
project_url = '/{}nodes/{}/?related_counts=children'.format(API_BASE, child._id)
res = app.get(project_url, auth=user.auth)
assert res.status_code == 200
# Nodes with implicit admin perms are also included in the count
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 1
def <API key>(self, app, user, public_project):
NodeFactory(parent=public_project, creator=user)
url = '/{}nodes/{}/?related_counts=children'.format(API_BASE, public_project._id)
user_two = AuthUserFactory()
# Unauthorized
res = app.get(url)
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 0
# Logged in noncontrib
res = app.get(url, auth=user_two.auth)
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 0
# Logged in contrib
res = app.get(url, auth=user.auth)
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 1
def <API key>(self, user, app, private_project,
component, view_only_link, private_project_url):
# get node related_counts with vol before vol is attached to components
node_url = '/{}nodes/{}/?related_counts=children&view_only={}'.format(API_BASE,
private_project._id, view_only_link.key)
res = app.get(node_url)
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 0
# view only link is not attached to components
view_only_link_url = '{}?view_only={}'.format(private_project_url, view_only_link.key)
res = app.get(view_only_link_url)
ids = [node['id'] for node in res.json['data']]
assert res.status_code == 200
assert len(ids) == 0
assert component._id not in ids
# view only link is attached to components
view_only_link.nodes.add(component)
res = app.get(view_only_link_url)
ids = [node['id'] for node in res.json['data']]
assert res.status_code == 200
assert component._id in ids
assert 'contributors' in res.json['data'][0]['relationships']
assert '<API key>' in res.json['data'][0]['relationships']
assert '<API key>' in res.json['data'][0]['relationships']
# get node related_counts with vol once vol is attached to components
res = app.get(node_url)
assert res.json['data']['relationships']['children']['links']['related']['meta']['count'] == 1
# make private vol anonymous
view_only_link.anonymous = True
view_only_link.save()
res = app.get(view_only_link_url)
assert 'contributors' not in res.json['data'][0]['relationships']
assert '<API key>' not in res.json['data'][0]['relationships']
assert '<API key>' not in res.json['data'][0]['relationships']
# delete vol
view_only_link.is_deleted = True
view_only_link.save()
res = app.get(view_only_link_url, expect_errors=True)
assert res.status_code == 401
@pytest.mark.django_db
class <API key>:
def <API key>(self, app, user):
project = ProjectFactory(creator=user)
title_one, title_two = fake.bs(), fake.bs()
component = NodeFactory(title=title_one, parent=project)
component_two = NodeFactory(title=title_two, parent=project)
url = '/{}nodes/{}/children/?filter[title]={}'.format(
API_BASE,
project._id,
title_one
)
res = app.get(url, auth=user.auth)
ids = [node['id'] for node in res.json['data']]
assert component._id in ids
assert component_two._id not in ids
@pytest.mark.django_db
class TestNodeChildCreate:
@pytest.fixture()
def project(self, user):
return ProjectFactory(creator=user, is_public=True)
@pytest.fixture()
def url(self, project):
return '/{}nodes/{}/children/'.format(API_BASE, project._id)
@pytest.fixture()
def child(self):
return {
'data': {
'type': 'nodes',
'attributes': {
'title': 'child',
'description': 'this is a child project',
'category': 'project'
}
}
}
def test_creates_child(self, app, user, project, child, url):
# <API key>
res = app.post_json_api(url, child, expect_errors=True)
assert res.status_code == 401
project.reload()
assert len(project.nodes) == 0
# <API key>
read_contrib = AuthUserFactory()
project.add_contributor(
read_contrib,
permissions=permissions.READ,
auth=Auth(user), save=True
)
res = app.post_json_api(
url, child, auth=read_contrib.auth,
expect_errors=True
)
assert res.status_code == 403
project.reload()
assert len(project.nodes) == 0
# <API key>
non_contrib = AuthUserFactory()
res = app.post_json_api(
url, child, auth=non_contrib.auth,
expect_errors=True
)
assert res.status_code == 403
project.reload()
assert len(project.nodes) == 0
# <API key>
group_mem = AuthUserFactory()
group = OSFGroupFactory(creator=group_mem)
project.add_osf_group(group, permissions.READ)
res = app.post_json_api(
url, child, auth=group_mem.auth,
expect_errors=True
)
assert res.status_code == 403
project.update_osf_group(group, permissions.WRITE)
res = app.post_json_api(
url, child, auth=group_mem.auth,
expect_errors=True
)
assert res.status_code == 201
# <API key>
child = {
'data': {
'attributes': {
'title': 'child',
'description': 'this is a child project',
'category': 'project',
}
}
}
res = app.post_json_api(url, child, auth=user.auth, expect_errors=True)
assert res.status_code == 400
assert res.json['errors'][0]['detail'] == 'This field may not be null.'
assert res.json['errors'][0]['source']['pointer'] == '/data/type'
# <API key>
child = {
'data': {
'type': 'Wrong type.',
'attributes': {
'title': 'child',
'description': 'this is a child project',
'category': 'project',
}
}
}
res = app.post_json_api(url, child, auth=user.auth, expect_errors=True)
assert res.status_code == 409
assert res.json['errors'][0]['detail'] == 'This resource has a type of "nodes", but you set the json body\'s type field to "Wrong type.". You probably need to change the type field to match the resource\'s type.'
# <API key>
child = {
'data': {
'attributes': {
'title': 'child',
'description': 'this is a child project'
},
'category': 'project'
}
}
res = app.post_json_api(url, child, auth=user.auth, expect_errors=True)
assert res.status_code == 400
assert res.json['errors'][0]['detail'] == 'This field is required.'
assert res.json['errors'][0]['source']['pointer'] == '/data/attributes/category'
def <API key>(
self, app, user, project, child, url):
write_contrib = AuthUserFactory()
project.add_contributor(
write_contrib,
permissions=permissions.WRITE,
auth=Auth(user),
save=True)
res = app.post_json_api(url, child, auth=write_contrib.auth)
assert res.status_code == 201
assert res.json['data']['attributes']['title'] == child['data']['attributes']['title']
assert res.json['data']['attributes']['description'] == child['data']['attributes']['description']
assert res.json['data']['attributes']['category'] == child['data']['attributes']['category']
project.reload()
child_id = res.json['data']['id']
assert child_id == project.nodes[0]._id
assert AbstractNode.load(child_id).logs.latest(
).action == NodeLog.PROJECT_CREATED
def <API key>(
self, app, user, project, child, url):
res = app.post_json_api(url, child, auth=user.auth)
assert res.status_code == 201
assert res.json['data']['attributes']['title'] == child['data']['attributes']['title']
assert res.json['data']['attributes']['description'] == child['data']['attributes']['description']
assert res.json['data']['attributes']['category'] == child['data']['attributes']['category']
project.reload()
assert res.json['data']['id'] == project.nodes[0]._id
assert project.nodes[0].logs.latest().action == NodeLog.PROJECT_CREATED
def <API key>(
self, app, user, project, url):
title = '<em>Reasonable</em> <strong>Project</strong>'
description = 'An <script>alert("even reasonabler")</script> child'
res = app.post_json_api(url, {
'data': {
'type': 'nodes',
'attributes': {
'title': title,
'description': description,
'category': 'project',
'public': True
}
}
}, auth=user.auth)
child_id = res.json['data']['id']
assert res.status_code == 201
url = '/{}nodes/{}/'.format(API_BASE, child_id)
res = app.get(url, auth=user.auth)
assert res.json['data']['attributes']['title'] == strip_html(title)
assert res.json['data']['attributes']['description'] == strip_html(
description)
assert res.json['data']['attributes']['category'] == 'project'
project.reload()
child_id = res.json['data']['id']
assert child_id == project.nodes[0]._id
assert AbstractNode.load(child_id).logs.latest(
).action == NodeLog.PROJECT_CREATED
def <API key>(self, app, user, project):
registration = RegistrationFactory(project=project, creator=user)
url = '/{}nodes/{}/children/'.format(API_BASE, registration._id)
res = app.post_json_api(url, {
'data': {
'type': 'nodes',
'attributes': {
'title': fake.catch_phrase(),
'description': fake.bs(),
'category': 'project',
'public': True,
}
}
}, auth=user.auth, expect_errors=True)
assert res.status_code == 404
@pytest.mark.django_db
class <API key>:
@pytest.fixture()
def project(self, user):
return ProjectFactory(creator=user, is_public=True)
@pytest.fixture()
def url(self, project):
return '/{}nodes/{}/children/'.format(API_BASE, project._id)
@pytest.fixture()
def child_one(self):
return {
'type': 'nodes',
'attributes': {
'title': 'child',
'description': 'this is a child project',
'category': 'project'
}
}
@pytest.fixture()
def child_two(self):
return {
'type': 'nodes',
'attributes': {
'title': 'second child',
'description': 'this is my hypothesis',
'category': 'hypothesis'
}
}
def <API key>(self, app, user, url):
res = app.post_json_api(
url, auth=user.auth,
expect_errors=True, bulk=True)
assert res.status_code == 400
def <API key>(self, app, user, child_one, url):
res = app.post_json_api(
url, {'data': [child_one] * 101},
auth=user.auth, expect_errors=True, bulk=True
)
assert res.status_code == 400
assert res.json['errors'][0]['detail'] == 'Bulk operation limit is 100, got 101.'
assert res.json['errors'][0]['source']['pointer'] == '/data'
def <API key>(
self, app, user, project, child_one, child_two, url):
# <API key>
res = app.post_json_api(
url,
{'data': [child_one, child_two]},
expect_errors=True, bulk=True
)
assert res.status_code == 401
project.reload()
assert len(project.nodes) == 0
# <API key>
read_contrib = AuthUserFactory()
project.add_contributor(
read_contrib,
permissions=permissions.READ,
auth=Auth(user),
save=True)
res = app.post_json_api(
url,
{'data': [child_one, child_two]},
auth=read_contrib.auth,
expect_errors=True, bulk=True)
assert res.status_code == 403
project.reload()
assert len(project.nodes) == 0
# <API key>
non_contrib = AuthUserFactory()
res = app.post_json_api(
url,
{'data': [child_one, child_two]},
auth=non_contrib.auth,
expect_errors=True, bulk=True)
assert res.status_code == 403
project.reload()
assert len(project.nodes) == 0
def <API key>(
self, app, user, project, child_one, child_two, url):
res = app.post_json_api(
url,
{'data': [child_one, child_two]},
auth=user.auth, bulk=True)
assert res.status_code == 201
assert res.json['data'][0]['attributes']['title'] == child_one['attributes']['title']
assert res.json['data'][0]['attributes']['description'] == child_one['attributes']['description']
assert res.json['data'][0]['attributes']['category'] == child_one['attributes']['category']
assert res.json['data'][1]['attributes']['title'] == child_two['attributes']['title']
assert res.json['data'][1]['attributes']['description'] == child_two['attributes']['description']
assert res.json['data'][1]['attributes']['category'] == child_two['attributes']['category']
project.reload()
nodes = project.nodes
assert res.json['data'][0]['id'] == nodes[0]._id
assert res.json['data'][1]['id'] == nodes[1]._id
assert nodes[0].logs.latest().action == NodeLog.PROJECT_CREATED
assert nodes[1].logs.latest().action == NodeLog.PROJECT_CREATED
def <API key>(
self, app, user, project, child_one, child_two, url):
write_contrib = AuthUserFactory()
project.add_contributor(
write_contrib,
permissions=permissions.WRITE,
auth=Auth(user),
save=True)
res = app.post_json_api(
url,
{'data': [child_one, child_two]},
auth=write_contrib.auth, bulk=True)
assert res.status_code == 201
assert res.json['data'][0]['attributes']['title'] == child_one['attributes']['title']
assert res.json['data'][0]['attributes']['description'] == child_one['attributes']['description']
assert res.json['data'][0]['attributes']['category'] == child_one['attributes']['category']
assert res.json['data'][1]['attributes']['title'] == child_two['attributes']['title']
assert res.json['data'][1]['attributes']['description'] == child_two['attributes']['description']
assert res.json['data'][1]['attributes']['category'] == child_two['attributes']['category']
project.reload()
child_id = res.json['data'][0]['id']
child_two_id = res.json['data'][1]['id']
nodes = project.nodes
assert child_id == nodes[0]._id
assert child_two_id == nodes[1]._id
assert AbstractNode.load(child_id).logs.latest(
).action == NodeLog.PROJECT_CREATED
assert nodes[1].logs.latest().action == NodeLog.PROJECT_CREATED
def <API key>(
self, app, user, project, url):
title = '<em>Reasoning</em> <strong>Aboot Projects</strong>'
description = 'A <script>alert("super reasonable")</script> child'
res = app.post_json_api(url, {
'data': [{
'type': 'nodes',
'attributes': {
'title': title,
'description': description,
'category': 'project',
'public': True
}
}]
}, auth=user.auth, bulk=True)
child_id = res.json['data'][0]['id']
assert res.status_code == 201
url = '/{}nodes/{}/'.format(API_BASE, child_id)
res = app.get(url, auth=user.auth)
assert res.json['data']['attributes']['title'] == strip_html(title)
assert res.json['data']['attributes']['description'] == strip_html(
description)
assert res.json['data']['attributes']['category'] == 'project'
project.reload()
child_id = res.json['data']['id']
assert child_id == project.nodes[0]._id
assert AbstractNode.load(child_id).logs.latest(
).action == NodeLog.PROJECT_CREATED
def <API key>(
self, app, user, project, child_two):
registration = RegistrationFactory(project=project, creator=user)
url = '/{}nodes/{}/children/'.format(API_BASE, registration._id)
res = app.post_json_api(url, {
'data': [child_two, {
'type': 'nodes',
'attributes': {
'title': fake.catch_phrase(),
'description': fake.bs(),
'category': 'project',
'public': True,
}
}]
}, auth=user.auth, expect_errors=True, bulk=True)
assert res.status_code == 404
project.reload()
assert len(project.nodes) == 0
def <API key>(
self, app, user, project, child_two, url):
# def <API key>(self, app, user, project,
# child_two, url):
child = {
'data': [child_two, {
'attributes': {
'title': 'child',
'description': 'this is a child project',
'category': 'project',
}
}]
}
res = app.post_json_api(
url, child, auth=user.auth,
expect_errors=True, bulk=True)
assert res.status_code == 400
assert res.json['errors'][0]['detail'] == 'This field may not be null.'
assert res.json['errors'][0]['source']['pointer'] == '/data/1/type'
project.reload()
assert len(project.nodes) == 0
# def <API key>(self, app, user, project,
# child_two, url):
child = {
'data': [child_two, {
'type': 'Wrong type.',
'attributes': {
'title': 'child',
'description': 'this is a child project',
'category': 'project',
}
}]
}
res = app.post_json_api(
url, child, auth=user.auth,
expect_errors=True, bulk=True)
assert res.status_code == 409
assert res.json['errors'][0]['detail'] == 'This resource has a type of "nodes", but you set the json body\'s type field to "Wrong type.". You probably need to change the type field to match the resource\'s type.'
project.reload()
assert len(project.nodes) == 0
# def <API key>(self, app, user,
# project, child_two, url):
child = {
'data': [child_two, {
'title': 'child',
'description': 'this is a child project',
'category': 'project',
}]
}
res = app.post_json_api(
url, child, auth=user.auth,
expect_errors=True, bulk=True)
assert res.status_code == 400
assert res.json['errors'][0]['detail'] == 'This field is required.'
assert res.json['errors'][0]['source']['pointer'] == '/data/1/attributes/category'
project.reload()
assert len(project.nodes) == 0
|
//CHECK
if (!(String.prototype.charAt.hasOwnProperty('length'))) {
$ERROR('#0: String.prototype.charAt.hasOwnProperty(\'length\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length'));
}
// CHECK
if (String.prototype.charAt.<API key>('length')) {
$ERROR('#1: String.prototype.charAt.<API key>(\'length\') return false. Actual: '+String.prototype.charAt.<API key>('length'));
}
// CHECK
var count=0;
for (var p in String.prototype.charAt){
if (p==="length") count++;
}
if (count !== 0) {
$ERROR('
}
|
package imagestreamimport
import (
"fmt"
"net/http"
"time"
"github.com/golang/glog"
gocontext "golang.org/x/net/context"
kapierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/diff"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/validation/field"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/registry/rest"
kapi "k8s.io/kubernetes/pkg/api"
authorizationapi "github.com/openshift/origin/pkg/authorization/api"
"github.com/openshift/origin/pkg/client"
serverapi "github.com/openshift/origin/pkg/cmd/server/api"
"github.com/openshift/origin/pkg/dockerregistry"
"github.com/openshift/origin/pkg/image/api"
imageapiv1 "github.com/openshift/origin/pkg/image/api/v1"
"github.com/openshift/origin/pkg/image/importer"
"github.com/openshift/origin/pkg/image/registry/imagestream"
quotautil "github.com/openshift/origin/pkg/quota/util"
)
// ImporterFunc returns an instance of the importer that should be used per invocation.
type ImporterFunc func(r importer.RepositoryRetriever) importer.Interface
// <API key> returns an instance of a docker client that should be used per invocation of import,
// may be nil if no legacy import capability is required.
type <API key> func() dockerregistry.Client
// REST implements the RESTStorage interface for ImageStreamImport
type REST struct {
importFn ImporterFunc
streams imagestream.Registry
internalStreams rest.CreaterUpdater
images rest.Creater
secrets client.<API key>
transport http.RoundTripper
insecureTransport http.RoundTripper
clientFn <API key>
strategy *strategy
sarClient client.<API key>
}
// NewREST returns a REST storage implementation that handles importing images. The clientFn argument is optional
// if v1 Docker Registry importing is not required. Insecure transport is optional, and both transports should not
// include client certs unless you wish to allow the entire cluster to import using those certs.
func NewREST(importFn ImporterFunc, streams imagestream.Registry, internalStreams rest.CreaterUpdater,
images rest.Creater, secrets client.<API key>,
transport, insecureTransport http.RoundTripper,
clientFn <API key>,
<API key> *serverapi.AllowedRegistries,
registryFn api.DefaultRegistryFunc,
sarClient client.<API key>,
) *REST {
return &REST{
importFn: importFn,
streams: streams,
internalStreams: internalStreams,
images: images,
secrets: secrets,
transport: transport,
insecureTransport: insecureTransport,
clientFn: clientFn,
strategy: NewStrategy(<API key>, registryFn),
sarClient: sarClient,
}
}
// New is only implemented to make REST implement RESTStorage
func (r *REST) New() runtime.Object {
return &api.ImageStreamImport{}
}
func (r *REST) Create(ctx apirequest.Context, obj runtime.Object) (runtime.Object, error) {
isi, ok := obj.(*api.ImageStreamImport)
if !ok {
return nil, kapierrors.NewBadRequest(fmt.Sprintf("obj is not an ImageStreamImport: %#v", obj))
}
inputMeta := isi.ObjectMeta
if err := rest.BeforeCreate(r.strategy, ctx, obj); err != nil {
return nil, err
}
// Check if the user is allowed to create Images or ImageStreamMappings.
// In case the user is allowed to create them, do not validate the ImageStreamImport
// registry location against the registry whitelist, but instead allow to create any
// image from any registry.
user, ok := apirequest.UserFrom(ctx)
if !ok {
return nil, kapierrors.NewBadRequest("unable to get user from context")
}
isCreateImage, err := r.sarClient.Create(authorizationapi.AddUserToSAR(user,
&authorizationapi.SubjectAccessReview{
Action: authorizationapi.Action{
Verb: "create",
Group: api.GroupName,
Resource: "images",
},
},
))
if err != nil {
return nil, err
}
<API key>, err := r.sarClient.Create(authorizationapi.AddUserToSAR(user,
&authorizationapi.SubjectAccessReview{
Action: authorizationapi.Action{
Verb: "create",
Group: api.GroupName,
Resource: "imagestreammapping",
},
},
))
if err != nil {
return nil, err
}
if !isCreateImage.Allowed && !<API key>.Allowed {
if errs := r.strategy.<API key>(isi); len(errs) != 0 {
return nil, kapierrors.NewInvalid(api.Kind("ImageStreamImport"), isi.Name, errs)
}
}
namespace, ok := apirequest.NamespaceFrom(ctx)
if !ok {
return nil, kapierrors.NewBadRequest("a namespace must be specified to import images")
}
if r.clientFn != nil {
if client := r.clientFn(); client != nil {
ctx = apirequest.WithValue(ctx, importer.<API key>, client)
}
}
// only load secrets if we need them
credentials := importer.<API key>(func() ([]kapi.Secret, error) {
secrets, err := r.secrets.ImageStreamSecrets(namespace).Secrets(isi.Name, metav1.ListOptions{})
if err != nil {
return nil, err
}
return secrets.Items, nil
})
importCtx := importer.NewContext(r.transport, r.insecureTransport).WithCredentials(credentials)
imports := r.importFn(importCtx)
if err := imports.Import(ctx.(gocontext.Context), isi); err != nil {
return nil, kapierrors.NewInternalError(err)
}
// if we encountered an error loading credentials and any images could not be retrieved with an access
// related error, modify the message.
// TODO: set a status cause
if err := credentials.Err(); err != nil {
for i, image := range isi.Status.Images {
switch image.Status.Reason {
case metav1.<API key>, metav1.<API key>:
isi.Status.Images[i].Status.Message = fmt.Sprintf("Unable to load secrets for this image: %v; (%s)", err, image.Status.Message)
}
}
if r := isi.Status.Repository; r != nil {
switch r.Status.Reason {
case metav1.<API key>, metav1.<API key>:
r.Status.Message = fmt.Sprintf("Unable to load secrets for this repository: %v; (%s)", err, r.Status.Message)
}
}
}
// TODO: perform the transformation of the image stream and return it with the ISI if import is false
// so that clients can see what the resulting object would look like.
if !isi.Spec.Import {
clearManifests(isi)
return isi, nil
}
create := false
stream, err := r.streams.GetImageStream(ctx, isi.Name, &metav1.GetOptions{})
if err != nil {
if !kapierrors.IsNotFound(err) {
return nil, err
}
// consistency check, stream must exist
if len(inputMeta.ResourceVersion) > 0 || len(inputMeta.UID) > 0 {
return nil, err
}
create = true
stream = &api.ImageStream{
ObjectMeta: metav1.ObjectMeta{
Name: isi.Name,
Namespace: namespace,
Generation: 0,
},
}
} else {
if len(inputMeta.ResourceVersion) > 0 && inputMeta.ResourceVersion != stream.ResourceVersion {
glog.V(4).Infof("DEBUG: mismatch between requested ResourceVersion %s and located ResourceVersion %s", inputMeta.ResourceVersion, stream.ResourceVersion)
return nil, kapierrors.NewConflict(api.Resource("imagestream"), inputMeta.Name, fmt.Errorf("the image stream was updated from %q to %q", inputMeta.ResourceVersion, stream.ResourceVersion))
}
if len(inputMeta.UID) > 0 && inputMeta.UID != stream.UID {
glog.V(4).Infof("DEBUG: mismatch between requested UID %s and located UID %s", inputMeta.UID, stream.UID)
return nil, kapierrors.NewNotFound(api.Resource("imagestream"), inputMeta.Name)
}
}
if stream.Annotations == nil {
stream.Annotations = make(map[string]string)
}
now := metav1.Now()
_, hasAnnotation := stream.Annotations[api.<API key>]
nextGeneration := stream.Generation + 1
original, err := kapi.Scheme.DeepCopy(stream)
if err != nil {
return nil, err
}
// walk the retrieved images, ensuring each one exists in etcd
importedImages := make(map[string]error)
updatedImages := make(map[string]*api.Image)
if spec := isi.Spec.Repository; spec != nil {
for i, status := range isi.Status.Repository.Images {
if checkImportFailure(status, stream, status.Tag, nextGeneration, now) {
continue
}
image := status.Image
ref, err := api.<API key>(image.<API key>)
if err != nil {
utilruntime.HandleError(fmt.Errorf("unable to parse image reference during import: %v", err))
continue
}
from, err := api.<API key>(spec.From.Name)
if err != nil {
utilruntime.HandleError(fmt.Errorf("unable to parse from reference during import: %v", err))
continue
}
tag := ref.Tag
if len(status.Tag) > 0 {
tag = status.Tag
}
// we've imported a set of tags, ensure spec tag will point to this for later imports
from.ID, from.Tag = "", tag
if updated, ok := r.importSuccessful(ctx, image, stream, tag, from.Exact(), nextGeneration,
now, spec.ImportPolicy, spec.ReferencePolicy, importedImages, updatedImages); ok {
isi.Status.Repository.Images[i].Image = updated
}
}
}
for i, spec := range isi.Spec.Images {
if spec.To == nil {
continue
}
tag := spec.To.Name
// record a failure condition
status := isi.Status.Images[i]
if checkImportFailure(status, stream, tag, nextGeneration, now) {
// ensure that we have a spec tag set
ensureSpecTag(stream, tag, spec.From.Name, spec.ImportPolicy, spec.ReferencePolicy, false)
continue
}
// record success
image := status.Image
if updated, ok := r.importSuccessful(ctx, image, stream, tag, spec.From.Name, nextGeneration,
now, spec.ImportPolicy, spec.ReferencePolicy, importedImages, updatedImages); ok {
isi.Status.Images[i].Image = updated
}
}
// TODO: should we allow partial failure?
for _, err := range importedImages {
if err != nil {
return nil, err
}
}
clearManifests(isi)
// ensure defaulting is applied by round trip converting
// TODO: convert to using versioned types.
external, err := kapi.Scheme.ConvertToVersion(stream, imageapiv1.SchemeGroupVersion)
if err != nil {
return nil, err
}
kapi.Scheme.Default(external)
internal, err := kapi.Scheme.ConvertToVersion(external, api.SchemeGroupVersion)
if err != nil {
return nil, err
}
stream = internal.(*api.ImageStream)
// if and only if we have changes between the original and the imported stream, trigger
// an import
hasChanges := !kapi.Semantic.DeepEqual(original, stream)
if create {
stream.Annotations[api.<API key>] = now.UTC().Format(time.RFC3339)
glog.V(4).Infof("create new stream: %#v", stream)
obj, err = r.internalStreams.Create(ctx, stream)
} else {
if hasAnnotation && !hasChanges {
glog.V(4).Infof("stream did not change: %#v", stream)
obj, err = original.(*api.ImageStream), nil
} else {
if glog.V(4) {
glog.V(4).Infof("updating stream %s", diff.ObjectDiff(original, stream))
}
stream.Annotations[api.<API key>] = now.UTC().Format(time.RFC3339)
obj, _, err = r.internalStreams.Update(ctx, stream.Name, rest.<API key>(stream, kapi.Scheme))
}
}
if err != nil {
// if we have am admission limit error then record the conditions on the original stream. Quota errors
// will be recorded by the importer.
if quotautil.<API key>(err) {
originalStream := original.(*api.ImageStream)
<API key>(originalStream, stream, err, now, nextGeneration)
var limitErr error
obj, _, limitErr = r.internalStreams.Update(ctx, stream.Name, rest.<API key>(originalStream, kapi.Scheme))
if limitErr != nil {
utilruntime.HandleError(fmt.Errorf("failed to record limit exceeded status in image stream %s/%s: %v", stream.Namespace, stream.Name, limitErr))
}
}
return nil, err
}
isi.Status.Import = obj.(*api.ImageStream)
return isi, nil
}
// <API key> adds the limit err to any new tag.
func <API key>(originalStream *api.ImageStream, newStream *api.ImageStream, err error, now metav1.Time, nextGeneration int64) {
for tag := range newStream.Status.Tags {
if _, ok := originalStream.Status.Tags[tag]; !ok {
api.SetTagConditions(originalStream, tag, <API key>(err, nextGeneration, now))
}
}
}
func checkImportFailure(status api.ImageImportStatus, stream *api.ImageStream, tag string, nextGeneration int64, now metav1.Time) bool {
if status.Image != nil && status.Status.Status == metav1.StatusSuccess {
return false
}
message := status.Status.Message
if len(message) == 0 {
message = "unknown error prevented import"
}
condition := api.TagEventCondition{
Type: api.ImportSuccess,
Status: kapi.ConditionFalse,
Message: message,
Reason: string(status.Status.Reason),
Generation: nextGeneration,
LastTransitionTime: now,
}
if tag == "" {
if len(status.Tag) > 0 {
tag = status.Tag
} else if status.Image != nil {
if ref, err := api.<API key>(status.Image.<API key>); err == nil {
tag = ref.Tag
}
}
}
if !api.HasTagCondition(stream, tag, condition) {
api.SetTagConditions(stream, tag, condition)
if tagRef, ok := stream.Spec.Tags[tag]; ok {
zero := int64(0)
tagRef.Generation = &zero
stream.Spec.Tags[tag] = tagRef
}
}
return true
}
// ensureSpecTag guarantees that the spec tag is set with the provided from, importPolicy and referencePolicy.
// If reset is passed, the tag will be overwritten.
func ensureSpecTag(stream *api.ImageStream, tag, from string, importPolicy api.TagImportPolicy,
referencePolicy api.TagReferencePolicy, reset bool) api.TagReference {
if stream.Spec.Tags == nil {
stream.Spec.Tags = make(map[string]api.TagReference)
}
specTag, ok := stream.Spec.Tags[tag]
if ok && !reset {
return specTag
}
specTag.From = &kapi.ObjectReference{
Kind: "DockerImage",
Name: from,
}
zero := int64(0)
specTag.Generation = &zero
specTag.ImportPolicy = importPolicy
specTag.ReferencePolicy = referencePolicy
stream.Spec.Tags[tag] = specTag
return specTag
}
// importSuccessful records a successful import into an image stream, setting the spec tag, status tag or conditions, and ensuring
// the image is created in etcd. Images are cached so they are not created multiple times in a row (when multiple tags point to the
// same image), and a failure to persist the image will be summarized before we update the stream. If an image was imported by this
// operation, it *replaces* the imported image (from the remote repository) with the updated image.
func (r *REST) importSuccessful(
ctx apirequest.Context,
image *api.Image, stream *api.ImageStream, tag string, from string, nextGeneration int64, now metav1.Time,
importPolicy api.TagImportPolicy, referencePolicy api.TagReferencePolicy,
importedImages map[string]error, updatedImages map[string]*api.Image,
) (*api.Image, bool) {
r.strategy.<API key>(image)
pullSpec, _ := api.<API key>(image.<API key>, image.Name, "")
tagEvent := api.TagEvent{
Created: now,
<API key>: pullSpec,
Image: image.Name,
Generation: nextGeneration,
}
if stream.Spec.Tags == nil {
stream.Spec.Tags = make(map[string]api.TagReference)
}
// ensure the spec and status tag match the imported image
changed := api.DifferentTagEvent(stream, tag, tagEvent) || api.<API key>(stream, tag)
specTag, ok := stream.Spec.Tags[tag]
if changed || !ok {
specTag = ensureSpecTag(stream, tag, from, importPolicy, referencePolicy, true)
api.<API key>(stream, tag, tagEvent)
}
// always reset the import policy
specTag.ImportPolicy = importPolicy
stream.Spec.Tags[tag] = specTag
// import or reuse the image, and ensure tag conditions are set
importErr, alreadyImported := importedImages[image.Name]
if importErr != nil {
api.SetTagConditions(stream, tag, <API key>(importErr, nextGeneration, now))
} else {
api.SetTagConditions(stream, tag)
}
// create the image if it does not exist, otherwise cache the updated status from the store for use by other tags
if alreadyImported {
if updatedImage, ok := updatedImages[image.Name]; ok {
return updatedImage, true
}
return nil, false
}
updated, err := r.images.Create(ctx, image)
switch {
case kapierrors.IsAlreadyExists(err):
if err := api.ImageWithMetadata(image); err != nil {
glog.V(4).Infof("Unable to update image metadata during image import when image already exists %q: err", image.Name, err)
}
updated = image
fallthrough
case err == nil:
updatedImage := updated.(*api.Image)
updatedImages[image.Name] = updatedImage
//isi.Status.Repository.Images[i].Image = updatedImage
importedImages[image.Name] = nil
return updatedImage, true
default:
importedImages[image.Name] = err
}
return nil, false
}
// clearManifests unsets the manifest for each object that does not request it
func clearManifests(isi *api.ImageStreamImport) {
for i := range isi.Status.Images {
if !isi.Spec.Images[i].IncludeManifest {
if isi.Status.Images[i].Image != nil {
isi.Status.Images[i].Image.DockerImageManifest = ""
isi.Status.Images[i].Image.DockerImageConfig = ""
}
}
}
if isi.Spec.Repository != nil && !isi.Spec.Repository.IncludeManifest {
for i := range isi.Status.Repository.Images {
if isi.Status.Repository.Images[i].Image != nil {
isi.Status.Repository.Images[i].Image.DockerImageManifest = ""
isi.Status.Repository.Images[i].Image.DockerImageConfig = ""
}
}
}
}
func <API key>(err error, gen int64, now metav1.Time) api.TagEventCondition {
c := api.TagEventCondition{
Type: api.ImportSuccess,
Status: kapi.ConditionFalse,
Message: err.Error(),
Generation: gen,
LastTransitionTime: now,
}
if status, ok := err.(kapierrors.APIStatus); ok {
s := status.Status()
c.Reason, c.Message = string(s.Reason), s.Message
}
return c
}
func invalidStatus(kind, position string, errs ...*field.Error) metav1.Status {
return kapierrors.NewInvalid(api.Kind(kind), position, errs).ErrStatus
}
|
package scala.scalajs.js.annotation
import scala.annotation.meta._
@field @getter @setter
class JSGlobal extends scala.annotation.StaticAnnotation {
def this(name: String) = this()
}
|
/** @prettier */
import { expect } from 'chai';
import { EMPTY, of, EmptyError, defer, throwError, Observable } from 'rxjs';
import { throwIfEmpty, mergeMap, retry, take } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing';
import { observableMatcher } from '../helpers/observableMatcher';
/** @test {throwIfEmpty} */
describe('throwIfEmpty', () => {
let rxTestScheduler: TestScheduler;
beforeEach(() => {
rxTestScheduler = new TestScheduler(observableMatcher);
});
describe('with errorFactory', () => {
it('should error when empty', () => {
rxTestScheduler.run(({ cold, expectObservable }) => {
const source = cold('
const expected = ' ----
const result = source.pipe(throwIfEmpty(() => new Error('test')));
expectObservable(result).toBe(expected, undefined, new Error('test'));
});
});
it('should throw if empty', () => {
const error = new Error('So empty inside');
let thrown: any;
EMPTY.pipe(throwIfEmpty(() => error)).subscribe({
error(err) {
thrown = err;
},
});
expect(thrown).to.equal(error);
});
it('should NOT throw if NOT empty', () => {
const error = new Error('So empty inside');
let thrown: any;
of('test')
.pipe(throwIfEmpty(() => error))
.subscribe({
error(err) {
thrown = err;
},
});
expect(thrown).to.be.undefined;
});
it('should pass values through', () => {
rxTestScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
const source = cold('
const sub1 = ' ^
const expected = '
const result = source.pipe(throwIfEmpty(() => new Error('test')));
expectObservable(result).toBe(expected);
expectSubscriptions(source.subscriptions).toBe([sub1]);
});
});
it('should never when never', () => {
rxTestScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
const source = cold('-');
const sub1 = ' ^';
const expected = ' -';
const result = source.pipe(throwIfEmpty(() => new Error('test')));
expectObservable(result).toBe(expected);
expectSubscriptions(source.subscriptions).toBe([sub1]);
});
});
it('should error when empty', () => {
rxTestScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
const source = cold('
const sub1 = ' ^
const expected = ' ----
const result = source.pipe(throwIfEmpty(() => new Error('test')));
expectObservable(result).toBe(expected, undefined, new Error('test'));
expectSubscriptions(source.subscriptions).toBe([sub1]);
});
});
it('should throw if empty after retry', () => {
const error = new Error('So empty inside');
let thrown: any;
let sourceIsEmpty = false;
const source = defer(() => {
if (sourceIsEmpty) {
return EMPTY;
}
sourceIsEmpty = true;
return of(1, 2);
});
source
.pipe(
throwIfEmpty(() => error),
mergeMap((value) => {
if (value > 1) {
return throwError(() => new Error());
}
return of(value);
}),
retry(1)
)
.subscribe({
error(err) {
thrown = err;
},
});
expect(thrown).to.equal(error);
});
});
describe('without errorFactory', () => {
it('should throw EmptyError if empty', () => {
let thrown: any;
EMPTY.pipe(throwIfEmpty()).subscribe({
error(err) {
thrown = err;
},
});
expect(thrown).to.be.instanceof(EmptyError);
});
it('should NOT throw if NOT empty', () => {
let thrown: any;
of('test')
.pipe(throwIfEmpty())
.subscribe({
error(err) {
thrown = err;
},
});
expect(thrown).to.be.undefined;
});
it('should pass values through', () => {
rxTestScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
const source = cold('
const sub1 = ' ^
const expected = '
const result = source.pipe(throwIfEmpty());
expectObservable(result).toBe(expected);
expectSubscriptions(source.subscriptions).toBe([sub1]);
});
});
it('should never when never', () => {
rxTestScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
const source = cold('-');
const sub1 = ' ^';
const expected = ' -';
const result = source.pipe(throwIfEmpty());
expectObservable(result).toBe(expected);
expectSubscriptions(source.subscriptions).toBe([sub1]);
});
});
it('should error when empty', () => {
rxTestScheduler.run(({ cold, expectObservable, expectSubscriptions }) => {
const source = cold('
const sub1 = ' ^
const expected = ' ----
const result = source.pipe(throwIfEmpty());
expectObservable(result).toBe(expected, undefined, new EmptyError());
expectSubscriptions(source.subscriptions).toBe([sub1]);
});
});
it('should throw if empty after retry', () => {
let thrown: any;
let sourceIsEmpty = false;
const source = defer(() => {
if (sourceIsEmpty) {
return EMPTY;
}
sourceIsEmpty = true;
return of(1, 2);
});
source
.pipe(
throwIfEmpty(),
mergeMap((value) => {
if (value > 1) {
return throwError(() => new Error());
}
return of(value);
}),
retry(1)
)
.subscribe({
error(err) {
thrown = err;
},
});
expect(thrown).to.be.instanceof(EmptyError);
});
});
it('should stop listening to a synchronous observable when unsubscribed', () => {
const sideEffects: number[] = [];
const <API key> = new Observable<number>((subscriber) => {
// This will check to see if the subscriber was closed on each loop
// when the unsubscribe hits (from the `take`), it should be closed
for (let i = 0; !subscriber.closed && i < 10; i++) {
sideEffects.push(i);
subscriber.next(i);
}
});
<API key>.pipe(throwIfEmpty(), take(3)).subscribe(() => {
/* noop */
});
expect(sideEffects).to.deep.equal([0, 1, 2]);
});
});
|
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "<API key>.h"
#include <algorithm>
namespace Apache { namespace Hadoop { namespace Hive {
int <API key>[] = {
HiveObjectType::GLOBAL,
HiveObjectType::DATABASE,
HiveObjectType::TABLE,
HiveObjectType::PARTITION,
HiveObjectType::COLUMN
};
const char* <API key>[] = {
"GLOBAL",
"DATABASE",
"TABLE",
"PARTITION",
"COLUMN"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(5, <API key>, <API key>), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
PrincipalType::USER,
PrincipalType::ROLE,
PrincipalType::GROUP
};
const char* <API key>[] = {
"USER",
"ROLE",
"GROUP"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(3, <API key>, <API key>), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
PartitionEventType::LOAD_DONE
};
const char* <API key>[] = {
"LOAD_DONE"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(1, <API key>, <API key>), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kTxnStateValues[] = {
TxnState::COMMITTED,
TxnState::ABORTED,
TxnState::OPEN
};
const char* _kTxnStateNames[] = {
"COMMITTED",
"ABORTED",
"OPEN"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(3, _kTxnStateValues, _kTxnStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kLockLevelValues[] = {
LockLevel::DB,
LockLevel::TABLE,
LockLevel::PARTITION
};
const char* _kLockLevelNames[] = {
"DB",
"TABLE",
"PARTITION"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(3, _kLockLevelValues, _kLockLevelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kLockStateValues[] = {
LockState::ACQUIRED,
LockState::WAITING,
LockState::ABORT,
LockState::NOT_ACQUIRED
};
const char* _kLockStateNames[] = {
"ACQUIRED",
"WAITING",
"ABORT",
"NOT_ACQUIRED"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(4, _kLockStateValues, _kLockStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kLockTypeValues[] = {
LockType::SHARED_READ,
LockType::SHARED_WRITE,
LockType::EXCLUSIVE
};
const char* _kLockTypeNames[] = {
"SHARED_READ",
"SHARED_WRITE",
"EXCLUSIVE"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(3, _kLockTypeValues, _kLockTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
CompactionType::MINOR,
CompactionType::MAJOR
};
const char* <API key>[] = {
"MINOR",
"MAJOR"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(2, <API key>, <API key>), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
GrantRevokeType::GRANT,
GrantRevokeType::REVOKE
};
const char* <API key>[] = {
"GRANT",
"REVOKE"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(2, <API key>, <API key>), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
EventRequestType::INSERT,
EventRequestType::UPDATE,
EventRequestType::DELETE
};
const char* <API key>[] = {
"INSERT",
"UPDATE",
"DELETE"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(3, <API key>, <API key>), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
FunctionType::JAVA
};
const char* _kFunctionTypeNames[] = {
"JAVA"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(1, <API key>, _kFunctionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int <API key>[] = {
ResourceType::JAR,
ResourceType::FILE,
ResourceType::ARCHIVE
};
const char* _kResourceTypeNames[] = {
"JAR",
"FILE",
"ARCHIVE"
};
const std::map<int, const char*> <API key>(::apache::thrift::TEnumIterator(3, <API key>, _kResourceTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
const char* Version::ascii_fingerprint = "<API key>";
const uint8_t Version::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
uint32_t Version::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->version);
this->__isset.version = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->comments);
this->__isset.comments = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Version");
xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->version);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->comments);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Version &a, Version &b) {
using ::std::swap;
swap(a.version, b.version);
swap(a.comments, b.comments);
swap(a.__isset, b.__isset);
}
const char* FieldSchema::ascii_fingerprint = "<API key>";
const uint8_t FieldSchema::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71};
uint32_t FieldSchema::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->type);
this->__isset.type = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->comment);
this->__isset.comment = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("FieldSchema");
xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->type);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("comment", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->comment);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(FieldSchema &a, FieldSchema &b) {
using ::std::swap;
swap(a.name, b.name);
swap(a.type, b.type);
swap(a.comment, b.comment);
swap(a.__isset, b.__isset);
}
const char* Type::ascii_fingerprint = "<API key>";
const uint8_t Type::binary_fingerprint[16] = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42};
uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->type1);
this->__isset.type1 = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->type2);
this->__isset.type2 = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->fields.clear();
uint32_t _size0;
::apache::thrift::protocol::TType _etype3;
xfer += iprot->readListBegin(_etype3, _size0);
this->fields.resize(_size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4)
{
xfer += this->fields[_i4].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.fields = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Type");
xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
if (this->__isset.type1) {
xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->type1);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.type2) {
xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->type2);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.fields) {
xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fields.size()));
std::vector<FieldSchema> ::const_iterator _iter5;
for (_iter5 = this->fields.begin(); _iter5 != this->fields.end(); ++_iter5)
{
xfer += (*_iter5).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Type &a, Type &b) {
using ::std::swap;
swap(a.name, b.name);
swap(a.type1, b.type1);
swap(a.type2, b.type2);
swap(a.fields, b.fields);
swap(a.__isset, b.__isset);
}
const char* HiveObjectRef::ascii_fingerprint = "<API key>";
const uint8_t HiveObjectRef::binary_fingerprint[16] = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C};
uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast6;
xfer += iprot->readI32(ecast6);
this->objectType = (HiveObjectType::type)ecast6;
this->__isset.objectType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->objectName);
this->__isset.objectName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partValues.clear();
uint32_t _size7;
::apache::thrift::protocol::TType _etype10;
xfer += iprot->readListBegin(_etype10, _size7);
this->partValues.resize(_size7);
uint32_t _i11;
for (_i11 = 0; _i11 < _size7; ++_i11)
{
xfer += iprot->readString(this->partValues[_i11]);
}
xfer += iprot->readListEnd();
}
this->__isset.partValues = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->columnName);
this->__isset.columnName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("HiveObjectRef");
xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->objectType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->objectName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partValues.size()));
std::vector<std::string> ::const_iterator _iter12;
for (_iter12 = this->partValues.begin(); _iter12 != this->partValues.end(); ++_iter12)
{
xfer += oprot->writeString((*_iter12));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->columnName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(HiveObjectRef &a, HiveObjectRef &b) {
using ::std::swap;
swap(a.objectType, b.objectType);
swap(a.dbName, b.dbName);
swap(a.objectName, b.objectName);
swap(a.partValues, b.partValues);
swap(a.columnName, b.columnName);
swap(a.__isset, b.__isset);
}
const char* PrivilegeGrantInfo::ascii_fingerprint = "<API key>";
const uint8_t PrivilegeGrantInfo::binary_fingerprint[16] = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F};
uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->privilege);
this->__isset.privilege = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->grantor);
this->__isset.grantor = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast13;
xfer += iprot->readI32(ecast13);
this->grantorType = (PrincipalType::type)ecast13;
this->__isset.grantorType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->grantOption);
this->__isset.grantOption = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("PrivilegeGrantInfo");
xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->privilege);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->grantor);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32((int32_t)this->grantorType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5);
xfer += oprot->writeBool(this->grantOption);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b) {
using ::std::swap;
swap(a.privilege, b.privilege);
swap(a.createTime, b.createTime);
swap(a.grantor, b.grantor);
swap(a.grantorType, b.grantorType);
swap(a.grantOption, b.grantOption);
swap(a.__isset, b.__isset);
}
const char* HiveObjectPrivilege::ascii_fingerprint = "<API key>";
const uint8_t HiveObjectPrivilege::binary_fingerprint[16] = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8};
uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->hiveObject.read(iprot);
this->__isset.hiveObject = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->principalName);
this->__isset.principalName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast14;
xfer += iprot->readI32(ecast14);
this->principalType = (PrincipalType::type)ecast14;
this->__isset.principalType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->grantInfo.read(iprot);
this->__isset.grantInfo = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("HiveObjectPrivilege");
xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->hiveObject.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->principalName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3);
xfer += oprot->writeI32((int32_t)this->principalType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4);
xfer += this->grantInfo.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b) {
using ::std::swap;
swap(a.hiveObject, b.hiveObject);
swap(a.principalName, b.principalName);
swap(a.principalType, b.principalType);
swap(a.grantInfo, b.grantInfo);
swap(a.__isset, b.__isset);
}
const char* PrivilegeBag::ascii_fingerprint = "<API key>";
const uint8_t PrivilegeBag::binary_fingerprint[16] = {0xBB,0x89,0xE4,0x70,0x1B,0x7B,0x70,0x9B,0x04,0x6A,0x74,0xC9,0x0B,0x11,0x47,0xF2};
uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->privileges.clear();
uint32_t _size15;
::apache::thrift::protocol::TType _etype18;
xfer += iprot->readListBegin(_etype18, _size15);
this->privileges.resize(_size15);
uint32_t _i19;
for (_i19 = 0; _i19 < _size15; ++_i19)
{
xfer += this->privileges[_i19].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("PrivilegeBag");
xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->privileges.size()));
std::vector<HiveObjectPrivilege> ::const_iterator _iter20;
for (_iter20 = this->privileges.begin(); _iter20 != this->privileges.end(); ++_iter20)
{
xfer += (*_iter20).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(PrivilegeBag &a, PrivilegeBag &b) {
using ::std::swap;
swap(a.privileges, b.privileges);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x08,0xF7,0x5D,0x25,0x33,0x90,0x6E,0xA8,0x7B,0xE3,0x4E,0xA6,0x40,0x85,0x66,0x83};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->userPrivileges.clear();
uint32_t _size21;
::apache::thrift::protocol::TType _ktype22;
::apache::thrift::protocol::TType _vtype23;
xfer += iprot->readMapBegin(_ktype22, _vtype23, _size21);
uint32_t _i25;
for (_i25 = 0; _i25 < _size21; ++_i25)
{
std::string _key26;
xfer += iprot->readString(_key26);
std::vector<PrivilegeGrantInfo> & _val27 = this->userPrivileges[_key26];
{
_val27.clear();
uint32_t _size28;
::apache::thrift::protocol::TType _etype31;
xfer += iprot->readListBegin(_etype31, _size28);
_val27.resize(_size28);
uint32_t _i32;
for (_i32 = 0; _i32 < _size28; ++_i32)
{
xfer += _val27[_i32].read(iprot);
}
xfer += iprot->readListEnd();
}
}
xfer += iprot->readMapEnd();
}
this->__isset.userPrivileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->groupPrivileges.clear();
uint32_t _size33;
::apache::thrift::protocol::TType _ktype34;
::apache::thrift::protocol::TType _vtype35;
xfer += iprot->readMapBegin(_ktype34, _vtype35, _size33);
uint32_t _i37;
for (_i37 = 0; _i37 < _size33; ++_i37)
{
std::string _key38;
xfer += iprot->readString(_key38);
std::vector<PrivilegeGrantInfo> & _val39 = this->groupPrivileges[_key38];
{
_val39.clear();
uint32_t _size40;
::apache::thrift::protocol::TType _etype43;
xfer += iprot->readListBegin(_etype43, _size40);
_val39.resize(_size40);
uint32_t _i44;
for (_i44 = 0; _i44 < _size40; ++_i44)
{
xfer += _val39[_i44].read(iprot);
}
xfer += iprot->readListEnd();
}
}
xfer += iprot->readMapEnd();
}
this->__isset.groupPrivileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->rolePrivileges.clear();
uint32_t _size45;
::apache::thrift::protocol::TType _ktype46;
::apache::thrift::protocol::TType _vtype47;
xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45);
uint32_t _i49;
for (_i49 = 0; _i49 < _size45; ++_i49)
{
std::string _key50;
xfer += iprot->readString(_key50);
std::vector<PrivilegeGrantInfo> & _val51 = this->rolePrivileges[_key50];
{
_val51.clear();
uint32_t _size52;
::apache::thrift::protocol::TType _etype55;
xfer += iprot->readListBegin(_etype55, _size52);
_val51.resize(_size52);
uint32_t _i56;
for (_i56 = 0; _i56 < _size52; ++_i56)
{
xfer += _val51[_i56].read(iprot);
}
xfer += iprot->readListEnd();
}
}
xfer += iprot->readMapEnd();
}
this->__isset.rolePrivileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->userPrivileges.size()));
std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter57;
for (_iter57 = this->userPrivileges.begin(); _iter57 != this->userPrivileges.end(); ++_iter57)
{
xfer += oprot->writeString(_iter57->first);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter57->second.size()));
std::vector<PrivilegeGrantInfo> ::const_iterator _iter58;
for (_iter58 = _iter57->second.begin(); _iter58 != _iter57->second.end(); ++_iter58)
{
xfer += (*_iter58).write(oprot);
}
xfer += oprot->writeListEnd();
}
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->groupPrivileges.size()));
std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter59;
for (_iter59 = this->groupPrivileges.begin(); _iter59 != this->groupPrivileges.end(); ++_iter59)
{
xfer += oprot->writeString(_iter59->first);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter59->second.size()));
std::vector<PrivilegeGrantInfo> ::const_iterator _iter60;
for (_iter60 = _iter59->second.begin(); _iter60 != _iter59->second.end(); ++_iter60)
{
xfer += (*_iter60).write(oprot);
}
xfer += oprot->writeListEnd();
}
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->rolePrivileges.size()));
std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter61;
for (_iter61 = this->rolePrivileges.begin(); _iter61 != this->rolePrivileges.end(); ++_iter61)
{
xfer += oprot->writeString(_iter61->first);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter61->second.size()));
std::vector<PrivilegeGrantInfo> ::const_iterator _iter62;
for (_iter62 = _iter61->second.begin(); _iter62 != _iter61->second.end(); ++_iter62)
{
xfer += (*_iter62).write(oprot);
}
xfer += oprot->writeListEnd();
}
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.userPrivileges, b.userPrivileges);
swap(a.groupPrivileges, b.groupPrivileges);
swap(a.rolePrivileges, b.rolePrivileges);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xDF,0x47,0x4A,0x3C,0xB5,0x26,0xAD,0x40,0xDC,0x0F,0x2C,0x37,0x02,0xF7,0xAA,0x2C};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast63;
xfer += iprot->readI32(ecast63);
this->requestType = (GrantRevokeType::type)ecast63;
this->__isset.requestType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->privileges.read(iprot);
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->revokeGrantOption);
this->__isset.revokeGrantOption = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->requestType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2);
xfer += this->privileges.write(oprot);
xfer += oprot->writeFieldEnd();
if (this->__isset.revokeGrantOption) {
xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3);
xfer += oprot->writeBool(this->revokeGrantOption);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.requestType, b.requestType);
swap(a.privileges, b.privileges);
swap(a.revokeGrantOption, b.revokeGrantOption);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xBF,0x05,0x46,0x52,0xDE,0xF8,0x62,0x53,0xC2,0xBE,0xE7,0xD9,0x47,0xF1,0x67,0xDD};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->success);
this->__isset.success = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
if (this->__isset.success) {
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1);
xfer += oprot->writeBool(this->success);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.success, b.success);
swap(a.__isset, b.__isset);
}
const char* Role::ascii_fingerprint = "<API key>";
const uint8_t Role::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26};
uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->roleName);
this->__isset.roleName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->ownerName);
this->__isset.ownerName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Role");
xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->roleName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->ownerName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Role &a, Role &b) {
using ::std::swap;
swap(a.roleName, b.roleName);
swap(a.createTime, b.createTime);
swap(a.ownerName, b.ownerName);
swap(a.__isset, b.__isset);
}
const char* RolePrincipalGrant::ascii_fingerprint = "<API key>";
const uint8_t RolePrincipalGrant::binary_fingerprint[16] = {0x89,0x9B,0xA3,0xF6,0x21,0x4D,0xD1,0xB7,0x9D,0x27,0x20,0x6B,0xA8,0x57,0xC7,0x72};
uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->roleName);
this->__isset.roleName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->principalName);
this->__isset.principalName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast64;
xfer += iprot->readI32(ecast64);
this->principalType = (PrincipalType::type)ecast64;
this->__isset.principalType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->grantOption);
this->__isset.grantOption = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->grantTime);
this->__isset.grantTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->grantorName);
this->__isset.grantorName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast65;
xfer += iprot->readI32(ecast65);
this-><API key> = (PrincipalType::type)ecast65;
this->__isset.<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t RolePrincipalGrant::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("RolePrincipalGrant");
xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->roleName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->principalName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3);
xfer += oprot->writeI32((int32_t)this->principalType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 4);
xfer += oprot->writeBool(this->grantOption);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantTime", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32(this->grantTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("grantorName", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->grantorName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("<API key>", ::apache::thrift::protocol::T_I32, 7);
xfer += oprot->writeI32((int32_t)this-><API key>);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(RolePrincipalGrant &a, RolePrincipalGrant &b) {
using ::std::swap;
swap(a.roleName, b.roleName);
swap(a.principalName, b.principalName);
swap(a.principalType, b.principalType);
swap(a.grantOption, b.grantOption);
swap(a.grantTime, b.grantTime);
swap(a.grantorName, b.grantorName);
swap(a.<API key>, b.<API key>);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xD6,0xFD,0x82,0x6D,0x94,0x92,0x21,0x39,0x6F,0x4F,0xFC,0x3E,0xCC,0xD3,0xD1,0x92};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool <API key> = false;
bool <API key> = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->principal_name);
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast66;
xfer += iprot->readI32(ecast66);
this->principal_type = (PrincipalType::type)ecast66;
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->principal_name);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->principal_type);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.principal_name, b.principal_name);
swap(a.principal_type, b.principal_type);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x59,0x26,0xB4,0xB3,0x54,0x1A,0x62,0xE1,0x76,0x63,0x82,0x0C,0x7E,0x3B,0xE6,0x90};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool <API key> = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->principalGrants.clear();
uint32_t _size67;
::apache::thrift::protocol::TType _etype70;
xfer += iprot->readListBegin(_etype70, _size67);
this->principalGrants.resize(_size67);
uint32_t _i71;
for (_i71 = 0; _i71 < _size67; ++_i71)
{
xfer += this->principalGrants[_i71].read(iprot);
}
xfer += iprot->readListEnd();
}
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->principalGrants.size()));
std::vector<RolePrincipalGrant> ::const_iterator _iter72;
for (_iter72 = this->principalGrants.begin(); _iter72 != this->principalGrants.end(); ++_iter72)
{
xfer += (*_iter72).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.principalGrants, b.principalGrants);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_roleName = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->roleName);
isset_roleName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_roleName)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->roleName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.roleName, b.roleName);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x59,0x26,0xB4,0xB3,0x54,0x1A,0x62,0xE1,0x76,0x63,0x82,0x0C,0x7E,0x3B,0xE6,0x90};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool <API key> = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->principalGrants.clear();
uint32_t _size73;
::apache::thrift::protocol::TType _etype76;
xfer += iprot->readListBegin(_etype76, _size73);
this->principalGrants.resize(_size73);
uint32_t _i77;
for (_i77 = 0; _i77 < _size73; ++_i77)
{
xfer += this->principalGrants[_i77].read(iprot);
}
xfer += iprot->readListEnd();
}
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->principalGrants.size()));
std::vector<RolePrincipalGrant> ::const_iterator _iter78;
for (_iter78 = this->principalGrants.begin(); _iter78 != this->principalGrants.end(); ++_iter78)
{
xfer += (*_iter78).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.principalGrants, b.principalGrants);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x90,0x7D,0xEA,0x79,0x6F,0x2B,0xA7,0xAF,0x76,0xDC,0x25,0x66,0xE7,0x5F,0xAE,0xE7};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast79;
xfer += iprot->readI32(ecast79);
this->requestType = (GrantRevokeType::type)ecast79;
this->__isset.requestType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->roleName);
this->__isset.roleName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->principalName);
this->__isset.principalName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast80;
xfer += iprot->readI32(ecast80);
this->principalType = (PrincipalType::type)ecast80;
this->__isset.principalType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->grantor);
this->__isset.grantor = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast81;
xfer += iprot->readI32(ecast81);
this->grantorType = (PrincipalType::type)ecast81;
this->__isset.grantorType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->grantOption);
this->__isset.grantOption = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->requestType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->roleName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->principalName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32((int32_t)this->principalType);
xfer += oprot->writeFieldEnd();
if (this->__isset.grantor) {
xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->grantor);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.grantorType) {
xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32((int32_t)this->grantorType);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.grantOption) {
xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 7);
xfer += oprot->writeBool(this->grantOption);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.requestType, b.requestType);
swap(a.roleName, b.roleName);
swap(a.principalName, b.principalName);
swap(a.principalType, b.principalType);
swap(a.grantor, b.grantor);
swap(a.grantorType, b.grantorType);
swap(a.grantOption, b.grantOption);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xBF,0x05,0x46,0x52,0xDE,0xF8,0x62,0x53,0xC2,0xBE,0xE7,0xD9,0x47,0xF1,0x67,0xDD};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->success);
this->__isset.success = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
if (this->__isset.success) {
xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1);
xfer += oprot->writeBool(this->success);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.success, b.success);
swap(a.__isset, b.__isset);
}
const char* Database::ascii_fingerprint = "<API key>";
const uint8_t Database::binary_fingerprint[16] = {0x55,0x34,0x95,0xCA,0xE2,0x43,0xA1,0xC5,0x83,0xD5,0xC3,0xDD,0x99,0x0A,0xED,0x53};
uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->description);
this->__isset.description = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->locationUri);
this->__isset.locationUri = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size82;
::apache::thrift::protocol::TType _ktype83;
::apache::thrift::protocol::TType _vtype84;
xfer += iprot->readMapBegin(_ktype83, _vtype84, _size82);
uint32_t _i86;
for (_i86 = 0; _i86 < _size82; ++_i86)
{
std::string _key87;
xfer += iprot->readString(_key87);
std::string& _val88 = this->parameters[_key87];
xfer += iprot->readString(_val88);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->privileges.read(iprot);
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->ownerName);
this->__isset.ownerName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast89;
xfer += iprot->readI32(ecast89);
this->ownerType = (PrincipalType::type)ecast89;
this->__isset.ownerType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Database");
xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->description);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("locationUri", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->locationUri);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 4);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter90;
for (_iter90 = this->parameters.begin(); _iter90 != this->parameters.end(); ++_iter90)
{
xfer += oprot->writeString(_iter90->first);
xfer += oprot->writeString(_iter90->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
if (this->__isset.privileges) {
xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 5);
xfer += this->privileges.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.ownerName) {
xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->ownerName);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.ownerType) {
xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 7);
xfer += oprot->writeI32((int32_t)this->ownerType);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Database &a, Database &b) {
using ::std::swap;
swap(a.name, b.name);
swap(a.description, b.description);
swap(a.locationUri, b.locationUri);
swap(a.parameters, b.parameters);
swap(a.privileges, b.privileges);
swap(a.ownerName, b.ownerName);
swap(a.ownerType, b.ownerType);
swap(a.__isset, b.__isset);
}
const char* SerDeInfo::ascii_fingerprint = "<API key>";
const uint8_t SerDeInfo::binary_fingerprint[16] = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7};
uint32_t SerDeInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->name);
this->__isset.name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->serializationLib);
this->__isset.serializationLib = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size91;
::apache::thrift::protocol::TType _ktype92;
::apache::thrift::protocol::TType _vtype93;
xfer += iprot->readMapBegin(_ktype92, _vtype93, _size91);
uint32_t _i95;
for (_i95 = 0; _i95 < _size91; ++_i95)
{
std::string _key96;
xfer += iprot->readString(_key96);
std::string& _val97 = this->parameters[_key96];
xfer += iprot->readString(_val97);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SerDeInfo");
xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("serializationLib", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->serializationLib);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter98;
for (_iter98 = this->parameters.begin(); _iter98 != this->parameters.end(); ++_iter98)
{
xfer += oprot->writeString(_iter98->first);
xfer += oprot->writeString(_iter98->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(SerDeInfo &a, SerDeInfo &b) {
using ::std::swap;
swap(a.name, b.name);
swap(a.serializationLib, b.serializationLib);
swap(a.parameters, b.parameters);
swap(a.__isset, b.__isset);
}
const char* Order::ascii_fingerprint = "<API key>";
const uint8_t Order::binary_fingerprint[16] = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36};
uint32_t Order::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->col);
this->__isset.col = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->order);
this->__isset.order = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Order");
xfer += oprot->writeFieldBegin("col", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->col);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("order", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->order);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Order &a, Order &b) {
using ::std::swap;
swap(a.col, b.col);
swap(a.order, b.order);
swap(a.__isset, b.__isset);
}
const char* SkewedInfo::ascii_fingerprint = "<API key>";
const uint8_t SkewedInfo::binary_fingerprint[16] = {0x4B,0xF2,0xED,0x84,0xBC,0x3C,0x3E,0xB2,0x97,0xA2,0xAE,0x2F,0xA8,0x42,0x7E,0xB1};
uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->skewedColNames.clear();
uint32_t _size99;
::apache::thrift::protocol::TType _etype102;
xfer += iprot->readListBegin(_etype102, _size99);
this->skewedColNames.resize(_size99);
uint32_t _i103;
for (_i103 = 0; _i103 < _size99; ++_i103)
{
xfer += iprot->readString(this->skewedColNames[_i103]);
}
xfer += iprot->readListEnd();
}
this->__isset.skewedColNames = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->skewedColValues.clear();
uint32_t _size104;
::apache::thrift::protocol::TType _etype107;
xfer += iprot->readListBegin(_etype107, _size104);
this->skewedColValues.resize(_size104);
uint32_t _i108;
for (_i108 = 0; _i108 < _size104; ++_i108)
{
{
this->skewedColValues[_i108].clear();
uint32_t _size109;
::apache::thrift::protocol::TType _etype112;
xfer += iprot->readListBegin(_etype112, _size109);
this->skewedColValues[_i108].resize(_size109);
uint32_t _i113;
for (_i113 = 0; _i113 < _size109; ++_i113)
{
xfer += iprot->readString(this->skewedColValues[_i108][_i113]);
}
xfer += iprot->readListEnd();
}
}
xfer += iprot->readListEnd();
}
this->__isset.skewedColValues = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this-><API key>.clear();
uint32_t _size114;
::apache::thrift::protocol::TType _ktype115;
::apache::thrift::protocol::TType _vtype116;
xfer += iprot->readMapBegin(_ktype115, _vtype116, _size114);
uint32_t _i118;
for (_i118 = 0; _i118 < _size114; ++_i118)
{
std::vector<std::string> _key119;
{
_key119.clear();
uint32_t _size121;
::apache::thrift::protocol::TType _etype124;
xfer += iprot->readListBegin(_etype124, _size121);
_key119.resize(_size121);
uint32_t _i125;
for (_i125 = 0; _i125 < _size121; ++_i125)
{
xfer += iprot->readString(_key119[_i125]);
}
xfer += iprot->readListEnd();
}
std::string& _val120 = this-><API key>[_key119];
xfer += iprot->readString(_val120);
}
xfer += iprot->readMapEnd();
}
this->__isset.<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SkewedInfo");
xfer += oprot->writeFieldBegin("skewedColNames", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->skewedColNames.size()));
std::vector<std::string> ::const_iterator _iter126;
for (_iter126 = this->skewedColNames.begin(); _iter126 != this->skewedColNames.end(); ++_iter126)
{
xfer += oprot->writeString((*_iter126));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("skewedColValues", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->skewedColValues.size()));
std::vector<std::vector<std::string> > ::const_iterator _iter127;
for (_iter127 = this->skewedColValues.begin(); _iter127 != this->skewedColValues.end(); ++_iter127)
{
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*_iter127).size()));
std::vector<std::string> ::const_iterator _iter128;
for (_iter128 = (*_iter127).begin(); _iter128 != (*_iter127).end(); ++_iter128)
{
xfer += oprot->writeString((*_iter128));
}
xfer += oprot->writeListEnd();
}
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("<API key>", ::apache::thrift::protocol::T_MAP, 3);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_LIST, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this-><API key>.size()));
std::map<std::vector<std::string> , std::string> ::const_iterator _iter129;
for (_iter129 = this-><API key>.begin(); _iter129 != this-><API key>.end(); ++_iter129)
{
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(_iter129->first.size()));
std::vector<std::string> ::const_iterator _iter130;
for (_iter130 = _iter129->first.begin(); _iter130 != _iter129->first.end(); ++_iter130)
{
xfer += oprot->writeString((*_iter130));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeString(_iter129->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(SkewedInfo &a, SkewedInfo &b) {
using ::std::swap;
swap(a.skewedColNames, b.skewedColNames);
swap(a.skewedColValues, b.skewedColValues);
swap(a.<API key>, b.<API key>);
swap(a.__isset, b.__isset);
}
const char* StorageDescriptor::ascii_fingerprint = "<API key>";
const uint8_t StorageDescriptor::binary_fingerprint[16] = {0xCA,0x8C,0x9A,0xA5,0xFE,0x4C,0x32,0x64,0x37,0x57,0xD8,0x63,0x9C,0xEF,0x0C,0xD7};
uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->cols.clear();
uint32_t _size131;
::apache::thrift::protocol::TType _etype134;
xfer += iprot->readListBegin(_etype134, _size131);
this->cols.resize(_size131);
uint32_t _i135;
for (_i135 = 0; _i135 < _size131; ++_i135)
{
xfer += this->cols[_i135].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.cols = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->location);
this->__isset.location = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->inputFormat);
this->__isset.inputFormat = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->outputFormat);
this->__isset.outputFormat = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->compressed);
this->__isset.compressed = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->numBuckets);
this->__isset.numBuckets = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->serdeInfo.read(iprot);
this->__isset.serdeInfo = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->bucketCols.clear();
uint32_t _size136;
::apache::thrift::protocol::TType _etype139;
xfer += iprot->readListBegin(_etype139, _size136);
this->bucketCols.resize(_size136);
uint32_t _i140;
for (_i140 = 0; _i140 < _size136; ++_i140)
{
xfer += iprot->readString(this->bucketCols[_i140]);
}
xfer += iprot->readListEnd();
}
this->__isset.bucketCols = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->sortCols.clear();
uint32_t _size141;
::apache::thrift::protocol::TType _etype144;
xfer += iprot->readListBegin(_etype144, _size141);
this->sortCols.resize(_size141);
uint32_t _i145;
for (_i145 = 0; _i145 < _size141; ++_i145)
{
xfer += this->sortCols[_i145].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.sortCols = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size146;
::apache::thrift::protocol::TType _ktype147;
::apache::thrift::protocol::TType _vtype148;
xfer += iprot->readMapBegin(_ktype147, _vtype148, _size146);
uint32_t _i150;
for (_i150 = 0; _i150 < _size146; ++_i150)
{
std::string _key151;
xfer += iprot->readString(_key151);
std::string& _val152 = this->parameters[_key151];
xfer += iprot->readString(_val152);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->skewedInfo.read(iprot);
this->__isset.skewedInfo = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 12:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this-><API key>);
this->__isset.<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("StorageDescriptor");
xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->cols.size()));
std::vector<FieldSchema> ::const_iterator _iter153;
for (_iter153 = this->cols.begin(); _iter153 != this->cols.end(); ++_iter153)
{
xfer += (*_iter153).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("location", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->location);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("inputFormat", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->inputFormat);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("outputFormat", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->outputFormat);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("compressed", ::apache::thrift::protocol::T_BOOL, 5);
xfer += oprot->writeBool(this->compressed);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numBuckets", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32(this->numBuckets);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("serdeInfo", ::apache::thrift::protocol::T_STRUCT, 7);
xfer += this->serdeInfo.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->bucketCols.size()));
std::vector<std::string> ::const_iterator _iter154;
for (_iter154 = this->bucketCols.begin(); _iter154 != this->bucketCols.end(); ++_iter154)
{
xfer += oprot->writeString((*_iter154));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->sortCols.size()));
std::vector<Order> ::const_iterator _iter155;
for (_iter155 = this->sortCols.begin(); _iter155 != this->sortCols.end(); ++_iter155)
{
xfer += (*_iter155).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter156;
for (_iter156 = this->parameters.begin(); _iter156 != this->parameters.end(); ++_iter156)
{
xfer += oprot->writeString(_iter156->first);
xfer += oprot->writeString(_iter156->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
if (this->__isset.skewedInfo) {
xfer += oprot->writeFieldBegin("skewedInfo", ::apache::thrift::protocol::T_STRUCT, 11);
xfer += this->skewedInfo.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.<API key>) {
xfer += oprot->writeFieldBegin("<API key>", ::apache::thrift::protocol::T_BOOL, 12);
xfer += oprot->writeBool(this-><API key>);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(StorageDescriptor &a, StorageDescriptor &b) {
using ::std::swap;
swap(a.cols, b.cols);
swap(a.location, b.location);
swap(a.inputFormat, b.inputFormat);
swap(a.outputFormat, b.outputFormat);
swap(a.compressed, b.compressed);
swap(a.numBuckets, b.numBuckets);
swap(a.serdeInfo, b.serdeInfo);
swap(a.bucketCols, b.bucketCols);
swap(a.sortCols, b.sortCols);
swap(a.parameters, b.parameters);
swap(a.skewedInfo, b.skewedInfo);
swap(a.<API key>, b.<API key>);
swap(a.__isset, b.__isset);
}
const char* Table::ascii_fingerprint = "<API key>";
const uint8_t Table::binary_fingerprint[16] = {0x29,0xEF,0xB2,0xA5,0x97,0x0E,0xF5,0x72,0x03,0x9E,0x5D,0x94,0xCC,0x78,0xAA,0x85};
uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableName);
this->__isset.tableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->owner);
this->__isset.owner = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->lastAccessTime);
this->__isset.lastAccessTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->retention);
this->__isset.retention = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->sd.read(iprot);
this->__isset.sd = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitionKeys.clear();
uint32_t _size157;
::apache::thrift::protocol::TType _etype160;
xfer += iprot->readListBegin(_etype160, _size157);
this->partitionKeys.resize(_size157);
uint32_t _i161;
for (_i161 = 0; _i161 < _size157; ++_i161)
{
xfer += this->partitionKeys[_i161].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.partitionKeys = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size162;
::apache::thrift::protocol::TType _ktype163;
::apache::thrift::protocol::TType _vtype164;
xfer += iprot->readMapBegin(_ktype163, _vtype164, _size162);
uint32_t _i166;
for (_i166 = 0; _i166 < _size162; ++_i166)
{
std::string _key167;
xfer += iprot->readString(_key167);
std::string& _val168 = this->parameters[_key167];
xfer += iprot->readString(_val168);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->viewOriginalText);
this->__isset.viewOriginalText = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->viewExpandedText);
this->__isset.viewExpandedText = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 12:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableType);
this->__isset.tableType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 13:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->privileges.read(iprot);
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 14:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->temporary);
this->__isset.temporary = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Table");
xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->tableName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->owner);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32(this->lastAccessTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("retention", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32(this->retention);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 7);
xfer += this->sd.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitionKeys.size()));
std::vector<FieldSchema> ::const_iterator _iter169;
for (_iter169 = this->partitionKeys.begin(); _iter169 != this->partitionKeys.end(); ++_iter169)
{
xfer += (*_iter169).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter170;
for (_iter170 = this->parameters.begin(); _iter170 != this->parameters.end(); ++_iter170)
{
xfer += oprot->writeString(_iter170->first);
xfer += oprot->writeString(_iter170->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("viewOriginalText", ::apache::thrift::protocol::T_STRING, 10);
xfer += oprot->writeString(this->viewOriginalText);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("viewExpandedText", ::apache::thrift::protocol::T_STRING, 11);
xfer += oprot->writeString(this->viewExpandedText);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12);
xfer += oprot->writeString(this->tableType);
xfer += oprot->writeFieldEnd();
if (this->__isset.privileges) {
xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 13);
xfer += this->privileges.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.temporary) {
xfer += oprot->writeFieldBegin("temporary", ::apache::thrift::protocol::T_BOOL, 14);
xfer += oprot->writeBool(this->temporary);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Table &a, Table &b) {
using ::std::swap;
swap(a.tableName, b.tableName);
swap(a.dbName, b.dbName);
swap(a.owner, b.owner);
swap(a.createTime, b.createTime);
swap(a.lastAccessTime, b.lastAccessTime);
swap(a.retention, b.retention);
swap(a.sd, b.sd);
swap(a.partitionKeys, b.partitionKeys);
swap(a.parameters, b.parameters);
swap(a.viewOriginalText, b.viewOriginalText);
swap(a.viewExpandedText, b.viewExpandedText);
swap(a.tableType, b.tableType);
swap(a.privileges, b.privileges);
swap(a.temporary, b.temporary);
swap(a.__isset, b.__isset);
}
const char* Partition::ascii_fingerprint = "<API key>";
const uint8_t Partition::binary_fingerprint[16] = {0x31,0xA5,0x22,0x41,0xB8,0x8A,0x42,0x6C,0x34,0x08,0x7F,0xE3,0x83,0x43,0xFF,0x51};
uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->values.clear();
uint32_t _size171;
::apache::thrift::protocol::TType _etype174;
xfer += iprot->readListBegin(_etype174, _size171);
this->values.resize(_size171);
uint32_t _i175;
for (_i175 = 0; _i175 < _size171; ++_i175)
{
xfer += iprot->readString(this->values[_i175]);
}
xfer += iprot->readListEnd();
}
this->__isset.values = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableName);
this->__isset.tableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->lastAccessTime);
this->__isset.lastAccessTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->sd.read(iprot);
this->__isset.sd = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size176;
::apache::thrift::protocol::TType _ktype177;
::apache::thrift::protocol::TType _vtype178;
xfer += iprot->readMapBegin(_ktype177, _vtype178, _size176);
uint32_t _i180;
for (_i180 = 0; _i180 < _size176; ++_i180)
{
std::string _key181;
xfer += iprot->readString(_key181);
std::string& _val182 = this->parameters[_key181];
xfer += iprot->readString(_val182);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->privileges.read(iprot);
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Partition");
xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->values.size()));
std::vector<std::string> ::const_iterator _iter183;
for (_iter183 = this->values.begin(); _iter183 != this->values.end(); ++_iter183)
{
xfer += oprot->writeString((*_iter183));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->tableName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32(this->lastAccessTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 6);
xfer += this->sd.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter184;
for (_iter184 = this->parameters.begin(); _iter184 != this->parameters.end(); ++_iter184)
{
xfer += oprot->writeString(_iter184->first);
xfer += oprot->writeString(_iter184->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
if (this->__isset.privileges) {
xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 8);
xfer += this->privileges.write(oprot);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Partition &a, Partition &b) {
using ::std::swap;
swap(a.values, b.values);
swap(a.dbName, b.dbName);
swap(a.tableName, b.tableName);
swap(a.createTime, b.createTime);
swap(a.lastAccessTime, b.lastAccessTime);
swap(a.sd, b.sd);
swap(a.parameters, b.parameters);
swap(a.privileges, b.privileges);
swap(a.__isset, b.__isset);
}
const char* PartitionWithoutSD::ascii_fingerprint = "<API key>";
const uint8_t PartitionWithoutSD::binary_fingerprint[16] = {0xD7,0x9F,0xA4,0x44,0x99,0x88,0x8D,0x0E,0x50,0xB5,0x62,0x5E,0x0C,0x53,0x6D,0xEA};
uint32_t PartitionWithoutSD::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->values.clear();
uint32_t _size185;
::apache::thrift::protocol::TType _etype188;
xfer += iprot->readListBegin(_etype188, _size185);
this->values.resize(_size185);
uint32_t _i189;
for (_i189 = 0; _i189 < _size185; ++_i189)
{
xfer += iprot->readString(this->values[_i189]);
}
xfer += iprot->readListEnd();
}
this->__isset.values = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->lastAccessTime);
this->__isset.lastAccessTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->relativePath);
this->__isset.relativePath = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size190;
::apache::thrift::protocol::TType _ktype191;
::apache::thrift::protocol::TType _vtype192;
xfer += iprot->readMapBegin(_ktype191, _vtype192, _size190);
uint32_t _i194;
for (_i194 = 0; _i194 < _size190; ++_i194)
{
std::string _key195;
xfer += iprot->readString(_key195);
std::string& _val196 = this->parameters[_key195];
xfer += iprot->readString(_val196);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->privileges.read(iprot);
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t PartitionWithoutSD::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("PartitionWithoutSD");
xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->values.size()));
std::vector<std::string> ::const_iterator _iter197;
for (_iter197 = this->values.begin(); _iter197 != this->values.end(); ++_iter197)
{
xfer += oprot->writeString((*_iter197));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 3);
xfer += oprot->writeI32(this->lastAccessTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("relativePath", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->relativePath);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 5);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter198;
for (_iter198 = this->parameters.begin(); _iter198 != this->parameters.end(); ++_iter198)
{
xfer += oprot->writeString(_iter198->first);
xfer += oprot->writeString(_iter198->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
if (this->__isset.privileges) {
xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 6);
xfer += this->privileges.write(oprot);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(PartitionWithoutSD &a, PartitionWithoutSD &b) {
using ::std::swap;
swap(a.values, b.values);
swap(a.createTime, b.createTime);
swap(a.lastAccessTime, b.lastAccessTime);
swap(a.relativePath, b.relativePath);
swap(a.parameters, b.parameters);
swap(a.privileges, b.privileges);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x7B,0xEE,0x93,0x05,0xB4,0x2D,0xCD,0x08,0x3F,0xF0,0x6B,0xEE,0x6D,0xDC,0x61,0xCF};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitions.clear();
uint32_t _size199;
::apache::thrift::protocol::TType _etype202;
xfer += iprot->readListBegin(_etype202, _size199);
this->partitions.resize(_size199);
uint32_t _i203;
for (_i203 = 0; _i203 < _size199; ++_i203)
{
xfer += this->partitions[_i203].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.partitions = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->sd.read(iprot);
this->__isset.sd = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
std::vector<PartitionWithoutSD> ::const_iterator _iter204;
for (_iter204 = this->partitions.begin(); _iter204 != this->partitions.end(); ++_iter204)
{
xfer += (*_iter204).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 2);
xfer += this->sd.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.partitions, b.partitions);
swap(a.sd, b.sd);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xA0,0x48,0x23,0x5C,0xB9,0xA2,0x57,0xC8,0xA7,0x4E,0x36,0x91,0xBE,0xFE,0x06,0x74};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitions.clear();
uint32_t _size205;
::apache::thrift::protocol::TType _etype208;
xfer += iprot->readListBegin(_etype208, _size205);
this->partitions.resize(_size205);
uint32_t _i209;
for (_i209 = 0; _i209 < _size205; ++_i209)
{
xfer += this->partitions[_i209].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.partitions = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
std::vector<Partition> ::const_iterator _iter210;
for (_iter210 = this->partitions.begin(); _iter210 != this->partitions.end(); ++_iter210)
{
xfer += (*_iter210).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.partitions, b.partitions);
swap(a.__isset, b.__isset);
}
const char* PartitionSpec::ascii_fingerprint = "<API key>";
const uint8_t PartitionSpec::binary_fingerprint[16] = {0xC3,0xF5,0x48,0xC2,0x4D,0x07,0x2C,0xF6,0x42,0x2F,0x25,0x09,0x61,0x43,0xE3,0xE8};
uint32_t PartitionSpec::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableName);
this->__isset.tableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->rootPath);
this->__isset.rootPath = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this-><API key>.read(iprot);
this->__isset.<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->partitionList.read(iprot);
this->__isset.partitionList = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t PartitionSpec::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("PartitionSpec");
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tableName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("rootPath", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->rootPath);
xfer += oprot->writeFieldEnd();
if (this->__isset.<API key>) {
xfer += oprot->writeFieldBegin("<API key>", ::apache::thrift::protocol::T_STRUCT, 4);
xfer += this-><API key>.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.partitionList) {
xfer += oprot->writeFieldBegin("partitionList", ::apache::thrift::protocol::T_STRUCT, 5);
xfer += this->partitionList.write(oprot);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(PartitionSpec &a, PartitionSpec &b) {
using ::std::swap;
swap(a.dbName, b.dbName);
swap(a.tableName, b.tableName);
swap(a.rootPath, b.rootPath);
swap(a.<API key>, b.<API key>);
swap(a.partitionList, b.partitionList);
swap(a.__isset, b.__isset);
}
const char* Index::ascii_fingerprint = "<API key>";
const uint8_t Index::binary_fingerprint[16] = {0x09,0xEE,0xF6,0x55,0x21,0x6A,0xC8,0x18,0x02,0x85,0x09,0x88,0xD6,0xC4,0x70,0xA6};
uint32_t Index::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->indexName);
this->__isset.indexName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->indexHandlerClass);
this->__isset.indexHandlerClass = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->origTableName);
this->__isset.origTableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->lastAccessTime);
this->__isset.lastAccessTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->indexTableName);
this->__isset.indexTableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->sd.read(iprot);
this->__isset.sd = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->parameters.clear();
uint32_t _size211;
::apache::thrift::protocol::TType _ktype212;
::apache::thrift::protocol::TType _vtype213;
xfer += iprot->readMapBegin(_ktype212, _vtype213, _size211);
uint32_t _i215;
for (_i215 = 0; _i215 < _size211; ++_i215)
{
std::string _key216;
xfer += iprot->readString(_key216);
std::string& _val217 = this->parameters[_key216];
xfer += iprot->readString(_val217);
}
xfer += iprot->readMapEnd();
}
this->__isset.parameters = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->deferredRebuild);
this->__isset.deferredRebuild = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Index");
xfer += oprot->writeFieldBegin("indexName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->indexName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("indexHandlerClass", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->indexHandlerClass);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("origTableName", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->origTableName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32(this->lastAccessTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("indexTableName", ::apache::thrift::protocol::T_STRING, 7);
xfer += oprot->writeString(this->indexTableName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 8);
xfer += this->sd.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->parameters.size()));
std::map<std::string, std::string> ::const_iterator _iter218;
for (_iter218 = this->parameters.begin(); _iter218 != this->parameters.end(); ++_iter218)
{
xfer += oprot->writeString(_iter218->first);
xfer += oprot->writeString(_iter218->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("deferredRebuild", ::apache::thrift::protocol::T_BOOL, 10);
xfer += oprot->writeBool(this->deferredRebuild);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Index &a, Index &b) {
using ::std::swap;
swap(a.indexName, b.indexName);
swap(a.indexHandlerClass, b.indexHandlerClass);
swap(a.dbName, b.dbName);
swap(a.origTableName, b.origTableName);
swap(a.createTime, b.createTime);
swap(a.lastAccessTime, b.lastAccessTime);
swap(a.indexTableName, b.indexTableName);
swap(a.sd, b.sd);
swap(a.parameters, b.parameters);
swap(a.deferredRebuild, b.deferredRebuild);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEA,0x2D,0x65,0xF1,0xE0,0xBB,0x78,0x76,0x02,0x05,0x68,0x20,0x82,0x30,0x4B,0x41};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_numTrues = false;
bool isset_numFalses = false;
bool isset_numNulls = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numTrues);
isset_numTrues = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numFalses);
isset_numFalses = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numNulls);
isset_numNulls = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_numTrues)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numFalses)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numNulls)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->numTrues);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 2);
xfer += oprot->writeI64(this->numFalses);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->numNulls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.numTrues, b.numTrues);
swap(a.numFalses, b.numFalses);
swap(a.numNulls, b.numNulls);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xDA,0x7C,0x01,0x13,0x21,0xD7,0x4C,0x48,0x39,0x6A,0xA0,0x02,0xE6,0x1A,0x0C,0xBB};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_numNulls = false;
bool isset_numDVs = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
xfer += iprot->readDouble(this->lowValue);
this->__isset.lowValue = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
xfer += iprot->readDouble(this->highValue);
this->__isset.highValue = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numNulls);
isset_numNulls = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numDVs);
isset_numDVs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_numNulls)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numDVs)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
if (this->__isset.lowValue) {
xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 1);
xfer += oprot->writeDouble(this->lowValue);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.highValue) {
xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 2);
xfer += oprot->writeDouble(this->highValue);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->numNulls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
xfer += oprot->writeI64(this->numDVs);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.lowValue, b.lowValue);
swap(a.highValue, b.highValue);
swap(a.numNulls, b.numNulls);
swap(a.numDVs, b.numDVs);
swap(a.__isset, b.__isset);
}
const char* LongColumnStatsData::ascii_fingerprint = "<API key>";
const uint8_t LongColumnStatsData::binary_fingerprint[16] = {0xE6,0x85,0xFC,0x22,0x0B,0x24,0xE3,0xB8,0xB9,0x36,0x04,0x79,0x0D,0xCB,0x9A,0xEA};
uint32_t LongColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_numNulls = false;
bool isset_numDVs = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lowValue);
this->__isset.lowValue = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->highValue);
this->__isset.highValue = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numNulls);
isset_numNulls = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numDVs);
isset_numDVs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_numNulls)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numDVs)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("LongColumnStatsData");
if (this->__isset.lowValue) {
xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lowValue);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.highValue) {
xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_I64, 2);
xfer += oprot->writeI64(this->highValue);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->numNulls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
xfer += oprot->writeI64(this->numDVs);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(LongColumnStatsData &a, LongColumnStatsData &b) {
using ::std::swap;
swap(a.lowValue, b.lowValue);
swap(a.highValue, b.highValue);
swap(a.numNulls, b.numNulls);
swap(a.numDVs, b.numDVs);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xD0,0x17,0xB0,0x8C,0x3D,0xF1,0x2C,0x3A,0xB9,0x87,0x88,0xB2,0xE6,0x7D,0xAA,0xB3};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_maxColLen = false;
bool isset_avgColLen = false;
bool isset_numNulls = false;
bool isset_numDVs = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->maxColLen);
isset_maxColLen = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
xfer += iprot->readDouble(this->avgColLen);
isset_avgColLen = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numNulls);
isset_numNulls = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numDVs);
isset_numDVs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_maxColLen)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_avgColLen)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numNulls)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numDVs)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->maxColLen);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2);
xfer += oprot->writeDouble(this->avgColLen);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->numNulls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
xfer += oprot->writeI64(this->numDVs);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.maxColLen, b.maxColLen);
swap(a.avgColLen, b.avgColLen);
swap(a.numNulls, b.numNulls);
swap(a.numDVs, b.numDVs);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x22,0xB0,0xCB,0x67,0x18,0x3F,0xCD,0xB9,0x45,0x89,0x2B,0x99,0x74,0x51,0x8D,0x06};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_maxColLen = false;
bool isset_avgColLen = false;
bool isset_numNulls = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->maxColLen);
isset_maxColLen = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
xfer += iprot->readDouble(this->avgColLen);
isset_avgColLen = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numNulls);
isset_numNulls = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_maxColLen)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_avgColLen)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numNulls)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->maxColLen);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2);
xfer += oprot->writeDouble(this->avgColLen);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->numNulls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.maxColLen, b.maxColLen);
swap(a.avgColLen, b.avgColLen);
swap(a.numNulls, b.numNulls);
}
const char* Decimal::ascii_fingerprint = "<API key>";
const uint8_t Decimal::binary_fingerprint[16] = {0xC4,0xDD,0xF6,0x75,0x9F,0x9B,0x17,0xC5,0xC3,0x80,0x80,0x6C,0xE7,0x43,0xDE,0x8E};
uint32_t Decimal::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_unscaled = false;
bool isset_scale = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readBinary(this->unscaled);
isset_unscaled = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I16) {
xfer += iprot->readI16(this->scale);
isset_scale = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_unscaled)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_scale)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t Decimal::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Decimal");
xfer += oprot->writeFieldBegin("unscaled", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeBinary(this->unscaled);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I16, 3);
xfer += oprot->writeI16(this->scale);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Decimal &a, Decimal &b) {
using ::std::swap;
swap(a.unscaled, b.unscaled);
swap(a.scale, b.scale);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xB6,0xD4,0x7E,0x7A,0x28,0x92,0x2B,0xFA,0x93,0xFE,0x05,0xE9,0xF1,0xB0,0x47,0x48};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_numNulls = false;
bool isset_numDVs = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->lowValue.read(iprot);
this->__isset.lowValue = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->highValue.read(iprot);
this->__isset.highValue = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numNulls);
isset_numNulls = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->numDVs);
isset_numDVs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_numNulls)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_numDVs)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
if (this->__isset.lowValue) {
xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->lowValue.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.highValue) {
xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2);
xfer += this->highValue.write(oprot);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->numNulls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4);
xfer += oprot->writeI64(this->numDVs);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.lowValue, b.lowValue);
swap(a.highValue, b.highValue);
swap(a.numNulls, b.numNulls);
swap(a.numDVs, b.numDVs);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xD0,0x79,0xAC,0xEA,0x6E,0xE0,0x99,0x8D,0x0A,0x45,0xCB,0x65,0xFF,0x1E,0xAA,0xDD};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->booleanStats.read(iprot);
this->__isset.booleanStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->longStats.read(iprot);
this->__isset.longStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->doubleStats.read(iprot);
this->__isset.doubleStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->stringStats.read(iprot);
this->__isset.stringStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->binaryStats.read(iprot);
this->__isset.binaryStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->decimalStats.read(iprot);
this->__isset.decimalStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("booleanStats", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->booleanStats.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("longStats", ::apache::thrift::protocol::T_STRUCT, 2);
xfer += this->longStats.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("doubleStats", ::apache::thrift::protocol::T_STRUCT, 3);
xfer += this->doubleStats.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("stringStats", ::apache::thrift::protocol::T_STRUCT, 4);
xfer += this->stringStats.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("binaryStats", ::apache::thrift::protocol::T_STRUCT, 5);
xfer += this->binaryStats.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("decimalStats", ::apache::thrift::protocol::T_STRUCT, 6);
xfer += this->decimalStats.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.booleanStats, b.booleanStats);
swap(a.longStats, b.longStats);
swap(a.doubleStats, b.doubleStats);
swap(a.stringStats, b.stringStats);
swap(a.binaryStats, b.binaryStats);
swap(a.decimalStats, b.decimalStats);
swap(a.__isset, b.__isset);
}
const char* ColumnStatisticsObj::ascii_fingerprint = "<API key>";
const uint8_t ColumnStatisticsObj::binary_fingerprint[16] = {0xE4,0x9E,0x62,0xCF,0xC7,0x16,0x82,0x00,0x46,0x14,0xEF,0xED,0xAC,0x3C,0xD3,0xF4};
uint32_t ColumnStatisticsObj::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_colName = false;
bool isset_colType = false;
bool isset_statsData = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->colName);
isset_colName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->colType);
isset_colType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->statsData.read(iprot);
isset_statsData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_colName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_colType)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_statsData)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t ColumnStatisticsObj::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ColumnStatisticsObj");
xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->colName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->colType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("statsData", ::apache::thrift::protocol::T_STRUCT, 3);
xfer += this->statsData.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b) {
using ::std::swap;
swap(a.colName, b.colName);
swap(a.colType, b.colType);
swap(a.statsData, b.statsData);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x26,0x17,0x59,0xFF,0x6F,0x8F,0xAB,0x53,0xF9,0x41,0x45,0x30,0x07,0xFE,0x18,0xCB};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_isTblLevel = false;
bool isset_dbName = false;
bool isset_tableName = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->isTblLevel);
isset_isTblLevel = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
isset_dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableName);
isset_tableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->partName);
this->__isset.partName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lastAnalyzed);
this->__isset.lastAnalyzed = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_isTblLevel)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_dbName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tableName)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 1);
xfer += oprot->writeBool(this->isTblLevel);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->tableName);
xfer += oprot->writeFieldEnd();
if (this->__isset.partName) {
xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->partName);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.lastAnalyzed) {
xfer += oprot->writeFieldBegin("lastAnalyzed", ::apache::thrift::protocol::T_I64, 5);
xfer += oprot->writeI64(this->lastAnalyzed);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.isTblLevel, b.isTblLevel);
swap(a.dbName, b.dbName);
swap(a.tableName, b.tableName);
swap(a.partName, b.partName);
swap(a.lastAnalyzed, b.lastAnalyzed);
swap(a.__isset, b.__isset);
}
const char* ColumnStatistics::ascii_fingerprint = "<API key>";
const uint8_t ColumnStatistics::binary_fingerprint[16] = {0x66,0x82,0xE2,0x34,0x19,0x9B,0x2C,0xD3,0x80,0x7B,0x1E,0xD4,0x20,0xC6,0xA7,0xF8};
uint32_t ColumnStatistics::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_statsDesc = false;
bool isset_statsObj = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->statsDesc.read(iprot);
isset_statsDesc = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->statsObj.clear();
uint32_t _size219;
::apache::thrift::protocol::TType _etype222;
xfer += iprot->readListBegin(_etype222, _size219);
this->statsObj.resize(_size219);
uint32_t _i223;
for (_i223 = 0; _i223 < _size219; ++_i223)
{
xfer += this->statsObj[_i223].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_statsObj = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_statsDesc)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_statsObj)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ColumnStatistics");
xfer += oprot->writeFieldBegin("statsDesc", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->statsDesc.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->statsObj.size()));
std::vector<ColumnStatisticsObj> ::const_iterator _iter224;
for (_iter224 = this->statsObj.begin(); _iter224 != this->statsObj.end(); ++_iter224)
{
xfer += (*_iter224).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ColumnStatistics &a, ColumnStatistics &b) {
using ::std::swap;
swap(a.statsDesc, b.statsDesc);
swap(a.statsObj, b.statsObj);
}
const char* AggrStats::ascii_fingerprint = "<API key>";
const uint8_t AggrStats::binary_fingerprint[16] = {0x39,0x9B,0xDB,0xAF,0x75,0x03,0xE0,0xBF,0xB5,0xE1,0xD9,0x9C,0x83,0xD7,0x90,0xCD};
uint32_t AggrStats::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_colStats = false;
bool isset_partsFound = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->colStats.clear();
uint32_t _size225;
::apache::thrift::protocol::TType _etype228;
xfer += iprot->readListBegin(_etype228, _size225);
this->colStats.resize(_size225);
uint32_t _i229;
for (_i229 = 0; _i229 < _size225; ++_i229)
{
xfer += this->colStats[_i229].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_colStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->partsFound);
isset_partsFound = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_colStats)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_partsFound)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t AggrStats::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("AggrStats");
xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->colStats.size()));
std::vector<ColumnStatisticsObj> ::const_iterator _iter230;
for (_iter230 = this->colStats.begin(); _iter230 != this->colStats.end(); ++_iter230)
{
xfer += (*_iter230).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("partsFound", ::apache::thrift::protocol::T_I64, 2);
xfer += oprot->writeI64(this->partsFound);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(AggrStats &a, AggrStats &b) {
using ::std::swap;
swap(a.colStats, b.colStats);
swap(a.partsFound, b.partsFound);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x63,0x5C,0x0D,0xA9,0xA9,0x47,0xDA,0x57,0xAA,0xE6,0x93,0xA5,0xDF,0xB8,0x65,0x69};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_colStats = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->colStats.clear();
uint32_t _size231;
::apache::thrift::protocol::TType _etype234;
xfer += iprot->readListBegin(_etype234, _size231);
this->colStats.resize(_size231);
uint32_t _i235;
for (_i235 = 0; _i235 < _size231; ++_i235)
{
xfer += this->colStats[_i235].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_colStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_colStats)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->colStats.size()));
std::vector<ColumnStatistics> ::const_iterator _iter236;
for (_iter236 = this->colStats.begin(); _iter236 != this->colStats.end(); ++_iter236)
{
xfer += (*_iter236).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.colStats, b.colStats);
}
const char* Schema::ascii_fingerprint = "<API key>";
const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B};
uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->fieldSchemas.clear();
uint32_t _size237;
::apache::thrift::protocol::TType _etype240;
xfer += iprot->readListBegin(_etype240, _size237);
this->fieldSchemas.resize(_size237);
uint32_t _i241;
for (_i241 = 0; _i241 < _size237; ++_i241)
{
xfer += this->fieldSchemas[_i241].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.fieldSchemas = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->properties.clear();
uint32_t _size242;
::apache::thrift::protocol::TType _ktype243;
::apache::thrift::protocol::TType _vtype244;
xfer += iprot->readMapBegin(_ktype243, _vtype244, _size242);
uint32_t _i246;
for (_i246 = 0; _i246 < _size242; ++_i246)
{
std::string _key247;
xfer += iprot->readString(_key247);
std::string& _val248 = this->properties[_key247];
xfer += iprot->readString(_val248);
}
xfer += iprot->readMapEnd();
}
this->__isset.properties = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Schema");
xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fieldSchemas.size()));
std::vector<FieldSchema> ::const_iterator _iter249;
for (_iter249 = this->fieldSchemas.begin(); _iter249 != this->fieldSchemas.end(); ++_iter249)
{
xfer += (*_iter249).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->properties.size()));
std::map<std::string, std::string> ::const_iterator _iter250;
for (_iter250 = this->properties.begin(); _iter250 != this->properties.end(); ++_iter250)
{
xfer += oprot->writeString(_iter250->first);
xfer += oprot->writeString(_iter250->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Schema &a, Schema &b) {
using ::std::swap;
swap(a.fieldSchemas, b.fieldSchemas);
swap(a.properties, b.properties);
swap(a.__isset, b.__isset);
}
const char* EnvironmentContext::ascii_fingerprint = "<API key>";
const uint8_t EnvironmentContext::binary_fingerprint[16] = {0x5E,0xA2,0xD5,0x27,0xEC,0xA3,0xBA,0x20,0xC7,0x7A,0xFC,0x02,0x3E,0xE8,0xC0,0x5F};
uint32_t EnvironmentContext::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->properties.clear();
uint32_t _size251;
::apache::thrift::protocol::TType _ktype252;
::apache::thrift::protocol::TType _vtype253;
xfer += iprot->readMapBegin(_ktype252, _vtype253, _size251);
uint32_t _i255;
for (_i255 = 0; _i255 < _size251; ++_i255)
{
std::string _key256;
xfer += iprot->readString(_key256);
std::string& _val257 = this->properties[_key256];
xfer += iprot->readString(_val257);
}
xfer += iprot->readMapEnd();
}
this->__isset.properties = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("EnvironmentContext");
xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->properties.size()));
std::map<std::string, std::string> ::const_iterator _iter258;
for (_iter258 = this->properties.begin(); _iter258 != this->properties.end(); ++_iter258)
{
xfer += oprot->writeString(_iter258->first);
xfer += oprot->writeString(_iter258->second);
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(EnvironmentContext &a, EnvironmentContext &b) {
using ::std::swap;
swap(a.properties, b.properties);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x40,0xB7,0x89,0xCC,0x91,0xB5,0x08,0xFE,0x36,0x60,0x0A,0x14,0xE3,0xF8,0x04,0x25};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_partitions = false;
bool <API key> = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitions.clear();
uint32_t _size259;
::apache::thrift::protocol::TType _etype262;
xfer += iprot->readListBegin(_etype262, _size259);
this->partitions.resize(_size259);
uint32_t _i263;
for (_i263 = 0; _i263 < _size259; ++_i263)
{
xfer += this->partitions[_i263].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_partitions = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this-><API key>);
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_partitions)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
std::vector<Partition> ::const_iterator _iter264;
for (_iter264 = this->partitions.begin(); _iter264 != this->partitions.end(); ++_iter264)
{
xfer += (*_iter264).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("<API key>", ::apache::thrift::protocol::T_BOOL, 2);
xfer += oprot->writeBool(this-><API key>);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.partitions, b.partitions);
swap(a.<API key>, b.<API key>);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x83,0x59,0x44,0x41,0x7A,0x02,0x6F,0xE6,0xAB,0xD0,0xDF,0x5A,0x35,0xBF,0x52,0xC5};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbName = false;
bool isset_tblName = false;
bool isset_expr = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
isset_dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tblName);
isset_tblName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readBinary(this->expr);
isset_expr = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this-><API key>);
this->__isset.<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I16) {
xfer += iprot->readI16(this->maxParts);
this->__isset.maxParts = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tblName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_expr)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tblName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeBinary(this->expr);
xfer += oprot->writeFieldEnd();
if (this->__isset.<API key>) {
xfer += oprot->writeFieldBegin("<API key>", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this-><API key>);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.maxParts) {
xfer += oprot->writeFieldBegin("maxParts", ::apache::thrift::protocol::T_I16, 5);
xfer += oprot->writeI16(this->maxParts);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.dbName, b.dbName);
swap(a.tblName, b.tblName);
swap(a.expr, b.expr);
swap(a.<API key>, b.<API key>);
swap(a.maxParts, b.maxParts);
swap(a.__isset, b.__isset);
}
const char* TableStatsResult::ascii_fingerprint = "<API key>";
const uint8_t TableStatsResult::binary_fingerprint[16] = {0xCE,0x3E,0x8F,0x0D,0x9B,0x31,0x0B,0x8D,0x33,0xCB,0x7A,0x89,0xA7,0x5F,0x3E,0x05};
uint32_t TableStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_tableStats = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->tableStats.clear();
uint32_t _size265;
::apache::thrift::protocol::TType _etype268;
xfer += iprot->readListBegin(_etype268, _size265);
this->tableStats.resize(_size265);
uint32_t _i269;
for (_i269 = 0; _i269 < _size265; ++_i269)
{
xfer += this->tableStats[_i269].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_tableStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_tableStats)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t TableStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TableStatsResult");
xfer += oprot->writeFieldBegin("tableStats", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tableStats.size()));
std::vector<ColumnStatisticsObj> ::const_iterator _iter270;
for (_iter270 = this->tableStats.begin(); _iter270 != this->tableStats.end(); ++_iter270)
{
xfer += (*_iter270).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(TableStatsResult &a, TableStatsResult &b) {
using ::std::swap;
swap(a.tableStats, b.tableStats);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xFF,0x17,0x5B,0x50,0xC5,0xEF,0x6F,0x44,0x2D,0x3A,0xF2,0x5B,0x06,0x43,0x5A,0x39};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_partStats = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->partStats.clear();
uint32_t _size271;
::apache::thrift::protocol::TType _ktype272;
::apache::thrift::protocol::TType _vtype273;
xfer += iprot->readMapBegin(_ktype272, _vtype273, _size271);
uint32_t _i275;
for (_i275 = 0; _i275 < _size271; ++_i275)
{
std::string _key276;
xfer += iprot->readString(_key276);
std::vector<ColumnStatisticsObj> & _val277 = this->partStats[_key276];
{
_val277.clear();
uint32_t _size278;
::apache::thrift::protocol::TType _etype281;
xfer += iprot->readListBegin(_etype281, _size278);
_val277.resize(_size278);
uint32_t _i282;
for (_i282 = 0; _i282 < _size278; ++_i282)
{
xfer += _val277[_i282].read(iprot);
}
xfer += iprot->readListEnd();
}
}
xfer += iprot->readMapEnd();
}
isset_partStats = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_partStats)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("partStats", ::apache::thrift::protocol::T_MAP, 1);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->partStats.size()));
std::map<std::string, std::vector<ColumnStatisticsObj> > ::const_iterator _iter283;
for (_iter283 = this->partStats.begin(); _iter283 != this->partStats.end(); ++_iter283)
{
xfer += oprot->writeString(_iter283->first);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter283->second.size()));
std::vector<ColumnStatisticsObj> ::const_iterator _iter284;
for (_iter284 = _iter283->second.begin(); _iter284 != _iter283->second.end(); ++_iter284)
{
xfer += (*_iter284).write(oprot);
}
xfer += oprot->writeListEnd();
}
}
xfer += oprot->writeMapEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.partStats, b.partStats);
}
const char* TableStatsRequest::ascii_fingerprint = "<API key>";
const uint8_t TableStatsRequest::binary_fingerprint[16] = {0x8E,0x2A,0xD6,0x40,0x1E,0x83,0x55,0x8E,0xCF,0xD6,0xA1,0x3D,0x74,0xDD,0x0A,0x3F};
uint32_t TableStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbName = false;
bool isset_tblName = false;
bool isset_colNames = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
isset_dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tblName);
isset_tblName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->colNames.clear();
uint32_t _size285;
::apache::thrift::protocol::TType _etype288;
xfer += iprot->readListBegin(_etype288, _size285);
this->colNames.resize(_size285);
uint32_t _i289;
for (_i289 = 0; _i289 < _size285; ++_i289)
{
xfer += iprot->readString(this->colNames[_i289]);
}
xfer += iprot->readListEnd();
}
isset_colNames = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tblName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_colNames)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t TableStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TableStatsRequest");
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tblName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->colNames.size()));
std::vector<std::string> ::const_iterator _iter290;
for (_iter290 = this->colNames.begin(); _iter290 != this->colNames.end(); ++_iter290)
{
xfer += oprot->writeString((*_iter290));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(TableStatsRequest &a, TableStatsRequest &b) {
using ::std::swap;
swap(a.dbName, b.dbName);
swap(a.tblName, b.tblName);
swap(a.colNames, b.colNames);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x5F,0x51,0xD9,0x0B,0xC3,0x23,0xBC,0xE4,0xB7,0x04,0xB7,0xD9,0x8E,0xDA,0x0B,0xD4};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbName = false;
bool isset_tblName = false;
bool isset_colNames = false;
bool isset_partNames = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
isset_dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tblName);
isset_tblName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->colNames.clear();
uint32_t _size291;
::apache::thrift::protocol::TType _etype294;
xfer += iprot->readListBegin(_etype294, _size291);
this->colNames.resize(_size291);
uint32_t _i295;
for (_i295 = 0; _i295 < _size291; ++_i295)
{
xfer += iprot->readString(this->colNames[_i295]);
}
xfer += iprot->readListEnd();
}
isset_colNames = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partNames.clear();
uint32_t _size296;
::apache::thrift::protocol::TType _etype299;
xfer += iprot->readListBegin(_etype299, _size296);
this->partNames.resize(_size296);
uint32_t _i300;
for (_i300 = 0; _i300 < _size296; ++_i300)
{
xfer += iprot->readString(this->partNames[_i300]);
}
xfer += iprot->readListEnd();
}
isset_partNames = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tblName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_colNames)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_partNames)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tblName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->colNames.size()));
std::vector<std::string> ::const_iterator _iter301;
for (_iter301 = this->colNames.begin(); _iter301 != this->colNames.end(); ++_iter301)
{
xfer += oprot->writeString((*_iter301));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partNames.size()));
std::vector<std::string> ::const_iterator _iter302;
for (_iter302 = this->partNames.begin(); _iter302 != this->partNames.end(); ++_iter302)
{
xfer += oprot->writeString((*_iter302));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.dbName, b.dbName);
swap(a.tblName, b.tblName);
swap(a.colNames, b.colNames);
swap(a.partNames, b.partNames);
}
const char* AddPartitionsResult::ascii_fingerprint = "<API key>";
const uint8_t AddPartitionsResult::binary_fingerprint[16] = {0x5A,0x68,0x9D,0x08,0x23,0xE7,0xBF,0xBB,0x60,0xC7,0x99,0xBA,0x60,0x06,0x5C,0x31};
uint32_t AddPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitions.clear();
uint32_t _size303;
::apache::thrift::protocol::TType _etype306;
xfer += iprot->readListBegin(_etype306, _size303);
this->partitions.resize(_size303);
uint32_t _i307;
for (_i307 = 0; _i307 < _size303; ++_i307)
{
xfer += this->partitions[_i307].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.partitions = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t AddPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("AddPartitionsResult");
if (this->__isset.partitions) {
xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
std::vector<Partition> ::const_iterator _iter308;
for (_iter308 = this->partitions.begin(); _iter308 != this->partitions.end(); ++_iter308)
{
xfer += (*_iter308).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(AddPartitionsResult &a, AddPartitionsResult &b) {
using ::std::swap;
swap(a.partitions, b.partitions);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x94,0xF9,0x38,0xD0,0x35,0x89,0x2C,0xF6,0x87,0x3D,0xED,0xB9,0x93,0x58,0xF0,0x69};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbName = false;
bool isset_tblName = false;
bool isset_parts = false;
bool isset_ifNotExists = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
isset_dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tblName);
isset_tblName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->parts.clear();
uint32_t _size309;
::apache::thrift::protocol::TType _etype312;
xfer += iprot->readListBegin(_etype312, _size309);
this->parts.resize(_size309);
uint32_t _i313;
for (_i313 = 0; _i313 < _size309; ++_i313)
{
xfer += this->parts[_i313].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_parts = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->ifNotExists);
isset_ifNotExists = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->needResult);
this->__isset.needResult = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tblName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_parts)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_ifNotExists)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tblName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->parts.size()));
std::vector<Partition> ::const_iterator _iter314;
for (_iter314 = this->parts.begin(); _iter314 != this->parts.end(); ++_iter314)
{
xfer += (*_iter314).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, 4);
xfer += oprot->writeBool(this->ifNotExists);
xfer += oprot->writeFieldEnd();
if (this->__isset.needResult) {
xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 5);
xfer += oprot->writeBool(this->needResult);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.dbName, b.dbName);
swap(a.tblName, b.tblName);
swap(a.parts, b.parts);
swap(a.ifNotExists, b.ifNotExists);
swap(a.needResult, b.needResult);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x5A,0x68,0x9D,0x08,0x23,0xE7,0xBF,0xBB,0x60,0xC7,0x99,0xBA,0x60,0x06,0x5C,0x31};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitions.clear();
uint32_t _size315;
::apache::thrift::protocol::TType _etype318;
xfer += iprot->readListBegin(_etype318, _size315);
this->partitions.resize(_size315);
uint32_t _i319;
for (_i319 = 0; _i319 < _size315; ++_i319)
{
xfer += this->partitions[_i319].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.partitions = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
if (this->__isset.partitions) {
xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->partitions.size()));
std::vector<Partition> ::const_iterator _iter320;
for (_iter320 = this->partitions.begin(); _iter320 != this->partitions.end(); ++_iter320)
{
xfer += (*_iter320).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.partitions, b.partitions);
swap(a.__isset, b.__isset);
}
const char* DropPartitionsExpr::ascii_fingerprint = "<API key>";
const uint8_t DropPartitionsExpr::binary_fingerprint[16] = {0x18,0xB1,0x62,0xB1,0xD1,0x5D,0x8D,0x46,0x50,0x9D,0x39,0x11,0xA9,0xF1,0xC2,0xAA};
uint32_t DropPartitionsExpr::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_expr = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readBinary(this->expr);
isset_expr = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->partArchiveLevel);
this->__isset.partArchiveLevel = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_expr)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t DropPartitionsExpr::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("DropPartitionsExpr");
xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeBinary(this->expr);
xfer += oprot->writeFieldEnd();
if (this->__isset.partArchiveLevel) {
xfer += oprot->writeFieldBegin("partArchiveLevel", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->partArchiveLevel);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(DropPartitionsExpr &a, DropPartitionsExpr &b) {
using ::std::swap;
swap(a.expr, b.expr);
swap(a.partArchiveLevel, b.partArchiveLevel);
swap(a.__isset, b.__isset);
}
const char* RequestPartsSpec::ascii_fingerprint = "<API key>";
const uint8_t RequestPartsSpec::binary_fingerprint[16] = {0x86,0x44,0x92,0xEC,0xAB,0x27,0x99,0x6C,0xD2,0x22,0xAA,0xCD,0xA1,0x0C,0x29,0x2E};
uint32_t RequestPartsSpec::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->names.clear();
uint32_t _size321;
::apache::thrift::protocol::TType _etype324;
xfer += iprot->readListBegin(_etype324, _size321);
this->names.resize(_size321);
uint32_t _i325;
for (_i325 = 0; _i325 < _size321; ++_i325)
{
xfer += iprot->readString(this->names[_i325]);
}
xfer += iprot->readListEnd();
}
this->__isset.names = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->exprs.clear();
uint32_t _size326;
::apache::thrift::protocol::TType _etype329;
xfer += iprot->readListBegin(_etype329, _size326);
this->exprs.resize(_size326);
uint32_t _i330;
for (_i330 = 0; _i330 < _size326; ++_i330)
{
xfer += this->exprs[_i330].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.exprs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t RequestPartsSpec::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("RequestPartsSpec");
xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->names.size()));
std::vector<std::string> ::const_iterator _iter331;
for (_iter331 = this->names.begin(); _iter331 != this->names.end(); ++_iter331)
{
xfer += oprot->writeString((*_iter331));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("exprs", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->exprs.size()));
std::vector<DropPartitionsExpr> ::const_iterator _iter332;
for (_iter332 = this->exprs.begin(); _iter332 != this->exprs.end(); ++_iter332)
{
xfer += (*_iter332).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(RequestPartsSpec &a, RequestPartsSpec &b) {
using ::std::swap;
swap(a.names, b.names);
swap(a.exprs, b.exprs);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEB,0x26,0x3F,0xBA,0x01,0x21,0x5C,0x48,0x0A,0x9A,0x24,0xC1,0x1D,0x69,0xE6,0x72};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbName = false;
bool isset_tblName = false;
bool isset_parts = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
isset_dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tblName);
isset_tblName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->parts.read(iprot);
isset_parts = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->deleteData);
this->__isset.deleteData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->ifExists);
this->__isset.ifExists = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->ignoreProtection);
this->__isset.ignoreProtection = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->environmentContext.read(iprot);
this->__isset.environmentContext = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->needResult);
this->__isset.needResult = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tblName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_parts)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tblName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_STRUCT, 3);
xfer += this->parts.write(oprot);
xfer += oprot->writeFieldEnd();
if (this->__isset.deleteData) {
xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4);
xfer += oprot->writeBool(this->deleteData);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.ifExists) {
xfer += oprot->writeFieldBegin("ifExists", ::apache::thrift::protocol::T_BOOL, 5);
xfer += oprot->writeBool(this->ifExists);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.ignoreProtection) {
xfer += oprot->writeFieldBegin("ignoreProtection", ::apache::thrift::protocol::T_BOOL, 6);
xfer += oprot->writeBool(this->ignoreProtection);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.environmentContext) {
xfer += oprot->writeFieldBegin("environmentContext", ::apache::thrift::protocol::T_STRUCT, 7);
xfer += this->environmentContext.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.needResult) {
xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 8);
xfer += oprot->writeBool(this->needResult);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.dbName, b.dbName);
swap(a.tblName, b.tblName);
swap(a.parts, b.parts);
swap(a.deleteData, b.deleteData);
swap(a.ifExists, b.ifExists);
swap(a.ignoreProtection, b.ignoreProtection);
swap(a.environmentContext, b.environmentContext);
swap(a.needResult, b.needResult);
swap(a.__isset, b.__isset);
}
const char* ResourceUri::ascii_fingerprint = "<API key>";
const uint8_t ResourceUri::binary_fingerprint[16] = {0x19,0xB5,0x24,0x05,0x89,0xE6,0x80,0x30,0x1A,0x7E,0x32,0xDF,0x39,0x71,0xEF,0xBE};
uint32_t ResourceUri::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast333;
xfer += iprot->readI32(ecast333);
this->resourceType = (ResourceType::type)ecast333;
this->__isset.resourceType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->uri);
this->__isset.uri = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t ResourceUri::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ResourceUri");
xfer += oprot->writeFieldBegin("resourceType", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->resourceType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("uri", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->uri);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ResourceUri &a, ResourceUri &b) {
using ::std::swap;
swap(a.resourceType, b.resourceType);
swap(a.uri, b.uri);
swap(a.__isset, b.__isset);
}
const char* Function::ascii_fingerprint = "<API key>";
const uint8_t Function::binary_fingerprint[16] = {0x72,0x27,0x9C,0x51,0x5E,0x70,0xF8,0x88,0x56,0x85,0x42,0xF9,0x76,0x16,0xAD,0xB8};
uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->functionName);
this->__isset.functionName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->className);
this->__isset.className = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->ownerName);
this->__isset.ownerName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast334;
xfer += iprot->readI32(ecast334);
this->ownerType = (PrincipalType::type)ecast334;
this->__isset.ownerType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->createTime);
this->__isset.createTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast335;
xfer += iprot->readI32(ecast335);
this->functionType = (FunctionType::type)ecast335;
this->__isset.functionType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->resourceUris.clear();
uint32_t _size336;
::apache::thrift::protocol::TType _etype339;
xfer += iprot->readListBegin(_etype339, _size336);
this->resourceUris.resize(_size336);
uint32_t _i340;
for (_i340 = 0; _i340 < _size336; ++_i340)
{
xfer += this->resourceUris[_i340].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.resourceUris = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("Function");
xfer += oprot->writeFieldBegin("functionName", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->functionName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->className);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->ownerName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32((int32_t)this->ownerType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32(this->createTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("functionType", ::apache::thrift::protocol::T_I32, 7);
xfer += oprot->writeI32((int32_t)this->functionType);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("resourceUris", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->resourceUris.size()));
std::vector<ResourceUri> ::const_iterator _iter341;
for (_iter341 = this->resourceUris.begin(); _iter341 != this->resourceUris.end(); ++_iter341)
{
xfer += (*_iter341).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(Function &a, Function &b) {
using ::std::swap;
swap(a.functionName, b.functionName);
swap(a.dbName, b.dbName);
swap(a.className, b.className);
swap(a.ownerName, b.ownerName);
swap(a.ownerType, b.ownerType);
swap(a.createTime, b.createTime);
swap(a.functionType, b.functionType);
swap(a.resourceUris, b.resourceUris);
swap(a.__isset, b.__isset);
}
const char* TxnInfo::ascii_fingerprint = "<API key>";
const uint8_t TxnInfo::binary_fingerprint[16] = {0x6C,0x5C,0x07,0x73,0xA9,0x01,0xCC,0xA3,0xBE,0x9D,0x08,0x5B,0x3B,0x47,0xA7,0x67};
uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_id = false;
bool isset_state = false;
bool isset_user = false;
bool isset_hostname = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->id);
isset_id = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast342;
xfer += iprot->readI32(ecast342);
this->state = (TxnState::type)ecast342;
isset_state = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->user);
isset_user = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->hostname);
isset_hostname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_id)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_state)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_user)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_hostname)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t TxnInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TxnInfo");
xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->id);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->state);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->user);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->hostname);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(TxnInfo &a, TxnInfo &b) {
using ::std::swap;
swap(a.id, b.id);
swap(a.state, b.state);
swap(a.user, b.user);
swap(a.hostname, b.hostname);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xCC,0xF7,0x69,0xBB,0xD3,0x30,0x05,0xB6,0x1F,0x20,0x79,0xA6,0x66,0x5E,0x3B,0x9C};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool <API key> = false;
bool isset_open_txns = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txn_high_water_mark);
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->open_txns.clear();
uint32_t _size343;
::apache::thrift::protocol::TType _etype346;
xfer += iprot->readListBegin(_etype346, _size343);
this->open_txns.resize(_size343);
uint32_t _i347;
for (_i347 = 0; _i347 < _size343; ++_i347)
{
xfer += this->open_txns[_i347].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_open_txns = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_open_txns)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->txn_high_water_mark);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->open_txns.size()));
std::vector<TxnInfo> ::const_iterator _iter348;
for (_iter348 = this->open_txns.begin(); _iter348 != this->open_txns.end(); ++_iter348)
{
xfer += (*_iter348).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.txn_high_water_mark, b.txn_high_water_mark);
swap(a.open_txns, b.open_txns);
}
const char* GetOpenTxnsResponse::ascii_fingerprint = "<API key>";
const uint8_t GetOpenTxnsResponse::binary_fingerprint[16] = {0x59,0x05,0x31,0xFF,0x1B,0xE8,0x61,0x16,0x78,0xB2,0x55,0x37,0x4F,0x61,0x09,0xEE};
uint32_t GetOpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool <API key> = false;
bool isset_open_txns = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txn_high_water_mark);
<API key> = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->open_txns.clear();
uint32_t _size349;
::apache::thrift::protocol::TType _etype352;
xfer += iprot->readSetBegin(_etype352, _size349);
uint32_t _i353;
for (_i353 = 0; _i353 < _size349; ++_i353)
{
int64_t _elem354;
xfer += iprot->readI64(_elem354);
this->open_txns.insert(_elem354);
}
xfer += iprot->readSetEnd();
}
isset_open_txns = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!<API key>)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_open_txns)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t GetOpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("GetOpenTxnsResponse");
xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->txn_high_water_mark);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_SET, 2);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->open_txns.size()));
std::set<int64_t> ::const_iterator _iter355;
for (_iter355 = this->open_txns.begin(); _iter355 != this->open_txns.end(); ++_iter355)
{
xfer += oprot->writeI64((*_iter355));
}
xfer += oprot->writeSetEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(GetOpenTxnsResponse &a, GetOpenTxnsResponse &b) {
using ::std::swap;
swap(a.txn_high_water_mark, b.txn_high_water_mark);
swap(a.open_txns, b.open_txns);
}
const char* OpenTxnRequest::ascii_fingerprint = "<API key>";
const uint8_t OpenTxnRequest::binary_fingerprint[16] = {0x33,0x68,0xC2,0xF8,0x1F,0x2F,0xEF,0x71,0xF1,0x1E,0xDA,0xCD,0xB2,0xA3,0xEC,0xEF};
uint32_t OpenTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_num_txns = false;
bool isset_user = false;
bool isset_hostname = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->num_txns);
isset_num_txns = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->user);
isset_user = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->hostname);
isset_hostname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_num_txns)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_user)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_hostname)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t OpenTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("OpenTxnRequest");
xfer += oprot->writeFieldBegin("num_txns", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32(this->num_txns);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->user);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->hostname);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(OpenTxnRequest &a, OpenTxnRequest &b) {
using ::std::swap;
swap(a.num_txns, b.num_txns);
swap(a.user, b.user);
swap(a.hostname, b.hostname);
}
const char* OpenTxnsResponse::ascii_fingerprint = "<API key>";
const uint8_t OpenTxnsResponse::binary_fingerprint[16] = {0xE4,0x9D,0x7D,0x1A,0x90,0x13,0xCC,0x81,0xCD,0x0F,0x69,0xD6,0x31,0xEF,0x82,0xE4};
uint32_t OpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_txn_ids = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->txn_ids.clear();
uint32_t _size356;
::apache::thrift::protocol::TType _etype359;
xfer += iprot->readListBegin(_etype359, _size356);
this->txn_ids.resize(_size356);
uint32_t _i360;
for (_i360 = 0; _i360 < _size356; ++_i360)
{
xfer += iprot->readI64(this->txn_ids[_i360]);
}
xfer += iprot->readListEnd();
}
isset_txn_ids = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_txn_ids)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t OpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("OpenTxnsResponse");
xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->txn_ids.size()));
std::vector<int64_t> ::const_iterator _iter361;
for (_iter361 = this->txn_ids.begin(); _iter361 != this->txn_ids.end(); ++_iter361)
{
xfer += oprot->writeI64((*_iter361));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(OpenTxnsResponse &a, OpenTxnsResponse &b) {
using ::std::swap;
swap(a.txn_ids, b.txn_ids);
}
const char* AbortTxnRequest::ascii_fingerprint = "<API key>";
const uint8_t AbortTxnRequest::binary_fingerprint[16] = {0x56,0xA5,0x9C,0xE7,0xFF,0xAF,0x82,0xBC,0xA8,0xA1,0x9F,0xAA,0xCD,0xE4,0xFB,0x75};
uint32_t AbortTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_txnid = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txnid);
isset_txnid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_txnid)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t AbortTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("AbortTxnRequest");
xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->txnid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(AbortTxnRequest &a, AbortTxnRequest &b) {
using ::std::swap;
swap(a.txnid, b.txnid);
}
const char* CommitTxnRequest::ascii_fingerprint = "<API key>";
const uint8_t CommitTxnRequest::binary_fingerprint[16] = {0x56,0xA5,0x9C,0xE7,0xFF,0xAF,0x82,0xBC,0xA8,0xA1,0x9F,0xAA,0xCD,0xE4,0xFB,0x75};
uint32_t CommitTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_txnid = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txnid);
isset_txnid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_txnid)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t CommitTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("CommitTxnRequest");
xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->txnid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(CommitTxnRequest &a, CommitTxnRequest &b) {
using ::std::swap;
swap(a.txnid, b.txnid);
}
const char* LockComponent::ascii_fingerprint = "<API key>";
const uint8_t LockComponent::binary_fingerprint[16] = {0x38,0xB0,0x25,0x31,0xB0,0x84,0x0A,0xC9,0xC7,0x29,0x04,0xA4,0x64,0x9F,0xD1,0x5F};
uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_type = false;
bool isset_level = false;
bool isset_dbname = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast362;
xfer += iprot->readI32(ecast362);
this->type = (LockType::type)ecast362;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast363;
xfer += iprot->readI32(ecast363);
this->level = (LockLevel::type)ecast363;
isset_level = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbname);
isset_dbname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tablename);
this->__isset.tablename = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->partitionname);
this->__isset.partitionname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_type)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_level)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_dbname)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("LockComponent");
xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1);
xfer += oprot->writeI32((int32_t)this->type);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->level);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->dbname);
xfer += oprot->writeFieldEnd();
if (this->__isset.tablename) {
xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->tablename);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.partitionname) {
xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->partitionname);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(LockComponent &a, LockComponent &b) {
using ::std::swap;
swap(a.type, b.type);
swap(a.level, b.level);
swap(a.dbname, b.dbname);
swap(a.tablename, b.tablename);
swap(a.partitionname, b.partitionname);
swap(a.__isset, b.__isset);
}
const char* LockRequest::ascii_fingerprint = "<API key>";
const uint8_t LockRequest::binary_fingerprint[16] = {0x46,0xBC,0x5E,0xD7,0x19,0x6B,0xC1,0x6C,0xB2,0x16,0xAD,0x5C,0xC6,0x7C,0x69,0x30};
uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_component = false;
bool isset_user = false;
bool isset_hostname = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->component.clear();
uint32_t _size364;
::apache::thrift::protocol::TType _etype367;
xfer += iprot->readListBegin(_etype367, _size364);
this->component.resize(_size364);
uint32_t _i368;
for (_i368 = 0; _i368 < _size364; ++_i368)
{
xfer += this->component[_i368].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_component = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txnid);
this->__isset.txnid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->user);
isset_user = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->hostname);
isset_hostname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_component)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_user)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_hostname)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("LockRequest");
xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->component.size()));
std::vector<LockComponent> ::const_iterator _iter369;
for (_iter369 = this->component.begin(); _iter369 != this->component.end(); ++_iter369)
{
xfer += (*_iter369).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
if (this->__isset.txnid) {
xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2);
xfer += oprot->writeI64(this->txnid);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->user);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->hostname);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(LockRequest &a, LockRequest &b) {
using ::std::swap;
swap(a.component, b.component);
swap(a.txnid, b.txnid);
swap(a.user, b.user);
swap(a.hostname, b.hostname);
swap(a.__isset, b.__isset);
}
const char* LockResponse::ascii_fingerprint = "<API key>";
const uint8_t LockResponse::binary_fingerprint[16] = {0xDF,0xA4,0x0D,0x9D,0x28,0x84,0x59,0x9F,0x3D,0x1E,0x7A,0x57,0x57,0x8F,0x13,0x84};
uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_lockid = false;
bool isset_state = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lockid);
isset_lockid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast370;
xfer += iprot->readI32(ecast370);
this->state = (LockState::type)ecast370;
isset_state = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_lockid)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_state)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t LockResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("LockResponse");
xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lockid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->state);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(LockResponse &a, LockResponse &b) {
using ::std::swap;
swap(a.lockid, b.lockid);
swap(a.state, b.state);
}
const char* CheckLockRequest::ascii_fingerprint = "<API key>";
const uint8_t CheckLockRequest::binary_fingerprint[16] = {0x56,0xA5,0x9C,0xE7,0xFF,0xAF,0x82,0xBC,0xA8,0xA1,0x9F,0xAA,0xCD,0xE4,0xFB,0x75};
uint32_t CheckLockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_lockid = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lockid);
isset_lockid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_lockid)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t CheckLockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("CheckLockRequest");
xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lockid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(CheckLockRequest &a, CheckLockRequest &b) {
using ::std::swap;
swap(a.lockid, b.lockid);
}
const char* UnlockRequest::ascii_fingerprint = "<API key>";
const uint8_t UnlockRequest::binary_fingerprint[16] = {0x56,0xA5,0x9C,0xE7,0xFF,0xAF,0x82,0xBC,0xA8,0xA1,0x9F,0xAA,0xCD,0xE4,0xFB,0x75};
uint32_t UnlockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_lockid = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lockid);
isset_lockid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_lockid)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t UnlockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("UnlockRequest");
xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lockid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(UnlockRequest &a, UnlockRequest &b) {
using ::std::swap;
swap(a.lockid, b.lockid);
}
const char* ShowLocksRequest::ascii_fingerprint = "<API key>";
const uint8_t ShowLocksRequest::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
uint32_t ShowLocksRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
xfer += iprot->skip(ftype);
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t ShowLocksRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ShowLocksRequest");
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ShowLocksRequest &a, ShowLocksRequest &b) {
using ::std::swap;
(void) a;
(void) b;
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x5A,0xD1,0x1F,0x0E,0x0E,0xF1,0xEE,0x0A,0x7C,0x08,0xB0,0x0F,0xEF,0xCF,0xF2,0x4F};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_lockid = false;
bool isset_dbname = false;
bool isset_state = false;
bool isset_type = false;
bool isset_lastheartbeat = false;
bool isset_user = false;
bool isset_hostname = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lockid);
isset_lockid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbname);
isset_dbname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tablename);
this->__isset.tablename = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->partname);
this->__isset.partname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast371;
xfer += iprot->readI32(ecast371);
this->state = (LockState::type)ecast371;
isset_state = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast372;
xfer += iprot->readI32(ecast372);
this->type = (LockType::type)ecast372;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txnid);
this->__isset.txnid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lastheartbeat);
isset_lastheartbeat = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->acquiredat);
this->__isset.acquiredat = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->user);
isset_user = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->hostname);
isset_hostname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_lockid)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_dbname)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_state)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_type)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_lastheartbeat)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_user)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_hostname)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lockid);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->dbname);
xfer += oprot->writeFieldEnd();
if (this->__isset.tablename) {
xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->tablename);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.partname) {
xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->partname);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32((int32_t)this->state);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 6);
xfer += oprot->writeI32((int32_t)this->type);
xfer += oprot->writeFieldEnd();
if (this->__isset.txnid) {
xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 7);
xfer += oprot->writeI64(this->txnid);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("lastheartbeat", ::apache::thrift::protocol::T_I64, 8);
xfer += oprot->writeI64(this->lastheartbeat);
xfer += oprot->writeFieldEnd();
if (this->__isset.acquiredat) {
xfer += oprot->writeFieldBegin("acquiredat", ::apache::thrift::protocol::T_I64, 9);
xfer += oprot->writeI64(this->acquiredat);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 10);
xfer += oprot->writeString(this->user);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 11);
xfer += oprot->writeString(this->hostname);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.lockid, b.lockid);
swap(a.dbname, b.dbname);
swap(a.tablename, b.tablename);
swap(a.partname, b.partname);
swap(a.state, b.state);
swap(a.type, b.type);
swap(a.txnid, b.txnid);
swap(a.lastheartbeat, b.lastheartbeat);
swap(a.acquiredat, b.acquiredat);
swap(a.user, b.user);
swap(a.hostname, b.hostname);
swap(a.__isset, b.__isset);
}
const char* ShowLocksResponse::ascii_fingerprint = "<API key>";
const uint8_t ShowLocksResponse::binary_fingerprint[16] = {0xBD,0x59,0x8A,0xA6,0x0F,0xE9,0x41,0x36,0x1F,0xB5,0x4C,0x43,0x97,0x3C,0x01,0x1F};
uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->locks.clear();
uint32_t _size373;
::apache::thrift::protocol::TType _etype376;
xfer += iprot->readListBegin(_etype376, _size373);
this->locks.resize(_size373);
uint32_t _i377;
for (_i377 = 0; _i377 < _size373; ++_i377)
{
xfer += this->locks[_i377].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.locks = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ShowLocksResponse");
xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->locks.size()));
std::vector<<API key>> ::const_iterator _iter378;
for (_iter378 = this->locks.begin(); _iter378 != this->locks.end(); ++_iter378)
{
xfer += (*_iter378).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ShowLocksResponse &a, ShowLocksResponse &b) {
using ::std::swap;
swap(a.locks, b.locks);
swap(a.__isset, b.__isset);
}
const char* HeartbeatRequest::ascii_fingerprint = "<API key>";
const uint8_t HeartbeatRequest::binary_fingerprint[16] = {0x03,0x54,0xD0,0x7C,0x94,0xCB,0x85,0x42,0x87,0x2C,0xA1,0x27,0x70,0x08,0x86,0x0A};
uint32_t HeartbeatRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lockid);
this->__isset.lockid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->txnid);
this->__isset.txnid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t HeartbeatRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("HeartbeatRequest");
if (this->__isset.lockid) {
xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lockid);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.txnid) {
xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2);
xfer += oprot->writeI64(this->txnid);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(HeartbeatRequest &a, HeartbeatRequest &b) {
using ::std::swap;
swap(a.lockid, b.lockid);
swap(a.txnid, b.txnid);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xF3,0x31,0x35,0x32,0x12,0x53,0xDA,0xEB,0x67,0xB0,0xE7,0x9E,0x41,0x6C,0xA8,0x31};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_min = false;
bool isset_max = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->min);
isset_min = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->max);
isset_max = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_min)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_max)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->min);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_I64, 2);
xfer += oprot->writeI64(this->max);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.min, b.min);
swap(a.max, b.max);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x33,0xE4,0x9A,0x70,0xBD,0x5C,0x04,0x26,0x2A,0x0F,0x40,0x7E,0x36,0x56,0xE3,0xCF};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_aborted = false;
bool isset_nosuch = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->aborted.clear();
uint32_t _size379;
::apache::thrift::protocol::TType _etype382;
xfer += iprot->readSetBegin(_etype382, _size379);
uint32_t _i383;
for (_i383 = 0; _i383 < _size379; ++_i383)
{
int64_t _elem384;
xfer += iprot->readI64(_elem384);
this->aborted.insert(_elem384);
}
xfer += iprot->readSetEnd();
}
isset_aborted = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->nosuch.clear();
uint32_t _size385;
::apache::thrift::protocol::TType _etype388;
xfer += iprot->readSetBegin(_etype388, _size385);
uint32_t _i389;
for (_i389 = 0; _i389 < _size385; ++_i389)
{
int64_t _elem390;
xfer += iprot->readI64(_elem390);
this->nosuch.insert(_elem390);
}
xfer += iprot->readSetEnd();
}
isset_nosuch = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_aborted)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_nosuch)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->aborted.size()));
std::set<int64_t> ::const_iterator _iter391;
for (_iter391 = this->aborted.begin(); _iter391 != this->aborted.end(); ++_iter391)
{
xfer += oprot->writeI64((*_iter391));
}
xfer += oprot->writeSetEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->nosuch.size()));
std::set<int64_t> ::const_iterator _iter392;
for (_iter392 = this->nosuch.begin(); _iter392 != this->nosuch.end(); ++_iter392)
{
xfer += oprot->writeI64((*_iter392));
}
xfer += oprot->writeSetEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.aborted, b.aborted);
swap(a.nosuch, b.nosuch);
}
const char* CompactionRequest::ascii_fingerprint = "<API key>";
const uint8_t CompactionRequest::binary_fingerprint[16] = {0x89,0x9F,0xD1,0xF3,0x39,0xD8,0x31,0x8D,0x62,0x86,0x87,0xCC,0x2C,0xE2,0x86,0x4B};
uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbname = false;
bool isset_tablename = false;
bool isset_type = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbname);
isset_dbname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tablename);
isset_tablename = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->partitionname);
this->__isset.partitionname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast393;
xfer += iprot->readI32(ecast393);
this->type = (CompactionType::type)ecast393;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->runas);
this->__isset.runas = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbname)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tablename)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_type)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t CompactionRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("CompactionRequest");
xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbname);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tablename);
xfer += oprot->writeFieldEnd();
if (this->__isset.partitionname) {
xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->partitionname);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32((int32_t)this->type);
xfer += oprot->writeFieldEnd();
if (this->__isset.runas) {
xfer += oprot->writeFieldBegin("runas", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->runas);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(CompactionRequest &a, CompactionRequest &b) {
using ::std::swap;
swap(a.dbname, b.dbname);
swap(a.tablename, b.tablename);
swap(a.partitionname, b.partitionname);
swap(a.type, b.type);
swap(a.runas, b.runas);
swap(a.__isset, b.__isset);
}
const char* ShowCompactRequest::ascii_fingerprint = "<API key>";
const uint8_t ShowCompactRequest::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
xfer += iprot->skip(ftype);
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t ShowCompactRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ShowCompactRequest");
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ShowCompactRequest &a, ShowCompactRequest &b) {
using ::std::swap;
(void) a;
(void) b;
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x2F,0x33,0x8C,0x26,0x5D,0xC4,0xFD,0x82,0xDD,0x13,0xF4,0x96,0x6F,0xE4,0x3F,0x13};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_dbname = false;
bool isset_tablename = false;
bool isset_type = false;
bool isset_state = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbname);
isset_dbname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tablename);
isset_tablename = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->partitionname);
this->__isset.partitionname = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast394;
xfer += iprot->readI32(ecast394);
this->type = (CompactionType::type)ecast394;
isset_type = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->state);
isset_state = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->workerid);
this->__isset.workerid = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->start);
this->__isset.start = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->runAs);
this->__isset.runAs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_dbname)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_tablename)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_type)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_state)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->dbname);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->tablename);
xfer += oprot->writeFieldEnd();
if (this->__isset.partitionname) {
xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->partitionname);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32((int32_t)this->type);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->state);
xfer += oprot->writeFieldEnd();
if (this->__isset.workerid) {
xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->workerid);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.start) {
xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7);
xfer += oprot->writeI64(this->start);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.runAs) {
xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8);
xfer += oprot->writeString(this->runAs);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.dbname, b.dbname);
swap(a.tablename, b.tablename);
swap(a.partitionname, b.partitionname);
swap(a.type, b.type);
swap(a.state, b.state);
swap(a.workerid, b.workerid);
swap(a.start, b.start);
swap(a.runAs, b.runAs);
swap(a.__isset, b.__isset);
}
const char* ShowCompactResponse::ascii_fingerprint = "<API key>";
const uint8_t ShowCompactResponse::binary_fingerprint[16] = {0x91,0x5B,0x7B,0x8D,0xB8,0x96,0x6D,0x65,0x76,0x9C,0x0F,0x98,0x70,0x7B,0xBA,0xE3};
uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_compacts = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->compacts.clear();
uint32_t _size395;
::apache::thrift::protocol::TType _etype398;
xfer += iprot->readListBegin(_etype398, _size395);
this->compacts.resize(_size395);
uint32_t _i399;
for (_i399 = 0; _i399 < _size395; ++_i399)
{
xfer += this->compacts[_i399].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_compacts = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_compacts)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ShowCompactResponse");
xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->compacts.size()));
std::vector<<API key>> ::const_iterator _iter400;
for (_iter400 = this->compacts.begin(); _iter400 != this->compacts.end(); ++_iter400)
{
xfer += (*_iter400).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(ShowCompactResponse &a, ShowCompactResponse &b) {
using ::std::swap;
swap(a.compacts, b.compacts);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x6E,0x57,0x8D,0xA8,0xAB,0x10,0xEE,0xD8,0x24,0xA7,0x55,0x34,0x35,0x0E,0xBA,0xEF};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_lastEvent = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lastEvent);
isset_lastEvent = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->maxEvents);
this->__isset.maxEvents = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_lastEvent)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("lastEvent", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->lastEvent);
xfer += oprot->writeFieldEnd();
if (this->__isset.maxEvents) {
xfer += oprot->writeFieldBegin("maxEvents", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->maxEvents);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.lastEvent, b.lastEvent);
swap(a.maxEvents, b.maxEvents);
swap(a.__isset, b.__isset);
}
const char* NotificationEvent::ascii_fingerprint = "<API key>";
const uint8_t NotificationEvent::binary_fingerprint[16] = {0xAC,0xAF,0x00,0x36,0xD9,0x99,0x9F,0x3A,0x38,0x9F,0x49,0x0F,0x5E,0x22,0xD3,0x69};
uint32_t NotificationEvent::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_eventId = false;
bool isset_eventTime = false;
bool isset_eventType = false;
bool isset_message = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->eventId);
isset_eventId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->eventTime);
isset_eventTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->eventType);
isset_eventType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableName);
this->__isset.tableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
isset_message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_eventId)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_eventTime)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_eventType)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_message)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t NotificationEvent::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("NotificationEvent");
xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->eventId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("eventTime", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(this->eventTime);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->eventType);
xfer += oprot->writeFieldEnd();
if (this->__isset.dbName) {
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.tableName) {
xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeString(this->tableName);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(NotificationEvent &a, NotificationEvent &b) {
using ::std::swap;
swap(a.eventId, b.eventId);
swap(a.eventTime, b.eventTime);
swap(a.eventType, b.eventType);
swap(a.dbName, b.dbName);
swap(a.tableName, b.tableName);
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEE,0x3D,0xB2,0x33,0x99,0x63,0x91,0x14,0xBC,0xD1,0x78,0x2A,0x0F,0xB0,0x18,0x18};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_events = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->events.clear();
uint32_t _size401;
::apache::thrift::protocol::TType _etype404;
xfer += iprot->readListBegin(_etype404, _size401);
this->events.resize(_size401);
uint32_t _i405;
for (_i405 = 0; _i405 < _size401; ++_i405)
{
xfer += this->events[_i405].read(iprot);
}
xfer += iprot->readListEnd();
}
isset_events = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_events)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->events.size()));
std::vector<NotificationEvent> ::const_iterator _iter406;
for (_iter406 = this->events.begin(); _iter406 != this->events.end(); ++_iter406)
{
xfer += (*_iter406).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.events, b.events);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x56,0xA5,0x9C,0xE7,0xFF,0xAF,0x82,0xBC,0xA8,0xA1,0x9F,0xAA,0xCD,0xE4,0xFB,0x75};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_eventId = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->eventId);
isset_eventId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_eventId)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1);
xfer += oprot->writeI64(this->eventId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.eventId, b.eventId);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xAC,0xE4,0xF6,0x44,0xF0,0xFD,0xD2,0x89,0xDD,0xC4,0xEE,0x5B,0x83,0xBC,0x13,0xC0};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_filesAdded = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->filesAdded.clear();
uint32_t _size407;
::apache::thrift::protocol::TType _etype410;
xfer += iprot->readListBegin(_etype410, _size407);
this->filesAdded.resize(_size407);
uint32_t _i411;
for (_i411 = 0; _i411 < _size407; ++_i411)
{
xfer += iprot->readString(this->filesAdded[_i411]);
}
xfer += iprot->readListEnd();
}
isset_filesAdded = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_filesAdded)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAdded.size()));
std::vector<std::string> ::const_iterator _iter412;
for (_iter412 = this->filesAdded.begin(); _iter412 != this->filesAdded.end(); ++_iter412)
{
xfer += oprot->writeString((*_iter412));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.filesAdded, b.filesAdded);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0x18,0x7E,0x75,0x4B,0x26,0x70,0x7E,0xE3,0x24,0x51,0xE6,0xA2,0x7F,0xB6,0x72,0xCE};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->insertData.read(iprot);
this->__isset.insertData = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("insertData", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->insertData.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.insertData, b.insertData);
swap(a.__isset, b.__isset);
}
const char* FireEventRequest::ascii_fingerprint = "<API key>";
const uint8_t FireEventRequest::binary_fingerprint[16] = {0x1B,0xA3,0xA7,0xF0,0x01,0x59,0x25,0x40,0x72,0xC3,0x97,0x9B,0x14,0x29,0xB5,0x0B};
uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
bool isset_successful = false;
bool isset_data = false;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->successful);
isset_successful = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->data.read(iprot);
isset_data = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->dbName);
this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->tableName);
this->__isset.tableName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->partitionVals.clear();
uint32_t _size413;
::apache::thrift::protocol::TType _etype416;
xfer += iprot->readListBegin(_etype416, _size413);
this->partitionVals.resize(_size413);
uint32_t _i417;
for (_i417 = 0; _i417 < _size413; ++_i417)
{
xfer += iprot->readString(this->partitionVals[_i417]);
}
xfer += iprot->readListEnd();
}
this->__isset.partitionVals = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_successful)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_data)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("FireEventRequest");
xfer += oprot->writeFieldBegin("successful", ::apache::thrift::protocol::T_BOOL, 1);
xfer += oprot->writeBool(this->successful);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2);
xfer += this->data.write(oprot);
xfer += oprot->writeFieldEnd();
if (this->__isset.dbName) {
xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.tableName) {
xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->tableName);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.partitionVals) {
xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionVals.size()));
std::vector<std::string> ::const_iterator _iter418;
for (_iter418 = this->partitionVals.begin(); _iter418 != this->partitionVals.end(); ++_iter418)
{
xfer += oprot->writeString((*_iter418));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(FireEventRequest &a, FireEventRequest &b) {
using ::std::swap;
swap(a.successful, b.successful);
swap(a.data, b.data);
swap(a.dbName, b.dbName);
swap(a.tableName, b.tableName);
swap(a.partitionVals, b.partitionVals);
swap(a.__isset, b.__isset);
}
const char* FireEventResponse::ascii_fingerprint = "<API key>";
const uint8_t FireEventResponse::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B};
uint32_t FireEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
xfer += iprot->skip(ftype);
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t FireEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("FireEventResponse");
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(FireEventResponse &a, FireEventResponse &b) {
using ::std::swap;
(void) a;
(void) b;
}
const char* MetaException::ascii_fingerprint = "<API key>";
const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t MetaException::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("MetaException");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(MetaException &a, MetaException &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* UnknownDBException::ascii_fingerprint = "<API key>";
const uint8_t UnknownDBException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t UnknownDBException::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("UnknownDBException");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(UnknownDBException &a, UnknownDBException &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* <API key>::ascii_fingerprint = "<API key>";
const uint8_t <API key>::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t <API key>::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t <API key>::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("<API key>");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(<API key> &a, <API key> &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* NoSuchTxnException::ascii_fingerprint = "<API key>";
const uint8_t NoSuchTxnException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t NoSuchTxnException::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t NoSuchTxnException::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("NoSuchTxnException");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(NoSuchTxnException &a, NoSuchTxnException &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* TxnAbortedException::ascii_fingerprint = "<API key>";
const uint8_t TxnAbortedException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t TxnAbortedException::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t TxnAbortedException::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TxnAbortedException");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(TxnAbortedException &a, TxnAbortedException &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* TxnOpenException::ascii_fingerprint = "<API key>";
const uint8_t TxnOpenException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t TxnOpenException::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t TxnOpenException::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TxnOpenException");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(TxnOpenException &a, TxnOpenException &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
const char* NoSuchLockException::ascii_fingerprint = "<API key>";
const uint8_t NoSuchLockException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
uint32_t NoSuchLockException::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
::apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
using ::apache::thrift::protocol::TProtocolException;
while (true)
{
xfer += iprot->readFieldBegin(fname, ftype, fid);
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->message);
this->__isset.message = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
return xfer;
}
uint32_t NoSuchLockException::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("NoSuchLockException");
xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->message);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
void swap(NoSuchLockException &a, NoSuchLockException &b) {
using ::std::swap;
swap(a.message, b.message);
swap(a.__isset, b.__isset);
}
}}} // namespace
|
# $NetBSD: Makefile,v 1.2 2011/09/08 18:44:38 jmmv Exp $
NOMAN= # defined
.include <bsd.own.mk>
ATFFILE= no
TESTSDIR= ${TESTSBASE}/lib/libcurses
FILESDIR= ${TESTSDIR}/check_files
FILES= curses_start.chk
FILES+= addch.chk
FILES+= addchstr.chk
FILES+= addstr.chk
FILES+= attributes.chk
FILES+= bell.chk
FILES+= background1.chk
FILES+= background2.chk
FILES+= background3.chk
FILES+= background4.chk
FILES+= background5.chk
FILES+= chgat1.chk
FILES+= chgat2.chk
FILES+= chgat3.chk
FILES+= clear1.chk
FILES+= clear2.chk
FILES+= clear3.chk
FILES+= clear4.chk
FILES+= clear5.chk
FILES+= clear6.chk
FILES+= clear7.chk
FILES+= clear8.chk
FILES+= clear9.chk
FILES+= clear10.chk
FILES+= color_blank_draw.chk
FILES+= color_start.chk
FILES+= color_default.chk
FILES+= color_blue_back.chk
FILES+= color_red_fore.chk
FILES+= color_set.chk
FILES+= copywin1.chk
FILES+= copywin2.chk
FILES+= copywin3.chk
FILES+= copywin4.chk
FILES+= copywin5.chk
FILES+= copywin6.chk
FILES+= copywin7.chk
FILES+= copywin8.chk
FILES+= copywin9.chk
FILES+= copywin10.chk
FILES+= copywin11.chk
FILES+= copywin12.chk
FILES+= copywin13.chk
FILES+= copywin14.chk
FILES+= curs_set1.chk
FILES+= curs_set2.chk
FILES+= curs_set3.chk
FILES+= fill.chk
FILES+= home.chk
FILES+= timeout.chk
FILES+= box_standout.chk
FILES+= wborder.chk
FILES+= wborder_refresh.chk
FILES+= window.chk
FILES+= wscrl1.chk
FILES+= wscrl2.chk
FILES+= wgetstr.chk
FILES+= wgetstr_refresh.chk
FILES+= wprintw_refresh.chk
CLEANFILES=
.include <bsd.test.mk>
.include <bsd.files.mk>
.include <bsd.prog.mk>
|
// This file is part of libfringe, a low-level green threading library.
// copied, modified, or distributed except according to those terms.
extern crate fringe;
use fringe::OsStack;
use fringe::generator::Generator;
#[test]
fn producer() {
let stack = OsStack::new(0).unwrap();
let mut gen = Generator::new(stack, move |yielder, ()| {
for i in 0.. { yielder.suspend(i) }
});
assert_eq!(gen.next(), Some(0));
assert_eq!(gen.next(), Some(1));
assert_eq!(gen.next(), Some(2));
unsafe { gen.unsafe_unwrap(); }
}
|
#!/usr/bin/env bash
## Users, roles, tenants ##
adminUser=${1:-neutron}
adminRole=admin
l3AdminTenant=L3AdminTenant
serviceTenant=service
# Below user is just for demos so that we don't see all logical instances.
regularUser=viewer
password=viewer
echo -n "Checking if $l3AdminTenant tenant exists ..."
tenantId=`openstack project show $l3AdminTenant 2>&1 | awk '/No|id/ { if ($1 == "No") print "No"; else if ($2 == "id") print $4; }'`
if [ "$tenantId" == "No" ]; then
echo " No, it does not. Creating it."
tenantId=$(openstack project create $l3AdminTenant --domain="default" --or-show -f value -c id)
echo $tenantId
else
echo " Yes, it does."
fi
echo -n "Checking if $regularUser user exists ..."
userId=`openstack user show $regularUser 2>&1 | awk '/No user|id/ { if ($1 == "No") print "No"; else print $4; }'`
if [ "$userId" == "No" ]; then
echo " No, it does not. Creating it."
userId=$(openstack user create $regularUser --password $password --domain="default" --or-show -f value -c id)
echo $userId
else
echo " Yes, it does."
fi
echo -n "Checking if $adminUser user has admin privileges in $l3AdminTenant tenant ..."
isAdmin=`openstack --os-username $adminUser --os-project-name $l3AdminTenant user role list 2>&1 | awk 'BEGIN { res="No" } { if ($4 == "admin") res="Yes"; } END { print res; }'`
if [ "$isAdmin" == "No" ]; then
echo " No, it does not. Giving it admin rights."
admUserId=`openstack user show $adminUser | awk '{ if ($2 == "id") print $4 }'`
admRoleId=`openstack role show $adminRole | awk '{ if ($2 == "id") print $4 }'`
openstack role add $admRoleId --user $admUserId --project $tenantId
else
echo " Yes, it has."
fi
# What follows can be removed once L3AdminTenant is used to lookup UUID of L3AdminTenant
echo -n "Determining UUID of $serviceTenant tenant ..."
tenantId=`openstack project show $serviceTenant 2>&1 | awk '/No tenant|id/ { if ($1 == "No") print "No"; else if ($2 == "id") print $4; }'`
if [ "$tenantId" == "No" ]; then
echo "Error: $serviceTenant tenant does not seem to exist. Aborting!"
exit 1
else
echo " Done."
fi
echo -n "Checking if $adminUser user has admin privileges in $serviceTenant tenant ..."
isAdmin=`openstack --os-username $adminUser --os-project-name $serviceTenant user role list 2>&1 | awk 'BEGIN { res="No" } { if ($4 == "admin") res="Yes"; } END { print res; }'`
if [ "$isAdmin" == "No" ]; then
echo " No, it does not. Giving it admin rights."
admUserId=`openstack user show $adminUser | awk '{ if ($2 == "id") print $4 }'`
admRoleId=`openstack role show $adminRole | awk '{ if ($2 == "id") print $4 }'`
openstack role add $admRoleId --user $admUserId --project $tenantId
else
echo " Yes, it has."
fi
|
// finite-state transducer library.
// Class to compute the difference between two FSAs.
#ifndef FST_DIFFERENCE_H_
#define FST_DIFFERENCE_H_
#include <memory>
#include <fst/cache.h>
#include <fst/complement.h>
#include <fst/compose.h>
namespace fst {
template <class Arc, class M = Matcher<Fst<Arc>>,
class Filter = <API key><M>,
class StateTable =
<API key><Arc, typename Filter::FilterState>>
struct <API key>
: public ComposeFstOptions<Arc, M, Filter, StateTable> {
explicit <API key>(const CacheOptions &opts = CacheOptions(),
M *matcher1 = nullptr, M *matcher2 = nullptr,
Filter *filter = nullptr,
StateTable *state_table = nullptr)
: ComposeFstOptions<Arc, M, Filter, StateTable>(opts, matcher1, matcher2,
filter, state_table) {}
};
// Computes the difference between two FSAs. This version is a delayed FST.
// Only strings that are in the first automaton but not in second are retained
// in the result.
// The first argument must be an acceptor; the second argument must be an
// unweighted, epsilon-free, deterministic acceptor. One of the arguments must
// be label-sorted.
// Complexity: same as ComposeFst.
// Caveats: same as ComposeFst.
template <class A>
class DifferenceFst : public ComposeFst<A> {
public:
using Arc = A;
using Weight = typename Arc::Weight;
using StateId = typename Arc::StateId;
using ComposeFst<Arc>::CreateBase1;
// A - B = A ^ B'.
DifferenceFst(const Fst<Arc> &fst1, const Fst<Arc> &fst2,
const CacheOptions &opts = CacheOptions())
: ComposeFst<Arc>(<API key>(fst1, fst2, opts)) {
if (!fst1.Properties(kAcceptor, true)) {
FSTERROR() << "DifferenceFst: 1st argument not an acceptor";
GetImpl()->SetProperties(kError, kError);
}
}
template <class Matcher, class Filter, class StateTable>
DifferenceFst(
const Fst<Arc> &fst1, const Fst<Arc> &fst2,
const <API key><Arc, Matcher, Filter, StateTable> &opts)
: ComposeFst<Arc>(
<API key>(fst1, fst2, opts)) {
if (!fst1.Properties(kAcceptor, true)) {
FSTERROR() << "DifferenceFst: 1st argument not an acceptor";
GetImpl()->SetProperties(kError, kError);
}
}
// See Fst<>::Copy() for doc.
DifferenceFst(const DifferenceFst<Arc> &fst, bool safe = false)
: ComposeFst<Arc>(fst, safe) {}
// Get a copy of this DifferenceFst. See Fst<>::Copy() for further doc.
DifferenceFst<Arc> *Copy(bool safe = false) const override {
return new DifferenceFst<Arc>(*this, safe);
}
private:
using Impl = internal::ComposeFstImplBase<Arc>;
using ImplToFst<Impl>::GetImpl;
static std::shared_ptr<Impl> <API key>(
const Fst<Arc> &fst1, const Fst<Arc> &fst2, const CacheOptions &opts) {
using RM = RhoMatcher<Matcher<Fst<A>>>;
ComplementFst<Arc> cfst(fst2);
ComposeFstOptions<A, RM> copts(
CacheOptions(), new RM(fst1, MATCH_NONE),
new RM(cfst, MATCH_INPUT, ComplementFst<Arc>::kRhoLabel));
return CreateBase1(fst1, cfst, copts);
}
template <class Matcher, class Filter, class StateTable>
static std::shared_ptr<Impl> <API key>(
const Fst<Arc> &fst1, const Fst<Arc> &fst2,
const <API key><Arc, Matcher, Filter, StateTable> &opts) {
using RM = RhoMatcher<Matcher>;
ComplementFst<Arc> cfst(fst2);
ComposeFstOptions<Arc, RM> copts(opts);
copts.matcher1 = new RM(fst1, MATCH_NONE, kNoLabel, <API key>,
opts.matcher1);
copts.matcher2 = new RM(cfst, MATCH_INPUT, ComplementFst<Arc>::kRhoLabel,
<API key>, opts.matcher2);
return CreateBase1(fst1, cfst, copts);
}
};
// Specialization for DifferenceFst.
template <class Arc>
class StateIterator<DifferenceFst<Arc>>
: public StateIterator<ComposeFst<Arc>> {
public:
explicit StateIterator(const DifferenceFst<Arc> &fst)
: StateIterator<ComposeFst<Arc>>(fst) {}
};
// Specialization for DifferenceFst.
template <class Arc>
class ArcIterator<DifferenceFst<Arc>> : public ArcIterator<ComposeFst<Arc>> {
public:
using StateId = typename Arc::StateId;
ArcIterator(const DifferenceFst<Arc> &fst, StateId s)
: ArcIterator<ComposeFst<Arc>>(fst, s) {}
};
using DifferenceOptions = ComposeOptions;
// Useful alias when using StdArc.
using StdDifferenceFst = DifferenceFst<StdArc>;
using DifferenceOptions = ComposeOptions;
// Computes the difference between two FSAs. This version writes the difference
// to an output MutableFst. Only strings that are in the first automaton but not
// in the second are retained in the result.
// The first argument must be an acceptor; the second argument must be an
// unweighted, epsilon-free, deterministic acceptor. One of the arguments must
// be label-sorted.
// Complexity: same as Compose.
// Caveats: same as Compose.
template <class Arc>
void Difference(const Fst<Arc> &ifst1, const Fst<Arc> &ifst2,
MutableFst<Arc> *ofst,
const DifferenceOptions &opts = DifferenceOptions()) {
using M = Matcher<Fst<Arc>>;
// In each case, we cache only the last state for fastest copy.
switch (opts.filter_type) {
case AUTO_FILTER: {
CacheOptions nopts;
nopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, nopts);
break;
}
case SEQUENCE_FILTER: {
<API key><Arc> dopts;
dopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, dopts);
break;
}
case ALT_SEQUENCE_FILTER: {
<API key><Arc, M, <API key><M>> dopts;
dopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, dopts);
break;
}
case MATCH_FILTER: {
<API key><Arc, M, MatchComposeFilter<M>> dopts;
dopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, dopts);
break;
}
case NO_MATCH_FILTER: {
<API key><Arc, M, <API key><M>> dopts;
dopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, dopts);
break;
}
case NULL_FILTER: {
<API key><Arc, M, NullComposeFilter<M>> dopts;
dopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, dopts);
break;
}
case TRIVIAL_FILTER: {
<API key><Arc, M, <API key><M>> dopts;
dopts.gc_limit = 0;
*ofst = DifferenceFst<Arc>(ifst1, ifst2, dopts);
break;
}
}
if (opts.connect) Connect(ofst);
}
} // namespace fst
#endif // FST_DIFFERENCE_H_
|
package org.jetbrains.plugins.scala.lang.formatter;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.EditorFactory;
import com.intellij.openapi.editor.impl.DocumentImpl;
import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.<API key>;
import com.intellij.psi.codeStyle.<API key>;
import com.intellij.testFramework.LightIdeaTestCase;
import com.intellij.util.<API key>;
import org.jetbrains.plugins.scala.ScalaLanguage;
import org.jetbrains.plugins.scala.lang.formatting.settings.<API key>;
import org.jetbrains.plugins.scala.util.TestUtils;
import java.io.File;
import java.util.EnumMap;
import java.util.Map;
/**
* Base class for java formatter tests that holds utility methods.
*
* @author Denis Zhdanov
* @since Apr 27, 2010 6:26:29 PM
*/
//todo: almost duplicate from Java
public abstract class <API key> extends LightIdeaTestCase {
protected enum Action {REFORMAT, INDENT}
private interface TestFormatAction {
void run(PsiFile psiFile, int startOffset, int endOffset);
}
private static final Map<Action, TestFormatAction> ACTIONS = new EnumMap<Action, TestFormatAction>(Action.class);
static {
ACTIONS.put(Action.REFORMAT, new TestFormatAction() {
public void run(PsiFile psiFile, int startOffset, int endOffset) {
CodeStyleManager.getInstance(getProject()).reformatText(psiFile, startOffset, endOffset);
}
});
ACTIONS.put(Action.INDENT, new TestFormatAction() {
public void run(PsiFile psiFile, int startOffset, int endOffset) {
CodeStyleManager.getInstance(getProject()).adjustLineIndent(psiFile, startOffset);
}
});
}
private static final String BASE_PATH = TestUtils.getTestDataPath() + "/psi/formatter";
public TextRange myTextRange;
public TextRange myLineRange;
public <API key> getCommonSettings() {
return getSettings().getCommonSettings(ScalaLanguage.INSTANCE);
}
public <API key> getScalaSettings() {
return getSettings().getCustomSettings(<API key>.class);
}
public CodeStyleSettings getSettings() {
return <API key>.getSettings(getProject());
}
public <API key>.IndentOptions getIndentOptions() {
return getCommonSettings().getIndentOptions();
}
public void doTest() throws Exception {
doTest(getTestName(false) + ".scala", getTestName(false) + "_after.scala");
}
public void doTest(String fileNameBefore, String fileNameAfter) throws Exception {
doTextTest(Action.REFORMAT, loadFile(fileNameBefore), loadFile(fileNameAfter));
}
public void doTextTest(final String text, String textAfter) throws <API key> {
doTextTest(Action.REFORMAT, StringUtil.<API key>(text), StringUtil.<API key>(textAfter));
}
public void doTextTest(final Action action, final String text, String textAfter) throws <API key> {
final PsiFile file = createFile("A.scala", text);
if (myLineRange != null) {
final DocumentImpl document = new DocumentImpl(text);
myTextRange =
new TextRange(document.getLineStartOffset(myLineRange.getStartOffset()), document.getLineEndOffset(myLineRange.getEndOffset()));
}
/*
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
public void run() {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
performFormatting(file);
}
});
}
}, null, null);
assertEquals(prepareText(textAfter), prepareText(file.getText()));
*/
final PsiDocumentManager manager = PsiDocumentManager.getInstance(getProject());
final Document document = manager.getDocument(file);
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
public void run() {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
document.replaceString(0, document.getTextLength(), text);
manager.commitDocument(document);
try {
TextRange rangeToUse = myTextRange;
if (rangeToUse == null) {
rangeToUse = file.getTextRange();
}
ACTIONS.get(action).run(file, rangeToUse.getStartOffset(), rangeToUse.getEndOffset());
}
catch (<API key> e) {
assertTrue(e.getLocalizedMessage(), false);
}
}
});
}
}, "", "");
if (document == null) {
fail("Don't expect the document to be null");
return;
}
assertEquals(prepareText(textAfter), prepareText(document.getText()));
manager.commitDocument(document);
assertEquals(prepareText(textAfter), prepareText(file.getText()));
}
//todo: was unused, should be deleted (??)
/* public void doMethodTest(final String before, final String after) throws Exception {
doTextTest(
Action.REFORMAT,
"class Foo{\n" + " void foo() {\n" + before + '\n' + " }\n" + "}",
"class Foo {\n" + " void foo() {\n" + shiftIndentInside(after, 8, false) + '\n' + " }\n" + "}"
);
}
public void doClassTest(final String before, final String after) throws Exception {
doTextTest(
Action.REFORMAT,
"class Foo{\n" + before + '\n' + "}",
"class Foo {\n" + shiftIndentInside(after, 4, false) + '\n' + "}"
);
}*/
private static String prepareText(String actual) {
if (actual.startsWith("\n")) {
actual = actual.substring(1);
}
if (actual.startsWith("\n")) {
actual = actual.substring(1);
}
// Strip trailing spaces
final Document doc = EditorFactory.getInstance().createDocument(actual);
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
public void run() {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
((DocumentImpl)doc).stripTrailingSpaces(getProject());
}
});
}
}, "formatting", null);
return doc.getText().trim();
}
private static String loadFile(String name) throws Exception {
String fullName = BASE_PATH + File.separatorChar + name;
String text = new String(FileUtil.loadFileText(new File(fullName)));
text = StringUtil.<API key>(text);
return text;
}
@Override
protected void setUp() throws Exception {
super.setUp();
TestUtils.disableTimerThread();
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<title>HashGroupify (ARX Developer Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HashGroupify (ARX Developer Documentation)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HashGroupify.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.GroupStatistics.html" title="class in org.deidentifier.arx.framework.check.groupify"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/deidentifier/arx/framework/check/groupify/HashGroupify.html" target="_top">Frames</a></li>
<li><a href="HashGroupify.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#<API key>">Nested</a> | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<div class="subTitle">org.deidentifier.arx.framework.check.groupify</div>
<h2 title="Class HashGroupify" class="title">Class HashGroupify</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.deidentifier.arx.framework.check.groupify.HashGroupify</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">HashGroupify</span>
extends java.lang.Object
implements <a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></pre>
<div class="block">A hash groupify operator. It implements a hash table with chaining and keeps
track of additional properties per equivalence class</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="<API key>">
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.GroupStatistics.html" title="class in org.deidentifier.arx.framework.check.groupify">HashGroupify.GroupStatistics</a></strong></code>
<div class="block">Statistics about the groups, excluding outliers.</div>
</td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#HashGroupify(int,%20org.deidentifier.arx.ARXConfiguration.<API key>)">HashGroupify</a></strong>(int capacity,
<a href="../../../../../../org/deidentifier/arx/ARXConfiguration.<API key>.html" title="class in org.deidentifier.arx">ARXConfiguration.<API key></a> config)</code>
<div class="block">Constructs a new hash groupify operator.</div>
</td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method_summary">
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#addAll(int[],%20int,%20int,%20int[],%20int)">addAll</a></strong>(int[] key,
int representant,
int count,
int[] sensitive,
int pcount)</code>
<div class="block">Generic adder for all combinations of criteria in mode transform ALL.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#addGroupify(int[],%20int,%20int,%20org.deidentifier.arx.framework.check.distribution.Distribution[],%20int)">addGroupify</a></strong>(int[] key,
int representant,
int count,
<a href="../../../../../../org/deidentifier/arx/framework/check/distribution/Distribution.html" title="class in org.deidentifier.arx.framework.check.distribution">Distribution</a>[] distributions,
int pcount)</code>
<div class="block">Generic adder for all combinations of criteria in mode transform GROUPIFY.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#addSnapshot(int[],%20int,%20int,%20int[][],%20int[][],%20int)">addSnapshot</a></strong>(int[] key,
int representant,
int count,
int[][] elements,
int[][] frequencies,
int pcount)</code>
<div class="block">Generic adder for all combinations of criteria in mode transform SNAPSHOT.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#analyze(org.deidentifier.arx.framework.lattice.Node,%20boolean)">analyze</a></strong>(<a href="../../../../../../org/deidentifier/arx/framework/lattice/Node.html" title="class in org.deidentifier.arx.framework.lattice">Node</a> transformation,
boolean force)</code>
<div class="block">Computes the anonymity properties and suppressed tuples etc.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#clear()">clear</a></strong>()</code>
<div class="block">Clear.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupifyEntry.html" title="class in org.deidentifier.arx.framework.check.groupify">HashGroupifyEntry</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#getFirstEntry()">getFirstEntry</a></strong>()</code>
<div class="block">Gets the first entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.GroupStatistics.html" title="class in org.deidentifier.arx.framework.check.groupify">HashGroupify.GroupStatistics</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#getGroupStatistics()">getGroupStatistics</a></strong>()</code>
<div class="block">Returns statistics about the groups.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#isAnonymous()">isAnonymous</a></strong>()</code>
<div class="block">Are all defined privacy criteria fulfilled by this transformation, given the specified limit on suppressed tuples.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#isKAnonymous()">isKAnonymous</a></strong>()</code>
<div class="block">Is the current transformation k-anonymous.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#markOutliers(int[][])">markOutliers</a></strong>(int[][] data)</code>
<div class="block">Marks all outliers.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#resetSuppression()">resetSuppression</a></strong>()</code>
<div class="block">This method will reset all flags that indicate that equivalence classes are suppressed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.html#size()">size</a></strong>()</code>
<div class="block">Size.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="<API key>.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
</a>
<h3>Constructor Detail</h3>
<a name="HashGroupify(int, org.deidentifier.arx.ARXConfiguration.<API key>)">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HashGroupify</h4>
<pre>public HashGroupify(int capacity,
<a href="../../../../../../org/deidentifier/arx/ARXConfiguration.<API key>.html" title="class in org.deidentifier.arx">ARXConfiguration.<API key></a> config)</pre>
<div class="block">Constructs a new hash groupify operator.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>capacity</code> - The capacity</dd><dd><code>config</code> - The config</dd></dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method_detail">
</a>
<h3>Method Detail</h3>
<a name="addAll(int[], int, int, int[], int)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAll</h4>
<pre>public void addAll(int[] key,
int representant,
int count,
int[] sensitive,
int pcount)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#addAll(int[],%20int,%20int,%20int[],%20int)">IHashGroupify</a></code></strong></div>
<div class="block">Generic adder for all combinations of criteria in mode transform ALL.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#addAll(int[],%20int,%20int,%20int[],%20int)">addAll</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="addGroupify(int[], int, int, org.deidentifier.arx.framework.check.distribution.Distribution[], int)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>addGroupify</h4>
<pre>public void addGroupify(int[] key,
int representant,
int count,
<a href="../../../../../../org/deidentifier/arx/framework/check/distribution/Distribution.html" title="class in org.deidentifier.arx.framework.check.distribution">Distribution</a>[] distributions,
int pcount)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#addGroupify(int[],%20int,%20int,%20org.deidentifier.arx.framework.check.distribution.Distribution[],%20int)">IHashGroupify</a></code></strong></div>
<div class="block">Generic adder for all combinations of criteria in mode transform GROUPIFY.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#addGroupify(int[],%20int,%20int,%20org.deidentifier.arx.framework.check.distribution.Distribution[],%20int)">addGroupify</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="addSnapshot(int[], int, int, int[][], int[][], int)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>addSnapshot</h4>
<pre>public void addSnapshot(int[] key,
int representant,
int count,
int[][] elements,
int[][] frequencies,
int pcount)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#addSnapshot(int[],%20int,%20int,%20int[][],%20int[][],%20int)">IHashGroupify</a></code></strong></div>
<div class="block">Generic adder for all combinations of criteria in mode transform SNAPSHOT.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#addSnapshot(int[],%20int,%20int,%20int[][],%20int[][],%20int)">addSnapshot</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="analyze(org.deidentifier.arx.framework.lattice.Node, boolean)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>analyze</h4>
<pre>public void analyze(<a href="../../../../../../org/deidentifier/arx/framework/lattice/Node.html" title="class in org.deidentifier.arx.framework.lattice">Node</a> transformation,
boolean force)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#analyze(org.deidentifier.arx.framework.lattice.Node,%20boolean)">IHashGroupify</a></code></strong></div>
<div class="block">Computes the anonymity properties and suppressed tuples etc. Must be called
when all tuples have been passed to the operator. When the flag is set to true
the method will make sure that all equivalence classes that do not fulfill all
privacy criteria are marked for suppression. If the flag is set to false,
the operator may perform an early abort, which may lead to an inconsistent classification
of equivalence classes.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#analyze(org.deidentifier.arx.framework.lattice.Node,%20boolean)">analyze</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="clear()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public void clear()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#clear()">IHashGroupify</a></code></strong></div>
<div class="block">Clear.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#clear()">clear</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="getFirstEntry()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirstEntry</h4>
<pre>public <a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupifyEntry.html" title="class in org.deidentifier.arx.framework.check.groupify">HashGroupifyEntry</a> getFirstEntry()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#getFirstEntry()">IHashGroupify</a></code></strong></div>
<div class="block">Gets the first entry.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#getFirstEntry()">getFirstEntry</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the first entry</dd></dl>
</li>
</ul>
<a name="getGroupStatistics()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroupStatistics</h4>
<pre>public <a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.GroupStatistics.html" title="class in org.deidentifier.arx.framework.check.groupify">HashGroupify.GroupStatistics</a> getGroupStatistics()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#getGroupStatistics()">IHashGroupify</a></code></strong></div>
<div class="block">Returns statistics about the groups.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#getGroupStatistics()">getGroupStatistics</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd></dd></dl>
</li>
</ul>
<a name="isAnonymous()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAnonymous</h4>
<pre>public boolean isAnonymous()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#isAnonymous()">IHashGroupify</a></code></strong></div>
<div class="block">Are all defined privacy criteria fulfilled by this transformation, given the specified limit on suppressed tuples.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#isAnonymous()">isAnonymous</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>true, if successful</dd></dl>
</li>
</ul>
<a name="isKAnonymous()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>isKAnonymous</h4>
<pre>public boolean isKAnonymous()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#isKAnonymous()">IHashGroupify</a></code></strong></div>
<div class="block">Is the current transformation k-anonymous. Always returns true, if no k-anonymity (sub-)criterion was specified</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#isKAnonymous()">isKAnonymous</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd></dd></dl>
</li>
</ul>
<a name="markOutliers(int[][])">
</a>
<ul class="blockList">
<li class="blockList">
<h4>markOutliers</h4>
<pre>public void markOutliers(int[][] data)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#markOutliers(int[][])">IHashGroupify</a></code></strong></div>
<div class="block">Marks all outliers.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#markOutliers(int[][])">markOutliers</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="resetSuppression()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetSuppression</h4>
<pre>public void resetSuppression()</pre>
<div class="block">This method will reset all flags that indicate that equivalence classes are suppressed.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#resetSuppression()">resetSuppression</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
</dl>
</li>
</ul>
<a name="size()">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>size</h4>
<pre>public int size()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#size()">IHashGroupify</a></code></strong></div>
<div class="block">Size.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html#size()">size</a></code> in interface <code><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/IHashGroupify.html" title="interface in org.deidentifier.arx.framework.check.groupify">IHashGroupify</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the int</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HashGroupify.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../../org/deidentifier/arx/framework/check/groupify/HashGroupify.GroupStatistics.html" title="class in org.deidentifier.arx.framework.check.groupify"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/deidentifier/arx/framework/check/groupify/HashGroupify.html" target="_top">Frames</a></li>
<li><a href="HashGroupify.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#<API key>">Nested</a> | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
</a></div>
</body>
</html>
|
Copyright (c) 2009 Microsoft Corporation
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Microsoft nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ES5Harness.registerTest({
id: "15.2.3.6-3-37",
path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js",
description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
test: function testcase() {
var obj = {};
var accessed = false;
var numObj = new Number(-2);
numObj.enumerable = true;
Object.defineProperty(obj, "property", numObj);
for (var prop in obj) {
if (prop === "property") {
accessed = true;
}
}
return accessed;
},
precondition: function prereq() {
return fnExists(Object.defineProperty);
}
});
|
# Apache Aurora development environment
This directory contains [Packer](https://packer.io) scripts
to build and distribute the base development environment for Aurora.
The goal of this environment is to pre-fetch dependencies and artifacts
needed for the integration test environment so that `vagrant up` is
cheap after the box has been fetched for the first time.
As dependencies (libraries, or external packages) of Aurora change, it
will be helpful to update this box and keep this cost low.
## Updating the box
1. Download [packer](https:
2. Modify build scripts to make the changes you want
(e.g. install packages via `apt`)
3. Fetch the latest version of our base box
$ vagrant box update --box bento/ubuntu-16.04
The box will be stored in version-specific directory under
`~/.vagrant.d/boxes/<API key>.04/`. Find the path to the `.ovf` file for the
latest version of the box. For the remainder of this document, this path will be referred to as
`$UBUNTU_OVF`.
4. Build the new box
Using the path from the previous step, run the following command to start the build.
$ packer build -var "base_box_ovf=$UBUNTU_OVF" aurora.json
This takes a while, approximately 20 minutes. When finished, your working directory will
contain a file named `<API key>.box`.
5. Verify your box locally
$ vagrant box add --name <API key> \
<API key>.box
This will make a vagrant box named `<API key>` locally available to vagrant
(i.e. not on Vagrant Cloud). We use a different name here to avoid confusion that could
arise from using an unreleased base box.
Edit the [`Vagrantfile`](../../Vagrantfile), changing the line
config.vm.box = "apache-aurora/dev-environment"
to
config.vm.box = "<API key>"
and comment out vm version
# config.vm.box_version = "0.0.X"
At this point, you can use the box as normal to run integration tests.
6. Upload the box to Vagrant Cloud
Our boxes are stored in [Vagrant Cloud](https://vagrantcloud.com/apache-aurora/dev-environment).
In order to upload a new version of our box, you must have committer access to upload
a dev image box, please ask in dev@aurora.apache.org or our Slack Channel
if you would like to contribute. More info can be found by visiting our
[community page](http://aurora.apache.org/community/).
Once you have access to our Vagrant Cloud organization, a token can be generated by
going to your [security settings](https://app.vagrantup.com/settings/security).
Store the token in a safe place as it will be needed for future submissions.
Next, three environmental variables must be set: `$UBUNTU_OVF`, `$VAGRANT_CLOUD_TOKEN`,
and `$BOX_VERSION`.
$ export UBUNTU_OVF=<Location of base image (.ovf) on local machine>
$ export VAGRANT_CLOUD_TOKEN=<API Token from Hashicorp>
$ export BOX_VERSION=<SemVer to be given to this box>
**Make sure the variables are set correctly before proceeding as a mistake can cause
the very time consuming process to fail or clobber a previous box.**
$ env | grep -E "UBUNTU_OVF|VAGRANT_CLOUD_TOKEN|BOX_VERSION"
Then finally run the release packer configuration which will upload the vagrant box.
$ packer build aurora-release.json
Note: This process will rebuild the box and upload it to the Vagrant Cloud. Unfortunately,
there currently is no way to skip the build step as the output from the first post-processor
(Vagrant) is required for the second (Vagrant-Cloud).
You may now change the version in [`Vagrantfile`](../../Vagrantfile) to the one specified in
`$BOX_VERSION` and commit the change.
|
// file at the top-level directory of this distribution and at
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test case for issue #2843.
proto! streamp (
open:send<T:Send> {
data(T) -> open<T>
}
)
fn rendezvous() {
let (s, c) = streamp::init();
let streams: ~[streamp::client::open<int>] = ~[c];
error!("%?", streams[0]);
}
pub fn main() {
//os::getenv("FOO");
rendezvous();
}
|
package org.ovirt.engine.core.bll;
import org.ovirt.engine.core.common.action.<API key>;
public abstract class ConfigCommandBase<T extends <API key>> extends CommandBase<T> {
protected ConfigCommandBase(T parameters) {
super(parameters);
}
}
|
package animate
import (
"testing"
)
func TestGeocode(t *testing.T) {
testData := []struct {
text string
}{
{"funny cat"},
}
command := Animate()
for _, d := range testData {
rsp, err := command.Exec("animate", d.text)
if err != nil {
t.Fatal(err)
}
if rsp == nil {
t.Fatal("expected result, got nil")
}
}
}
|
package org.elasticsearch.xpack.runtimefields.query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.automaton.Automata;
import org.apache.lucene.util.automaton.ByteRunAutomaton;
import org.elasticsearch.script.Script;
import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript;
import java.util.List;
import java.util.Objects;
public class <API key> extends <API key> {
private final String lowerValue;
private final String upperValue;
private final boolean includeLower;
private final boolean includeUpper;
public <API key>(
Script script,
StringFieldScript.LeafFactory leafFactory,
String fieldName,
String lowerValue,
String upperValue,
boolean includeLower,
boolean includeUpper
) {
super(script, leafFactory, fieldName);
this.lowerValue = Objects.requireNonNull(lowerValue);
this.upperValue = Objects.requireNonNull(upperValue);
this.includeLower = includeLower;
this.includeUpper = includeUpper;
assert lowerValue.compareTo(upperValue) <= 0;
}
@Override
protected boolean matches(List<String> values) {
for (String value : values) {
int lct = lowerValue.compareTo(value);
boolean lowerOk = includeLower ? lct <= 0 : lct < 0;
if (lowerOk) {
int uct = upperValue.compareTo(value);
boolean upperOk = includeUpper ? uct >= 0 : uct > 0;
if (upperOk) {
return true;
}
}
}
return false;
}
@Override
public void visit(QueryVisitor visitor) {
if (visitor.acceptField(fieldName())) {
visitor.<API key>(
this,
fieldName(),
() -> new ByteRunAutomaton(
Automata.makeBinaryInterval(new BytesRef(lowerValue), includeLower, new BytesRef(upperValue), includeUpper)
)
);
}
}
@Override
public final String toString(String field) {
StringBuilder b = new StringBuilder();
if (false == fieldName().contentEquals(field)) {
b.append(fieldName()).append(':');
}
b.append(includeLower ? '[' : '{');
b.append(lowerValue).append(" TO ").append(upperValue);
b.append(includeUpper ? ']' : '}');
return b.toString();
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), lowerValue, upperValue, includeLower, includeUpper);
}
@Override
public boolean equals(Object obj) {
if (false == super.equals(obj)) {
return false;
}
<API key> other = (<API key>) obj;
return lowerValue.equals(other.lowerValue)
&& upperValue.equals(other.upperValue)
&& includeLower == other.includeLower
&& includeUpper == other.includeUpper;
}
String lowerValue() {
return lowerValue;
}
String upperValue() {
return upperValue;
}
boolean includeLower() {
return includeLower;
}
boolean includeUpper() {
return includeUpper;
}
}
|
package alien4cloud.tosca.parser.postprocess;
import static alien4cloud.utils.AlienUtils.safe;
import javax.annotation.Resource;
import org.alien4cloud.tosca.model.types.NodeType;
import org.springframework.stereotype.Component;
/**
* Post process a node type.
*/
@Component
public class <API key> implements IPostProcessor<NodeType> {
@Resource
private <API key> <API key>;
@Resource
private <API key> <API key>;
@Override
public void process(NodeType instance) {
safe(instance.getCapabilities()).forEach(<API key>);
safe(instance.getRequirements()).forEach(<API key>);
}
}
|
package protoutil
import (
"bytes"
"crypto/sha256"
"encoding/asn1"
"math/big"
"github.com/golang/protobuf/proto"
cb "github.com/hyperledger/fabric-protos-go/common"
"github.com/pkg/errors"
)
// NewBlock constructs a block with no data and no metadata.
func NewBlock(seqNum uint64, previousHash []byte) *cb.Block {
block := &cb.Block{}
block.Header = &cb.BlockHeader{}
block.Header.Number = seqNum
block.Header.PreviousHash = previousHash
block.Header.DataHash = []byte{}
block.Data = &cb.BlockData{}
var metadataContents [][]byte
for i := 0; i < len(cb.<API key>); i++ {
metadataContents = append(metadataContents, []byte{})
}
block.Metadata = &cb.BlockMetadata{Metadata: metadataContents}
return block
}
type asn1Header struct {
Number *big.Int
PreviousHash []byte
DataHash []byte
}
func BlockHeaderBytes(b *cb.BlockHeader) []byte {
asn1Header := asn1Header{
PreviousHash: b.PreviousHash,
DataHash: b.DataHash,
Number: new(big.Int).SetUint64(b.Number),
}
result, err := asn1.Marshal(asn1Header)
if err != nil {
// Errors should only arise for types which cannot be encoded, since the
// BlockHeader type is known a-priori to contain only encodable types, an
// error here is fatal and should not be propagated
panic(err)
}
return result
}
func BlockHeaderHash(b *cb.BlockHeader) []byte {
sum := sha256.Sum256(BlockHeaderBytes(b))
return sum[:]
}
func BlockDataHash(b *cb.BlockData) []byte {
sum := sha256.Sum256(bytes.Join(b.Data, nil))
return sum[:]
}
// <API key> returns channel ID given byte array which represents
// the block
func <API key>(bytes []byte) (string, error) {
block, err := UnmarshalBlock(bytes)
if err != nil {
return "", err
}
return <API key>(block)
}
// <API key> returns channel ID in the block
func <API key>(block *cb.Block) (string, error) {
if block == nil || block.Data == nil || block.Data.Data == nil || len(block.Data.Data) == 0 {
return "", errors.New("failed to retrieve channel id - block is empty")
}
var err error
envelope, err := <API key>(block.Data.Data[0])
if err != nil {
return "", err
}
payload, err := UnmarshalPayload(envelope.Payload)
if err != nil {
return "", err
}
if payload.Header == nil {
return "", errors.New("failed to retrieve channel id - payload header is empty")
}
chdr, err := <API key>(payload.Header.ChannelHeader)
if err != nil {
return "", err
}
return chdr.ChannelId, nil
}
// <API key> retrieves metadata at the specified index.
func <API key>(block *cb.Block, index cb.BlockMetadataIndex) (*cb.Metadata, error) {
if block.Metadata == nil {
return nil, errors.New("no metadata in block")
}
if len(block.Metadata.Metadata) <= int(index) {
return nil, errors.Errorf("no metadata at index [%s]", index)
}
md := &cb.Metadata{}
err := proto.Unmarshal(block.Metadata.Metadata[index], md)
if err != nil {
return nil, errors.Wrapf(err, "error unmarshalling metadata at index [%s]", index)
}
return md, nil
}
// <API key> retrieves metadata at the specified index, or
// panics on error
func <API key>(block *cb.Block, index cb.BlockMetadataIndex) *cb.Metadata {
md, err := <API key>(block, index)
if err != nil {
panic(err)
}
return md
}
// <API key> attempts to retrieve consenter metadata from the value
// stored in block metadata at index SIGNATURES (first field). If no consenter metadata
// is found there, it falls back to index ORDERER (third field).
func <API key>(block *cb.Block) (*cb.Metadata, error) {
m, err := <API key>(block, cb.<API key>)
if err != nil {
return nil, errors.WithMessage(err, "failed to retrieve metadata")
}
// TODO FAB-15864 Remove this fallback when we can stop supporting upgrade from pre-1.4.1 orderer
if len(m.Value) == 0 {
return <API key>(block, cb.<API key>)
}
obm := &cb.<API key>{}
err = proto.Unmarshal(m.Value, obm)
if err != nil {
return nil, errors.Wrap(err, "failed to unmarshal orderer block metadata")
}
res := &cb.Metadata{}
err = proto.Unmarshal(obm.ConsenterMetadata, res)
if err != nil {
return nil, errors.Wrap(err, "failed to unmarshal consenter metadata")
}
return res, nil
}
// <API key> retrieves the index of the last config block as
// encoded in the block metadata
func <API key>(block *cb.Block) (uint64, error) {
m, err := <API key>(block, cb.<API key>)
if err != nil {
return 0, errors.WithMessage(err, "failed to retrieve metadata")
}
// TODO FAB-15864 Remove this fallback when we can stop supporting upgrade from pre-1.4.1 orderer
if len(m.Value) == 0 {
m, err := <API key>(block, cb.<API key>)
if err != nil {
return 0, errors.WithMessage(err, "failed to retrieve metadata")
}
lc := &cb.LastConfig{}
err = proto.Unmarshal(m.Value, lc)
if err != nil {
return 0, errors.Wrap(err, "error unmarshalling LastConfig")
}
return lc.Index, nil
}
obm := &cb.<API key>{}
err = proto.Unmarshal(m.Value, obm)
if err != nil {
return 0, errors.Wrap(err, "failed to unmarshal orderer block metadata")
}
return obm.LastConfig.Index, nil
}
// <API key> retrieves the index of the last config
// block as encoded in the block metadata, or panics on error
func <API key>(block *cb.Block) uint64 {
index, err := <API key>(block)
if err != nil {
panic(err)
}
return index
}
// CopyBlockMetadata copies metadata from one block into another
func CopyBlockMetadata(src *cb.Block, dst *cb.Block) {
dst.Metadata = src.Metadata
// Once copied initialize with rest of the
// required metadata positions.
InitBlockMetadata(dst)
}
// InitBlockMetadata initializes metadata structure
func InitBlockMetadata(block *cb.Block) {
if block.Metadata == nil {
block.Metadata = &cb.BlockMetadata{Metadata: [][]byte{{}, {}, {}, {}, {}}}
} else if len(block.Metadata.Metadata) < int(cb.<API key>+1) {
for i := int(len(block.Metadata.Metadata)); i <= int(cb.<API key>); i++ {
block.Metadata.Metadata = append(block.Metadata.Metadata, []byte{})
}
}
}
|
package org.jaudiotagger.audio.mp4;
import org.jaudiotagger.audio.generic.GenericAudioHeader;
import org.jaudiotagger.audio.mp4.atom.Mp4EsdsBox;
/**
* Store some additional attributes not available for all audio types
*/
public class Mp4AudioHeader extends GenericAudioHeader {
/**
* The key for the kind field<br>
*
* @see #content
*/
public final static String FIELD_KIND = "KIND";
/**
* The key for the profile<br>
*
* @see #content
*/
public final static String FIELD_PROFILE = "PROFILE";
/**
* The key for the ftyp brand<br>
*
* @see #content
*/
public final static String FIELD_BRAND = "BRAND";
public void setKind(Mp4EsdsBox.Kind kind) {
content.put(FIELD_KIND, kind);
}
/**
* @return kind
*/
public Mp4EsdsBox.Kind getKind() {
return (Mp4EsdsBox.Kind) content.get(FIELD_KIND);
}
/**
* The key for the profile
*
* @param profile
*/
public void setProfile(Mp4EsdsBox.AudioProfile profile) {
content.put(FIELD_PROFILE, profile);
}
/**
* @return audio profile
*/
public Mp4EsdsBox.AudioProfile getProfile() {
return (Mp4EsdsBox.AudioProfile) content.get(FIELD_PROFILE);
}
/**
* @param brand
*/
public void setBrand(String brand) {
content.put(FIELD_BRAND, brand);
}
/**
* @return brand
*/
public String getBrand() {
return (String) content.get(FIELD_BRAND);
}
}
|
# Linux on Hyper-V and Azure Test Code, ver. 1.0.0
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
# ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR
# PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
<
.Synopsis
Run continous Ping while disabling and enabling the SR-IOV feature
.Description
Continuously ping a server, from a Linux client, over a SR-IOV connection.
Disable SR-IOV on the Linux client and observe RTT increase.
Re-enable SR-IOV and observe that RTT lowers.
.Parameter vmName
Name of the test VM.
.Parameter hvServer
Name of the Hyper-V server hosting the VM.
.Parameter testParams
Semicolon separated list of test parameters.
This setup script does not use any setup scripts.
.Example
<test>
<testName>Ping_DisableVF</testName>
<testScript>setupscripts\<API key>.ps1</testScript>
<files>remote-scripts/ica/utils.sh,remote-scripts/ica/SR-IOV_Utils.sh</files>
<setupScript>
<file>setupscripts\RevertSnapshot.ps1</file>
<file>setupscripts\SR-IOV_enable.ps1</file>
</setupScript>
<noReboot>False</noReboot>
<testParams>
<param>NIC=NetworkAdapter,External,SRIOV,001600112200</param>
<param>TC_COVERED=SRIOV-5A</param>
<param>VF_IP1=10.11.12.31</param>
<param>VF_IP2=10.11.12.32</param>
<param>NETMASK=255.255.255.0</param>
<param>REMOTE_SERVER=remoteHostname</param>
</testParams>
<timeout>1800</timeout>
</test>
param ([String] $vmName, [String] $hvServer, [string] $testParams)
# Main script body
$retVal = $False
$leaveTrail = "no"
# Check the required input args are present
# Write out test Params
$testParams
if ($hvServer -eq $null)
{
"ERROR: hvServer is null"
return $False
}
if ($testParams -eq $null)
{
"ERROR: testParams is null"
return $False
}
#change working directory to root dir
$testParams -match "RootDir=([^;]+)"
if (-not $?)
{
"Mandatory param RootDir=Path; not found!"
return $false
}
$rootDir = $Matches[1]
if (Test-Path $rootDir)
{
Set-Location -Path $rootDir
if (-not $?)
{
"ERROR: Could not change directory to $rootDir !"
return $false
}
"Changed working directory to $rootDir"
}
else
{
"ERROR: RootDir = $rootDir is not a valid path"
return $false
}
# Source TCUitls.ps1 for getipv4 and other functions
if (Test-Path ".\setupScripts\TCUtils.ps1")
{
. .\setupScripts\TCUtils.ps1
}
else
{
"ERROR: Could not find setupScripts\TCUtils.ps1"
return $false
}
# Source NET_UTILS.ps1 for network functions
if (Test-Path ".\setupScripts\NET_UTILS.ps1")
{
. .\setupScripts\NET_UTILS.ps1
}
else
{
"ERROR: Could not find setupScripts\NET_Utils.ps1"
return $false
}
# Process the test params
$params = $testParams.Split(';')
foreach ($p in $params)
{
$fields = $p.Split("=")
switch ($fields[0].Trim())
{
"SshKey" { $sshKey = $fields[1].Trim() }
"ipv4" { $ipv4 = $fields[1].Trim() }
"VF_IP1" { $vmVF_IP1 = $fields[1].Trim() }
"VF_IP2" { $vmVF_IP2 = $fields[1].Trim() }
"NETMASK" { $netmask = $fields[1].Trim() }
"VM2NAME" { $vm2Name = $fields[1].Trim() }
"REMOTE_SERVER" { $remoteServer = $fields[1].Trim()}
"TC_COVERED" { $TC_COVERED = $fields[1].Trim() }
}
}
$summaryLog = "${vmName}_summary.log"
del $summaryLog -ErrorAction SilentlyContinue
Write-Output "This script covers test case: ${TC_COVERED}" | Tee-Object -Append -file $summaryLog
# Get IPs
$ipv4 = GetIPv4 $vmName $hvServer
"${vmName} IPADDRESS: ${ipv4}"
# Configure VF on test VM
Start-Sleep -s 5
$retVal = ConfigureVF $ipv4 $sshKey $netmask
if (-not $retVal)
{
"ERROR: Failed to configure eth1 on vm $vmName (IP: ${ipv4}), by setting a static IP of $vmVF_IP1 , netmask $netmask"
return $false
}
Start-Sleep -s 10
# Run Ping with SR-IOV enabled
.\bin\plink.exe -i ssh\$sshKey root@${ipv4} "echo 'source constants.sh && ping -c 600 -I eth1 `$VF_IP2 > PingResults.log &' > runPing.sh"
Start-Sleep -s 5
.\bin\plink.exe -i ssh\$sshKey root@${ipv4} "bash ~/runPing.sh > ~/Ping.log 2>&1"
# Wait 60 seconds and read the RTT
"Get Logs"
Start-Sleep -s 30
[decimal]$vfEnabledRTT = .\bin\plink.exe -i ssh\$sshKey root@${ipv4} "tail -2 PingResults.log | head -1 | awk '{print `$7}' | sed 's/=/ /' | awk '{print `$2}'"
if (-not $vfEnabledRTT){
"ERROR: No result was logged! Check if Ping was executed!" | Tee-Object -Append -file $summaryLog
return $false
}
"The RTT before disabling SR-IOV is $vfEnabledRTT ms" | Tee-Object -Append -file $summaryLog
# Disable SR-IOV on test VM
Start-Sleep -s 5
"Disabling VF on vm1"
<API key> -VMName $vmName -ComputerName $hvServer -IovWeight 0
if (-not $?) {
"ERROR: Failed to disable SR-IOV on $vmName!" | Tee-Object -Append -file $summaryLog
return $false
}
# Read the RTT with SR-IOV disabled; it should be higher
Start-Sleep -s 30
[decimal]$vfDisabledRTT = .\bin\plink.exe -i ssh\$sshKey root@${ipv4} "tail -2 PingResults.log | head -1 | awk '{print `$7}' | sed 's/=/ /' | awk '{print `$2}'"
if (-not $vfDisabledRTT){
"ERROR: No result was logged after SR-IOV was disabled!" | Tee-Object -Append -file $summaryLog
return $false
}
"The RTT with SR-IOV disabled is $vfDisabledRTT ms" | Tee-Object -Append -file $summaryLog
if ($vfDisabledRTT -le $vfEnabledRTT) {
"ERROR: The RTT was lower with SR-IOV disabled, it should be higher" | Tee-Object -Append -file $summaryLog
return $false
}
# Enable SR-IOV on test VM
"Enable VF on vm1"
<API key> -VMName $vmName -ComputerName $hvServer -IovWeight 1
if (-not $?) {
"ERROR: Failed to enable SR-IOV on $vmName!" | Tee-Object -Append -file $summaryLog
return $false
}
Start-Sleep -s 30
# Read the RTT again, it should be lower than before
# We should see values to close to the initial RTT measured
[decimal]$vfEnabledRTT = $vfEnabledRTT * 1.3
[decimal]$vfFinalRTT = .\bin\plink.exe -i ssh\$sshKey root@${ipv4} "tail -2 PingResults.log | head -1 | awk '{print `$7}' | sed 's/=/ /' | awk '{print `$2}'"
"The RTT after re-enabling SR-IOV is $vfFinalRTT ms" | Tee-Object -Append -file $summaryLog
if ($vfFinalRTT -gt $vfEnabledRTT) {
"ERROR: After re-enabling SR-IOV, the RTT value has not lowered enough
Please check if the VF was successfully restarted" | Tee-Object -Append -file $summaryLog
return $false
}
return $true
|
foam.CLASS({
package: 'foam.nanos.crunch.lite',
name: '<API key>',
refines: 'foam.nanos.crunch.MinMaxCapability',
implements: [
'foam.nanos.crunch.lite.<API key>'
],
javaImports: [
'foam.nanos.crunch.<API key>',
'foam.nanos.crunch.CrunchService',
'static foam.nanos.crunch.<API key>.*'
],
methods: [
{
name: '<API key>',
documentation: `
<API key> are the available CapablePayloads which are GRANTED or can eventually be turned into
GRANTED from PENDING state. If MinMaxCapability.min is greater than the number of available payloads which are GRANTED or
can eventually be turned into GRANTED, then it is impossible for the total amount of GRANTED payloads to be greater than the MIN,
thereby fulfilling the minimum requirement.
For example, let there be a min max capablity which has 10 prerequisites and a min of 2.
If the user selected only 3 of those prereqs in the wizard, then the CapablePayload.status for those 3 will each be in PENDING
state with approvals generated for each one. Note, there will only be these 3 CapablePayloads out of the 10 Prereqs avaliable on the
Capable object since the user only selected 3.
If 1 of those 3 CapablePayloads get rejected. Then there will be 2 <API key> which could still potentially satisfy
the min requirement of 2 if those 2 CapablePayloads get set to GRANTED.
If 2 of those 3 CapablePayloads get rejected. Then there will be 1 <API key> which would be impossible to satisfy the
MinMaxCapability.min requirement of 2 even if that 1 CapablePayload is GRANTED.
`,
javaCode: `
CrunchService crunchService = (CrunchService) x.get("crunchService");
List<String> prereqCapIds = crunchService.getPrereqs(getId());
int numberGranted = 0;
int numberPending = 0;
int numberRejected = 0;
for ( String capId : prereqCapIds ) {
<API key> prereqPayload = (<API key>)
capablePayloadDAO.find(capId);
if ( prereqPayload == null ) {
continue;
}
switch ( prereqPayload.getStatus() ) {
case GRANTED:
numberGranted++;
continue;
case PENDING:
case APPROVED:
numberPending++;
continue;
case REJECTED:
numberRejected++;
continue;
}
}
int numberTotal = numberGranted + numberPending + numberRejected;
int <API key> = numberGranted + numberPending;
if ( numberTotal == 0 ){
return <API key>.ACTION_REQUIRED;
}
if ( getMin() > <API key> ){
return <API key>.REJECTED;
}
if ( numberGranted >= getMin() ) {
return <API key>.GRANTED;
}
if ( numberTotal >= getMin() ) {
return <API key>.PENDING;
}
return <API key>.ACTION_REQUIRED;
`
}
]
});
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<title>Uses of Class org.deidentifier.arx.gui.view.impl.define.<API key> (ARX GUI Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.deidentifier.arx.gui.view.impl.define.<API key> (ARX GUI Documentation)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/deidentifier/arx/gui/view/impl/define/<API key>.html" title="class in org.deidentifier.arx.gui.view.impl.define">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/deidentifier/arx/gui/view/impl/define/class-use/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.deidentifier.arx.gui.view.impl.define.<API key>" class="title">Uses of Class<br>org.deidentifier.arx.gui.view.impl.define.<API key></h2>
</div>
<div class="classUseContainer">No usage of org.deidentifier.arx.gui.view.impl.define.<API key></div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/deidentifier/arx/gui/view/impl/define/<API key>.html" title="class in org.deidentifier.arx.gui.view.impl.define">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/deidentifier/arx/gui/view/impl/define/class-use/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_bottom">
</a></div>
</body>
</html>
|
<?php
final class <API key> extends <API key> {
protected function executeChecks() {
$repo_path = PhabricatorEnv::getEnvConfig('repository.default-local-path');
if (!$repo_path) {
$summary = pht(
"The configuration option '%s' is not set.",
'repository.default-local-path');
$this->newIssue('repository.default-local-path.empty')
->setName(pht('Missing Repository Local Path'))
->setSummary($summary)
-><API key>('repository.default-local-path');
return;
}
if (!Filesystem::pathExists($repo_path)) {
$summary = pht(
'The path for local repositories does not exist, or is not '.
'readable by the webserver.');
$message = pht(
"The directory for local repositories (%s) does not exist, or is not ".
"readable by the webserver. Phabricator uses this directory to store ".
"information about repositories. If this directory does not exist, ".
"create it:\n\n".
"%s\n".
"If this directory exists, make it readable to the webserver. You ".
"can also edit the configuration below to use some other directory.",
phutil_tag('tt', array(), $repo_path),
phutil_tag('pre', array(), csprintf('$ mkdir -p %s', $repo_path)));
$this->newIssue('repository.default-local-path.empty')
->setName(pht('Missing Repository Local Path'))
->setSummary($summary)
->setMessage($message)
-><API key>('repository.default-local-path');
}
}
}
|
<?php
App::uses('AppModel', 'Model');
App::uses('<API key>', 'Controller/Component/Auth');
class Product extends AppModel {
}
|
class UsersController < <API key>
include BatchProcessable
# special find method before load_resource
before_filter :<API key>, :only => [:new, :create]
# authorization via CanCan
<API key>
def index
# sort and eager load
@users = @users.by_name
# if there is a search with the '.' character in it, we can't eager load due to a bug in Rails
# this should be fixed in Rails 4
unless params[:search].present? && params[:search].match(/\./)
@users = @users.with_assoc
end
# do search if applicable
if params[:search].present?
begin
@users = User.do_search(@users, params[:search])
rescue Search::ParseError
flash.now[:error] = $!.to_s
@search_error = true
end
end
end
def new
# set the default pref_lang based on the mission settings
<API key>
end
def show
<API key>
end
def edit
<API key>
end
def create
if @user.save
@user.<API key>
set_success(@user)
# render printable instructions if requested
<API key>
# if create failed, render the form again
else
flash.now[:error] = I18n.t('activerecord.errors.models.user.general')
<API key>
end
end
def update
# make sure changing assignment role is permitted if attempting
authorize!(:change_assignments, @user) if params[:user]['<API key>']
@user.assign_attributes(params[:user])
pref_lang_changed = @user.pref_lang_changed?
if @user.save
if @user == current_user
I18n.locale = @user.pref_lang.to_sym if pref_lang_changed
flash[:success] = t("user.profile_updated")
redirect_to(:action => :edit)
else
set_success(@user)
# if the user's password was reset, do it, and show instructions if requested
@user.<API key>
<API key>
end
# if save failed, render the form again
else
flash.now[:error] = I18n.t('activerecord.errors.models.user.general')
<API key>
end
end
def destroy
<API key>(@user)
redirect_to(<API key>)
end
# shows printable login instructions for the user
def login_instructions
end
# exports the selected users to VCF format
def export
respond_to do |format|
format.vcf do
@users = params[:selected] ? <API key>(User) : []
render(:text => @users.collect{|u| u.to_vcf}.join("\n"))
end
end
end
def regenerate_key
@user = User.find(params[:id])
@user.regenerate_<TwitterConsumerkey>(:action => :edit)
end
private
# if we need to print instructions, redirects to the instructions action. otherwise redirects to index.
def <API key>
if @user.<API key> == "print"
# save the password in the flash since we won't be able to get it once it's crypted
flash[:password] = @user.password
redirect_to(:action => :login_instructions, :id => @user.id)
else
redirect_to(<API key>)
end
end
# prepares objects and renders the form template
def <API key>
if admin_mode?
# get assignable missons and roles for this user
@assignments = @user.assignments.as_json(:include => :mission, :methods => :new_record?)
@<API key> = @user.assignments.map{|a| can?(:update, a)}
@assignable_missions = Mission.accessible_by(current_ability, :assign_to).sorted_by_name.as_json(:only => [:id, :name])
@assignable_roles = Ability.assignable_roles(current_user)
else
@current_assignment = @user.<API key>[current_mission] || @user.assignments.build(:mission => current_mission)
end
render(:form)
end
def <API key>
@user = User.new(params[:user])
if cannot?(:create, @user) && @user.assignments.empty?
@user.assignments.build(:mission => current_mission)
end
end
end
|
<?php
final class <API key> extends Phobject {
public static function getIconMap() {
return
array(
'fa-briefcase' => pht('Briefcase'),
'fa-tags' => pht('Tag'),
'fa-folder' => pht('Folder'),
'fa-users' => pht('Team'),
'fa-bug' => pht('Bug'),
'fa-trash-o' => pht('Garbage'),
'fa-calendar' => pht('Deadline'),
'fa-flag-checkered' => pht('Goal'),
'fa-envelope' => pht('Communication'),
'fa-truck' => pht('Release'),
'fa-lock' => pht('Policy'),
'fa-umbrella' => pht('An Umbrella'),
'fa-cloud' => pht('The Cloud'),
'fa-building' => pht('Company'),
'fa-credit-card' => pht('Accounting'),
'fa-flask' => pht('Experimental'),
);
}
public static function getColorMap() {
$shades = PHUITagView::getShadeMap();
$shades = array_select_keys(
$shades,
array(PhabricatorProject::DEFAULT_COLOR)) + $shades;
unset($shades[PHUITagView::COLOR_DISABLED]);
return $shades;
}
public static function getLabel($key) {
$map = self::getIconMap();
return $map[$key];
}
public static function getAPIName($key) {
return substr($key, 3);
}
public static function <API key>($icon) {
$project_icons = <API key>::getIconMap();
return phutil_tag(
'span',
array(),
array(
id(new PHUIIconView())->setIconFont($icon),
' ',
idx($project_icons, $icon, pht('Unknown Icon')),
));
}
}
|
package set
import (
"encoding/json"
"errors"
"fmt"
"io"
"os"
"path"
"strings"
"github.com/golang/glog"
"github.com/spf13/cobra"
kapi "k8s.io/kubernetes/pkg/api"
apierrs "k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
kresource "k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned"
kclient "k8s.io/kubernetes/pkg/client/unversioned"
kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/runtime"
"github.com/openshift/origin/pkg/cmd/templates"
cmdutil "github.com/openshift/origin/pkg/cmd/util"
"github.com/openshift/origin/pkg/cmd/util/clientcmd"
)
const (
volumePrefix = "volume-"
storageAnnClass = "volume.beta.kubernetes.io/storage-class"
)
var (
volumeLong = templates.LongDesc(`
Update volumes on a pod template
This command can add, update or remove volumes from containers for any object
that has a pod template (deployment configs, replication controllers, or pods).
You can list volumes in pod or any object that has a pod template. You can
specify a single object or multiple, and alter volumes on all containers or
just those that match a given name.
If you alter a volume setting on a deployment config, a deployment will be
triggered. Changing a replication controller will not affect running pods, and
you cannot change a pod's volumes once it has been created.
Volume types include:
* emptydir (empty directory) *default*: A directory allocated when the pod is
created on a local host, is removed when the pod is deleted and is not copied
across servers
* hostdir (host directory): A directory with specific path on any host
(requires elevated privileges)
* <API key> or pvc (persistent volume claim): Link the volume
directory in the container to a persistent volume claim you have allocated by
name - a persistent volume claim is a request to allocate storage. Note that
if your claim hasn't been bound, your pods will not start.
* secret (mounted secret): Secret volumes mount a named secret to the provided
directory.
For descriptions on other volume types, see https://docs.openshift.com`)
volumeExample = templates.Examples(`
# List volumes defined on all deployment configs in the current project
%[1]s volume dc --all
# Add a new empty dir volume to deployment config (dc) 'registry' mounted under
# /var/lib/registry
%[1]s volume dc/registry --add --mount-path=/var/lib/registry
# Use an existing persistent volume claim (pvc) to overwrite an existing volume 'v1'
%[1]s volume dc/registry --add --name=v1 -t pvc --claim-name=pvc1 --overwrite
# Remove volume 'v1' from deployment config 'registry'
%[1]s volume dc/registry --remove --name=v1
# Create a new persistent volume claim that overwrites an existing volume 'v1'
%[1]s volume dc/registry --add --name=v1 -t pvc --claim-size=1G --overwrite
# Change the mount point for volume 'v1' to /data
%[1]s volume dc/registry --add --name=v1 -m /data --overwrite
# Modify the deployment config by removing volume mount "v1" from container "c1"
# (and by removing the volume "v1" if no other containers have volume mounts that reference it)
%[1]s volume dc/registry --remove --name=v1 --containers=c1
# Add new volume based on a more complex volume source (Git repo, AWS EBS, GCE PD,
# Ceph, Gluster, NFS, ISCSI, ...)
%[1]s volume dc/registry --add -m /repo --source=<json-string>`)
)
type VolumeOptions struct {
DefaultNamespace string
ExplicitNamespace bool
Out io.Writer
Err io.Writer
Mapper meta.RESTMapper
Typer runtime.ObjectTyper
RESTClientFactory func(mapping *meta.RESTMapping) (resource.RESTClient, error)
<API key> func(obj runtime.Object, fn func(*kapi.PodSpec) error) (bool, error)
Client kclient.<API key>
Encoder runtime.Encoder
// Resource selection
Selector string
All bool
Filenames []string
// Operations
Add bool
Remove bool
List bool
// Common optional params
Name string
Containers string
Confirm bool
Output string
PrintObject func([]*resource.Info) error
OutputVersion unversioned.GroupVersion
// Add op params
AddOpts *AddVolumeOptions
}
type AddVolumeOptions struct {
Type string
MountPath string
Overwrite bool
Path string
ConfigMapName string
SecretName string
Source string
CreateClaim bool
ClaimName string
ClaimSize string
ClaimMode string
ClaimClass string
TypeChanged bool
}
func NewCmdVolume(fullName string, f *clientcmd.Factory, out, errOut io.Writer) *cobra.Command {
addOpts := &AddVolumeOptions{}
opts := &VolumeOptions{AddOpts: addOpts}
cmd := &cobra.Command{
Use: "volumes RESOURCE/NAME --add|--remove|--list",
Short: "Update volumes on a pod template",
Long: volumeLong,
Example: fmt.Sprintf(volumeExample, fullName),
Aliases: []string{"volume"},
Run: func(cmd *cobra.Command, args []string) {
addOpts.TypeChanged = cmd.Flag("type").Changed
err := opts.Validate(cmd, args)
if err != nil {
kcmdutil.CheckErr(kcmdutil.UsageError(cmd, err.Error()))
}
err = opts.Complete(f, cmd, out, errOut)
kcmdutil.CheckErr(err)
err = opts.RunVolume(args)
if err == cmdutil.ErrExit {
os.Exit(1)
}
kcmdutil.CheckErr(err)
},
}
cmd.Flags().StringVarP(&opts.Selector, "selector", "l", "", "Selector (label query) to filter on")
cmd.Flags().BoolVar(&opts.All, "all", false, "select all resources in the namespace of the specified resource types")
cmd.Flags().StringSliceVarP(&opts.Filenames, "filename", "f", opts.Filenames, "Filename, directory, or URL to file to use to edit the resource.")
cmd.Flags().BoolVar(&opts.Add, "add", false, "Add volume and/or volume mounts for containers")
cmd.Flags().BoolVar(&opts.Remove, "remove", false, "Remove volume and/or volume mounts for containers")
cmd.Flags().BoolVar(&opts.List, "list", false, "List volumes and volume mounts for containers")
cmd.Flags().StringVar(&opts.Name, "name", "", "Name of the volume. If empty, auto generated for add operation")
cmd.Flags().StringVarP(&opts.Containers, "containers", "c", "*", "The names of containers in the selected pod templates to change - may use wildcards")
cmd.Flags().BoolVar(&opts.Confirm, "confirm", false, "Confirm that you really want to remove multiple volumes")
cmd.Flags().StringVarP(&addOpts.Type, "type", "t", "", "Type of the volume source for add operation. Supported options: emptyDir, hostPath, secret, configmap, <API key>")
cmd.Flags().StringVarP(&addOpts.MountPath, "mount-path", "m", "", "Mount path inside the container. Optional param for --add or --remove")
cmd.Flags().BoolVar(&addOpts.Overwrite, "overwrite", false, "If true, replace existing volume source and/or volume mount for the given resource")
cmd.Flags().StringVar(&addOpts.Path, "path", "", "Host path. Must be provided for hostPath volume type")
cmd.Flags().StringVar(&addOpts.ConfigMapName, "configmap-name", "", "Name of the persisted config map. Must be provided for configmap volume type")
cmd.Flags().StringVar(&addOpts.SecretName, "secret-name", "", "Name of the persisted secret. Must be provided for secret volume type")
cmd.Flags().StringVar(&addOpts.ClaimName, "claim-name", "", "Persistent volume claim name. Must be provided for <API key> volume type")
cmd.Flags().StringVar(&addOpts.ClaimClass, "claim-class", "", "StorageClass to use for the persistent volume claim")
cmd.Flags().StringVar(&addOpts.ClaimSize, "claim-size", "", "If specified along with a persistent volume type, create a new claim with the given size in bytes. Accepts SI notation: 10, 10G, 10Gi")
cmd.Flags().StringVar(&addOpts.ClaimMode, "claim-mode", "ReadWriteOnce", "Set the access mode of the claim to be created. Valid values are ReadWriteOnce (rwo), ReadWriteMany (rwm), or ReadOnlyMany (rom)")
cmd.Flags().StringVar(&addOpts.Source, "source", "", "Details of volume source as json string. This can be used if the required volume type is not supported by --type option. (e.g.: '{\"gitRepo\": {\"repository\": <git-url>, \"revision\": <commit-hash>}}')")
kcmdutil.AddPrinterFlags(cmd)
cmd.MarkFlagFilename("filename", "yaml", "yml", "json")
// deprecate --list option
cmd.Flags().MarkDeprecated("list", "Volumes and volume mounts can be listed by providing a resource with no additional options.")
return cmd
}
func (v *VolumeOptions) Validate(cmd *cobra.Command, args []string) error {
if len(v.Selector) > 0 {
if _, err := labels.Parse(v.Selector); err != nil {
return errors.New("--selector=<selector> must be a valid label selector")
}
if v.All {
return errors.New("you may specify either --selector or --all but not both")
}
}
if len(v.Filenames) == 0 && len(args) < 1 {
return errors.New("provide one or more resources to add, list, or delete volumes on as TYPE/NAME")
}
numOps := 0
if v.Add {
numOps++
}
if v.Remove {
numOps++
}
if v.List {
numOps++
}
switch {
case numOps == 0:
v.List = true
case numOps > 1:
return errors.New("you may only specify one operation at a time")
}
output := kcmdutil.GetFlagString(cmd, "output")
if v.List && len(output) > 0 {
return errors.New("--list and --output may not be specified together")
}
err := v.AddOpts.Validate(v.Add)
if err != nil {
return err
}
// Removing all volumes for the resource type needs confirmation
if v.Remove && len(v.Name) == 0 && !v.Confirm {
return errors.New("must provide --confirm for removing more than one volume")
}
return nil
}
func (a *AddVolumeOptions) Validate(isAddOp bool) error {
if isAddOp {
if len(a.Type) == 0 && (len(a.ClaimName) > 0 || len(a.ClaimSize) > 0) {
a.Type = "<API key>"
a.TypeChanged = true
}
if len(a.Type) == 0 && (len(a.SecretName) > 0) {
a.Type = "secret"
a.TypeChanged = true
}
if len(a.Type) == 0 && (len(a.ConfigMapName) > 0) {
a.Type = "configmap"
a.TypeChanged = true
}
if len(a.Type) == 0 && (len(a.Path) > 0) {
a.Type = "hostpath"
a.TypeChanged = true
}
if len(a.Type) == 0 {
a.Type = "emptydir"
}
if len(a.Type) == 0 && len(a.Source) == 0 {
return errors.New("must provide --type or --source for --add operation")
} else if a.TypeChanged && len(a.Source) > 0 {
return errors.New("either specify --type or --source but not both for --add operation")
}
if len(a.Type) > 0 {
switch strings.ToLower(a.Type) {
case "emptydir":
case "hostpath":
if len(a.Path) == 0 {
return errors.New("must provide --path for --type=hostPath")
}
case "secret":
if len(a.SecretName) == 0 {
return errors.New("must provide --secret-name for --type=secret")
}
case "configmap":
if len(a.ConfigMapName) == 0 {
return errors.New("must provide --configmap-name for --type=configmap")
}
case "<API key>", "pvc":
if len(a.ClaimName) == 0 && len(a.ClaimSize) == 0 {
return errors.New("must provide --claim-name or --claim-size (to create a new claim) for --type=pvc")
}
default:
return errors.New("invalid volume type. Supported types: emptyDir, hostPath, secret, <API key>")
}
} else if len(a.Path) > 0 || len(a.SecretName) > 0 || len(a.ClaimName) > 0 {
return errors.New("--path|--secret-name|--claim-name are only valid for --type option")
}
if len(a.Source) > 0 {
var source map[string]interface{}
err := json.Unmarshal([]byte(a.Source), &source)
if err != nil {
return err
}
if len(source) > 1 {
return errors.New("must provide only one volume for --source")
}
var vs kapi.VolumeSource
err = json.Unmarshal([]byte(a.Source), &vs)
if err != nil {
return err
}
}
if len(a.ClaimClass) > 0 {
selectedLowerType := strings.ToLower(a.Type)
if selectedLowerType != "<API key>" && selectedLowerType != "pvc" {
return errors.New("must provide --type as <API key>")
}
if len(a.ClaimSize) == 0 {
return errors.New("must provide --claim-size to create new pvc with claim-class")
}
}
} else if len(a.Source) > 0 || len(a.Path) > 0 || len(a.SecretName) > 0 || len(a.ConfigMapName) > 0 || len(a.ClaimName) > 0 || a.Overwrite {
return errors.New("--type|--path|--configmap-name|--secret-name|--claim-name|--source|--overwrite are only valid for --add operation")
}
return nil
}
func (v *VolumeOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, out, errOut io.Writer) error {
clientConfig, err := f.ClientConfig()
if err != nil {
return err
}
v.OutputVersion, err = kcmdutil.OutputVersion(cmd, clientConfig.GroupVersion)
if err != nil {
return err
}
_, kc, err := f.Clients()
if err != nil {
return err
}
v.Client = kc
cmdNamespace, explicit, err := f.DefaultNamespace()
if err != nil {
return err
}
mapper, typer := f.Object(false)
v.Output = kcmdutil.GetFlagString(cmd, "output")
if len(v.Output) > 0 {
v.PrintObject = func(infos []*resource.Info) error {
return f.PrintResourceInfos(cmd, infos, v.Out)
}
}
v.DefaultNamespace = cmdNamespace
v.ExplicitNamespace = explicit
v.Out = out
v.Err = errOut
v.Mapper = mapper
v.Typer = typer
v.RESTClientFactory = f.Factory.ClientForMapping
v.<API key> = f.<API key>
v.Encoder = f.JSONEncoder()
// In case of volume source ignore the default volume type
if len(v.AddOpts.Source) > 0 {
v.AddOpts.Type = ""
}
if len(v.AddOpts.ClaimSize) > 0 {
v.AddOpts.CreateClaim = true
if len(v.AddOpts.ClaimName) == 0 {
v.AddOpts.ClaimName = kapi.SimpleNameGenerator.GenerateName("pvc-")
}
q, err := kresource.ParseQuantity(v.AddOpts.ClaimSize)
if err != nil {
return fmt.Errorf("--claim-size is not valid: %v", err)
}
v.AddOpts.ClaimSize = q.String()
}
switch strings.ToLower(v.AddOpts.ClaimMode) {
case strings.ToLower(string(kapi.ReadOnlyMany)), "rom":
v.AddOpts.ClaimMode = string(kapi.ReadOnlyMany)
case strings.ToLower(string(kapi.ReadWriteOnce)), "rwo":
v.AddOpts.ClaimMode = string(kapi.ReadWriteOnce)
case strings.ToLower(string(kapi.ReadWriteMany)), "rwm":
v.AddOpts.ClaimMode = string(kapi.ReadWriteMany)
case "":
default:
return errors.New("--claim-mode must be one of ReadWriteOnce (rwo), ReadWriteMany (rwm), or ReadOnlyMany (rom)")
}
return nil
}
func (v *VolumeOptions) RunVolume(args []string) error {
mapper := resource.ClientMapperFunc(v.RESTClientFactory)
b := resource.NewBuilder(v.Mapper, v.Typer, mapper, kapi.Codecs.UniversalDecoder()).
ContinueOnError().
NamespaceParam(v.DefaultNamespace).DefaultNamespace().
FilenameParam(v.ExplicitNamespace, false, v.Filenames...).
SelectorParam(v.Selector).
<API key>(v.All, args...).
Flatten()
singular := false
infos, err := b.Do().IntoSingular(&singular).Infos()
if err != nil {
return err
}
if v.List {
listingErrors := v.printVolumes(infos)
if len(listingErrors) > 0 {
return cmdutil.ErrExit
}
return nil
}
updateInfos := []*resource.Info{}
// if a claim should be created, generate the info we'll add to the flow
if v.Add && v.AddOpts.CreateClaim {
claim := v.AddOpts.createClaim()
m, err := v.Mapper.RESTMapping(kapi.Kind("<API key>"))
if err != nil {
return err
}
client, err := mapper.ClientForMapping(m)
if err != nil {
return err
}
info := &resource.Info{
Mapping: m,
Client: client,
Namespace: v.DefaultNamespace,
Object: claim,
}
infos = append(infos, info)
updateInfos = append(updateInfos, info)
}
patches, patchError := v.<API key>(infos, singular)
if patchError != nil {
return patchError
}
if v.PrintObject != nil {
return v.PrintObject(infos)
}
failed := false
for _, info := range updateInfos {
var obj runtime.Object
if len(info.ResourceVersion) == 0 {
obj, err = resource.NewHelper(info.Client, info.Mapping).Create(info.Namespace, false, info.Object)
} else {
obj, err = resource.NewHelper(info.Client, info.Mapping).Replace(info.Namespace, info.Name, true, info.Object)
}
if err != nil {
<API key>(v.Err, err, "volume")
failed = true
continue
}
info.Refresh(obj, true)
fmt.Fprintf(v.Out, "%s/%s\n", info.Mapping.Resource, info.Name)
}
for _, patch := range patches {
info := patch.Info
if patch.Err != nil {
failed = true
fmt.Fprintf(v.Err, "error: %s/%s %v\n", info.Mapping.Resource, info.Name, patch.Err)
continue
}
if string(patch.Patch) == "{}" || len(patch.Patch) == 0 {
fmt.Fprintf(v.Err, "info: %s %q was not changed\n", info.Mapping.Resource, info.Name)
continue
}
glog.V(4).Infof("Calculated patch %s", patch.Patch)
obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, kapi.<API key>, patch.Patch)
if err != nil {
<API key>(v.Err, err, "volume")
failed = true
continue
}
info.Refresh(obj, true)
kcmdutil.PrintSuccess(v.Mapper, false, v.Out, info.Mapping.Resource, info.Name, false, "updated")
}
if failed {
return cmdutil.ErrExit
}
return nil
}
func (v *VolumeOptions) <API key>(infos []*resource.Info, singular bool) ([]*Patch, error) {
skipped := 0
patches := CalculatePatches(infos, v.Encoder, func(info *resource.Info) (bool, error) {
transformed := false
ok, err := v.<API key>(info.Object, func(spec *kapi.PodSpec) error {
var e error
switch {
case v.Add:
e = v.addVolumeToSpec(spec, info, singular)
transformed = true
case v.Remove:
e = v.<API key>(spec, info)
transformed = true
}
return e
})
if !ok {
skipped++
}
return transformed, err
})
if singular && skipped == len(infos) {
patchError := fmt.Errorf("the %s %s is not a pod or does not have a pod template", infos[0].Mapping.Resource, infos[0].Name)
return patches, patchError
}
return patches, nil
}
func <API key>(kv *kapi.Volume, opts *AddVolumeOptions) error {
switch strings.ToLower(opts.Type) {
case "emptydir":
kv.EmptyDir = &kapi.<API key>{}
case "hostpath":
kv.HostPath = &kapi.<API key>{
Path: opts.Path,
}
case "secret":
kv.Secret = &kapi.SecretVolumeSource{
SecretName: opts.SecretName,
}
case "configmap":
kv.ConfigMap = &kapi.<API key>{
<API key>: kapi.<API key>{
Name: opts.ConfigMapName,
},
}
case "<API key>", "pvc":
kv.<API key> = &kapi.<API key>{
ClaimName: opts.ClaimName,
}
default:
return fmt.Errorf("invalid volume type: %s", opts.Type)
}
return nil
}
func (v *VolumeOptions) printVolumes(infos []*resource.Info) []error {
listingErrors := []error{}
for _, info := range infos {
_, err := v.<API key>(info.Object, func(spec *kapi.PodSpec) error {
return v.listVolumeForSpec(spec, info)
})
if err != nil {
listingErrors = append(listingErrors, err)
fmt.Fprintf(v.Err, "error: %s/%s %v\n", info.Mapping.Resource, info.Name, err)
}
}
return listingErrors
}
func (v *AddVolumeOptions) createClaim() *kapi.<API key> {
pvc := &kapi.<API key>{
ObjectMeta: kapi.ObjectMeta{
Name: v.ClaimName,
},
Spec: kapi.<API key>{
AccessModes: []kapi.<API key>{kapi.<API key>(v.ClaimMode)},
Resources: kapi.<API key>{
Requests: kapi.ResourceList{
kapi.ResourceName(kapi.ResourceStorage): kresource.MustParse(v.ClaimSize),
},
},
},
}
if len(v.ClaimClass) > 0 {
pvc.Annotations = map[string]string{
storageAnnClass: v.ClaimClass,
}
}
return pvc
}
func (v *VolumeOptions) setVolumeSource(kv *kapi.Volume) error {
var err error
opts := v.AddOpts
if len(opts.Type) > 0 {
err = <API key>(kv, opts)
} else if len(opts.Source) > 0 {
err = json.Unmarshal([]byte(opts.Source), &kv.VolumeSource)
}
return err
}
func (v *VolumeOptions) setVolumeMount(spec *kapi.PodSpec, info *resource.Info) error {
opts := v.AddOpts
containers, _ := selectContainers(spec.Containers, v.Containers)
if len(containers) == 0 && v.Containers != "*" {
fmt.Fprintf(v.Err, "warning: %s/%s does not have any containers matching %q\n", info.Mapping.Resource, info.Name, v.Containers)
return nil
}
for _, c := range containers {
for _, m := range c.VolumeMounts {
if path.Clean(m.MountPath) == path.Clean(opts.MountPath) && m.Name != v.Name {
return fmt.Errorf("volume mount '%s' already exists for container '%s'", opts.MountPath, c.Name)
}
}
for i, m := range c.VolumeMounts {
if m.Name == v.Name {
c.VolumeMounts = append(c.VolumeMounts[:i], c.VolumeMounts[i+1:]...)
break
}
}
volumeMount := &kapi.VolumeMount{
Name: v.Name,
MountPath: path.Clean(opts.MountPath),
}
c.VolumeMounts = append(c.VolumeMounts, *volumeMount)
}
return nil
}
func (v *VolumeOptions) getVolumeName(spec *kapi.PodSpec, singleResource bool) (string, error) {
opts := v.AddOpts
if opts.Overwrite {
// Multiple resources can have same mount-path for different volumes,
// so restrict it for single resource to uniquely find the volume
if !singleResource {
return "", fmt.Errorf("you must specify --name for the volume name when dealing with multiple resources")
}
if len(opts.MountPath) > 0 {
containers, _ := selectContainers(spec.Containers, v.Containers)
var name string
matchCount := 0
for _, c := range containers {
for _, m := range c.VolumeMounts {
if path.Clean(m.MountPath) == path.Clean(opts.MountPath) {
name = m.Name
matchCount += 1
break
}
}
}
switch matchCount {
case 0:
return "", fmt.Errorf("unable to find the volume for mount-path: %s", opts.MountPath)
case 1:
return name, nil
default:
return "", fmt.Errorf("found multiple volumes with same mount-path: %s", opts.MountPath)
}
} else {
return "", fmt.Errorf("ambiguous --overwrite, specify --name or --mount-path")
}
} else { // Generate volume name
name := kapi.SimpleNameGenerator.GenerateName(volumePrefix)
if len(v.Output) == 0 {
fmt.Fprintf(v.Err, "info: Generated volume name: %s\n", name)
}
return name, nil
}
}
func (v *VolumeOptions) addVolumeToSpec(spec *kapi.PodSpec, info *resource.Info, singleResource bool) error {
opts := v.AddOpts
if len(v.Name) == 0 {
var err error
v.Name, err = v.getVolumeName(spec, singleResource)
if err != nil {
return err
}
}
newVolume := &kapi.Volume{
Name: v.Name,
}
setSource := true
for i, vol := range spec.Volumes {
if v.Name == vol.Name {
if !opts.Overwrite {
return fmt.Errorf("volume '%s' already exists. Use --overwrite to replace", v.Name)
}
if !opts.TypeChanged && len(opts.Source) == 0 {
newVolume.VolumeSource = vol.VolumeSource
setSource = false
}
spec.Volumes = append(spec.Volumes[:i], spec.Volumes[i+1:]...)
break
}
}
if setSource {
err := v.setVolumeSource(newVolume)
if err != nil {
return err
}
}
spec.Volumes = append(spec.Volumes, *newVolume)
if len(opts.MountPath) > 0 {
err := v.setVolumeMount(spec, info)
if err != nil {
return err
}
}
return nil
}
func (v *VolumeOptions) <API key>(spec *kapi.PodSpec, containers, skippedContainers []*kapi.Container) error {
for _, c := range containers {
for i, m := range c.VolumeMounts {
if v.Name == m.Name {
c.VolumeMounts = append(c.VolumeMounts[:i], c.VolumeMounts[i+1:]...)
break
}
}
}
// Remove volume if no container is using it
found := false
for _, c := range skippedContainers {
for _, m := range c.VolumeMounts {
if v.Name == m.Name {
found = true
break
}
}
if found {
break
}
}
if !found {
foundVolume := false
for i, vol := range spec.Volumes {
if v.Name == vol.Name {
spec.Volumes = append(spec.Volumes[:i], spec.Volumes[i+1:]...)
foundVolume = true
break
}
}
if !foundVolume {
return fmt.Errorf("volume '%s' not found", v.Name)
}
}
return nil
}
func (v *VolumeOptions) <API key>(spec *kapi.PodSpec, info *resource.Info) error {
containers, skippedContainers := selectContainers(spec.Containers, v.Containers)
if len(containers) == 0 && v.Containers != "*" {
fmt.Fprintf(v.Err, "warning: %s/%s does not have any containers matching %q\n", info.Mapping.Resource, info.Name, v.Containers)
return nil
}
if len(v.Name) == 0 {
for _, c := range containers {
c.VolumeMounts = []kapi.VolumeMount{}
}
spec.Volumes = []kapi.Volume{}
} else {
err := v.<API key>(spec, containers, skippedContainers)
if err != nil {
return err
}
}
return nil
}
func sourceAccessMode(readOnly bool) string {
if readOnly {
return " read-only"
}
return ""
}
func <API key>(claim *kapi.<API key>) string {
if len(claim.Spec.VolumeName) == 0 {
// TODO: check for other dimensions of request - IOPs, etc
if val, ok := claim.Spec.Resources.Requests[kapi.ResourceStorage]; ok {
return fmt.Sprintf("waiting for %sB allocation", val.String())
}
return "waiting to allocate"
}
// TODO: check for other dimensions of capacity?
if val, ok := claim.Status.Capacity[kapi.ResourceStorage]; ok {
return fmt.Sprintf("allocated %sB", val.String())
}
return "allocated unknown size"
}
func <API key>(source *kapi.VolumeSource) string {
switch {
case source.<API key> != nil:
return fmt.Sprintf("AWS EBS %s type=%s partition=%d%s", source.<API key>.VolumeID, source.<API key>.FSType, source.<API key>.Partition, sourceAccessMode(source.<API key>.ReadOnly))
case source.EmptyDir != nil:
return "empty directory"
case source.GCEPersistentDisk != nil:
return fmt.Sprintf("GCE PD %s type=%s partition=%d%s", source.GCEPersistentDisk.PDName, source.GCEPersistentDisk.FSType, source.GCEPersistentDisk.Partition, sourceAccessMode(source.GCEPersistentDisk.ReadOnly))
case source.GitRepo != nil:
if len(source.GitRepo.Revision) == 0 {
return fmt.Sprintf("Git repository %s", source.GitRepo.Repository)
}
return fmt.Sprintf("Git repository %s @ %s", source.GitRepo.Repository, source.GitRepo.Revision)
case source.Glusterfs != nil:
return fmt.Sprintf("GlusterFS %s:%s%s", source.Glusterfs.EndpointsName, source.Glusterfs.Path, sourceAccessMode(source.Glusterfs.ReadOnly))
case source.HostPath != nil:
return fmt.Sprintf("host path %s", source.HostPath.Path)
case source.ISCSI != nil:
return fmt.Sprintf("ISCSI %s target-portal=%s type=%s lun=%d%s", source.ISCSI.IQN, source.ISCSI.TargetPortal, source.ISCSI.FSType, source.ISCSI.Lun, sourceAccessMode(source.ISCSI.ReadOnly))
case source.NFS != nil:
return fmt.Sprintf("NFS %s:%s%s", source.NFS.Server, source.NFS.Path, sourceAccessMode(source.NFS.ReadOnly))
case source.<API key> != nil:
return fmt.Sprintf("pvc/%s%s", source.<API key>.ClaimName, sourceAccessMode(source.<API key>.ReadOnly))
case source.RBD != nil:
return fmt.Sprintf("Ceph RBD %v type=%s image=%s pool=%s%s", source.RBD.CephMonitors, source.RBD.FSType, source.RBD.RBDImage, source.RBD.RBDPool, sourceAccessMode(source.RBD.ReadOnly))
case source.Secret != nil:
return fmt.Sprintf("secret/%s", source.Secret.SecretName)
default:
return "unknown"
}
}
func (v *VolumeOptions) listVolumeForSpec(spec *kapi.PodSpec, info *resource.Info) error {
containers, _ := selectContainers(spec.Containers, v.Containers)
if len(containers) == 0 && v.Containers != "*" {
fmt.Fprintf(v.Err, "warning: %s/%s does not have any containers matching %q\n", info.Mapping.Resource, info.Name, v.Containers)
return nil
}
fmt.Fprintf(v.Out, "%s/%s\n", info.Mapping.Resource, info.Name)
checkName := (len(v.Name) > 0)
found := false
for _, vol := range spec.Volumes {
if checkName && v.Name != vol.Name {
continue
}
found = true
refInfo := ""
if vol.VolumeSource.<API key> != nil {
claimName := vol.VolumeSource.<API key>.ClaimName
claim, err := v.Client.<API key>(info.Namespace).Get(claimName)
switch {
case err == nil:
refInfo = fmt.Sprintf("(%s)", <API key>(claim))
case apierrs.IsNotFound(err):
refInfo = "(does not exist)"
default:
fmt.Fprintf(v.Err, "error: unable to retrieve persistent volume claim %s referenced in %s/%s: %v", claimName, info.Mapping.Resource, info.Name, err)
}
}
if len(refInfo) > 0 {
refInfo = " " + refInfo
}
fmt.Fprintf(v.Out, " %s%s as %s\n", <API key>(&vol.VolumeSource), refInfo, vol.Name)
for _, c := range containers {
for _, m := range c.VolumeMounts {
if vol.Name != m.Name {
continue
}
if len(spec.Containers) == 1 {
fmt.Fprintf(v.Out, " mounted at %s\n", m.MountPath)
} else {
fmt.Fprintf(v.Out, " mounted at %s in container %s\n", m.MountPath, c.Name)
}
}
}
}
if checkName && !found {
return fmt.Errorf("volume %q not found", v.Name)
}
return nil
}
|
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/pubsub/v1/pubsub.proto
namespace Google\Cloud\PubSub\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Request for the ModifyAckDeadline method.
*
* Generated from protobuf message <code>google.pubsub.v1.<API key></code>
*/
class <API key> extends \Google\Protobuf\Internal\Message
{
/**
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
*
* Generated from protobuf field <code>string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
*/
private $subscription = '';
/**
* Required. List of acknowledgment IDs.
*
* Generated from protobuf field <code>repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private $ack_ids;
/**
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
*
* Generated from protobuf field <code>int32 <API key> = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private $<API key> = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $subscription
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
* @type string[]|\Google\Protobuf\Internal\RepeatedField $ack_ids
* Required. List of acknowledgment IDs.
* @type int $<API key>
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
parent::__construct($data);
}
/**
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
*
* Generated from protobuf field <code>string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
* @return string
*/
public function getSubscription()
{
return $this->subscription;
}
/**
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
*
* Generated from protobuf field <code>string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
* @param string $var
* @return $this
*/
public function setSubscription($var)
{
GPBUtil::checkString($var, True);
$this->subscription = $var;
return $this;
}
/**
* Required. List of acknowledgment IDs.
*
* Generated from protobuf field <code>repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getAckIds()
{
return $this->ack_ids;
}
/**
* Required. List of acknowledgment IDs.
*
* Generated from protobuf field <code>repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param string[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAckIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->ack_ids = $arr;
return $this;
}
/**
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
*
* Generated from protobuf field <code>int32 <API key> = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return int
*/
public function <API key>()
{
return $this-><API key>;
}
/**
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
*
* Generated from protobuf field <code>int32 <API key> = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @param int $var
* @return $this
*/
public function <API key>($var)
{
GPBUtil::checkInt32($var);
$this-><API key> = $var;
return $this;
}
}
|
package com.mapswithme.maps.purchase;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.android.billingclient.api.SkuDetails;
import com.bumptech.glide.Glide;
import com.mapswithme.maps.Framework;
import com.mapswithme.maps.PrivateVariables;
import com.mapswithme.maps.<API key>;
import com.mapswithme.maps.R;
import com.mapswithme.maps.base.BaseMwmFragment;
import com.mapswithme.maps.bookmarks.data.PaymentData;
import com.mapswithme.maps.dialog.AlertDialogCallback;
import com.mapswithme.util.Utils;
import com.mapswithme.util.log.Logger;
import com.mapswithme.util.log.LoggerFactory;
import com.mapswithme.util.statistics.Statistics;
import java.util.Collections;
import java.util.List;
public class <API key> extends BaseMwmFragment
implements AlertDialogCallback, <API key><<API key>>
{
static final String ARG_PAYMENT_DATA = "arg_payment_data";
private static final Logger LOGGER = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.BILLING);
private static final String TAG = <API key>.class.getSimpleName();
private static final String EXTRA_CURRENT_STATE = "extra_current_state";
private static final String <API key> = "<API key>";
private static final String <API key> = "<API key>";
private static final String <API key> = "<API key>";
@SuppressWarnings("NullableProblems")
@NonNull
private PurchaseController<PurchaseCallback> mPurchaseController;
@SuppressWarnings("NullableProblems")
@NonNull
private <API key> mPurchaseCallback;
@SuppressWarnings("NullableProblems")
@NonNull
private PaymentData mPaymentData;
@Nullable
private ProductDetails mProductDetails;
@Nullable
private ProductDetails mSubsProductDetails;
private boolean mValidationResult;
@NonNull
private <API key> mState = <API key>.NONE;
@SuppressWarnings("NullableProblems")
@NonNull
private BillingManager<<API key>> <API key>;
@NonNull
private final <API key> <API key>
= new <API key>();
@Override
public void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Bundle args = getArguments();
if (args == null)
throw new <API key>("Args must be provided for payment fragment!");
PaymentData paymentData = args.getParcelable(ARG_PAYMENT_DATA);
if (paymentData == null)
throw new <API key>("Payment data must be provided for payment fragment!");
mPaymentData = paymentData;
mPurchaseCallback = new <API key>(mPaymentData.getServerId());
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable
Bundle savedInstanceState)
{
mPurchaseController = PurchaseFactory.<API key>(requireContext(),
mPaymentData.getProductId(),
mPaymentData.getServerId());
if (savedInstanceState != null)
mPurchaseController.onRestore(savedInstanceState);
mPurchaseController.initialize(requireActivity());
<API key> = PurchaseFactory.<API key>();
<API key>.initialize(requireActivity());
<API key>.addCallback(<API key>);
<API key>.attach(this);
View root = inflater.inflate(R.layout.<API key>, container, false);
View subscriptionButton = root.findViewById(R.id.buy_subs_btn);
subscriptionButton.setOnClickListener(v -> <API key>());
TextView buyInappBtn = root.findViewById(R.id.buy_inapp_btn);
buyInappBtn.setOnClickListener(v -> onBuyInappClicked());
return root;
}
private void <API key>()
{
SubscriptionType type = SubscriptionType.<API key>(mPaymentData.getGroup());
if (type.equals(SubscriptionType.BOOKMARKS_SIGHTS))
{
<API key>.startForResult
(this, PurchaseUtils.<API key>, Statistics.ParamValue.CARD);
return;
}
<API key>.startForResult
(this, PurchaseUtils.<API key>, Statistics.ParamValue.CARD);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (resultCode != Activity.RESULT_OK)
return;
if (requestCode == PurchaseUtils.<API key>)
{
Intent intent = new Intent();
intent.putExtra(PurchaseUtils.<API key>, true);
requireActivity().setResult(Activity.RESULT_OK, intent);
requireActivity().finish();
}
}
private void onBuyInappClicked()
{
Statistics.INSTANCE.<API key>(mPaymentData.getServerId(),
mPaymentData.getProductId());
Statistics.INSTANCE.trackPurchaseEvent(Statistics.EventName.<API key>,
mPaymentData.getServerId(),
Statistics.<API key>);
<API key>();
}
@Override
public boolean onBackPressed()
{
if (mState == <API key>.VALIDATION)
{
Toast.makeText(requireContext(), R.string.<API key>, Toast.LENGTH_SHORT)
.show();
return true;
}
Statistics.INSTANCE.trackPurchaseEvent(Statistics.EventName.<API key>,
mPaymentData.getServerId());
return super.onBackPressed();
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
if (savedInstanceState == null)
Statistics.INSTANCE.<API key>(mPaymentData.getServerId(),
PrivateVariables.bookmarksVendor(),
mPaymentData.getProductId());
LOGGER.d(TAG, "onViewCreated savedInstanceState = " + savedInstanceState);
<API key>();
loadImage();
if (savedInstanceState != null)
{
mProductDetails = savedInstanceState.getParcelable(<API key>);
if (mProductDetails != null)
<API key>();
mSubsProductDetails = savedInstanceState.getParcelable(<API key>);
if (mSubsProductDetails != null)
<API key>();
mValidationResult = savedInstanceState.getBoolean(<API key>);
<API key> savedState
= <API key>.values()[savedInstanceState.getInt(EXTRA_CURRENT_STATE)];
activateState(savedState);
return;
}
activateState(<API key>.<API key>);
mPurchaseController.queryProductDetails();
SubscriptionType type = SubscriptionType.<API key>(mPaymentData.getGroup());
List<String> subsProductIds =
Collections.singletonList(type.getMonthlyProductId());
<API key>.queryProductDetails(subsProductIds);
}
@Override
public void onDestroyView()
{
super.onDestroyView();
mPurchaseController.destroy();
<API key>.removeCallback(<API key>);
<API key>.detach();
<API key>.destroy();
}
private void <API key>()
{
activateState(<API key>.<API key>);
Framework.<API key>(mPaymentData.getServerId(),
PrivateVariables.bookmarksVendor());
}
void launchBillingFlow()
{
mPurchaseController.launchPurchaseFlow(mPaymentData.getProductId());
activateState(<API key>.PAYMENT_IN_PROGRESS);
}
@Override
public void onStart()
{
super.onStart();
<API key> observable = <API key>.from(requireContext());
observable.<API key>(mPurchaseCallback);
mPurchaseController.addCallback(mPurchaseCallback);
mPurchaseCallback.attach(this);
}
@Override
public void onStop()
{
super.onStop();
<API key> observable = <API key>.from(requireContext());
observable.<API key>(mPurchaseCallback);
mPurchaseController.removeCallback();
mPurchaseCallback.detach();
}
@Override
public void onSaveInstanceState(Bundle outState)
{
super.onSaveInstanceState(outState);
LOGGER.d(TAG, "onSaveInstanceState");
outState.putInt(EXTRA_CURRENT_STATE, mState.ordinal());
outState.putParcelable(<API key>, mProductDetails);
outState.putParcelable(<API key>, mSubsProductDetails);
mPurchaseController.onSave(outState);
}
@Override
public void activateState(@NonNull <API key> state)
{
if (state == mState)
return;
LOGGER.i(TAG, "Activate state: " + state);
mState = state;
mState.activate(this);
}
private void loadImage()
{
if (TextUtils.isEmpty(mPaymentData.getImgUrl()))
return;
ImageView imageView = getViewOrThrow().findViewById(R.id.image);
Glide.with(imageView.getContext())
.load(mPaymentData.getImgUrl())
.centerCrop()
.into(imageView);
}
private void <API key>()
{
TextView name = getViewOrThrow().findViewById(R.id.<API key>);
name.setText(mPaymentData.getName());
TextView author = getViewOrThrow().findViewById(R.id.author_name);
author.setText(mPaymentData.getAuthorName());
}
void <API key>(@NonNull List<SkuDetails> details)
{
if (details.isEmpty())
return;
SkuDetails skuDetails = details.get(0);
mProductDetails = PurchaseUtils.toProductDetails(skuDetails);
}
void <API key>(@NonNull List<SkuDetails> details)
{
if (details.isEmpty())
return;
SkuDetails skuDetails = details.get(0);
mSubsProductDetails = PurchaseUtils.toProductDetails(skuDetails);
}
void <API key>(boolean validationResult)
{
mValidationResult = validationResult;
}
@Override
public void <API key>(int requestCode, int which)
{
<API key>(requestCode);
}
@Override
public void <API key>(int requestCode, int which)
{
// Do nothing by default.
}
@Override
public void onAlertDialogCancel(int requestCode)
{
<API key>(requestCode);
}
private void <API key>(int requestCode)
{
switch (requestCode)
{
case PurchaseUtils.<API key>:
requireActivity().finish();
break;
case PurchaseUtils.<API key>:
case PurchaseUtils.<API key>:
activateState(<API key>.<API key>);
break;
}
}
void <API key>()
{
if (mProductDetails == null)
throw new AssertionError("Product details must be obtained at this moment!");
TextView buyButton = getViewOrThrow().findViewById(R.id.buy_inapp_btn);
String price = Utils.<API key>(mProductDetails.getPrice(),
mProductDetails.getCurrencyCode());
buyButton.setText(getString(R.string.buy_btn, price));
TextView storeName = getViewOrThrow().findViewById(R.id.product_store_name);
storeName.setText(mProductDetails.getTitle());
}
void <API key>()
{
if (mSubsProductDetails == null)
throw new AssertionError("Subs product details must be obtained at this moment!");
String formattedPrice = Utils.<API key>(mSubsProductDetails.getPrice(),
mSubsProductDetails.getCurrencyCode());
TextView subsButton = getViewOrThrow().findViewById(R.id.buy_subs_btn);
subsButton.setText(getString(R.string.<API key>, formattedPrice));
}
void finishValidation()
{
if (mValidationResult)
requireActivity().setResult(Activity.RESULT_OK);
requireActivity().finish();
}
}
|
#include <aws/codedeploy/model/TrafficRoutingType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/<API key>.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeDeploy
{
namespace Model
{
namespace <API key>
{
static const int <API key> = HashingUtils::HashString("TimeBasedCanary");
static const int <API key> = HashingUtils::HashString("TimeBasedLinear");
static const int AllAtOnce_HASH = HashingUtils::HashString("AllAtOnce");
TrafficRoutingType <API key>(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == <API key>)
{
return TrafficRoutingType::TimeBasedCanary;
}
else if (hashCode == <API key>)
{
return TrafficRoutingType::TimeBasedLinear;
}
else if (hashCode == AllAtOnce_HASH)
{
return TrafficRoutingType::AllAtOnce;
}
<API key>* overflowContainer = Aws::<API key>();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<TrafficRoutingType>(hashCode);
}
return TrafficRoutingType::NOT_SET;
}
Aws::String <API key>(TrafficRoutingType enumValue)
{
switch(enumValue)
{
case TrafficRoutingType::TimeBasedCanary:
return "TimeBasedCanary";
case TrafficRoutingType::TimeBasedLinear:
return "TimeBasedLinear";
case TrafficRoutingType::AllAtOnce:
return "AllAtOnce";
default:
<API key>* overflowContainer = Aws::<API key>();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace <API key>
} // namespace Model
} // namespace CodeDeploy
} // namespace Aws
|
id: version-2.8.<API key>
title: RabbitMQ source connector
sidebar_label: RabbitMQ source connector
original_id: io-rabbitmq-source
The RabbitMQ source connector receives messages from RabbitMQ clusters
and writes messages to Pulsar topics.
## Configuration
The configuration of the RabbitMQ source connector has the following properties.
Property
| Name | Type|Required | Default | Description
|
| `connectionName` |String| true | " " (empty string) | The connection name. |
| `host` | String| true | " " (empty string) | The RabbitMQ host. |
| `port` | int |true | 5672 | The RabbitMQ port. |
| `virtualHost` |String|true | / | The virtual host used to connect to RabbitMQ. |
| `username` | String|false | guest | The username used to authenticate to RabbitMQ. |
| `password` | String|false | guest | The password used to authenticate to RabbitMQ. |
| `queueName` | String|true | " " (empty string) | The RabbitMQ queue name that messages should be read from or written to. |
| `requestedChannelMax` | int|false | 0 | The initially requested maximum channel number. <br><br>0 means unlimited. |
| `requestedFrameMax` | int|false |0 | The initially requested maximum frame size in octets. <br><br>0 means unlimited. |
| `connectionTimeout` | int|false | 60000 | The timeout of TCP connection establishment in milliseconds. <br><br>0 means infinite. |
| `handshakeTimeout` | int|false | 10000 | The timeout of AMQP0-9-1 protocol handshake in milliseconds. |
| `requestedHeartbeat` | int|false | 60 | The requested heartbeat timeout in seconds. |
| `prefetchCount` | int|false | 0 | The maximum number of messages that the server delivers.<br><br> 0 means unlimited. |
| `prefetchGlobal` | boolean|false | false |Whether the setting should be applied to the entire channel rather than each consumer. |
| `passive` | boolean|false | false | Whether the rabbitmq consumer should create its own queue or bind to an existing one. |
Example
Before using the RabbitMQ source connector, you need to create a configuration file through one of the following methods.
* JSON
json
{
"host": "localhost",
"port": "5672",
"virtualHost": "/",
"username": "guest",
"password": "guest",
"queueName": "test-queue",
"connectionName": "test-connection",
"requestedChannelMax": "0",
"requestedFrameMax": "0",
"connectionTimeout": "60000",
"handshakeTimeout": "10000",
"requestedHeartbeat": "60",
"prefetchCount": "0",
"prefetchGlobal": "false",
"passive": "false"
}
* YAML
yaml
configs:
host: "localhost"
port: 5672
virtualHost: "/"
username: "guest"
password: "guest"
queueName: "test-queue"
connectionName: "test-connection"
requestedChannelMax: 0
requestedFrameMax: 0
connectionTimeout: 60000
handshakeTimeout: 10000
requestedHeartbeat: 60
prefetchCount: 0
prefetchGlobal: "false"
passive: "false"
|
module('BadAriaRole');
test('No elements === no problems.', function(assert) {
var config = {
ruleName: 'badAriaRole',
expected: axs.constants.AuditResult.NA
};
assert.runRule(config);
});
test('No roles === no problems.', function(assert) {
// Setup fixture
var fixture = document.getElementById('qunit-fixture');
for (var i = 0; i < 10; i++)
fixture.appendChild(document.createElement('div'));
var config = {
ruleName: 'badAriaRole',
expected: axs.constants.AuditResult.NA
};
assert.runRule(config);
});
test('Good role === no problems.', function(assert) {
// Setup fixture
var fixture = document.getElementById('qunit-fixture');
for (var r in axs.constants.ARIA_ROLES) {
if (axs.constants.ARIA_ROLES.hasOwnProperty(r) && !axs.constants.ARIA_ROLES[r]['abstract']) {
var div = document.createElement('div');
div.setAttribute('role', r);
fixture.appendChild(div);
}
}
var config = {
ruleName: 'badAriaRole',
expected: axs.constants.AuditResult.PASS,
elements: []
};
assert.runRule(config);
});
test('Bad role == problem', function(assert) {
// Setup fixture
var fixture = document.getElementById('qunit-fixture');
var div = document.createElement('div');
div.setAttribute('role', 'not-an-aria-role');
fixture.appendChild(div);
var config = {
ruleName: 'badAriaRole',
expected: axs.constants.AuditResult.FAIL,
elements: [div]
};
assert.runRule(config);
});
test('Abstract role == problem', function(assert) {
// Setup fixture
var fixture = document.getElementById('qunit-fixture');
var div = document.createElement('div');
div.setAttribute('role', 'input');
fixture.appendChild(div);
var config = {
ruleName: 'badAriaRole',
expected: axs.constants.AuditResult.FAIL,
elements: [div]
};
assert.runRule(config);
});
|
#include <aws/securityhub/model/<API key>.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SecurityHub
{
namespace Model
{
<API key>::<API key>() :
<API key>(false),
<API key>(false)
{
}
<API key>::<API key>(JsonView jsonValue) :
<API key>(false),
<API key>(false)
{
*this = jsonValue;
}
<API key>& <API key>::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("StandardsArn"))
{
m_standardsArn = jsonValue.GetString("StandardsArn");
<API key> = true;
}
if(jsonValue.ValueExists("StandardsInput"))
{
Aws::Map<Aws::String, JsonView> <API key> = jsonValue.GetObject("StandardsInput").GetAllObjects();
for(auto& standardsInputItem : <API key>)
{
m_standardsInput[standardsInputItem.first] = standardsInputItem.second.AsString();
}
<API key> = true;
}
return *this;
}
JsonValue <API key>::Jsonize() const
{
JsonValue payload;
if(<API key>)
{
payload.WithString("StandardsArn", m_standardsArn);
}
if(<API key>)
{
JsonValue <API key>;
for(auto& standardsInputItem : m_standardsInput)
{
<API key>.WithString(standardsInputItem.first, standardsInputItem.second);
}
payload.WithObject("StandardsInput", std::move(<API key>));
}
return payload;
}
} // namespace Model
} // namespace SecurityHub
} // namespace Aws
|
+++
title = "John Behrens"
image = "john-behrens.jpg"
<TwitterConsumerkey>"
website = "http:
type = "speaker"
linktitle = "john-behrens"
+++
John Behrens is a freelancer from Hamburg Germany, he is fulfilling different roles in Developer, Tester, Scrum Master, Engineer, Architect, Trainer or Agile Coach. He is mostly willing to use any skill that is needed to help the team and take a project to success.
|
require 'puppet/node/facts'
require 'puppet/indirector/rest'
require 'puppet/util/puppetdb'
class Puppet::Node::Facts::Puppetdb < Puppet::Indirector::REST
include Puppet::Util::Puppetdb
include Puppet::Util::Puppetdb::CommandNames
def save(request)
facts = request.instance.dup
facts.values = facts.values.dup
facts.stringify
submit_command(request.key, facts.to_pson, CommandReplaceFacts, 1)
end
def find(request)
begin
response = http_get(request, "/v2/nodes/#{CGI.escape(request.key)}/facts", headers)
<API key>(response)
if response.is_a? Net::HTTPSuccess
result = PSON.parse(response.body)
# Note: the Inventory Service API appears to expect us to return nil here
# if the node isn't found. However, PuppetDB returns an empty array in
# this case; for now we will just look for that condition and assume that
# it means that the node wasn't found, so we will return nil. In the
# future we may want to improve the logic such that we can distinguish
# between the "node not found" and the "no facts for this node" cases.
if result.empty?
return nil
end
facts = result.inject({}) do |a,h|
a.merge(h['name'] => h['value'])
end
Puppet::Node::Facts.new(request.key, facts)
else
# Newline characters cause an HTTP error, so strip them
raise "[#{response.code} #{response.message}] #{response.body.gsub(/[\r\n]/, '')}"
end
rescue => e
raise Puppet::Error, "Failed to find facts from PuppetDB at #{self.class.server}:#{self.class.port}: #{e}"
end
end
# Search for nodes matching a set of fact constraints. The constraints are
# specified as a hash of the form:
# `{type.name.operator => value`
# The only accepted `type` is 'facts'.
# `name` must be the fact name to query against.
# `operator` may be one of {eq, ne, lt, gt, le, ge}, and will default to 'eq'
# if unspecified.
def search(request)
return [] unless request.options
operator_map = {
'eq' => '=',
'gt' => '>',
'lt' => '<',
'ge' => '>=',
'le' => '<=',
}
filters = request.options.sort.map do |key,value|
type, name, operator = key.to_s.split('.')
operator ||= 'eq'
raise Puppet::Error, "Fact search against keys of type '#{type}' is unsupported" unless type == 'facts'
if operator == 'ne'
['not', ['=', ['fact', name], value]]
else
[operator_map[operator], ['fact', name], value]
end
end
query = ["and"] + filters
query_param = CGI.escape(query.to_pson)
begin
response = http_get(request, "/v2/nodes?query=#{query_param}", headers)
<API key>(response)
if response.is_a? Net::HTTPSuccess
PSON.parse(response.body).collect {|s| s["name"]}
else
# Newline characters cause an HTTP error, so strip them
raise "[#{response.code} #{response.message}] #{response.body.gsub(/[\r\n]/, '')}"
end
rescue => e
raise Puppet::Error, "Could not perform inventory search from PuppetDB at #{self.class.server}:#{self.class.port}: #{e}"
end
end
def headers
{
"Accept" => "application/json",
"Content-Type" => "application/<API key>; charset=UTF-8",
}
end
end
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Fri Aug 28 09:51:25 EDT 2015 -->
<title>Cassandra.AsyncClient.<API key> (apache-cassandra API)</title>
<meta name="date" content="2015-08-28">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Cassandra.AsyncClient.<API key> (apache-cassandra API)";
}
}
catch(err) {
}
var methods = {"i0":10,"i1":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Cassandra.AsyncClient.<API key>.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.add_call.html" title="class in org.apache.cassandra.thrift"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.batch_mutate_call.html" title="class in org.apache.cassandra.thrift"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cassandra/thrift/Cassandra.AsyncClient.<API key>.html" target="_top">Frames</a></li>
<li><a href="Cassandra.AsyncClient.<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.classes.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">Nested</a> | </li>
<li><a href="#fields.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<div class="subTitle">org.apache.cassandra.thrift</div>
<h2 title="Class Cassandra.AsyncClient.<API key>" class="title">Class Cassandra.AsyncClient.<API key></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.thrift.async.TAsyncMethodCall</li>
<li>
<ul class="inheritance">
<li>org.apache.cassandra.thrift.Cassandra.AsyncClient.<API key></li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.html" title="class in org.apache.cassandra.thrift">Cassandra.AsyncClient</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="typeNameLabel">Cassandra.AsyncClient.<API key></span>
extends org.apache.thrift.async.TAsyncMethodCall</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">
</a>
<h3>Nested classes/interfaces inherited from class org.apache.thrift.async.TAsyncMethodCall</h3>
<code>org.apache.thrift.async.TAsyncMethodCall.State</code></li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="field.summary">
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">
</a>
<h3>Fields inherited from class org.apache.thrift.async.TAsyncMethodCall</h3>
<code>client, transport</code></li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.<API key>.html#<API key>.util.Map-org.apache.cassandra.thrift.<API key>.apache.thrift.async.<API key>.apache.thrift.async.TAsyncClient-org.apache.thrift.protocol.<API key>.apache.thrift.transport.<API key>-"><API key></a></span>(java.util.Map<java.nio.ByteBuffer,java.util.Map<java.lang.String,java.util.List<<a href="../../../../org/apache/cassandra/thrift/Mutation.html" title="class in org.apache.cassandra.thrift">Mutation</a>>>> mutation_map,
<a href="../../../../org/apache/cassandra/thrift/ConsistencyLevel.html" title="enum in org.apache.cassandra.thrift">ConsistencyLevel</a> consistency_level,
org.apache.thrift.async.AsyncMethodCallback resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.<API key> transport)</code> </td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.summary">
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.<API key>.html#getResult--">getResult</a></span>()</code> </td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.<API key>.html#write_args-org.apache.thrift.protocol.TProtocol-">write_args</a></span>(org.apache.thrift.protocol.TProtocol prot)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">
</a>
<h3>Methods inherited from class org.apache.thrift.async.TAsyncMethodCall</h3>
<code>getClient, getFrameBuffer, getSequenceId, getStartTime, getState, getTimeoutTimestamp, hasTimeout, isFinished, onError, prepareMethodCall, transition</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
</a>
<h3>Constructor Detail</h3>
<a name="<API key>.util.Map-org.apache.cassandra.thrift.<API key>.apache.thrift.async.<API key>.apache.thrift.async.TAsyncClient-org.apache.thrift.protocol.<API key>.apache.thrift.transport.<API key>-">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4><API key></h4>
<pre>public <API key>(java.util.Map<java.nio.ByteBuffer,java.util.Map<java.lang.String,java.util.List<<a href="../../../../org/apache/cassandra/thrift/Mutation.html" title="class in org.apache.cassandra.thrift">Mutation</a>>>> mutation_map,
<a href="../../../../org/apache/cassandra/thrift/ConsistencyLevel.html" title="enum in org.apache.cassandra.thrift">ConsistencyLevel</a> consistency_level,
org.apache.thrift.async.AsyncMethodCallback resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.<API key> transport)
throws org.apache.thrift.TException</pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>org.apache.thrift.TException</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.detail">
</a>
<h3>Method Detail</h3>
<a name="write_args-org.apache.thrift.protocol.TProtocol-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>write_args</h4>
<pre>public void write_args(org.apache.thrift.protocol.TProtocol prot)
throws org.apache.thrift.TException</pre>
<dl>
<dt><span class="<API key>">Specified by:</span></dt>
<dd><code>write_args</code> in class <code>org.apache.thrift.async.TAsyncMethodCall</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>org.apache.thrift.TException</code></dd>
</dl>
</li>
</ul>
<a name="getResult
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getResult</h4>
<pre>public void getResult()
throws <a href="../../../../org/apache/cassandra/thrift/<API key>.html" title="class in org.apache.cassandra.thrift"><API key></a>,
<a href="../../../../org/apache/cassandra/thrift/<API key>.html" title="class in org.apache.cassandra.thrift"><API key></a>,
<a href="../../../../org/apache/cassandra/thrift/TimedOutException.html" title="class in org.apache.cassandra.thrift">TimedOutException</a>,
org.apache.thrift.TException</pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/cassandra/thrift/<API key>.html" title="class in org.apache.cassandra.thrift"><API key></a></code></dd>
<dd><code><a href="../../../../org/apache/cassandra/thrift/<API key>.html" title="class in org.apache.cassandra.thrift"><API key></a></code></dd>
<dd><code><a href="../../../../org/apache/cassandra/thrift/TimedOutException.html" title="class in org.apache.cassandra.thrift">TimedOutException</a></code></dd>
<dd><code>org.apache.thrift.TException</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Cassandra.AsyncClient.<API key>.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.add_call.html" title="class in org.apache.cassandra.thrift"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/apache/cassandra/thrift/Cassandra.AsyncClient.batch_mutate_call.html" title="class in org.apache.cassandra.thrift"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cassandra/thrift/Cassandra.AsyncClient.<API key>.html" target="_top">Frames</a></li>
<li><a href="Cassandra.AsyncClient.<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested.classes.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">Nested</a> | </li>
<li><a href="#fields.inherited.from.class.org.apache.thrift.async.TAsyncMethodCall">Field</a> | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright © 2015 The Apache Software Foundation</small></p>
</body>
</html>
|
package org.apereo.cas.web.flow.actions;
import org.apereo.cas.authentication.Core<API key>;
import org.apereo.cas.authentication.principal.<API key>;
import org.apereo.cas.authentication.principal.<API key>;
import org.apereo.cas.authentication.principal.<API key>;
import org.apereo.cas.config.<API key>;
import org.apereo.cas.config.<API key>;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.web.flow.CasWebflowConstants;
import org.apereo.cas.web.support.WebUtils;
import lombok.val;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.autoconfigure.<API key>;
import org.springframework.mock.web.<API key>;
import org.springframework.mock.web.<API key>;
import org.springframework.mock.web.MockServletContext;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import org.springframework.webflow.context.servlet.<API key>;
import org.springframework.webflow.test.MockRequestContext;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
/**
* This is {@link <API key>}.
*
* @author Misagh Moayyed
* @since 5.3.0
*/
@SpringBootTest(classes = {
<API key>.class,
<API key>.class,
<API key>.class
})
public class <API key> {
@ClassRule
public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule();
@Rule
public final SpringMethodRule springMethodRule = new SpringMethodRule();
@Autowired
@Qualifier("servicesManager")
private ServicesManager servicesManager;
@Test
public void verifyAction() throws Exception {
val context = new MockRequestContext();
val request = new <API key>();
context.setExternalContext(new <API key>(new MockServletContext(), request, new <API key>()));
WebUtils.putAuthentication(Core<API key>.getAuthentication(), context);
WebUtils.putService(context, Core<API key>.<API key>());
val locator = mock(<API key>.class);
when(locator.locate(any(<API key>.class))).thenReturn(new <API key>(this.servicesManager));
val <API key> = new <API key>(locator);
val event = <API key>.execute(context);
assertEquals(CasWebflowConstants.<API key>, event.getId());
}
}
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<title>Berlin 2013
- Proposal</title>
<meta name="author" content="Tim Lossen" >
<link rel="alternate" type="application/rss+xml" title="devopsdays RSS Feed" href="http:
<script type="text/javascript" src="https:
<script type="text/javascript">
google.load('jquery', '1.3.2');
</script>
<!---This is a combined jAmpersand, jqwindont , jPullquote -->
<script type="text/javascript" src="/js/devops.js"></script>
<!--- Blueprint CSS Framework Screen + Fancytype-Screen + jedi.css -->
<link rel="stylesheet" href="/css/devops.min.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print">
<!--[if IE]>
<link rel="stylesheet" href="/css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]
</head>
<body onload="initialize()">
<div class="container ">
<div class="span-24 last" id="header">
<div class="span-16 first">
<img src="/images/devopsdays-banner.png" title="devopsdays banner" width="801" height="115" alt="devopdays banner" ><br>
</div>
<div class="span-8 last">
</div>
</div>
<div class="span-24 last">
<div class="span-15 first">
<div id="headermenu">
<table >
<tr>
<td>
<a href="/"><img alt="home" title="home" src="/images/home.png"></a>
<a href="/">Home</a>
</td>
<td>
<a href="/contact/"><img alt="contact" title="contact" src="/images/contact.png"></a>
<a href="/contact/">Contact</a>
</td>
<td>
<a href="/events/"><img alt="events" title="events" src="/images/events.png"></a>
<a href="/events/">Events</a>
</td>
<td>
<a href="/presentations/"><img alt="presentations" title="presentations" src="/images/presentations.png"></a>
<a href="/presentations/">Presentations</a>
</td>
<td>
<a href="/blog/"><img alt="blog" title="blog" src="/images/blog.png"></a>
<a href="/blog/">Blog</a>
</td>
</tr>
</table>
</div>
</div>
<div class="span-8 last">
</div>
<div class="span-24 last" id="title">
<div class="span-15 first">
<h1>Berlin 2013
- Proposal </h1>
</div>
<div class="span-8 last">
</div>
<h1>Gold sponsors</h1>
</div>
<div class="span-15 ">
<div class="span-15 last ">
<div class="submenu">
<h3>
<a href="/events/2013-berlin/">welcome</a>
<a href="/events/2013-berlin/propose">propose</a>
<a href="/events/2013-berlin/program">program</a>
<a href="/events/2013-berlin/location">location</a>
<a href="/events/2013-berlin/registration">register</a>
<a href="/events/2013-berlin/sponsor">sponsor</a>
<a href="/events/2013-berlin/contact">contact</a>
</h3>
</div>
Back to <a href='..'>proposals overview</a> - <a href='../../program'>program</a>
<hr>
<h3>Podularity FTW!</h3>
<p><strong>Abstract:</strong></p>
<p>In "The Connected Company" (O'Reilly, 2012), Dave Gray describes how
pods -- "small, autonomous units" -- are the basic building blocks of
a flexible, scalable and resilient organisation. At Wooga, we have
used pods (though we call them "game teams") as the main
organizational unit from the beginning, and this has led quite
naturally to a strong devops culture.</p>
<p>In this talk, I will tell how this decision came about, how it has
played out, which practical benefits the approach provides -- but
also, what problems we have run into. As a bonus, I will report on a
recent attempt to use podularity as the technical system architecture,
where scalability and resilience are major concerns as well.</p>
<p><strong>Speaker:</strong></p>
<p>Tim Lossen</p>
</div>
<div class="span-15 first last">
<script type="text/javascript">
// var disqus_developer = 1;
</script>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'devopsdays';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.<API key>('head')[0] || document.<API key>('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
<hr>
</div>
</div>
<div class="span-8 last">
<div class="span-8 last">
<a href='http:
<a href='http://www8.hp.com/de/de/software-solutions/software.html?compURI=1234839&jumpid=<API key>'><img border=0 alt='HP' title='HP' width=100px height=100px src='/events/2013-berlin/logos/hp.png'></a>
<h1>Gold Sponsors</h1>
<a href='http:
<a href='http://developer.immobilienscout24.de/jobs/'><img border=0 alt='Immobilien Scout' title='Immobilien Scout' width=100px height=100px src='/events/2013-berlin/logos/immobilienscout.png'></a>
<a href='http:
<a href='http://nokia.de'><img border=0 alt='Nokia Here' title='Nokia Here' width=100px height=100px src='/events/2013-berlin/logos/here.png'></a>
<a href='https:
<a href='http:
<a href='http:
<a href='http:
<h1>Silver sponsors</h1>
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http://aws.amazon.com/opsworks/'><img border=0 alt='OpsWorks' title='OpsWorks' width=100px height=100px src='/events/2013-berlin/logos/opsworks.png'></a>
<a href='http:
<h1>Evening sponsors</h1>
<a href='http:
<a href='http:
</div>
<div class="span-8 last">
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-9713393-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https:
var s = document.<API key>('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
|
package org.camunda.bpm.engine.rest.wink;
import org.camunda.bpm.engine.rest.<API key>;
import org.camunda.bpm.engine.rest.util.<API key>;
import org.junit.AfterClass;
import org.junit.BeforeClass;
public class <API key> extends <API key> {
protected static <API key> serverBootstrap;
@BeforeClass
public static void <API key>() {
serverBootstrap = new <API key>();
serverBootstrap.start();
}
@AfterClass
public static void <API key>() {
serverBootstrap.stop();
}
}
|
let connectionIdx = 0;
let messageIdx = 0;
function addConnection(connection) {
connection.connectionId = ++connectionIdx;
addMessage('New connection #' + connectionIdx);
connection.addEventListener('message', function(event) {
messageIdx++;
const data = JSON.parse(event.data);
const logString = 'Message ' + messageIdx + ' from connection
connection.connectionId + ': ' + data.message;
addMessage(logString, data.lang);
maybeSetFruit(data.message);
connection.send('Received message ' + messageIdx);
});
connection.addEventListener('close', function(event) {
addMessage('Connection #' + connection.connectionId + ' closed, reason = ' +
event.reason + ', message = ' + event.message);
});
};
/* Utils */
const fruitEmoji = {
'grapes': '\u{1F347}',
'watermelon': '\u{1F349}',
'melon': '\u{1F348}',
'tangerine': '\u{1F34A}',
'lemon': '\u{1F34B}',
'banana': '\u{1F34C}',
'pineapple': '\u{1F34D}',
'green apple': '\u{1F35F}',
'apple': '\u{1F34E}',
'pear': '\u{1F350}',
'peach': '\u{1F351}',
'cherries': '\u{1F352}',
'strawberry': '\u{1F353}'
};
function addMessage(content, language) {
const listItem = document.createElement("li");
if (language) {
listItem.lang = language;
}
listItem.textContent = content;
document.querySelector("#message-list").appendChild(listItem);
};
function maybeSetFruit(message) {
const fruit = message.toLowerCase();
if (fruit in fruitEmoji) {
document.querySelector('#main').textContent = fruitEmoji[fruit];
}
};
document.addEventListener('DOMContentLoaded', function() {
if (navigator.presentation.receiver) {
navigator.presentation.receiver.connectionList.then(list => {
list.connections.map(connection => addConnection(connection));
list.addEventListener('connectionavailable', function(event) {
addConnection(event.connection);
});
});
}
});
|
package ro.isdc.wro.model.resource.processor;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.net.URL;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import ro.isdc.wro.config.Context;
import ro.isdc.wro.model.resource.ResourceType;
import ro.isdc.wro.model.resource.processor.impl.css.<API key>;
import ro.isdc.wro.util.WroTestUtils;
public class <API key> {
private <API key> processor;
@BeforeClass
public static void onBeforeClass() {
assertEquals(0, Context.countActive());
}
@AfterClass
public static void onAfterClass() {
assertEquals(0, Context.countActive());
}
@Before
public void setUp() {
processor = new <API key>();
}
@Test
public void testFromFolder()
throws Exception {
final URL url = getClass().getResource("conformColors");
final File testFolder = new File(url.getFile(), "test");
final File expectedFolder = new File(url.getFile(), "expected");
WroTestUtils.<API key>(testFolder, expectedFolder, "css", processor);
}
@Test
public void <API key>() {
WroTestUtils.<API key>(processor, ResourceType.CSS);
}
}
|
require 'spec_helper'
describe Puppet::Type.type(:openldap_access) do
describe 'namevar title patterns' do
it 'handles componsite name' do
access = described_class.new(name: 'to attrs=userPassword,shadowLastChange by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:name]).to eq('to attrs=userPassword,shadowLastChange by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:what]).to eq('attrs=userPassword,shadowLastChange')
expect(access[:access]).to eq([['by dn="cn=admin,dc=example,dc=com" write', 'by anonymous auth']])
end
it 'handles componsite name with position' do
access = described_class.new(name: '{0}to attrs=userPassword,shadowLastChange by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:name]).to eq('{0}to attrs=userPassword,shadowLastChange by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:position]).to eq('0')
expect(access[:what]).to eq('attrs=userPassword,shadowLastChange')
expect(access[:access]).to eq([['by dn="cn=admin,dc=example,dc=com" write', 'by anonymous auth']])
end
it 'handles componsite name with position' do
access = described_class.new(name: '{0}to attrs=userPassword,shadowLastChange by dn="cn=admin,dc=example,dc=com" write by anonymous auth on dc=example,dc=com')
expect(access[:name]).to eq('{0}to attrs=userPassword,shadowLastChange by dn="cn=admin,dc=example,dc=com" write by anonymous auth on dc=example,dc=com')
expect(access[:position]).to eq('0')
expect(access[:what]).to eq('attrs=userPassword,shadowLastChange')
expect(access[:access]).to eq([['by dn="cn=admin,dc=example,dc=com" write', 'by anonymous auth']])
expect(access[:suffix]).to eq('dc=example,dc=com')
end
it 'handles specific value of attr' do
access = described_class.new(name: 'to attrs=objectClass val=posixAccount by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:name]).to eq('to attrs=objectClass val=posixAccount by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:what]).to eq('attrs=objectClass val=posixAccount')
expect(access[:access]).to eq([['by dn="cn=admin,dc=example,dc=com" write', 'by anonymous auth']])
end
end
describe 'access' do
it 'handles array of values' do
access = described_class.new(name: 'foo', access: ['by dn="cn=admin,dc=example,dc=com" write', 'by anonymous auth'])
expect(access[:access]).to eq([['by dn="cn=admin,dc=example,dc=com" write'], ['by anonymous auth']])
end
it 'handles string' do
access = described_class.new(name: 'foo', access: 'by dn="cn=admin,dc=example,dc=com" write by anonymous auth')
expect(access[:access]).to eq([['by dn="cn=admin,dc=example,dc=com" write', 'by anonymous auth']])
end
end
end
|
#pragma once
#include <aws/forecast/<API key>.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class <API key>;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace ForecastService
{
namespace Model
{
class <API key> <API key>
{
public:
<API key>();
<API key>(const Aws::<API key><Aws::Utils::Json::JsonValue>& result);
<API key>& operator=(const Aws::<API key><Aws::Utils::Json::JsonValue>& result);
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline const Aws::String& <API key>() const{ return <API key>; }
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline void <API key>(const Aws::String& value) { <API key> = value; }
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline void <API key>(Aws::String&& value) { <API key> = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline void <API key>(const char* value) { <API key>.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline <API key>& <API key>(const Aws::String& value) { <API key>(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline <API key>& <API key>(Aws::String&& value) { <API key>(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the export job.</p>
*/
inline <API key>& <API key>(const char* value) { <API key>(value); return *this;}
private:
Aws::String <API key>;
};
} // namespace Model
} // namespace ForecastService
} // namespace Aws
|
/* worker_thread.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#define <API key>
#include "bx_data_structures.h"
#define DEBUG 0
// There are one or more Worker Threads per target.
// A Worker Thread will indicate that it is WAITING for something to do and
// place itself on the Worker Thread Data Structure queue of its target.
// Eventually the target will wake up a Worker Thread which is indicated
// by a non-zero value in the bx_wd_released variable in the Worker Thread
// Data Structure for this Worker Thread.
// Upon waking up, the Worker Thread will perform an INPUT or OUTPUT
// operation depending on its target's designation. The Worker Thread
// will have a buffer header structure that contains the location in the
// file to perform the operation, the number of bytes to transfer, and the
// I/O memory buffer.
// Upon completing the requested I/O operation, the Worker Thread will
// stuff its Buffer Header on to the "next buffer queue". In other words,
// if this Worker Thread is an INPUT Worker Thread then it just read data
// into its buffer.
// Therefore, upon completion of the read, this Worker Thread will stuff
// its Buffer Header on the Buffer Header Queue of the OUTPUT target and
// wake up the OUTPUT target if it is waiting for a buffer.
// Likewise, if this Worker Thread is an OUTPUT Worker Thread then it just
// wrote data from its buffer. Therefore, upon completion of the write, this
// Worker Thread will stuff its Buffer Header on the Buffer Header Queue
// of the INPUT target and wake up the INPUT target if it is waiting
// for a buffer.
// After putting its Buffer Header on the appropriate queue this Worker
// Thread will stuff itself back onto its Worker Thread Data Structure
// queue and wait for something to do.
// At some point the Worker Thread will wake up and find the "TERMINATE"
// flag set in its Worker Thread Data Structure . At this point the Worker
// Thread will break the loop and terminate.
void *
worker_thread_main(void *pin) {
int status;
struct bx_td *bx_tdp;
struct bx_wd *bx_wdp;
struct bx_buffer_queue *qp;
struct bx_buffer_header *bufhdrp;
nclk_t nclk;
bx_wdp = (struct bx_wd *)pin;
bx_tdp = bx_wdp->bx_wd_my_bx_tdp;
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu: worker_thread_main: ENTER: bx_wdp=%p, bx_tdp=%p\n", (unsigned long long int)nclk,bx_wdp, bx_tdp);
status = 0;
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - ENTER %d\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>);
while (1) {
// Set flag to indicate that this worker_thread is WAITING
bx_wdp->bx_wd_flags |= BX_WD_WAITING;
// Enqueue this Worker Thread Data Structure on the bx_wd_queue for this target
bx_wd_enqueue(bx_wdp, bx_wdp->bx_wd_my_queue);
// Wait for the target thread to release me
pthread_mutex_lock(&bx_wdp->bx_wd_mutex);
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - got the bx_wd_mutex lock - waiting for something to do - time %d\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>);
bx_wdp->bx_wd_flags |= BX_WD_WAITING;
while (1 != bx_wdp->bx_wd_released) {
pthread_cond_wait(&bx_wdp->bx_wd_conditional, &bx_wdp->bx_wd_mutex);
}
bx_wdp->bx_wd_flags &= ~BX_WD_WAITING;
bx_wdp->bx_wd_released = 0;
if (bx_wdp->bx_wd_flags & BX_WD_TERMINATE)
break;
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - got the bx_wd_mutex lock - GOT something to do - time %d\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>);
bx_wd_show(bx_wdp);
bufhdrp = bx_wdp->bx_wd_bufhdrp;
if (bx_tdp->bx_td_flags & BX_TD_INPUT) { // Read the input file
status = pread(bx_wdp->bx_wd_fd, bufhdrp->bh_startp, bufhdrp->bh_transfer_size, bufhdrp->bh_file_offset);
if (status < 0) {
perror("Read error");
bufhdrp->bh_valid_size = 0;
} else {
bufhdrp->bh_valid_size = status;
}
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - read %d of %d bytes starting at offset %d - time %zd\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>,status,bufhdrp->bh_transfer_size,bufhdrp->bh_file_offset);
// Put this buffer on the output target queue
qp = &bx_td[bx_wdp-><API key>].bx_td_buffer_queue;
bh_enqueue(bx_wdp->bx_wd_bufhdrp, qp);
} else { // Must be output
status = pwrite(bx_wdp->bx_wd_fd, bufhdrp->bh_startp, bufhdrp->bh_transfer_size, bufhdrp->bh_file_offset);
if (status < 0) {
perror("Write error");
bufhdrp->bh_valid_size = 0;
} else {
bufhdrp->bh_valid_size = status;
}
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - wrote %d of %d bytes starting at offset %d - requeuing buffer %zd - time %p\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>,status,bufhdrp->bh_transfer_size,bufhdrp->bh_file_offset, bufhdrp);
// Put this buffer on the input target queue
qp = &bx_td[bx_wdp-><API key>].bx_td_buffer_queue;
bh_enqueue(bufhdrp, qp);
bufqueue_show(qp);
}
nclk_now(&nclk);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - transferred %d bytes - time %d\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>,status);
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s - releasing the bx_wd_mutex lock %d\n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>);
<API key>(&bx_wdp->bx_wd_mutex);
}
if (DEBUG) fprintf(stderr,"%llu worker_thread_main: <API key>=%s %d - Exit \n", (unsigned long long int)nclk,(bx_tdp->bx_td_flags & BX_TD_INPUT)?"INPUT":"OUTPUT", bx_wdp-><API key>);
return 0;
} // End of worker_thread_main()
|
package com.bazaarvoice.emodb.common.dropwizard.leader;
import com.bazaarvoice.curator.recipes.leader.LeaderService;
import com.bazaarvoice.emodb.common.dropwizard.task.TaskRegistry;
import com.bazaarvoice.emodb.common.zookeeper.leader.<API key>;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import com.google.inject.Inject;
import io.dropwizard.servlets.tasks.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentMap;
/**
* Shows the current status of leadership processes managed by {@link LeaderService}. Allows terminating
* individual leadership processes, but such that they can be restarted only by restarting the entire server.
*/
public class LeaderServiceTask extends Task {
private static final Logger _log = LoggerFactory.getLogger(LeaderServiceTask.class);
private final ConcurrentMap<String, LeaderService> _selectorMap = Maps.newConcurrentMap();
@Inject
public LeaderServiceTask(TaskRegistry tasks) {
super("leader");
tasks.addTask(this);
}
public void register(final String name, final LeaderService leaderService) {
_selectorMap.put(name, leaderService);
// Unregister automatically to avoid memory leaks.
leaderService.addListener(new <API key>() {
@Override
public void terminated(Service.State from) {
unregister(name, leaderService);
}
@Override
public void failed(Service.State from, Throwable failure) {
unregister(name, leaderService);
}
}, MoreExecutors.sameThreadExecutor());
}
public void register(final String name, final <API key> <API key>) {
int partition = 0;
for (LeaderService leaderService : <API key>.<API key>()) {
register(String.format("%s-%d", name, partition++), leaderService);
}
}
public void unregister(String name, LeaderService leaderService) {
_selectorMap.remove(name, leaderService);
}
@Override
public void execute(ImmutableMultimap<String, String> parameters, PrintWriter out) throws Exception {
// The 'release' argument tells a server to give up leadership and let a new leader be elected, possibly
// re-electing the current server. This is useful for rebalancing leader-controlled activities.
for (String name : parameters.get("release")) {
LeaderService leaderService = _selectorMap.get(name);
if (leaderService == null) {
out.printf("Unknown leader process: %s%n", name);
continue;
}
Service actualService = leaderService.<API key>().orNull();
if (actualService == null || !actualService.isRunning()) {
out.printf("Process is not currently elected leader: %s%n", name);
continue;
}
_log.warn("Temporarily releasing leadership for process: {}", name);
out.printf("Temporarily releasing leadership for process: %s, cluster will elect a new leader.%n", name);
actualService.stopAndWait();
}
// The 'terminate' argument tells a server to give up leadership permanently (or until the server restarts).
for (String name : parameters.get("terminate")) {
LeaderService leaderService = _selectorMap.get(name);
if (leaderService == null) {
out.printf("Unknown leader process: %s%n", name);
continue;
}
_log.warn("Terminating leader process for: {}", name);
out.printf("Terminating leader process for: %s. Restart the server to restart the leader process.%n", name);
leaderService.stopAndWait();
}
// Print current status.
for (Map.Entry<String, LeaderService> entry : new TreeMap<>(_selectorMap).entrySet()) {
String name = entry.getKey();
LeaderService leaderService = entry.getValue();
out.printf("%s: %s (leader=%s)%n", name,
describeState(leaderService.state(), leaderService.hasLeadership()),
getLeaderId(leaderService));
}
}
private String describeState(Service.State state, boolean hasLeadership) {
if (state == Service.State.RUNNING && !hasLeadership) {
return "waiting to win leadership election";
} else {
return state.name();
}
}
private String getLeaderId(LeaderService leaderService) {
try {
return leaderService.getLeader().getId();
} catch (Exception e) {
return "<unknown>";
}
}
}
|
<!DOCTYPE html>
<html devsite>
<head>
<meta name="project_path" value="/web/tools/workbox/_project.yaml" />
<meta name="book_path" value="/web/tools/workbox/_book.yaml" />
<meta name="gtm_var" data-key="docType" data-value="reference">
<title>Source: <API key>/src/inject-manifest.js</title>
<link href="jsdoc.css" rel="stylesheet">
</head>
<body>
<div id="<API key>">
<div id="jsdoc-content">
<div id="<API key>">
<div id="jsdoc-banner" role="banner">
</div>
<div id="jsdoc-main" role="main">
<header class="page-header">
<h1>Source: <API key>/src/inject-manifest.js</h1>
</header>
<article>
const assert = require('assert');
const path = require('path');
const {getManifest} = require('workbox-build');
const <API key> = require('./lib/<API key>');
const getAssetHash = require('./lib/get-asset-hash');
const <API key> =
require('./lib/<API key>');
const getWorkboxSWImports = require('./lib/<API key>');
const readFileWrapper = require('./lib/read-file-wrapper');
const sanitizeConfig = require('./lib/sanitize-config');
const stringifyManifest = require('./lib/stringify-manifest');
class InjectManifest {
/**
* Creates an instance of InjectManifest.
*
* @param {Object} [config] See the
* [configuration guide](/web/tools/workbox/modules/<API key>#configuration)
* for all supported options and defaults.
*/
constructor(config = {}) {
assert(typeof config.swSrc === 'string', `swSrc must be set to the path ` +
`to an existing service worker file.`);
this.config = Object.assign({}, {
chunks: [],
exclude: [
// Exclude source maps.
/\.map$/,
// Exclude anything starting with manifest and ending .js or .json.
/^manifest.*\.js(?:on)?$/,
],
excludeChunks: [],
importScripts: [],
importWorkboxFrom: 'cdn',
swDest: path.basename(config.swSrc),
}, config);
}
/**
* @param {Object} compilation The webpack compilation.
* @param {Function} readFile The function to use when reading files,
* derived from compiler.inputFileSystem.
* @private
*/
async handleEmit(compilation, readFile) {
if (this.config.importWorkboxFrom === 'local') {
throw new Error(`importWorkboxFrom can not be set to 'local' when using` +
` InjectManifest. Please use 'cdn' or a chunk name instead.`);
}
const workboxSWImports = await getWorkboxSWImports(
compilation, this.config);
let entries = <API key>(compilation, this.config);
const sanitizedConfig = sanitizeConfig.forGetManifest(this.config);
// If there are any "extra" config options remaining after we remove the
// ones that are used natively by the plugin, then assume that they should
// be passed on to workbox-build.getManifest() to generate extra entries.
if (Object.keys(sanitizedConfig).length > 0) {
// If globPatterns isn't explicitly set, then default to [], instead of
// the workbox-build.getManifest() default.
sanitizedConfig.globPatterns = sanitizedConfig.globPatterns || [];
const {manifestEntries} = await getManifest(sanitizedConfig);
entries = entries.concat(manifestEntries);
}
const manifestString = stringifyManifest(entries);
const manifestAsset = <API key>(manifestString);
const manifestHash = getAssetHash(manifestAsset);
const manifestFilename = `precache-manifest.${manifestHash}.js`;
compilation.assets[manifestFilename] = manifestAsset;
this.config.importScripts.push(
(compilation.options.output.publicPath || '') + manifestFilename);
// workboxSWImports might be null if importWorkboxFrom is 'disabled'.
if (workboxSWImports) {
// workboxSWImport is an array, so use concat() rather than push().
this.config.importScripts = this.config.importScripts.concat(
workboxSWImports);
}
const originalSWString = await readFileWrapper(readFile, this.config.swSrc);
const importScriptsString = this.config.importScripts
.map(JSON.stringify)
.join(', ');
const <API key> = `importScripts(${importScriptsString});
${originalSWString}
`;
compilation.assets[this.config.swDest] =
<API key>(<API key>);
}
/**
* @param {Object} [compiler] default compiler object passed from webpack
*
* @private
*/
apply(compiler) {
compiler.plugin('emit', (compilation, callback) => {
this.handleEmit(compilation, compiler.inputFileSystem._readFile)
.then(callback)
.catch(callback);
});
}
}
module.exports = InjectManifest;
</code></pre>
</article>
</div>
</div>
<nav id="jsdoc-toc-nav" role="navigation"></nav>
</div>
</div>
</body>
</html>
|
package org.elasticsearch.action.get;
import com.bazaarvoice.elasticsearch.client.core.spi.RestExecutor;
import com.bazaarvoice.elasticsearch.client.core.spi.RestResponse;
import com.bazaarvoice.elasticsearch.client.core.util.UrlBuilder;
import org.elasticsearch.action.<API key>;
import org.elasticsearch.common.base.Function;
import org.elasticsearch.common.util.concurrent.Futures;
import org.elasticsearch.common.util.concurrent.ListenableFuture;
import static com.bazaarvoice.elasticsearch.client.core.util.StringFunctions.booleanToString;
import static com.bazaarvoice.elasticsearch.client.core.util.StringFunctions.<API key>;
import static com.bazaarvoice.elasticsearch.client.core.util.UrlBuilder.urlEncode;
import static com.bazaarvoice.elasticsearch.client.core.util.Validation.notNull;
import static org.elasticsearch.common.base.Optional.fromNullable;
/**
* The inverse of {@link org.elasticsearch.rest.action.get.RestGetAction}
*
* @param <ResponseType>
*/
public class GetRest<ResponseType> extends <API key><GetRequest, ResponseType> {
public GetRest(final String protocol, final String host, final int port, final RestExecutor executor, final Function<RestResponse, ResponseType> responseTransform) {
super(protocol, host, port, executor, responseTransform);
}
@Override public ListenableFuture<ResponseType> act(GetRequest request) {
UrlBuilder url = UrlBuilder.create()
.protocol(protocol).host(host).port(port)
.path(urlEncode(notNull(request.index())))
.seg(urlEncode(notNull(request.type())))
.seg(urlEncode(notNull(request.id())))
.paramIfPresent("refresh", fromNullable(request.refresh()).transform(booleanToString))
.paramIfPresent("routing", fromNullable(request.routing()))
// note parent(string) seems just to set the routing, so we don't need to provide it here
.paramIfPresent("preference", fromNullable(request.preference()))
.paramIfPresent("realtime", fromNullable(request.realtime()).transform(booleanToString))
.paramIfPresent("fields", fromNullable(request.fields()).transform(<API key>));
return Futures.transform(executor.get(url.url()), responseTransform);
}
}
|
package internalversion
import (
"github.com/openshift/origin/pkg/template/api"
"k8s.io/apimachinery/pkg/api/errors"
)
// <API key> allows custom methods to be added to
// TemplateLister.
type <API key> interface {
GetByUID(uid string) (*api.Template, error)
}
// <API key> allows custom methods to be added to
// <API key>.
type <API key> interface{}
func (s templateLister) GetByUID(uid string) (*api.Template, error) {
templates, err := s.indexer.ByIndex(api.TemplateUIDIndex, uid)
if err != nil {
return nil, err
}
if len(templates) == 0 {
return nil, errors.NewNotFound(api.Resource("template"), uid)
}
return templates[0].(*api.Template), nil
}
|
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift File.join(dir, "../lib")
# Maybe <API key> is in a directory next to puppetdb. If not, we
# don't fail any worse than we already would.
$LOAD_PATH.push File.join(dir, "../../../<API key>")
require 'rspec'
require '<API key>/puppet_spec_helper'
require 'tmpdir'
require 'fileutils'
require 'puppet'
require 'puppet/util/log'
require 'puppet/util/puppetdb/command'
RSpec.configure do |config|
config.before :each do
@logs = []
Puppet::Util::Log.level = :info
Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs))
def test_logs
@logs.map(&:message)
end
end
end
|
/* Mane selection div - the dragable rectangle */
#<API key>{
position:absolute;
overflow:hidden;
border:1px solid #222; /* Blue border */
z-index:5000000;
}
/* Transparent div inside the image selection div */
#<API key>{ /* This is the transparent div placed inside #<API key> */
filter:alpha(opacity=50);
opacity:0.5;
-moz-opacity:0.5;
background-color:#666; /* Blue background color */
position:absolute;
left:-5px;
top:-5px;
width:200%;
height:200%;
}
/* Div for the drag process - dragging images */
#<API key>{
position:absolute;
border:1px solid #222;
z-index:5000000;
overflow:hidden;
width:107px;
}
#<API key> #<API key>{
padding:0px;
z-index:5;
position:relative;
}
/* Div for the drag process - small boxes for each image. These divs are placed inside #<API key> */
#<API key> .<API key>{ /* Individual box for each image */
width:35px;
height:35px;
float:left;
background-repeat:no-repeat;
background-position:center center;
}
/* Div inside the div with id #<API key> - it could be transparent or not, that's your choice */
#<API key> .<API key>{
background-color:#666; /* Blue background color */
position:absolute;
left:-5px;
top:-5px;
width:200%;
height:200%;
z-index:4;
}
|
"""Support for Switchbot devices."""
from asyncio import Lock
import switchbot # pylint: disable=import-error
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_SENSOR_TYPE, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from .const import (
ATTR_BOT,
ATTR_CURTAIN,
BTLE_LOCK,
COMMON_OPTIONS,
CONF_RETRY_COUNT,
CONF_RETRY_TIMEOUT,
CONF_SCAN_TIMEOUT,
<API key>,
DATA_COORDINATOR,
DEFAULT_RETRY_COUNT,
<API key>,
<API key>,
<API key>,
DOMAIN,
)
from .coordinator import <API key>
PLATFORMS_BY_TYPE = {
ATTR_BOT: [Platform.SWITCH, Platform.SENSOR],
ATTR_CURTAIN: [Platform.COVER, Platform.BINARY_SENSOR, Platform.SENSOR],
}
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Switchbot from a config entry."""
hass.data.setdefault(DOMAIN, {})
if not entry.options:
options = {
<API key>: <API key>,
CONF_RETRY_COUNT: DEFAULT_RETRY_COUNT,
CONF_RETRY_TIMEOUT: <API key>,
CONF_SCAN_TIMEOUT: <API key>,
}
hass.config_entries.async_update_entry(entry, options=options)
# Use same coordinator instance for all entities.
# Uses BTLE advertisement data, all Switchbot devices in range is stored here.
if DATA_COORDINATOR not in hass.data[DOMAIN]:
# Check if asyncio.lock is stored in hass data.
# BTLE has issues with multiple connections,
# so we use a lock to ensure that only one API request is reaching it at a time:
if BTLE_LOCK not in hass.data[DOMAIN]:
hass.data[DOMAIN][BTLE_LOCK] = Lock()
if COMMON_OPTIONS not in hass.data[DOMAIN]:
hass.data[DOMAIN][COMMON_OPTIONS] = {**entry.options}
switchbot.<API key> = hass.data[DOMAIN][COMMON_OPTIONS][
CONF_RETRY_TIMEOUT
]
# Store api in coordinator.
coordinator = <API key>(
hass,
update_interval=hass.data[DOMAIN][COMMON_OPTIONS][
<API key>
],
api=switchbot,
retry_count=hass.data[DOMAIN][COMMON_OPTIONS][CONF_RETRY_COUNT],
scan_timeout=hass.data[DOMAIN][COMMON_OPTIONS][CONF_SCAN_TIMEOUT],
api_lock=hass.data[DOMAIN][BTLE_LOCK],
)
hass.data[DOMAIN][DATA_COORDINATOR] = coordinator
else:
coordinator = hass.data[DOMAIN][DATA_COORDINATOR]
await coordinator.<API key>()
if not coordinator.last_update_success:
raise ConfigEntryNotReady
entry.async_on_unload(entry.add_update_listener(<API key>))
hass.data[DOMAIN][entry.entry_id] = {DATA_COORDINATOR: coordinator}
sensor_type = entry.data[CONF_SENSOR_TYPE]
hass.config_entries.<API key>(entry, PLATFORMS_BY_TYPE[sensor_type])
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
sensor_type = entry.data[CONF_SENSOR_TYPE]
unload_ok = await hass.config_entries.<API key>(
entry, PLATFORMS_BY_TYPE[sensor_type]
)
if unload_ok:
hass.data[DOMAIN].pop(entry.entry_id)
if len(hass.config_entries.async_entries(DOMAIN)) == 0:
hass.data.pop(DOMAIN)
return unload_ok
async def <API key>(hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Handle options update."""
# Update entity options stored in hass.
if {**entry.options} != hass.data[DOMAIN][COMMON_OPTIONS]:
hass.data[DOMAIN][COMMON_OPTIONS] = {**entry.options}
hass.data[DOMAIN].pop(DATA_COORDINATOR)
await hass.config_entries.async_reload(entry.entry_id)
|
package org.zstack.sdk.zwatch.thirdparty.api;
public class <API key> {
public java.util.List inventories;
public void setInventories(java.util.List inventories) {
this.inventories = inventories;
}
public java.util.List getInventories() {
return this.inventories;
}
public java.lang.Long total;
public void setTotal(java.lang.Long total) {
this.total = total;
}
public java.lang.Long getTotal() {
return this.total;
}
}
|
#include <aws/kinesisanalytics/model/LambdaOutputUpdate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace KinesisAnalytics
{
namespace Model
{
LambdaOutputUpdate::LambdaOutputUpdate() :
<API key>(false),
<API key>(false)
{
}
LambdaOutputUpdate::LambdaOutputUpdate(JsonView jsonValue) :
<API key>(false),
<API key>(false)
{
*this = jsonValue;
}
LambdaOutputUpdate& LambdaOutputUpdate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceARNUpdate"))
{
m_resourceARNUpdate = jsonValue.GetString("ResourceARNUpdate");
<API key> = true;
}
if(jsonValue.ValueExists("RoleARNUpdate"))
{
m_roleARNUpdate = jsonValue.GetString("RoleARNUpdate");
<API key> = true;
}
return *this;
}
JsonValue LambdaOutputUpdate::Jsonize() const
{
JsonValue payload;
if(<API key>)
{
payload.WithString("ResourceARNUpdate", m_resourceARNUpdate);
}
if(<API key>)
{
payload.WithString("RoleARNUpdate", m_roleARNUpdate);
}
return payload;
}
} // namespace Model
} // namespace KinesisAnalytics
} // namespace Aws
|
package com.orientechnologies.orient.core.index;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.orientechnologies.common.collection.OCompositeKey;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
@Test
@SuppressWarnings("unchecked")
public class <API key> {
private <API key> <API key>;
@BeforeMethod
public void beforeMethod() {
<API key> = new <API key>(OType.INTEGER, OType.STRING);
}
@Test
public void testGetFields() {
Assert.assertTrue(<API key>.getFields().isEmpty());
}
@Test
public void testGetClassName() {
Assert.assertNull(<API key>.getClassName());
}
@Test
public void <API key>() {
final <API key> keyIndexDefinition = new <API key>(OType.INTEGER);
final Object result = keyIndexDefinition.createValue("2");
Assert.assertEquals(result, 2);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue(Arrays.asList("2", "3"));
final OCompositeKey compositeKey = new OCompositeKey(Arrays.asList(2, "3"));
Assert.assertEquals(result, compositeKey);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue(Arrays.asList((Object) null));
Assert.assertNull(result);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue(Arrays.asList("2", null));
Assert.assertNull(result);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue(Arrays.asList("a", "3"));
Assert.assertNull(result);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue("2", "3");
final OCompositeKey compositeKey = new OCompositeKey(Arrays.asList(2, "3"));
Assert.assertEquals(result, compositeKey);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue((List<?>) null);
Assert.assertNull(result);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue((Object) null);
Assert.assertNull(result);
}
@Test
public void <API key>() {
final Object result = <API key>.createValue(Collections.<Object> emptyList());
Assert.assertNull(result);
}
@Test
public void testNullParamItem() {
final Object result = <API key>.createValue("2", null);
Assert.assertNull(result);
}
@Test
public void testWrongParamType() {
final Object result = <API key>.createValue("a", "3");
Assert.assertNull(result);
}
@Test
public void testParamCount() {
Assert.assertEquals(<API key>.getParamCount(), 2);
}
@Test
public void <API key>() {
final <API key> keyIndexDefinition = new <API key>(OType.INTEGER);
Assert.assertEquals(keyIndexDefinition.getParamCount(), 1);
}
@Test
public void testGetKeyTypes() {
Assert.assertEquals(<API key>.getTypes(), new OType[] { OType.INTEGER, OType.STRING });
}
@Test
public void <API key>() {
final <API key> keyIndexDefinition = new <API key>(OType.BOOLEAN);
Assert.assertEquals(keyIndexDefinition.getTypes(), new OType[] { OType.BOOLEAN });
}
@Test
public void testReload() {
final ODatabaseDocumentTx databaseDocumentTx = new ODatabaseDocumentTx("memory:<API key>");
databaseDocumentTx.create();
final ODocument storeDocument = <API key>.toStream();
storeDocument.save();
final ODocument loadDocument = databaseDocumentTx.load(storeDocument.getIdentity());
final <API key> <API key> = new <API key>();
<API key>.fromStream(loadDocument);
databaseDocumentTx.drop();
Assert.assertEquals(<API key>, <API key>);
}
@Test(expectedExceptions = OIndexException.class)
public void <API key>() {
<API key>.<API key>(new ODocument());
}
}
|
"""
Drone.io badge generator.
Currently set up to work on Mac.
Requires Pillow.
"""
import os
from PIL import Image, ImageDraw, ImageFont
SIZE = (95, 18)
def hex_colour(hex):
if hex[0] == '
hex = hex[1:]
return (
int(hex[:2], 16),
int(hex[2:4], 16),
int(hex[4:6], 16),
)
BACKGROUND = hex_colour('#4A4A4A')
SUCCESS = hex_colour('#94B944')
WARNING = hex_colour('#E4A83C')
ERROR = hex_colour('#B10610')
SUCCESS_CUTOFF = 85
WARNING_CUTOFF = 45
FONT = ImageFont.truetype(size=10, filename="/Library/Fonts/Arial.ttf")
FONT_SHADOW = hex_colour('#525252')
PADDING_TOP = 3
def build_image(percentage, colour):
image = Image.new('RGB', SIZE, color=BACKGROUND)
drawing = ImageDraw.Draw(image)
drawing.rectangle([(55, 0), SIZE], colour, colour)
drawing.text((8, PADDING_TOP+1), 'coverage', font=FONT, fill=FONT_SHADOW)
drawing.text((7, PADDING_TOP), 'coverage', font=FONT)
drawing.text((63, PADDING_TOP+1), '%s%%' % percentage, font=FONT, fill=FONT_SHADOW)
drawing.text((62, PADDING_TOP), '%s%%' % percentage, font=FONT)
return image
os.chdir('_build')
for i in range(101):
filename = '%i.png' % i
file = open(filename, 'wb')
if i < WARNING_CUTOFF:
build_image(i, ERROR).save(file)
elif i < SUCCESS_CUTOFF:
build_image(i, WARNING).save(file)
else:
build_image(i, SUCCESS).save(file)
|
// scalac: -Ystop-after:parser
object foo {
val n =
<a xmlns=""/>
n.namespace == null
}
|
<?php
namespace PHPExcel\Reader\Excel5;
class RC4
{
// Context
protected $s = array();
protected $i = 0;
protected $j = 0;
/**
* RC4 stream decryption/encryption constrcutor
*
* @param string $key Encryption key/passphrase
*/
public function __construct($key)
{
$len = strlen($key);
for ($this->i = 0; $this->i < 256; $this->i++) {
$this->s[$this->i] = $this->i;
}
$this->j = 0;
for ($this->i = 0; $this->i < 256; $this->i++) {
$this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256;
$t = $this->s[$this->i];
$this->s[$this->i] = $this->s[$this->j];
$this->s[$this->j] = $t;
}
$this->i = $this->j = 0;
}
/**
* Symmetric decryption/encryption function
*
* @param string $data Data to encrypt/decrypt
*
* @return string
*/
public function RC4($data)
{
$len = strlen($data);
for ($c = 0; $c < $len; $c++) {
$this->i = ($this->i + 1) % 256;
$this->j = ($this->j + $this->s[$this->i]) % 256;
$t = $this->s[$this->i];
$this->s[$this->i] = $this->s[$this->j];
$this->s[$this->j] = $t;
$t = ($this->s[$this->i] + $this->s[$this->j]) % 256;
$data[$c] = chr(ord($data[$c]) ^ $this->s[$t]);
}
return $data;
}
}
|
package gw.plugin.ij.intentions;
import com.intellij.codeInsight.CodeInsightUtilBase;
import com.intellij.codeInspection.<API key>;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiWhiteSpace;
import com.intellij.psi.util.PsiMatcherImpl;
import gw.internal.gosu.parser.Expression;
import gw.internal.gosu.parser.expressions.NumericLiteral;
import gw.lang.parser.IStatement;
import gw.lang.parser.statements.<API key>;
import gw.lang.parser.statements.IStatementList;
import gw.lang.parser.statements.IWhileStatement;
import gw.plugin.ij.lang.psi.api.statements.IGosuVariable;
import gw.plugin.ij.lang.psi.impl.statements.<API key>;
import gw.plugin.ij.lang.psi.impl.statements.<API key>;
import gw.plugin.ij.lang.psi.util.GosuPsiParseUtil;
import gw.plugin.ij.util.GosuBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import static com.intellij.psi.util.PsiMatchers.hasClass;
public class WhileToForFix extends <API key> {
String ident;
Expression rhs;
private IGosuVariable <API key>;
private <API key> increment;
public WhileToForFix(PsiElement whileStmt, String ident, Expression rhs, IGosuVariable <API key>, <API key> increment) {
super(whileStmt);
this.ident = ident;
this.rhs = rhs;
this.<API key> = <API key>;
this.increment = increment;
}
@Override
public void invoke(@NotNull Project project, @NotNull PsiFile file, @Nullable("is null when called from inspection") Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {
if (!CodeInsightUtilBase.prepareFileForWrite(startElement.getContainingFile())) {
return;
}
IWhileStatement parsedElement = ((<API key>) startElement).getParsedElement();
if (parsedElement == null) {
return;
}
IStatement statement = parsedElement.getStatement();
IStatement[] statements = ((IStatementList) statement).getStatements();
StringBuilder forStmt = new StringBuilder();
forStmt.append("for (");
forStmt.append(ident);
forStmt.append(" in 0..");
if(rhs instanceof NumericLiteral) {
Object res = rhs.evaluate();
if(res instanceof Integer) {
forStmt.append(((Integer)res)-1);
}
} else {
forStmt.append("|" + rhs);
}
forStmt.append(") {\n");
String indent = getIndet(parsedElement, statements);
for (IStatement statement1 : statements) {
if (statement1 != increment) {
forStmt.append(indent);
forStmt.append(statement1.getLocation().getTextFromTokens());
forStmt.append("\n");
}
}
forStmt.append("}");
PsiElement stub = GosuPsiParseUtil.parseProgramm(forStmt.toString(), startElement, file.getManager(), null);
PsiElement newForStmt = new PsiMatcherImpl(stub)
.descendant(hasClass(<API key>.class))
.getElement();
if (newForStmt != null) {
<API key>.delete();
startElement.replace(newForStmt);
}
}
private String getIndet(IWhileStatement parsedElement, IStatement[] statements) {
int whileColum = parsedElement.getLocation().getColumn();
int column = statements[1].getLocation().getColumn() - whileColum;
if(column < 0) {
return " ";
}
StringBuilder out = new StringBuilder();
for(int i = 0; i <= column; i++) {
out.append(" ");
}
return out.toString();
}
private void removeVarDecl(PsiElement whileStmt, String ident) {
PsiElement prev = whileStmt.getPrevSibling();
while (prev instanceof PsiWhiteSpace) {
prev = prev.getPrevSibling();
}
if (prev instanceof IGosuVariable && ((IGosuVariable) prev).getName().equals(ident)) {
prev.delete();
}
}
@Override
public boolean isAvailable(@NotNull Project project,
@NotNull PsiFile file,
@NotNull PsiElement startElement,
@NotNull PsiElement endElement) {
return startElement instanceof <API key>;
}
@NotNull
@Override
public String getText() {
return GosuBundle.message("inspection.while.to.for");
}
@NotNull
@Override
public String getFamilyName() {
return GosuBundle.message("inspection.group.name.statement.issues");
}
}
|
#pragma once
/* Anything up to INFO is compiled in by default; syslog can be used
* to filter them out. DEBUG can be quite spammy and isn't enabled by
* default. */
#define <API key> 6
#ifndef L_LEVEL
#define L_LEVEL <API key>
#endif /* !L_LEVEL */
#ifndef L_PREFIX
#define L_PREFIX ""
#endif /* !L_PREFIX */
#ifdef __APPLE__
/* Haha. Got to love advanced IPv6 socket API being disabled by
* default. */
#define <API key>
#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
#define <API key> IPV6_LEAVE_GROUP
/* LIST_HEAD macro in sys/queue.h, argh.. */
#include <sys/queue.h>
#ifdef LIST_HEAD
#undef LIST_HEAD
#endif /* LIST_HEAD */
#endif /* __APPLE__ */
#include <stddef.h>
#include <stdint.h>
#include <time.h>
#include <syslog.h>
#include <sys/types.h>
#include <libubox/utils.h>
#include <inttypes.h>
#define STR_EXPAND(tok) #tok
#define STR(tok) STR_EXPAND(tok)
#define PRItime PRId64
#include "hnetd_time.h"
extern int log_level;
// Logging macros
extern void (*hnetd_log)(int priority, const char *format, ...);
#define L_INTERNAL(level, ...) \
do { \
if (hnetd_log && log_level >= level) \
hnetd_log(level, L_PREFIX __VA_ARGS__); \
} while(0)
#if L_LEVEL >= LOG_ERR
#define L_ERR(...) L_INTERNAL(LOG_ERR, __VA_ARGS__)
#else
#define L_ERR(...) do {} while(0)
#endif
#if L_LEVEL >= LOG_WARNING
#define L_WARN(...) L_INTERNAL(LOG_WARNING, __VA_ARGS__)
#else
#define L_WARN(...) do {} while(0)
#endif
#if L_LEVEL >= LOG_NOTICE
#define L_NOTICE(...) L_INTERNAL(LOG_NOTICE, __VA_ARGS__)
#else
#define L_NOTICE(...) do {} while(0)
#endif
#if L_LEVEL >= LOG_INFO
#define L_INFO(...) L_INTERNAL(LOG_INFO, __VA_ARGS__)
#else
#define L_INFO(...) do {} while(0)
#endif
#if L_LEVEL >= LOG_DEBUG
#define L_DEBUG(...) L_INTERNAL(LOG_DEBUG, __VA_ARGS__)
#else
#define L_DEBUG(...) do {} while(0)
#endif
// Some C99 compatibility
#ifndef typeof
#define typeof __typeof
#endif
#ifndef container_of
#define container_of(ptr, type, member) ( \
(type *)( (char *)ptr - offsetof(type,member) ))
#endif
#ifndef __unused
#define __unused __attribute__((unused))
#endif
|
#ifndef V8_DATE_H_
#define V8_DATE_H_
#include "src/base/timezone-cache.h"
#include "src/globals.h"
#include "src/objects/smi.h"
namespace v8 {
namespace internal {
class DateCache {
public:
static const int kMsPerMin = 60 * 1000;
static const int kSecPerDay = 24 * 60 * 60;
static const int64_t kMsPerDay = kSecPerDay * 1000;
static const int64_t kMsPerMonth = kMsPerDay * 30;
// The largest time that can be passed to OS date-time library functions.
static const int kMaxEpochTimeInSec = kMaxInt;
static const int64_t kMaxEpochTimeInMs =
static_cast<int64_t>(kMaxInt) * 1000;
// The largest time that can be stored in JSDate.
static const int64_t kMaxTimeInMs =
static_cast<int64_t>(864000000) * 10000000;
// Conservative upper bound on time that can be stored in JSDate
// before UTC conversion.
static const int64_t <API key> = kMaxTimeInMs + kMsPerMonth;
// Sentinel that denotes an invalid local offset.
static const int <API key> = kMaxInt;
// Sentinel that denotes an invalid cache stamp.
// It is an invariant of DateCache that cache stamp is non-negative.
static const int kInvalidStamp = -1;
DateCache();
virtual ~DateCache() {
delete tz_cache_;
tz_cache_ = nullptr;
}
// Clears cached timezone information and increments the cache stamp.
void ResetDateCache(
base::TimezoneCache::TimeZoneDetection time_zone_detection);
// Computes floor(time_ms / kMsPerDay).
static int DaysFromTime(int64_t time_ms) {
if (time_ms < 0) time_ms -= (kMsPerDay - 1);
return static_cast<int>(time_ms / kMsPerDay);
}
// Computes modulo(time_ms, kMsPerDay) given that
// days = floor(time_ms / kMsPerDay).
static int TimeInDay(int64_t time_ms, int days) {
return static_cast<int>(time_ms - days * kMsPerDay);
}
// ECMA 262 - ES#sec-timeclip TimeClip (time)
static double TimeClip(double time);
// Given the number of days since the epoch, computes the weekday.
// ECMA 262 - 15.9.1.6.
int Weekday(int days) {
int result = (days + 4) % 7;
return result >= 0 ? result : result + 7;
}
bool IsLeap(int year) {
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
}
// ECMA 262 - ES#<API key>
int LocalOffsetInMs(int64_t time, bool is_utc) {
return <API key>(time, is_utc);
}
const char* LocalTimezone(int64_t time_ms) {
if (time_ms < 0 || time_ms > kMaxEpochTimeInMs) {
time_ms = EquivalentTime(time_ms);
}
bool is_dst = <API key>(time_ms) != 0;
const char** name = is_dst ? &dst_tz_name_ : &tz_name_;
if (*name == nullptr) {
*name = tz_cache_->LocalTimezone(static_cast<double>(time_ms));
}
return *name;
}
// ECMA 262 - 15.9.5.26
int TimezoneOffset(int64_t time_ms) {
int64_t local_ms = ToLocal(time_ms);
return static_cast<int>((time_ms - local_ms) / kMsPerMin);
}
// ECMA 262 - ES#sec-localtime-t
// LocalTime(t) = t + LocalTZA(t, true)
int64_t ToLocal(int64_t time_ms) {
return time_ms + LocalOffsetInMs(time_ms, true);
}
// ECMA 262 - ES#sec-utc-t
// UTC(t) = t - LocalTZA(t, false)
int64_t ToUTC(int64_t time_ms) {
return time_ms - LocalOffsetInMs(time_ms, false);
}
// Computes a time equivalent to the given time according
// to ECMA 262 - 15.9.1.9.
// The issue here is that some library calls don't work right for dates
// that cannot be represented using a non-negative signed 32 bit integer
// (measured in whole seconds based on the 1970 epoch).
// We solve this by mapping the time to a year with same leap-year-ness
// and same starting day for the year. The ECMAscript specification says
// we must do this, but for compatibility with other browsers, we use
// the actual year if it is in the range 1970..2037
int64_t EquivalentTime(int64_t time_ms) {
int days = DaysFromTime(time_ms);
int time_within_day_ms = static_cast<int>(time_ms - days * kMsPerDay);
int year, month, day;
<API key>(days, &year, &month, &day);
int new_days = DaysFromYearMonth(EquivalentYear(year), month) + day - 1;
return static_cast<int64_t>(new_days) * kMsPerDay + time_within_day_ms;
}
// Returns an equivalent year in the range [2008-2035] matching
// - leap year,
// - week day of first day.
// ECMA 262 - 15.9.1.9.
int EquivalentYear(int year) {
int week_day = Weekday(DaysFromYearMonth(year, 0));
int recent_year = (IsLeap(year) ? 1956 : 1967) + (week_day * 12) % 28;
// Find the year in the range 2008..2037 that is equivalent mod 28.
// Add 3*28 to give a positive argument to the modulus operator.
return 2008 + (recent_year + 3 * 28 - 2008) % 28;
}
// Given the number of days since the epoch, computes
// the corresponding year, month, and day.
void <API key>(int days, int* year, int* month, int* day);
// Computes the number of days since the epoch for
// the first day of the given month in the given year.
int DaysFromYearMonth(int year, int month);
// Breaks down the time value.
void BreakDownTime(int64_t time_ms, int* year, int* month, int* day,
int* weekday, int* hour, int* min, int* sec, int* ms);
// Cache stamp is used for invalidating caches in JSDate.
// We increment the stamp each time when the timezone information changes.
// JSDate objects perform stamp check and invalidate their caches if
// their saved stamp is not equal to the current stamp.
Smi stamp() { return stamp_; }
void* stamp_address() { return &stamp_; }
// These functions are virtual so that we can override them when testing.
virtual int <API key>(int64_t time_sec) {
double time_ms = static_cast<double>(time_sec * 1000);
return static_cast<int>(tz_cache_-><API key>(time_ms));
}
virtual int <API key>(int64_t time_ms, bool is_utc);
private:
// The implementation relies on the fact that no time zones have
// more than one daylight savings offset change per 19 days.
// In Egypt in 2010 they decided to suspend DST during Ramadan. This
// led to a short interval where DST is in effect from September 10 to
// September 30.
static const int <API key> = 19 * kSecPerDay;
// Size of the Daylight Savings Time cache.
static const int kDSTSize = 32;
// Daylight Savings Time segment stores a segment of time where
// daylight savings offset does not change.
struct DST {
int start_sec;
int end_sec;
int offset_ms;
int last_used;
};
// Computes the daylight savings offset for the given time.
// ECMA 262 - 15.9.1.8
int <API key>(int64_t time_ms);
// Sets the before_ and the after_ segments from the DST cache such that
// the before_ segment starts earlier than the given time and
// the after_ segment start later than the given time.
// Both segments might be invalid.
// The last_used counters of the before_ and after_ are updated.
void ProbeDST(int time_sec);
// Finds the least recently used segment from the DST cache that is not
// equal to the given 'skip' segment.
DST* <API key>(DST* skip);
// Extends the after_ segment with the given point or resets it
// if it starts later than the given time + <API key>.
inline void <API key>(int time_sec, int offset_ms);
// Makes the given segment invalid.
inline void ClearSegment(DST* segment);
bool InvalidSegment(DST* segment) {
return segment->start_sec > segment->end_sec;
}
Smi stamp_;
// Daylight Saving Time cache.
DST dst_[kDSTSize];
int dst_usage_counter_;
DST* before_;
DST* after_;
int local_offset_ms_;
// Year/Month/Day cache.
bool ymd_valid_;
int ymd_days_;
int ymd_year_;
int ymd_month_;
int ymd_day_;
// Timezone name cache
const char* tz_name_;
const char* dst_tz_name_;
base::TimezoneCache* tz_cache_;
};
} // namespace internal
} // namespace v8
#endif // V8_DATE_H_
|
// <API key>.h
// Socialize
#import <Socialize/Socialize.h>
@interface <API key> : <API key>
@end
|
var Mustache = function() {
var Renderer = function() {};
Renderer.prototype = {
otag: "{{",
ctag: "}}",
pragmas: {},
buffer: [],
pragmas_implemented: {
"IMPLICIT-ITERATOR": true,
"TRANSLATION-HINT": true
},
context: {},
render: function(template, context, partials, in_recursion) {
// reset buffer & set context
if(!in_recursion) {
this.context = context;
this.buffer = []; // TODO: make this non-lazy
}
// fail fast
if(!this.includes("", template)) {
if(in_recursion) {
return template;
} else {
this.send(template);
return;
}
}
// Branching or moving down the partial stack, save any translation mode info.
if (this.pragmas['TRANSLATION-HINT']) {
context['_mode'] = this.pragmas['TRANSLATION-HINT']['mode'];
}
template = this.render_pragmas(template);
template = this.render_i18n(template, context, partials);
var html = this.render_section(template, context, partials);
if (html === template) {
if (in_recursion) {
return this.render_tags(html, context, partials, true);
}
this.render_tags(html, context, partials, false);
} else {
if(in_recursion) {
return html;
} else {
var lines = html.split("\n");
for (var i = 0; i < lines.length; i++) {
this.send(lines[i]);
}
return;
}
}
},
/*
Sends parsed lines
*/
send: function(line) {
if(line != "") {
this.buffer.push(line);
}
},
/*
Looks for %PRAGMAS
*/
render_pragmas: function(template) {
// no pragmas
if(!this.includes("%", template)) {
return template;
}
var that = this;
var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" +
this.ctag);
return template.replace(regex, function(match, pragma, options) {
if(!that.pragmas_implemented[pragma]) {
throw({message:
"This implementation of mustache doesn't understand the '" +
pragma + "' pragma"});
}
that.pragmas[pragma] = {};
if(options) {
var opts = options.split("=");
that.pragmas[pragma][opts[0]] = opts[1];
}
return "";
// ignore unknown pragmas silently
});
},
/*
Tries to find a partial in the curent scope and render it
*/
render_partial: function(name, context, partials) {
name = this.trim(name);
if(!partials || partials[name] === undefined) {
throw({message: "unknown_partial '" + name + "'"});
}
if(typeof(context[name]) != "object") {
return this.render(partials[name], context, partials, true);
}
return this.render(partials[name], context[name], partials, true);
},
render_i18n: function(html, context, partials) {
if (html.indexOf(this.otag + "_i") == -1) {
return html;
}
var that = this;
var regex = new RegExp(this.otag + "\\_i" + this.ctag +
"\\s*([\\s\\S]+?)" + this.otag + "\\/i" + this.ctag, "mg");
// for each {{_i}}{{/i}} section do...
return html.replace(regex, function(match, content) {
var translation_mode = undefined;
if (that.pragmas && that.pragmas["TRANSLATION-HINT"] && that.pragmas["TRANSLATION-HINT"]['mode']) {
translation_mode = { _mode: that.pragmas["TRANSLATION-HINT"]['mode'] };
} else if (context['_mode']) {
translation_mode = { _mode: context['_mode'] };
}
return that.render(_(content, translation_mode), context, partials, true);
});
},
/*
Renders inverted (^) and normal (#) sections
*/
render_section: function(template, context, partials) {
if(!this.includes("#", template) && !this.includes("^", template)) {
return template;
}
var that = this;
// This regex matches _the first_ section ({{#foo}}{{/foo}}), and captures the remainder
var regex = new RegExp(
"^([\\s\\S]*?)" + // all the crap at the beginning that is not {{*}} ($1)
this.otag +
"(\\^|\\#)\\s*(.+)\\s*" + // #foo (# == $2, foo == $3)
this.ctag +
"\n*([\\s\\S]*?)" + // between the tag ($2). leading newlines are dropped
this.otag +
"\\/\\s*\\3\\s*" + // /foo (backreference to the opening tag).
this.ctag +
"\\s*([\\s\\S]*)$", // everything else in the string ($4). leading whitespace is dropped.
"g");
// for each {{#foo}}{{/foo}} section do...
return template.replace(regex, function(match, before, type, name, content, after) {
// before contains only tags, no sections
var renderedBefore = before ? that.render_tags(before, context, partials, true) : "",
// after may contain both sections and tags, so use full rendering function
renderedAfter = after ? that.render(after, context, partials, true) : "";
var value = that.find(name, context);
if(type == "^") { // inverted section
if(!value || that.is_array(value) && value.length === 0) {
// false or empty list, render it
return renderedBefore + that.render(content, context, partials, true) + renderedAfter;
} else {
return renderedBefore + "" + renderedAfter;
}
} else if(type == "#") { // normal section
if(that.is_array(value)) { // Enumerable, Let's loop!
return renderedBefore + that.map(value, function(row) {
return that.render(content, that.create_context(row), partials, true);
}).join("") + renderedAfter;
} else if(that.is_object(value)) { // Object, Use it as subcontext!
return renderedBefore + that.render(content, that.create_context(value),
partials, true) + renderedAfter;
} else if(typeof value === "function") {
// higher order section
return renderedBefore + value.call(context, content, function(text) {
return that.render(text, context, partials, true);
}) + renderedAfter;
} else if(value) { // boolean section
return renderedBefore + that.render(content, context, partials, true) + renderedAfter;
} else {
return renderedBefore + "" + renderedAfter;
}
}
});
},
/*
Replace {{foo}} and friends with values from our view
*/
render_tags: function(template, context, partials, in_recursion) {
// tit for tat
var that = this;
var new_regex = function() {
return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/
that.ctag + "+", "g");
};
var regex = new_regex();
var <API key> = function(match, operator, name) {
switch(operator) {
case "!": // ignore comments
return "";
case "=": // set new delimiters, rebuild the replace regexp
that.set_delimiters(name);
regex = new_regex();
return "";
case ">": // render partial
return that.render_partial(name, context, partials);
case "{": // the triple mustache is unescaped
return that.find(name, context);
default: // escape the value
return that.escape(that.find(name, context));
}
};
var lines = template.split("\n");
for(var i = 0; i < lines.length; i++) {
lines[i] = lines[i].replace(regex, <API key>, this);
if(!in_recursion) {
this.send(lines[i]);
}
}
if(in_recursion) {
return lines.join("\n");
}
},
set_delimiters: function(delimiters) {
var dels = delimiters.split(" ");
this.otag = this.escape_regex(dels[0]);
this.ctag = this.escape_regex(dels[1]);
},
escape_regex: function(text) {
// thank you Simon Willison
if(!arguments.callee.sRE) {
var specials = [
'/', '.', '*', '+', '?', '|',
'(', ')', '[', ']', '{', '}', '\\'
];
arguments.callee.sRE = new RegExp(
'(\\' + specials.join('|\\') + ')', 'g'
);
}
return text.replace(arguments.callee.sRE, '\\$1');
},
/*
find `name` in current `context`. That is find me a value
from the view object
*/
find: function(name, context) {
name = this.trim(name);
// Checks whether a value is thruthy or false or 0
function is_kinda_truthy(bool) {
return bool === false || bool === 0 || bool;
}
var value;
if(is_kinda_truthy(context[name])) {
value = context[name];
} else if(is_kinda_truthy(this.context[name])) {
value = this.context[name];
}
if(typeof value === "function") {
return value.apply(context);
}
if(value !== undefined) {
return value;
}
// silently ignore unkown variables
return "";
},
// Utility methods
/* includes tag */
includes: function(needle, haystack) {
return haystack.indexOf(this.otag + needle) != -1;
},
/*
Does away with nasty characters
*/
escape: function(s) {
s = String(s === null ? "" : s);
return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) {
switch(s) {
case "&": return "&";
case "\\": return "\\\\";
case '"': return '"';
case "'": return '&
case "<": return "<";
case ">": return ">";
default: return s;
}
});
},
// by @langalex, support for arrays of strings
create_context: function(_context) {
if(this.is_object(_context)) {
return _context;
} else {
var iterator = ".";
if(this.pragmas["IMPLICIT-ITERATOR"]) {
iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
}
var ctx = {};
ctx[iterator] = _context;
return ctx;
}
},
is_object: function(a) {
return a && typeof a == "object";
},
is_array: function(a) {
return Object.prototype.toString.call(a) === '[object Array]';
},
/*
Gets rid of leading and trailing whitespace
*/
trim: function(s) {
return s.replace(/^\s*|\s*$/g, "");
},
/*
Why, why, why? Because IE. Cry, cry cry.
*/
map: function(array, fn) {
if (typeof array.map == "function") {
return array.map(fn);
} else {
var r = [];
var l = array.length;
for(var i = 0; i < l; i++) {
r.push(fn(array[i]));
}
return r;
}
}
};
return({
name: "mustache.js",
version: "0.3.1-dev-twitter",
/*
Turns a template and view into HTML
*/
to_html: function(template, view, partials, send_fun) {
var renderer = new Renderer();
if(send_fun) {
renderer.send = send_fun;
}
renderer.render(template, view || {}, partials);
if(!send_fun) {
return renderer.buffer.join("\n");
}
}
});
}();
|
package alien4cloud.tosca.parser.mapping.generator;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.Map;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import org.yaml.snakeyaml.nodes.MappingNode;
import org.yaml.snakeyaml.nodes.Node;
import org.yaml.snakeyaml.nodes.NodeTuple;
import org.yaml.snakeyaml.nodes.ScalarNode;
import org.yaml.snakeyaml.nodes.SequenceNode;
import alien4cloud.tosca.parser.IChecker;
import alien4cloud.tosca.parser.INodeParser;
import alien4cloud.tosca.parser.<API key>;
import alien4cloud.tosca.parser.MappingTarget;
import alien4cloud.tosca.parser.ParserUtils;
import alien4cloud.tosca.parser.<API key>;
import alien4cloud.tosca.parser.ParsingError;
import alien4cloud.tosca.parser.ParsingException;
import alien4cloud.tosca.parser.ParsingResult;
import alien4cloud.tosca.parser.YamlSimpleParser;
import alien4cloud.tosca.parser.impl.ErrorCode;
import alien4cloud.tosca.parser.impl.base.<API key>;
import alien4cloud.tosca.parser.impl.base.ScalarParser;
import alien4cloud.tosca.parser.impl.base.TypeNodeParser;
import alien4cloud.tosca.parser.mapping.DefaultParser;
import com.google.common.collect.Maps;
/**
* Load type mapping definition from yaml and add it to the type mapping registry.
*/
@Slf4j
@Component
public class MappingGenerator extends DefaultParser<Map<String, INodeParser>> {
@Resource
private ApplicationContext applicationContext;
private Map<String, INodeParser> parsers = Maps.newHashMap();
private Map<String, IMappingBuilder> mappingBuilders = Maps.newHashMap();
private Map<String, IChecker> checkers = Maps.newHashMap();
@PostConstruct
public void initialize() {
Map<String, INodeParser> contextParsers = applicationContext.getBeansOfType(INodeParser.class);
// register parsers based on their class name.
for (INodeParser parser : contextParsers.values()) {
parsers.put(parser.getClass().getName(), parser);
}
Map<String, IMappingBuilder> <API key> = applicationContext.getBeansOfType(IMappingBuilder.class);
for (IMappingBuilder mappingBuilder : <API key>.values()) {
mappingBuilders.put(mappingBuilder.getKey(), mappingBuilder);
}
Map<String, IChecker> contextCheckers = applicationContext.getBeansOfType(IChecker.class);
for (IChecker checker : contextCheckers.values()) {
checkers.put(checker.getName(), checker);
}
}
public Map<String, INodeParser> process(String resourceLocation) throws ParsingException {
org.springframework.core.io.Resource resource = applicationContext.getResource(resourceLocation);
YamlSimpleParser<Map<String, INodeParser>> nodeParser = new YamlSimpleParser<>(this);
try {
ParsingResult<Map<String, INodeParser>> result = nodeParser.parseFile(resource.getURI().toString(), resource.getFilename(),
resource.getInputStream(), null);
if (result.getContext().getParsingErrors().isEmpty()) {
return result.getResult();
}
throw new ParsingException(resource.getFilename(), result.getContext().getParsingErrors());
} catch (IOException e) {
log.error("Failed to open stream", e);
throw new ParsingException(resource.getFilename(), new ParsingError(ErrorCode.MISSING_FILE, "Unable to load file.", null, e.getMessage(), null,
resourceLocation));
}
}
public Map<String, INodeParser> parse(Node node, <API key> context) {
Map<String, INodeParser> parsers = Maps.newHashMap();
if (node instanceof SequenceNode) {
SequenceNode types = (SequenceNode) node;
for (Node mapping : types.getValue()) {
Map.Entry<String, INodeParser<?>> entry = processTypeMapping(mapping, context);
if (entry != null) {
parsers.put(entry.getKey(), entry.getValue());
}
}
} else {
context.getParsingErrors().add(
new ParsingError(ErrorCode.SYNTAX_ERROR, "Mapping should be a sequence of type mappings", node.getStartMark(), "Actually was "
+ node.getClass().getSimpleName(), node.getEndMark(), ""));
}
return parsers;
}
private Map.Entry<String, INodeParser<?>> processTypeMapping(Node node, <API key> context) {
try {
return <API key>(node, context);
} catch (<API key> | <API key> | <API key> e) {
log.error("Failed to load class while parsing mapping", e);
context.getParsingErrors().add(
new ParsingError(ErrorCode.SYNTAX_ERROR, "Unable to load class", node.getStartMark(), e.getMessage(), node.getEndMark(), ""));
return null;
}
}
private Map.Entry<String, INodeParser<?>> <API key>(Node node, <API key> context) throws <API key>,
<API key>, <API key> {
if (node instanceof MappingNode) {
MappingNode mapping = (MappingNode) node;
String yamlType = null;
INodeParser<?> parser = null;
for (NodeTuple tuple : mapping.getValue()) {
if (yamlType == null) {
yamlType = ParserUtils.getScalar(tuple.getKeyNode(), context);
String type = ParserUtils.getScalar(tuple.getValueNode(), context);
if (type.startsWith("__")) {
parser = getWrapperParser(type, mapping, context);
return new AbstractMap.SimpleEntry<String, INodeParser<?>>(yamlType, parser);
}
parser = this.parsers.get(type);
if (parser != null) {
log.debug("Mapping yaml type <" + yamlType + "> using parser <" + type + ">");
return new AbstractMap.SimpleEntry<String, INodeParser<?>>(yamlType, parser);
}
parser = buildTypeNodeParser(yamlType, type);
// log.debug("Mapping yaml type <" + yamlType + "> to class <" + type + ">");
// Class<?> javaClass = Class.forName(type);
// parser = new TypeNodeParser<>(javaClass, yamlType);
} else {
// process a mapping
map(tuple, (TypeNodeParser) parser, context);
}
}
return new AbstractMap.SimpleEntry<String, INodeParser<?>>(yamlType, parser);
} else {
context.getParsingErrors().add(
new ParsingError(ErrorCode.SYNTAX_ERROR, "Unable to process type mapping.", node.getStartMark(),
"Mapping must be defined using a mapping node.", node.getEndMark(), ""));
}
return null;
}
private TypeNodeParser<?> buildTypeNodeParser(String yamlType, String javaType) throws <API key> {
String realJavaType = javaType;
IChecker checker = null;
if (javaType.contains("|")) {
realJavaType = javaType.substring(0, javaType.indexOf("|"));
String checkerName = javaType.substring(javaType.indexOf("|") + 1);
log.debug(String.format("After parsing <%s>, realJavaType is <%s>, checkerName is <%s>", javaType, realJavaType, checkerName));
checker = checkers.get(checkerName);
if (checker == null) {
log.warn(String.format("Can not find checker <%s>, using a standard TypeNodeParser", checkerName));
}
}
Class<?> javaClass = Class.forName(realJavaType);
if (checker == null) {
log.debug("Mapping yaml type <" + yamlType + "> to class <" + realJavaType + ">");
return new TypeNodeParser<>(javaClass, yamlType);
} else {
// TODO check that the type are compatible
log.debug("Mapping yaml type <" + yamlType + "> to class <" + realJavaType + "> using checker " + checker.toString());
return new <API key><>(javaClass, yamlType, checker);
}
}
private INodeParser<?> getWrapperParser(String wrapperKey, MappingNode mapping, <API key> context) {
IMappingBuilder builder = this.mappingBuilders.get(wrapperKey.substring(2));
return builder.buildMapping(mapping, context).getParser();
}
private void map(NodeTuple tuple, TypeNodeParser<?> parser, <API key> context) {
String key = ParserUtils.getScalar(tuple.getKeyNode(), context);
int <API key> = <API key>(key);
if (<API key> > -1) {
mapPositionMapping(<API key>, tuple.getValueNode(), parser, context);
} else {
MappingTarget mappingTarget = getMappingTarget(tuple.getValueNode(), context);
if (mappingTarget != null) {
parser.<API key>().put(key, mappingTarget);
}
}
}
private MappingTarget getMappingTarget(Node mappingNode, <API key> context) {
if (mappingNode instanceof ScalarNode) {
// create a scalar mapping
String value = ParserUtils.getScalar(mappingNode, context);
return new MappingTarget(value, parsers.get(ScalarParser.class.getName()));
} else if (mappingNode instanceof MappingNode) {
return mapMappingNode((MappingNode) mappingNode, context);
}
return null;
}
private int <API key>(String key) {
if (key.startsWith("__")) {
try {
int position = Integer.valueOf(key.substring(2));
return position;
} catch (<API key> e) {
// not a position mapping
return -1;
}
}
return -1;
}
private void mapPositionMapping(Integer index, Node positionMapping, TypeNodeParser<?> parser, <API key> context) {
if (positionMapping instanceof MappingNode) {
MappingNode mappingNode = (MappingNode) positionMapping;
String key = null;
MappingTarget valueMappingTarget = null;
for (NodeTuple tuple : mappingNode.getValue()) {
String tupleKey = ParserUtils.getScalar(tuple.getKeyNode(), context);
if (tupleKey.equals("key")) {
key = ParserUtils.getScalar(tuple.getValueNode(), context);
} else if (tupleKey.equals("value")) {
valueMappingTarget = getMappingTarget(tuple.getValueNode(), context);
} else {
context.getParsingErrors().add(
new ParsingError(ErrorCode.SYNTAX_ERROR, "Unknown key for position mapping.", tuple.getKeyNode().getStartMark(), tupleKey, tuple
.getKeyNode().getEndMark(), ""));
}
}
if (valueMappingTarget == null) {
return;
}
if (key == null) {
parser.<API key>().put(index, valueMappingTarget);
} else {
parser.<API key>().put(index, new <API key>(key, valueMappingTarget.getPath(), valueMappingTarget.getParser()));
}
} else {
context.getParsingErrors().add(
new ParsingError(ErrorCode.SYNTAX_ERROR, "Position mapping must be a mapping node with key and value fields.", positionMapping
.getStartMark(), "", positionMapping.getEndMark(), ""));
}
}
private MappingTarget mapMappingNode(MappingNode mappingNode, <API key> context) {
String key = ParserUtils.getScalar(mappingNode.getValue().get(0).getKeyNode(), context);
IMappingBuilder mappingBuilder = mappingBuilders.get(key);
if (mappingBuilder != null) {
log.debug("Mapping yaml key <" + key + "> using mapping builder " + mappingBuilder.getClass().getName());
return mappingBuilder.buildMapping(mappingNode, context);
}
context.getParsingErrors().add(
new ParsingError(ErrorCode.SYNTAX_ERROR, "No mapping target found for key", mappingNode.getValue().get(0).getKeyNode().getStartMark(), key,
mappingNode.getValue().get(0).getKeyNode().getEndMark(), ""));
return null;
}
}
|
id: io-kinesis-sink
title: Kinesis sink connector
sidebar_label: "Kinesis sink connector"
original_id: io-kinesis-sink
The Kinesis sink connector pulls data from Pulsar and persists data into Amazon Kinesis.
## Configuration
The configuration of the Kinesis sink connector has the following property.
Property
| Name | Type|Required | Default | Description
|
`messageFormat`|MessageFormat|true|ONLY_RAW_PAYLOAD|Message format in which Kinesis sink converts Pulsar messages and publishes to Kinesis streams.<br /><br />Below are the available options:<br /><br /><li>`ONLY_RAW_PAYLOAD`: Kinesis sink directly publishes Pulsar message payload as a message into the configured Kinesis stream. <br /><br /></li><li>`<API key>`: Kinesis sink creates a JSON payload with Pulsar message payload, properties and encryptionCtx, and publishes JSON payload into the configured Kinesis stream.<br /><br /></li><li>`FULL_MESSAGE_IN_FB`: Kinesis sink creates a flatbuffer serialized payload with Pulsar message payload, properties and encryptionCtx, and publishes flatbuffer payload into the configured Kinesis stream.</li>
`retainOrdering`|boolean|false|false|Whether Pulsar connectors to retain ordering when moving messages from Pulsar to Kinesis or not.
`awsEndpoint`|String|false|" " (empty string)|The Kinesis end-point URL, which can be found at [here](https://docs.aws.amazon.com/general/latest/gr/rande.html).
`awsRegion`|String|false|" " (empty string)|The AWS region. <br /><br />**Example**<br /> us-west-1, us-west-2
`<API key>`|String|true|" " (empty string)|The Kinesis stream name.
`<API key>`|String|false|" " (empty string)|The fully-qualified class name of implementation of {@inject: github:<API key>:/pulsar-io/kinesis/src/main/java/org/apache/pulsar/io/kinesis/<API key>.java}. <br /><br />It is a factory class which creates an <API key> that is used by Kinesis sink. <br /><br />If it is empty, the Kinesis sink creates a default <API key> which accepts json-map of credentials in `<API key>`.
`<API key>`|String |false|" " (empty string)|The JSON parameter to initialize `<API key>`.
Built-in plugins
The following are built-in `<API key>` plugins:
* `org.apache.pulsar.io.kinesis.<API key>`
This plugin takes no configuration, it uses the default AWS provider chain.
For more information, see [AWS documentation](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-default).
* `org.apache.pulsar.io.kinesis.<API key>`
This plugin takes a configuration (via the `<API key>`) that describes a role to assume when running the KCL.
This configuration takes the form of a small json document like:
json
{"roleArn": "arn...", "roleSessionName": "name"}
Example
Before using the Kinesis sink connector, you need to create a configuration file through one of the following methods.
* JSON
json
{
"awsEndpoint": "some.endpoint.aws",
"awsRegion": "us-east-1",
"<API key>": "my-stream",
"<API key>": "{\"accessKey\":\"myKey\",\"secretKey\":\"my-Secret\"}",
"messageFormat": "ONLY_RAW_PAYLOAD",
"retainOrdering": "true"
}
* YAML
yaml
configs:
awsEndpoint: "some.endpoint.aws"
awsRegion: "us-east-1"
<API key>: "my-stream"
<API key>: "{\"accessKey\":\"myKey\",\"secretKey\":\"my-Secret\"}"
messageFormat: "ONLY_RAW_PAYLOAD"
retainOrdering: "true"
|
'use strict';
import { module } from 'angular';
import _ from 'lodash';
import { AccountService, <API key> } from '@spinnaker/core';
import { <API key> } from '../../../kubernetes.settings';
export const <API key> = 'spinnaker.kubernetes.<API key>.service';
export const name = <API key>; // for backwards compatibility
module(<API key>, []).factory('<API key>', function() {
function <API key>(application, defaultAccount, command) {
return AccountService.listAccounts('kubernetes', 'v1').then(function(kubernetesAccounts) {
const <API key> = _.map(kubernetesAccounts, 'name');
let <API key> = null;
if (application.accounts.length) {
<API key> = _.find(application.accounts, function(applicationAccount) {
return <API key>.includes(applicationAccount);
});
} else if (<API key>.length) {
<API key> = <API key>[0];
}
const <API key> = defaultAccount && <API key>.includes(defaultAccount);
command.account = <API key>
? defaultAccount
: <API key>
? <API key>
: 'my-account-name';
});
}
function <API key>(application, command) {
command.<API key> = ['KubernetesContainer', 'KubernetesPod'];
}
function <API key>(application, defaults = {}) {
const defaultAccount = defaults.account || <API key>.defaults.account;
const command = {
account: defaultAccount,
application: application.name,
strategy: '',
targetSize: 1,
cloudProvider: 'kubernetes',
selectedProvider: 'kubernetes',
namespace: 'default',
containers: [],
initContainers: [],
volumeSources: [],
buildImageId: buildImageId,
groupByRegistry: groupByRegistry,
<API key>: 30,
viewState: {
mode: defaults.mode || 'create',
<API key>: true,
useAutoscaler: false,
},
capacity: {
min: 1,
desired: 1,
max: 1,
},
scalingPolicy: {
cpuUtilization: {
target: 40,
},
},
useSourceCapacity: false,
deployment: {
enabled: false,
minReadySeconds: 0,
deploymentStrategy: {
type: 'RollingUpdate',
rollingUpdate: {
maxUnavailable: 1,
maxSurge: 1,
},
},
},
};
<API key>(application, command);
<API key>(application, defaultAccount, command);
return command;
}
function <API key>(application, existing, mode) {
mode = mode || 'clone';
const command = _.cloneDeep(existing.deployDescription);
command.groupByRegistry = groupByRegistry;
command.cloudProvider = 'kubernetes';
command.selectedProvider = 'kubernetes';
command.account = existing.account;
command.buildImageId = buildImageId;
command.strategy = '';
command.containers.forEach(container => {
container.imageDescription.imageId = buildImageId(container.imageDescription);
});
command.initContainers.forEach(container => {
container.imageDescription.imageId = buildImageId(container.imageDescription);
});
command.viewState = {
mode: mode,
useAutoscaler: !!command.scalingPolicy,
};
if (!command.capacity) {
command.capacity = {
min: command.targetSize,
max: command.targetSize,
desired: command.targetSize,
};
}
if (!_.has(command, 'scalingPolicy.cpuUtilization.target')) {
command.scalingPolicy = { cpuUtilization: { target: 40 } };
}
<API key>(application, command);
return command;
}
function groupByRegistry(container) {
if (container.imageDescription) {
if (container.imageDescription.fromContext) {
return 'Find Image Result(s)';
} else if (container.imageDescription.fromTrigger) {
return 'Images from Trigger(s)';
} else if (container.imageDescription.fromArtifact) {
return 'Images from Artifact(s)';
} else {
return container.imageDescription.registry;
}
}
}
function buildImageId(image) {
if (image.fromFindImage) {
return `${image.cluster} ${image.pattern}`;
} else if (image.fromBake) {
return `${image.repository} (Baked during execution)`;
} else if (image.fromTrigger && !image.tag) {
return `${image.registry}/${image.repository} (Tag resolved at runtime)`;
} else if (image.fromArtifact) {
return `${image.name} (Artifact resolved at runtime)`;
} else {
if (image.registry) {
return `${image.registry}/${image.repository}:${image.tag}`;
} else {
return `${image.repository}:${image.tag}`;
}
}
}
function <API key>(containers, upstreamImages) {
const getConfig = image => {
if (image.fromContext) {
return {
match: other => other.fromContext && other.stageId === image.stageId,
fieldsToCopy: matchImage => {
const { cluster, pattern, repository } = matchImage;
return { cluster, pattern, repository };
},
};
} else if (image.fromTrigger) {
return {
match: other =>
other.fromTrigger &&
other.registry === image.registry &&
other.repository === image.repository &&
other.tag === image.tag,
fieldsToCopy: () => ({}),
};
} else if (image.fromArtifact) {
return {
match: other => other.fromArtifact && other.stageId === image.stageId,
fieldsToCopy: matchImage => {
const { name } = matchImage;
return { name };
},
};
} else {
return {
skipProcessing: true,
};
}
};
const result = [];
containers.forEach(container => {
const imageDescription = container.imageDescription;
const imageConfig = getConfig(imageDescription);
if (imageConfig.skipProcessing) {
result.push(container);
} else {
const matchingImage = upstreamImages.find(imageConfig.match);
if (matchingImage) {
Object.assign(imageDescription, imageConfig.fieldsToCopy(matchingImage));
result.push(container);
}
}
});
return result;
}
function findContextImages(current, all, visited = {}) {
// This actually indicates a loop in the stage dependencies.
if (visited[current.refId]) {
return [];
} else {
visited[current.refId] = true;
}
let result = [];
if (current.type === 'findImage') {
result.push({
fromContext: true,
fromFindImage: true,
cluster: current.cluster,
pattern: current.imageNamePattern,
repository: current.name,
stageId: current.refId,
});
} else if (current.type === 'bake') {
result.push({
fromContext: true,
fromBake: true,
repository: current.ami_name,
organization: current.organization,
stageId: current.refId,
});
}
current.<API key>.forEach(function(id) {
const next = all.find(stage => stage.refId === id);
if (next) {
result = result.concat(findContextImages(next, all, visited));
}
});
return result;
}
function findTriggerImages(triggers) {
return triggers
.filter(trigger => {
return trigger.type === 'docker';
})
.map(trigger => {
return {
fromTrigger: true,
repository: trigger.repository,
account: trigger.account,
organization: trigger.organization,
registry: trigger.registry,
tag: trigger.tag,
};
});
}
function findArtifactImages(currentStage, pipeline) {
const artifactImages = <API key>.<API key>(currentStage, pipeline)
.filter(artifact => artifact.matchArtifact.type === 'docker/image')
.map(artifact => ({
fromArtifact: true,
artifactId: artifact.id,
name: artifact.matchArtifact.name,
}));
return artifactImages;
}
function <API key>(current, pipeline) {
let contextImages = findContextImages(current, pipeline.stages) || [];
contextImages = contextImages.concat(findTriggerImages(pipeline.triggers));
contextImages = contextImages.concat(findArtifactImages(current, pipeline));
return {
strategy: '',
viewState: {
contextImages: contextImages,
mode: 'editPipeline',
submitButtonLabel: 'Done',
<API key>: true,
useAutoscaler: false,
},
};
}
function <API key>(app, originalCommand, current, pipeline) {
const command = _.cloneDeep(originalCommand);
let contextImages = findContextImages(current, pipeline.stages) || [];
contextImages = contextImages.concat(findTriggerImages(pipeline.triggers));
contextImages = contextImages.concat(findArtifactImages(current, pipeline));
command.containers = <API key>(command.containers, contextImages);
command.containers.map(container => {
container.imageDescription.imageId = buildImageId(container.imageDescription);
});
command.groupByRegistry = groupByRegistry;
command.buildImageId = buildImageId;
command.strategy = command.strategy || '';
command.selectedProvider = 'kubernetes';
command.viewState = {
mode: 'editPipeline',
contextImages: contextImages,
submitButtonLabel: 'Done',
useAutoscaler: !!command.scalingPolicy,
};
if (!_.has(command, 'scalingPolicy.cpuUtilization.target')) {
command.scalingPolicy = { cpuUtilization: { target: 40 } };
}
return command;
}
return {
<API key>: <API key>,
<API key>: <API key>,
<API key>: <API key>,
<API key>: <API key>,
groupByRegistry: groupByRegistry,
buildImageId: buildImageId,
};
});
|
import { getGlobal } from '../src/prebidGlobal.js';
import { createBid } from '../src/bidfactory.js';
import { STATUS } from '../src/constants.json';
import { ajax } from '../src/ajax.js';
import * as utils from '../src/utils.js';
import { config } from '../src/config.js';
import { getHook } from '../src/hook.js';
const <API key> = 'https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json?date=$$TODAY$$';
const <API key> = 4;
var bidResponseQueue = [];
var conversionCache = {};
var currencyRatesLoaded = false;
var <API key> = true;
var adServerCurrency = 'USD';
export var <API key> = false;
export var currencyRates = {};
var <API key> = {};
var defaultRates;
/**
* Configuration function for currency
* @param {string} [config.adServerCurrency = 'USD']
* ISO 4217 3-letter currency code that represents the target currency. (e.g. 'EUR'). If this value is present,
* the currency conversion feature is activated.
* @param {number} [config.<API key> = 1]
* A decimal value representing how mcuh to scale the price granularity calculations.
* @param {object} config.<API key>
* An optional argument to specify bid currencies for bid adapters. This option is provided for the transitional phase
* before every bid adapter will specify its own bid currency. If the adapter specifies a bid currency, this value is
* ignored for that bidder.
*
* example:
* {
* rubicon: 'USD'
* }
* @param {string} [config.conversionRateFile = 'URL pointing to conversion file']
* Optional path to a file containing currency conversion data. Prebid.org hosts a file that is used as the default,
* if not specified.
* @param {object} [config.rates]
* This optional argument allows you to specify the rates with a JSON object, subverting the need for a external
* config.conversionRateFile parameter. If this argument is specified, the conversion rate file will not be loaded.
*
* example:
* {
* 'GBP': { 'CNY': 8.8282, 'JPY': 141.7, 'USD': 1.2824 },
* 'USD': { 'CNY': 6.8842, 'GBP': 0.7798, 'JPY': 110.49 }
* }
* @param {object} [config.defaultRates]
* This optional currency rates definition follows the same format as config.rates, however it is only utilized if
* there is an error loading the config.conversionRateFile.
*/
export function setConfig(config) {
let url = <API key>;
if (typeof config.rates === 'object') {
currencyRates.conversions = config.rates;
currencyRatesLoaded = true;
<API key> = false; // don't call if rates are already specified
}
if (typeof config.defaultRates === 'object') {
defaultRates = config.defaultRates;
// set up the default rates to be used if the rate file doesn't get loaded in time
currencyRates.conversions = defaultRates;
currencyRatesLoaded = true;
}
if (typeof config.adServerCurrency === 'string') {
utils.logInfo('enabling currency support', arguments);
adServerCurrency = config.adServerCurrency;
if (config.conversionRateFile) {
utils.logInfo('currency using override conversionRateFile:', config.conversionRateFile);
url = config.conversionRateFile;
}
// see if the url contains a date macro
// this is a workaround to the fact that jsdelivr doesn't currently support setting a 24-hour HTTP cache header
// So this is an approach to let the browser cache a copy of the file each day
// We should remove the macro once the CDN support a day-level HTTP cache setting
const macroLocation = url.indexOf('$$TODAY$$');
if (macroLocation !== -1) {
// get the date to resolve the macro
const d = new Date();
let month = `${d.getMonth() + 1}`;
let day = `${d.getDate()}`;
if (month.length < 2) month = `0${month}`;
if (day.length < 2) day = `0${day}`;
const todaysDate = `${d.getFullYear()}${month}${day}`;
// replace $$TODAY$$ with todaysDate
url = `${url.substring(0, macroLocation)}${todaysDate}${url.substring(macroLocation + 9, url.length)}`;
}
initCurrency(url);
} else {
// currency support is disabled, setting defaults
utils.logInfo('disabling currency support');
resetCurrency();
}
if (typeof config.<API key> === 'object') {
<API key> = config.<API key>;
}
}
config.getConfig('currency', config => setConfig(config.currency));
function errorSettingsRates(msg) {
if (defaultRates) {
utils.logWarn(msg);
utils.logWarn('Currency failed loading rates, falling back to currency.defaultRates');
} else {
utils.logError(msg);
}
}
function initCurrency(url) {
conversionCache = {};
<API key> = true;
utils.logInfo('Installing addBidResponse decorator for currency module', arguments);
// Adding conversion function to prebid global for external module and on page use
getGlobal().convertCurrency = (cpm, fromCurrency, toCurrency) => parseFloat(cpm) * <API key>(fromCurrency, toCurrency);
getHook('addBidResponse').before(addBidResponseHook, 100);
// call for the file if we haven't already
if (<API key>) {
<API key> = false;
ajax(url,
{
success: function (response) {
try {
currencyRates = JSON.parse(response);
utils.logInfo('currencyRates set to ' + JSON.stringify(currencyRates));
currencyRatesLoaded = true;
<API key>();
} catch (e) {
errorSettingsRates('Failed to parse currencyRates response: ' + response);
}
},
error: errorSettingsRates
}
);
}
}
function resetCurrency() {
utils.logInfo('Uninstalling addBidResponse decorator for currency module', arguments);
getHook('addBidResponse').getHooks({hook: addBidResponseHook}).remove();
delete getGlobal().convertCurrency;
adServerCurrency = 'USD';
conversionCache = {};
<API key> = false;
currencyRatesLoaded = false;
<API key> = true;
currencyRates = {};
<API key> = {};
}
export function addBidResponseHook(fn, adUnitCode, bid) {
if (!bid) {
return fn.call(this, adUnitCode); // if no bid, call original and let it display warnings
}
let bidder = bid.bidderCode || bid.bidder;
if (<API key>[bidder]) {
let currencyDefault = <API key>[bidder];
if (bid.currency && currencyDefault !== bid.currency) {
utils.logWarn(`Currency default '${bidder}: ${currencyDefault}' ignored. adapter specified '${bid.currency}'`);
} else {
bid.currency = currencyDefault;
}
}
// default to USD if currency not set
if (!bid.currency) {
utils.logWarn('Currency not specified on bid. Defaulted to "USD"');
bid.currency = 'USD';
}
// used for analytics
bid.getCpmInNewCurrency = function(toCurrency) {
return (parseFloat(this.cpm) * <API key>(this.currency, toCurrency)).toFixed(3);
};
// execute immediately if the bid is already in the desired currency
if (bid.currency === adServerCurrency) {
return fn.call(this, adUnitCode, bid);
}
bidResponseQueue.push(wrapFunction(fn, this, [adUnitCode, bid]));
if (!<API key> || currencyRatesLoaded) {
<API key>();
}
}
function <API key>() {
while (bidResponseQueue.length > 0) {
(bidResponseQueue.shift())();
}
}
function wrapFunction(fn, context, params) {
return function() {
let bid = params[1];
if (bid !== undefined && 'currency' in bid && 'cpm' in bid) {
let fromCurrency = bid.currency;
try {
let conversion = <API key>(fromCurrency);
if (conversion !== 1) {
bid.cpm = (parseFloat(bid.cpm) * conversion).toFixed(4);
bid.currency = adServerCurrency;
}
} catch (e) {
utils.logWarn('Returning NO_BID, <API key> threw error: ', e);
params[1] = createBid(STATUS.NO_BID, {
bidder: bid.bidderCode || bid.bidder,
bidId: bid.requestId
});
}
}
return fn.apply(context, params);
};
}
function <API key>(fromCurrency, toCurrency = adServerCurrency) {
var conversionRate = null;
var rates;
let cacheKey = `${fromCurrency}->${toCurrency}`;
if (cacheKey in conversionCache) {
conversionRate = conversionCache[cacheKey];
utils.logMessage('Using conversionCache value ' + conversionRate + ' for ' + cacheKey);
} else if (<API key> === false) {
if (fromCurrency === 'USD') {
conversionRate = 1;
} else {
throw new Error('Prebid currency support has not been enabled and fromCurrency is not USD');
}
} else if (fromCurrency === toCurrency) {
conversionRate = 1;
} else {
if (fromCurrency in currencyRates.conversions) {
// using direct conversion rate from fromCurrency to toCurrency
rates = currencyRates.conversions[fromCurrency];
if (!(toCurrency in rates)) {
// bid should fail, currency is not supported
throw new Error('Specified adServerCurrency in config \'' + toCurrency + '\' not found in the currency rates file');
}
conversionRate = rates[toCurrency];
utils.logInfo('<API key> using direct ' + fromCurrency + ' to ' + toCurrency + ' conversionRate ' + conversionRate);
} else if (toCurrency in currencyRates.conversions) {
// using reciprocal of conversion rate from toCurrency to fromCurrency
rates = currencyRates.conversions[toCurrency];
if (!(fromCurrency in rates)) {
// bid should fail, currency is not supported
throw new Error('Specified fromCurrency \'' + fromCurrency + '\' not found in the currency rates file');
}
conversionRate = roundFloat(1 / rates[fromCurrency], <API key>);
utils.logInfo('<API key> using reciprocal ' + fromCurrency + ' to ' + toCurrency + ' conversionRate ' + conversionRate);
} else {
// first defined currency base used as intermediary
var anyBaseCurrency = Object.keys(currencyRates.conversions)[0];
if (!(fromCurrency in currencyRates.conversions[anyBaseCurrency])) {
// bid should fail, currency is not supported
throw new Error('Specified fromCurrency \'' + fromCurrency + '\' not found in the currency rates file');
}
var <API key> = 1 / currencyRates.conversions[anyBaseCurrency][fromCurrency];
if (!(toCurrency in currencyRates.conversions[anyBaseCurrency])) {
// bid should fail, currency is not supported
throw new Error('Specified adServerCurrency in config \'' + toCurrency + '\' not found in the currency rates file');
}
var <API key> = currencyRates.conversions[anyBaseCurrency][toCurrency];
conversionRate = roundFloat(<API key> * <API key>, <API key>);
utils.logInfo('<API key> using intermediate ' + fromCurrency + ' thru ' + anyBaseCurrency + ' to ' + toCurrency + ' conversionRate ' + conversionRate);
}
}
if (!(cacheKey in conversionCache)) {
utils.logMessage('Adding conversionCache value ' + conversionRate + ' for ' + cacheKey);
conversionCache[cacheKey] = conversionRate;
}
return conversionRate;
}
function roundFloat(num, dec) {
var d = 1;
for (let i = 0; i < dec; i++) {
d += '0';
}
return Math.round(num * d) / d;
}
|
#pragma once
#include <aws/codecommit/CodeCommit_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/codecommit/model/Conflict.h>
#include <aws/codecommit/model/<API key>.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class <API key>;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace CodeCommit
{
namespace Model
{
class AWS_CODECOMMIT_API <API key>
{
public:
<API key>();
<API key>(const Aws::<API key><Aws::Utils::Json::JsonValue>& result);
<API key>& operator=(const Aws::<API key><Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline const Aws::Vector<Conflict>& GetConflicts() const{ return m_conflicts; }
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline void SetConflicts(const Aws::Vector<Conflict>& value) { m_conflicts = value; }
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline void SetConflicts(Aws::Vector<Conflict>&& value) { m_conflicts = std::move(value); }
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline <API key>& WithConflicts(const Aws::Vector<Conflict>& value) { SetConflicts(value); return *this;}
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline <API key>& WithConflicts(Aws::Vector<Conflict>&& value) { SetConflicts(std::move(value)); return *this;}
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline <API key>& AddConflicts(const Conflict& value) { m_conflicts.push_back(value); return *this; }
/**
* <p>A list of conflicts for each file, including the conflict metadata and the
* hunks of the differences between the files.</p>
*/
inline <API key>& AddConflicts(Conflict&& value) { m_conflicts.push_back(std::move(value)); return *this; }
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline <API key>& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline <API key>& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>An enumeration token that can be used in a request to return the next batch
* of the results.</p>
*/
inline <API key>& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline const Aws::Vector<<API key>>& GetErrors() const{ return m_errors; }
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline void SetErrors(const Aws::Vector<<API key>>& value) { m_errors = value; }
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline void SetErrors(Aws::Vector<<API key>>&& value) { m_errors = std::move(value); }
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline <API key>& WithErrors(const Aws::Vector<<API key>>& value) { SetErrors(value); return *this;}
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline <API key>& WithErrors(Aws::Vector<<API key>>&& value) { SetErrors(std::move(value)); return *this;}
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline <API key>& AddErrors(const <API key>& value) { m_errors.push_back(value); return *this; }
/**
* <p>A list of any errors returned while describing the merge conflicts for each
* file.</p>
*/
inline <API key>& AddErrors(<API key>&& value) { m_errors.push_back(std::move(value)); return *this; }
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline const Aws::String& <API key>() const{ return <API key>; }
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline void <API key>(const Aws::String& value) { <API key> = value; }
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline void <API key>(Aws::String&& value) { <API key> = std::move(value); }
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline void <API key>(const char* value) { <API key>.assign(value); }
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline <API key>& <API key>(const Aws::String& value) { <API key>(value); return *this;}
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline <API key>& <API key>(Aws::String&& value) { <API key>(std::move(value)); return *this;}
/**
* <p>The commit ID of the destination commit specifier that was used in the merge
* evaluation.</p>
*/
inline <API key>& <API key>(const char* value) { <API key>(value); return *this;}
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline const Aws::String& GetSourceCommitId() const{ return m_sourceCommitId; }
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline void SetSourceCommitId(const Aws::String& value) { m_sourceCommitId = value; }
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline void SetSourceCommitId(Aws::String&& value) { m_sourceCommitId = std::move(value); }
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline void SetSourceCommitId(const char* value) { m_sourceCommitId.assign(value); }
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline <API key>& WithSourceCommitId(const Aws::String& value) { SetSourceCommitId(value); return *this;}
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline <API key>& WithSourceCommitId(Aws::String&& value) { SetSourceCommitId(std::move(value)); return *this;}
/**
* <p>The commit ID of the source commit specifier that was used in the merge
* evaluation.</p>
*/
inline <API key>& WithSourceCommitId(const char* value) { SetSourceCommitId(value); return *this;}
/**
* <p>The commit ID of the merge base.</p>
*/
inline const Aws::String& GetBaseCommitId() const{ return m_baseCommitId; }
/**
* <p>The commit ID of the merge base.</p>
*/
inline void SetBaseCommitId(const Aws::String& value) { m_baseCommitId = value; }
/**
* <p>The commit ID of the merge base.</p>
*/
inline void SetBaseCommitId(Aws::String&& value) { m_baseCommitId = std::move(value); }
/**
* <p>The commit ID of the merge base.</p>
*/
inline void SetBaseCommitId(const char* value) { m_baseCommitId.assign(value); }
/**
* <p>The commit ID of the merge base.</p>
*/
inline <API key>& WithBaseCommitId(const Aws::String& value) { SetBaseCommitId(value); return *this;}
/**
* <p>The commit ID of the merge base.</p>
*/
inline <API key>& WithBaseCommitId(Aws::String&& value) { SetBaseCommitId(std::move(value)); return *this;}
/**
* <p>The commit ID of the merge base.</p>
*/
inline <API key>& WithBaseCommitId(const char* value) { SetBaseCommitId(value); return *this;}
private:
Aws::Vector<Conflict> m_conflicts;
Aws::String m_nextToken;
Aws::Vector<<API key>> m_errors;
Aws::String <API key>;
Aws::String m_sourceCommitId;
Aws::String m_baseCommitId;
};
} // namespace Model
} // namespace CodeCommit
} // namespace Aws
|
import app from 'common/electron/app';
import path from 'path';
/**
* @return the theme's css path
*/
function getThemePath (name) {
return path.join(app.getAppPath(), 'themes', name + '.css');
}
/**
* @return the style's css path
*/
function getStylePath (name) {
return path.join(app.getAppPath(), 'styles', name + '.css');
}
/**
* @return the image's path
*/
function getImagePath (name) {
return path.join(app.getAppPath(), 'images', name);
}
/**
* Windows only.
* @return the directory where the app is ran from
*/
function <API key> () {
return path.join(path.dirname(app.getPath('exe')), 'data');
}
function <API key> () {
return path.join(path.dirname(app.getPath('exe')), '..', 'Update.exe');
}
export default {
getThemePath,
getStylePath,
getImagePath,
<API key>,
<API key>
};
|
{% extends "admin/change_form.html" %}
{% load i18n admin_static admin_modify admin_urls %}
{% block extrahead %}
{{ block.super }}
{# hackily include js required for django admin datepicker #}
<script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/jquery.init.js' %}"></script>
{{ form.media }}
{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
› <a href="{% url 'admin:<API key>' source_config.id %}">{{ source_config.label }}</a>
› Harvest
</div>
{% endblock %}
{% block content %}
<div id="content-main">
<form action="" method="POST">
{% csrf_token %}
{% if form.non_field_errors|length > 0 %}
<p class="errornote">
"Please correct the errors below."
</p>
{{ form.non_field_errors }}
{% endif %}
<fieldset class="module aligned">
{% for field in form %}
<div class="form-row">
{{ field.errors }}
{{ field.label_tag }}
{{ field }}
{% if field.field.help_text %}
<p class="help">
{{ field.field.help_text|safe }}
</p>
{% endif %}
</div>
{% endfor %}
</fieldset>
<div class="submit-row">
<input type="submit" class="default" value="Start Harvest!">
</div>
</form>
</div>
{% endblock %}
|
/* $NetBSD: disklabel.h,v 1.12 2013/05/27 07:37:20 msaitoh Exp $ */
#ifndef _ARM_DISKLABEL_H_
#define _ARM_DISKLABEL_H_
#ifndef LABELUSESMBR
#define LABELUSESMBR 1 /* use MBR partitionning */
#endif
#define LABELSECTOR 1 /* sector containing label */
#define LABELOFFSET 0 /* offset of label in sector */
#define MAXPARTITIONS 16 /* number of partitions */
#define OLDMAXPARTITIONS 8 /* old number of partitions */
#ifndef RAW_PART
#define RAW_PART 2 /* raw partition: XX?c */
#endif
/*
* We use the highest bit of the minor number for the partition number.
* This maintains backward compatibility with device nodes created before
* MAXPARTITIONS was increased.
*/
#define __ARM_MAXDISKS ((1 << 20) / MAXPARTITIONS)
#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __ARM_MAXDISKS)
#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
((minor(dev) / (__ARM_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
#define DISKMINOR(unit, part) \
(((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
((part) / OLDMAXPARTITIONS) * (__ARM_MAXDISKS * OLDMAXPARTITIONS))
#if <API key>
#include <nbinclude/sys/dkbad.h>
#include <nbinclude/sys/disklabel_acorn.h>
#include <nbinclude/sys/bootblock.h>
#else
#include <sys/dkbad.h>
#include <sys/disklabel_acorn.h>
#include <sys/bootblock.h>
#endif /* <API key> */
struct cpu_disklabel {
struct mbr_partition mbrparts[MBR_PART_COUNT];
#define <API key>
struct dkbad bad;
};
#ifdef _KERNEL
struct buf;
struct disklabel;
/* for readdisklabel. rv != 0 -> matches, msg == NULL -> success */
int mbr_label_read(dev_t, void (*)(struct buf *), struct disklabel *,
struct cpu_disklabel *, const char **, int *, int *);
/* for writedisklabel. rv == 0 -> dosen't match, rv > 0 -> success */
int mbr_label_locate(dev_t, void (*)(struct buf *),
struct disklabel *, struct cpu_disklabel *, int *, int *);
#endif /* _KERNEL */
#endif /* _ARM_DISKLABEL_H_ */
|
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210930.14
#pragma once
#ifndef <API key>
#define <API key>
#include "winrt/impl/Windows.Devices.Portable.0.h"
WINRT_EXPORT namespace winrt::Windows::Devices::Portable
{
struct __declspec(empty_bases) <API key> :
winrt::Windows::Foundation::IInspectable,
impl::consume_t<<API key>>
{
<API key>(std::nullptr_t = nullptr) noexcept {}
<API key>(void* ptr, <API key>) noexcept : winrt::Windows::Foundation::IInspectable(ptr, <API key>) {}
};
struct __declspec(empty_bases) <API key> :
winrt::Windows::Foundation::IInspectable,
impl::consume_t<<API key>>
{
<API key>(std::nullptr_t = nullptr) noexcept {}
<API key>(void* ptr, <API key>) noexcept : winrt::Windows::Foundation::IInspectable(ptr, <API key>) {}
};
}
#endif
|
// HWTextPart.h
#import <Foundation/Foundation.h>
@interface HWTextPart : NSObject
@property (nonatomic, copy) NSString *text;
@property (nonatomic, assign) NSRange range;
@property (nonatomic, assign, getter = isSpecical) BOOL special;
@property (nonatomic, assign, getter = isEmotion) BOOL emotion;
@end
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_51) on Fri Jun 28 10:55:02 CEST 2013 -->
<TITLE>
UpdateInfoListener
</TITLE>
<META NAME="date" CONTENT="2013-06-28">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../<API key>.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="UpdateInfoListener";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UpdateInfoListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../net/hockeyapp/android/UpdateFragment.html" title="class in net.hockeyapp.android"><B>PREV CLASS</B></A>
<A HREF="../../../net/hockeyapp/android/UpdateManager.html" title="class in net.hockeyapp.android"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/hockeyapp/android/UpdateInfoListener.html" target="_top"><B>FRAMES</B></A>
<A HREF="UpdateInfoListener.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<H2>
<FONT SIZE="-1">
net.hockeyapp.android</FONT>
<BR>
Interface UpdateInfoListener</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/hockeyapp/android/UpdateActivity.html" title="class in net.hockeyapp.android">UpdateActivity</A>, <A HREF="../../../net/hockeyapp/android/UpdateFragment.html" title="class in net.hockeyapp.android">UpdateFragment</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>UpdateInfoListener</B></DL>
</PRE>
<P>
<h4>Description</h4>
Abstract class for callbacks to be invoked from UpdateActivity
and UpdateFragment.
<h4>License</h4>
<pre>
Copyright (c) 2011-2013 Bit Stadium GmbH
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
</pre>
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Thomas Dohmke</DD>
</DL>
<HR>
<P>
<A NAME="method_summary"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../net/hockeyapp/android/UpdateInfoListener.html#<API key>()"><API key></A></B>()</CODE>
<BR>
Implement to return the app's current version code.</TD>
</TR>
</TABLE>
<P>
<A NAME="method_detail"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="<API key>()"></A><H3>
<API key></H3>
<PRE>
int <B><API key></B>()</PRE>
<DL>
<DD>Implement to return the app's current version code.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UpdateInfoListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../net/hockeyapp/android/UpdateFragment.html" title="class in net.hockeyapp.android"><B>PREV CLASS</B></A>
<A HREF="../../../net/hockeyapp/android/UpdateManager.html" title="class in net.hockeyapp.android"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?net/hockeyapp/android/UpdateInfoListener.html" target="_top"><B>FRAMES</B></A>
<A HREF="UpdateInfoListener.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
</BODY>
</HTML>
|
#pragma once
#include <aws/workmail/WorkMail_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/workmail/model/ResourceType.h>
#include <aws/workmail/model/EntityState.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace WorkMail
{
namespace Model
{
class AWS_WORKMAIL_API Resource
{
public:
Resource();
Resource(Aws::Utils::Json::JsonView jsonValue);
Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier of the resource.</p>
*/
inline const Aws::String& GetId() const{ return m_id; }
/**
* <p>The identifier of the resource.</p>
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* <p>The identifier of the resource.</p>
*/
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
/**
* <p>The identifier of the resource.</p>
*/
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* <p>The identifier of the resource.</p>
*/
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
/**
* <p>The identifier of the resource.</p>
*/
inline Resource& WithId(const Aws::String& value) { SetId(value); return *this;}
/**
* <p>The identifier of the resource.</p>
*/
inline Resource& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
/**
* <p>The identifier of the resource.</p>
*/
inline Resource& WithId(const char* value) { SetId(value); return *this;}
/**
* <p>The email of the resource.</p>
*/
inline const Aws::String& GetEmail() const{ return m_email; }
/**
* <p>The email of the resource.</p>
*/
inline bool EmailHasBeenSet() const { return m_emailHasBeenSet; }
/**
* <p>The email of the resource.</p>
*/
inline void SetEmail(const Aws::String& value) { m_emailHasBeenSet = true; m_email = value; }
/**
* <p>The email of the resource.</p>
*/
inline void SetEmail(Aws::String&& value) { m_emailHasBeenSet = true; m_email = std::move(value); }
/**
* <p>The email of the resource.</p>
*/
inline void SetEmail(const char* value) { m_emailHasBeenSet = true; m_email.assign(value); }
/**
* <p>The email of the resource.</p>
*/
inline Resource& WithEmail(const Aws::String& value) { SetEmail(value); return *this;}
/**
* <p>The email of the resource.</p>
*/
inline Resource& WithEmail(Aws::String&& value) { SetEmail(std::move(value)); return *this;}
/**
* <p>The email of the resource.</p>
*/
inline Resource& WithEmail(const char* value) { SetEmail(value); return *this;}
/**
* <p>The name of the resource.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the resource.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the resource.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the resource.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the resource.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the resource.</p>
*/
inline Resource& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the resource.</p>
*/
inline Resource& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the resource.</p>
*/
inline Resource& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>The type of the resource: equipment or room.</p>
*/
inline const ResourceType& GetType() const{ return m_type; }
/**
* <p>The type of the resource: equipment or room.</p>
*/
inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
/**
* <p>The type of the resource: equipment or room.</p>
*/
inline void SetType(const ResourceType& value) { m_typeHasBeenSet = true; m_type = value; }
/**
* <p>The type of the resource: equipment or room.</p>
*/
inline void SetType(ResourceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
/**
* <p>The type of the resource: equipment or room.</p>
*/
inline Resource& WithType(const ResourceType& value) { SetType(value); return *this;}
/**
* <p>The type of the resource: equipment or room.</p>
*/
inline Resource& WithType(ResourceType&& value) { SetType(std::move(value)); return *this;}
/**
* <p>The state of the resource, which can be ENABLED, DISABLED, or DELETED.</p>
*/
inline const EntityState& GetState() const{ return m_state; }
/**
* <p>The state of the resource, which can be ENABLED, DISABLED, or DELETED.</p>
*/
inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
/**
* <p>The state of the resource, which can be ENABLED, DISABLED, or DELETED.</p>
*/
inline void SetState(const EntityState& value) { m_stateHasBeenSet = true; m_state = value; }
/**
* <p>The state of the resource, which can be ENABLED, DISABLED, or DELETED.</p>
*/
inline void SetState(EntityState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
/**
* <p>The state of the resource, which can be ENABLED, DISABLED, or DELETED.</p>
*/
inline Resource& WithState(const EntityState& value) { SetState(value); return *this;}
/**
* <p>The state of the resource, which can be ENABLED, DISABLED, or DELETED.</p>
*/
inline Resource& WithState(EntityState&& value) { SetState(std::move(value)); return *this;}
/**
* <p>The date indicating when the resource was enabled for Amazon WorkMail
* use.</p>
*/
inline const Aws::Utils::DateTime& GetEnabledDate() const{ return m_enabledDate; }
/**
* <p>The date indicating when the resource was enabled for Amazon WorkMail
* use.</p>
*/
inline bool <API key>() const { return <API key>; }
/**
* <p>The date indicating when the resource was enabled for Amazon WorkMail
* use.</p>
*/
inline void SetEnabledDate(const Aws::Utils::DateTime& value) { <API key> = true; m_enabledDate = value; }
/**
* <p>The date indicating when the resource was enabled for Amazon WorkMail
* use.</p>
*/
inline void SetEnabledDate(Aws::Utils::DateTime&& value) { <API key> = true; m_enabledDate = std::move(value); }
/**
* <p>The date indicating when the resource was enabled for Amazon WorkMail
* use.</p>
*/
inline Resource& WithEnabledDate(const Aws::Utils::DateTime& value) { SetEnabledDate(value); return *this;}
/**
* <p>The date indicating when the resource was enabled for Amazon WorkMail
* use.</p>
*/
inline Resource& WithEnabledDate(Aws::Utils::DateTime&& value) { SetEnabledDate(std::move(value)); return *this;}
/**
* <p>The date indicating when the resource was disabled from Amazon WorkMail
* use.</p>
*/
inline const Aws::Utils::DateTime& GetDisabledDate() const{ return m_disabledDate; }
/**
* <p>The date indicating when the resource was disabled from Amazon WorkMail
* use.</p>
*/
inline bool <API key>() const { return <API key>; }
/**
* <p>The date indicating when the resource was disabled from Amazon WorkMail
* use.</p>
*/
inline void SetDisabledDate(const Aws::Utils::DateTime& value) { <API key> = true; m_disabledDate = value; }
/**
* <p>The date indicating when the resource was disabled from Amazon WorkMail
* use.</p>
*/
inline void SetDisabledDate(Aws::Utils::DateTime&& value) { <API key> = true; m_disabledDate = std::move(value); }
/**
* <p>The date indicating when the resource was disabled from Amazon WorkMail
* use.</p>
*/
inline Resource& WithDisabledDate(const Aws::Utils::DateTime& value) { SetDisabledDate(value); return *this;}
/**
* <p>The date indicating when the resource was disabled from Amazon WorkMail
* use.</p>
*/
inline Resource& WithDisabledDate(Aws::Utils::DateTime&& value) { SetDisabledDate(std::move(value)); return *this;}
private:
Aws::String m_id;
bool m_idHasBeenSet;
Aws::String m_email;
bool m_emailHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
ResourceType m_type;
bool m_typeHasBeenSet;
EntityState m_state;
bool m_stateHasBeenSet;
Aws::Utils::DateTime m_enabledDate;
bool <API key>;
Aws::Utils::DateTime m_disabledDate;
bool <API key>;
};
} // namespace Model
} // namespace WorkMail
} // namespace Aws
|
//= require can.jquery-all
//= require models/cacheable
(function(ns, can) {
can.Model.Cacheable("CMS.Models.Document", {
root_object : "document"
, root_collection : "documents"
, findAll : "GET /api/documents"
, create : function(params) {
var _params = {
document : {
title : params.document.title
, description : params.document.description
, link : params.document.link
}
};
return $.ajax({
type : "POST"
, "url" : "/api/documents"
, dataType : "json"
, data : _params
});
}
, search : function(request, response) {
return $.ajax({
type : "get"
, url : "/api/documents"
, dataType : "json"
, data : {s : request.term}
, success : function(data) {
response($.map( data, function( item ) {
return can.extend({}, item.document, {
label: item.document.title
? item.document.title
+ (item.document.link_url
? " (" + item.document.link_url + ")"
: "")
: item.document.link_url
, value: item.document.id
});
}));
}
});
}
}, {
init : function () {
this._super && this._super();
// this.bind("change", function(ev, attr, how, newVal, oldVal) {
// var obj;
// if(obj = CMS.Models.ObjectDocument.findInCacheById(this.id) && attr !== "id") {
// obj.attr(attr, newVal);
var that = this;
this.each(function(value, name) {
if (value === null)
that.attr(name, undefined);
});
}
});
can.Model.Cacheable("CMS.Models.ObjectDocument", {
root_object : "object_document"
, root_collection : "object_documents"
, findAll: "GET /api/object_documents"
, create: "POST /api/object_documents"
, destroy : "DELETE /api/object_documents/{id}"
}, {
init : function() {
var _super = this._super;
function reinit() {
var that = this;
typeof _super === "function" && _super.call(this);
this.attr("document", CMS.Models.get_instance(
"Document", this.document_id || (this.document && this.document.id)));
this.attr("documentable", CMS.Models.get_instance(
this.documentable_type || (this.documentable && this.documentable.type),
this.documentable_id || (this.documentable && this.documentable.id)));
/*this.attr(
"document"
, CMS.Models.Document.findInCacheById(this.document_id)
|| new CMS.Models.Document(this.document && this.document.serialize ? this.document.serialize() : this.document));
*/
this.each(function(value, name) {
if (value === null)
that.removeAttr(name);
});
}
this.bind("created", can.proxy(reinit, this));
reinit.call(this);
}
});
})(this, can);
|
package com.google.api.ads.dfp.jaxws.v201508;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContentPartnerError", propOrder = {
"reason"
})
public class ContentPartnerError
extends ApiError
{
@XmlSchemaType(name = "string")
protected <API key> reason;
/**
* Gets the value of the reason property.
*
* @return
* possible object is
* {@link <API key> }
*
*/
public <API key> getReason() {
return reason;
}
/**
* Sets the value of the reason property.
*
* @param value
* allowed object is
* {@link <API key> }
*
*/
public void setReason(<API key> value) {
this.reason = value;
}
}
|
package jadx.tests.integration.conditions;
import org.junit.jupiter.api.Test;
import jadx.tests.api.SmaliTest;
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat;
@SuppressWarnings("CommentedOutCode")
public class TestTernary4 extends SmaliTest {
// @formatter:off
/*
private Set test(HashMap<String, Object> hashMap) {
boolean z;
HashSet hashSet = new HashSet();
synchronized (this.defaultValuesByPath) {
for (String next : this.defaultValuesByPath.keySet()) {
Object obj = hashMap.get(next);
if (obj != null) {
z = !getValueObject(next).equals(obj);
} else {
z = this.valuesByPath.get(next) != null;;
}
if (z) {
hashSet.add(next);
}
}
}
return hashSet;
}
*/
// @formatter:on
@Test
public void test() {
assertThat(<API key>())
.code()
.removeBlockComments()
.doesNotContain("5")
.doesNotContain("try");
}
}
|
package jadx.tests.integration.debuginfo;
import org.junit.jupiter.api.Test;
import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.SmaliTest;
import static jadx.tests.api.utils.JadxMatchers.containsOne;
import static org.hamcrest.MatcherAssert.assertThat;
public class TestVariablesNames extends SmaliTest {
// @formatter:off
/*
public static class TestCls {
public void test(String s, int k) {
f1(s);
int i = k + 3;
String s2 = "i" + i;
f2(i, s2);
double d = i * 5;
String s3 = "d" + d;
f3(d, s3);
}
private void f1(String s) {
}
private void f2(int i, String i2) {
}
private void f3(double d, String d2) {
}
}
*/
// @formatter:on
/**
* Parameter register reused in variables assign with different types and names
* No variables names in debug info
*/
@Test
public void test() {
ClassNode cls = <API key>("debuginfo", "TestVariablesNames");
String code = cls.getCode().toString();
// TODO: don't use current variables naming in tests
assertThat(code, containsOne("f1(str);"));
assertThat(code, containsOne("f2(i2, \"i\" + i2);"));
assertThat(code, containsOne("f3(d, \"d\" + d);"));
}
}
|
package com.cardshifter.gdx.screens;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.ui.*;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.cardshifter.api.incoming.UseAbilityMessage;
import com.cardshifter.api.messages.Message;
import com.cardshifter.api.outgoing.*;
import com.cardshifter.gdx.*;
import com.cardshifter.gdx.ui.<API key>;
import com.cardshifter.gdx.ui.EntityView;
import com.cardshifter.gdx.ui.PlayerView;
import com.cardshifter.gdx.ui.cards.CardView;
import com.cardshifter.gdx.ui.cards.CardViewSmall;
import com.cardshifter.gdx.ui.zones.<API key>;
import com.cardshifter.gdx.ui.zones.DefaultZoneView;
import com.cardshifter.gdx.ui.zones.ZoneView;
import java.util.*;
import java.util.List;
public class GameScreen implements Screen, TargetableCallback {
private final CardshifterGame game;
private final CardshifterClient client;
private final int playerIndex;
private final int gameId;
private final Table table;
private final Map<Integer, ZoneView> zoneViews = new HashMap<Integer, ZoneView>();
private final Map<Integer, EntityView> entityViews = new HashMap<Integer, EntityView>();
private final Map<String, Container<Actor>> holders = new HashMap<String, Container<Actor>>();
private final List<EntityView> targetsSelected = new ArrayList<EntityView>();
private final Screen parentScreen;
private <API key> targetsAvailable;
private final TargetableCallback onTarget = new TargetableCallback() {
@Override
public boolean addEntity(EntityView view) {
if (targetsSelected.contains(view)) {
targetsSelected.remove(view);
Gdx.app.log("GameScreen", "Removing selection " + view.getId());
view.setTargetable(TargetStatus.TARGETABLE, this);
return false;
}
if (targetsAvailable != null && targetsAvailable.getMax() == 1 && targetsAvailable.getMin() == 1) {
Gdx.app.log("GameScreen", "Sending selection " + view.getId());
client.send(new UseAbilityMessage(gameId, targetsAvailable.getEntity(), targetsAvailable.getAction(), new int[]{ view.getId() }));
return false;
}
Gdx.app.log("GameScreen", "Adding selection " + view.getId());
view.setTargetable(TargetStatus.TARGETED, this);
return targetsSelected.add(view);
}
};
private final <API key> context;
//private final float screenWidth;
private final float screenHeight;
public GameScreen(final CardshifterGame game, final CardshifterClient client, NewGameMessage message, final Screen parentScreen) {
this.parentScreen = parentScreen;
this.game = game;
this.client = client;
this.playerIndex = message.getPlayerIndex();
this.gameId = message.getGameId();
this.context = new <API key>(game.skin, message.getGameId(), client, game.stage);
//this.screenWidth = CardshifterGame.STAGE_WIDTH;
this.screenHeight = CardshifterGame.STAGE_HEIGHT;
this.table = new Table(game.skin);
Table leftTable = new Table(game.skin);
Table topTable = new Table(game.skin);
//Table rightTable = new Table(game.skin);
Table centerTable = new Table(game.skin);
TextButton backToMenu = new TextButton("Back to menu", game.skin);
backToMenu.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
game.setScreen(parentScreen);
}
});
leftTable.add(backToMenu).expandX().fill().row();
addZoneHolder(leftTable, 1 - this.playerIndex, "").expandY().fillY();
addZoneHolder(leftTable, this.playerIndex, "").expandY().fillY();
leftTable.add("controls").row();
TextButton actionDone = new TextButton("Done", game.skin);
actionDone.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
if (targetsAvailable != null) {
int selected = targetsSelected.size();
if (selected >= targetsAvailable.getMin() && selected <= targetsAvailable.getMax()) {
int[] targets = new int[targetsSelected.size()];
for (int i = 0; i < targets.length; i++) {
targets[i] = targetsSelected.get(i).getId();
}
UseAbilityMessage message = new UseAbilityMessage(gameId, targetsAvailable.getEntity(), targetsAvailable.getAction(), targets);
client.send(message);
}
}
}
});
leftTable.add(actionDone);
topTable.add(leftTable).left().expandY().fillY();
topTable.add(centerTable).center().expandX().expandY().fill();
//topTable.add(rightTable).right().width(150).expandY().fillY();
addZoneHolder(centerTable, 1 - this.playerIndex, "Hand").top().height(this.screenHeight/4);
addZoneHolder(centerTable, 1 - this.playerIndex, "Battlefield").height(this.screenHeight/4);
addZoneHolder(centerTable, this.playerIndex, "Battlefield").height(this.screenHeight/4);
this.table.add(topTable).expand().fill().row();
addZoneHolder(this.table, this.playerIndex, "Hand").height(140).expandX().fill();
this.table.setFillParent(true);
}
private Cell<Container<Actor>> addZoneHolder(Table table, int i, String name) {
Container<Actor> container = new Container<Actor>();
container.setName(name);
// container.fill();
Cell<Container<Actor>> cell = table.add(container).expandX().fillX();
table.row();
holders.put(i + name, container);
return cell;
}
@Override
public void render(float delta) {
}
@Override
public void resize(int width, int height) {
}
@Override
public void show() {
game.stage.addActor(table);
}
@Override
public void hide() {
table.remove();
}
@Override
public void pause() {
}
@Override
public void resume() {
}
@Override
public void dispose() {
}
public Map<Class<? extends Message>, SpecificHandler<?>> getHandlers() {
Map<Class<? extends Message>, SpecificHandler<?>> handlers =
new HashMap<Class<? extends Message>, SpecificHandler<?>>();
handlers.put(<API key>.class, new SpecificHandler<<API key>>() {
@Override
public void handle(<API key> message) {
targetsAvailable = message;
targetsSelected.clear();
for (EntityView view : entityViews.values()) {
view.setTargetable(TargetStatus.NOT_TARGETABLE, onTarget);
}
for (int id : message.getTargets()) {
EntityView view = entityViews.get(id);
if (view != null) {
view.setTargetable(TargetStatus.TARGETABLE, onTarget);
}
}
}
});
handlers.put(UsableActionMessage.class, new SpecificHandler<UsableActionMessage>() {
@Override
public void handle(UsableActionMessage message) {
int id = message.getId();
EntityView view = entityViews.get(id);
if (view != null) {
view.usableAction(message);
if (view instanceof CardViewSmall) {
((CardViewSmall)view).setUsable(GameScreen.this);
}
}
}
});
handlers.put(CardInfoMessage.class, new SpecificHandler<CardInfoMessage>() {
@Override
public void handle(CardInfoMessage message) {
ZoneView zone = getZoneView(message.getZone());
if (zone != null) {
zone.removeCard(message.getId());
}
EntityView entityView = entityViews.remove(message.getId());
if (entityView != null) {
entityView.remove();
}
if (zone != null) {
entityViews.put(message.getId(), zone.addCard(message));
}
}
});
handlers.put(EntityRemoveMessage.class, new SpecificHandler<EntityRemoveMessage>() {
@Override
public void handle(EntityRemoveMessage message) {
EntityView view = entityViews.get(message.getEntity());
for (ZoneView zone : zoneViews.values()) {
if (zone.hasCard(message.getEntity())) {
zone.removeCard(message.getEntity());
}
}
if (view != null) {
view.entityRemoved();
entityViews.remove(message.getEntity());
}
}
});
handlers.put(GameOverMessage.class, new SpecificHandler<GameOverMessage>() {
@Override
public void handle(GameOverMessage message) {
Dialog dialog = new Dialog("Game Over!", context.getSkin()) {
@Override
protected void result(Object object) {
game.setScreen(parentScreen);
}
};
dialog.button("OK");
dialog.show(context.getStage());
}
});
handlers.put(PlayerMessage.class, new SpecificHandler<PlayerMessage>() {
@Override
public void handle(PlayerMessage message) {
PlayerView playerView = new PlayerView(context, message);
entityViews.put(message.getId(), playerView);
Container<Actor> holder = holders.get(String.valueOf(message.getIndex()));
if (holder != null) {
holder.setActor(playerView.getActor());
}
}
});
handlers.put(<API key>.class, new SpecificHandler<<API key>>() {
@Override
public void handle(<API key> message) {
for (EntityView view : entityViews.values()) {
view.setTargetable(TargetStatus.NOT_TARGETABLE, null);
view.clearUsableActions();
}
}
});
handlers.put(UpdateMessage.class, new SpecificHandler<UpdateMessage>() {
@Override
public void handle(UpdateMessage message) {
EntityView entityView = entityViews.get(message.getId());
if (entityView != null) {
entityView.set(message.getKey(), message.getValue());
}
}
});
handlers.put(ZoneChangeMessage.class, new SpecificHandler<ZoneChangeMessage>() {
@Override
public void handle(ZoneChangeMessage message) {
ZoneView oldZone = getZoneView(message.getSourceZone()); // can be null
ZoneView destinationZone = getZoneView(message.getDestinationZone());
int id = message.getEntity();
CardView entityView = (CardView) entityViews.remove(id); // can be null
if (oldZone != null) {
oldZone.removeCard(id);
}
if (destinationZone != null) {
CardView newCardView = destinationZone.addCard(new CardInfoMessage(message.getDestinationZone(), id,
entityView == null ? null : entityView.getInfo()));
if (entityView != null) {
entityView.zoneMove(message, destinationZone, newCardView);
}
entityViews.put(id, newCardView);
}
else {
if (entityView != null) {
entityView.zoneMove(message, destinationZone, null);
}
}
/*
Send to AI Medium: ZoneChangeMessage [entity=95, sourceZone=72, destinationZone=73]
Send to AI Medium: CardInfo: 95 in zone 73 - {SCRAP=1, TAUNT=1, MAX_HEALTH=1, SICKNESS=1, MANA_COST=2, name=The Chopper, ATTACK=2, creatureType=Mech, HEALTH=1, ATTACK_AVAILABLE=1}
Send to Zomis: ZoneChangeMessage [entity=95, sourceZone=72, destinationZone=73]
if card is already known, send ZoneChange only
if card is not known, send ZoneChange first and then CardInfo
when cards are created from nowhere, ZoneChange with source -1 is sent and then CardInfo
*/
}
});
handlers.put(ZoneMessage.class, new SpecificHandler<ZoneMessage>() {
@Override
public void handle(ZoneMessage message) {
Gdx.app.log("GameScreen", "Zone " + message);
ZoneView zoneView = createZoneView(message);
if (zoneView != null) {
PlayerView view = (PlayerView) entityViews.get(message.getOwner());
if (view == null) {
Gdx.app.log("GameScreen", "no playerView for " + message.getOwner());
return;
}
String key = view.getIndex() + message.getName();
Container<Actor> container = holders.get(key);
if (container == null) {
Gdx.app.log("GameScreen", "no container for " + key);
return;
}
Gdx.app.log("GameScreen", "putting zoneview for " + key);
container.setActor(zoneView.getActor());
zoneViews.put(message.getId(), zoneView);
}
}
});
return handlers;
}
private ZoneView createZoneView(ZoneMessage message) {
String type = message.getName();
if (type.equals("Battlefield")) {
return new DefaultZoneView(context, message, this.entityViews);
}
if (type.equals("Hand")) {
return new DefaultZoneView(context, message, this.entityViews);
}
if (type.equals("Deck")) {
return new <API key>(game, message);
}
if (type.equals("Cards")) {
return null; // Card models only
}
throw new RuntimeException("Unknown ZoneView type: " + message.getName());
}
private ZoneView getZoneView(int id) {
return this.zoneViews.get(id);
}
public boolean checkCardDrop(CardViewSmall cardView) {
Table table = (Table)cardView.getActor();
Vector2 stageLoc = table.<API key>(new Vector2());
Rectangle tableRect = new Rectangle(stageLoc.x, stageLoc.y, table.getWidth(), table.getHeight());
for (Container<Actor> actor : this.holders.values()) {
if (actor.getName() == "Battlefield") {
Vector2 stageBattlefieldLoc = actor.<API key>(new Vector2(actor.getActor().getX(), actor.getActor().getY()));
Vector2 modifiedSBL = new Vector2(stageBattlefieldLoc.x - actor.getWidth()/2, stageBattlefieldLoc.y - actor.getHeight()/2);
Rectangle deckRect = new Rectangle(modifiedSBL.x, modifiedSBL.y, actor.getWidth() * 0.8f, actor.getHeight());
//uncomment this to see the bug where battlefields pop up in strange places
/*
Image squareImage = new Image(new Texture(Gdx.files.internal("cardbg.png")));
squareImage.setPosition(modifiedSBL.x, modifiedSBL.y);
squareImage.setSize(deckRect.width, deckRect.height);
this.game.stage.addActor(squareImage);
*/
if (tableRect.overlaps(deckRect)) {
//this.addEntity(cardView);
System.out.println("target found!");
return true;
}
}
}
return false;
//these can be used to double check the location of the rectangles
/*
Image squareImage = new Image(new Texture(Gdx.files.internal("cardbg.png")));
squareImage.setPosition(modifiedSBL.x, modifiedSBL.y);
squareImage.setSize(deckRect.width, deckRect.height);
this.game.stage.addActor(squareImage);
*/
/*
Image squareImage = new Image(new Texture(Gdx.files.internal("cardbg.png")));
squareImage.setPosition(stageLoc.x, stageLoc.y);
squareImage.setSize(tableRect.width, tableRect.height);
this.game.stage.addActor(squareImage);
*/
}
@Override
public boolean addEntity(EntityView view) {
//called by the CardViewSmall when not in mulligan mode, nothing will happen
return false;
}
}
|
// <auto-generated/>
#nullable disable
using System.Text.Json;
using Azure.Core;
namespace Azure.Management.Network.Models
{
public partial class Availability
{
internal static Availability <API key>(JsonElement element)
{
string timeGrain = default;
string retention = default;
string blobDuration = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("timeGrain"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
timeGrain = property.Value.GetString();
continue;
}
if (property.NameEquals("retention"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
retention = property.Value.GetString();
continue;
}
if (property.NameEquals("blobDuration"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
blobDuration = property.Value.GetString();
continue;
}
}
return new Availability(timeGrain, retention, blobDuration);
}
}
}
|
<!DOCTYPE html>
<html>
<head>
<title>Noto Warang Citi</title>
<meta charset="UTF-8" http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript">
function sliderChange() {
var slider = document.getElementById("fontSizeSlider");
var sizeInput = document.getElementById("fontSizeInput");
sizeInput.value = slider.value;
sizeInput.oninput();
}
function changeSize() {
var selector = document.getElementById('fontSizeInput');
var selectedSize = selector.value + "px";
samples = document.<API key>("sample");
for (var i = 0; i < samples.length; i++) {
samples[i].style.fontSize = selectedSize;
}
}
function printPrep() {
var header = document.getElementById("header");
header.style.display = "none";
window.print();
header.style.display = "block";
}
function init(reset) {
var sizeInput = document.getElementById("fontSizeInput");
var fontSizeSlider = document.getElementById("fontSizeSlider");
fontSizeSlider.value = 48;
sizeInput.value = 48;
sizeInput.oninput();
}
</script>
</head>
<style>
#header {
top:0;
left:0;
position: fixed;
margin: 0px;
width: 100%;
background: #fff;
}
/*#wrapper {*/
/*white-space: pre;*/
#fontSizeInput {
width: 40px;
}
input[type=range] {
/*removes default webkit styles*/
-webkit-appearance: none;
position: relative;
top: 50%;
transform: perspective(1px) translateY(30%);
/*fix for FF unable to apply focus style bug */
border: 1px solid white;
/*required for proper track sizing in FF*/
width: 400px;
}
input[type=range]::-<API key> {
width: 400px;
height: 5px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: red;
margin-top: -4px;
}
input[type=range]:focus {
outline: none;
}
input[type=range]:focus::-<API key> {
background: #ccc;
}
input[type=range]::-moz-range-track {
width: 400px;
height: 5px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-moz-range-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: red;
}
/*hide the outline behind the border*/
input[type=range]:-moz-focusring{
outline: 1px solid white;
outline-offset: -1px;
}
rt, rp {font-size: 20%;} /* = Webkit value */
@font-face {
font-family: "Noto Sans Warang Citi";
src: url("fonts/<API key>.otf");
font-weight: 400;
font-style: normal;
}
ruby {
ruby-position:under;
ruby-align: center;
}
.desc {
font-family: "Noto Sans", sans-serif;
font-size: 48px;
line-height: inherit;
}
.sample
{
font-family: "Noto Sans Warang Citi", "Noto Sans", sans-serif;
font-size: 48px;
line-height: 160%;
font-weight: 400;
<API key>: <API key>;
<API key>: "dlig";
<API key>: "dlig";
<API key>: "dlig";
}
</style>
<body onload="init()">
<div id="header" style="
padding-top:8px;
z-index:150;
color: #E4E4E4;
">
<span>
<input id="fontSizeSlider" type="range" name="amountRange" min="6" max="600" value="48" oninput="sliderChange()" />
<input id="fontSizeInput" type="number" name="amountInput" min="6" max="600" value="48" oninput="changeSize()" />
<button onclick="printPrep()">Print</button>
</span>
</div>
<div id="wrapper">
<br><br>
<span class="sample" contenteditable="true" onselect="textSelected()">
Noto Sans Warang Citi Kerning
<br><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>
</div>
</body>
</html>
|
<?php
namespace Topxia\Service\User\Dao\Impl;
use Topxia\Service\Common\BaseDao;
use Topxia\Service\User\Dao\UserFortuneLogDao;
class <API key> extends BaseDao implements UserFortuneLogDao
{
protected $table = 'user_fortune_log';
public function addLog(array $log)
{
$affected = $this->getConnection()->insert($this->table, $log);
if ($affected <= 0) {
throw $this->createDaoException('Insert log error');
}
return $this->getLog($this->getConnection()->lastInsertId());
}
public function getLog($id)
{
$sql = "SELECT * FROM {$this->table} WHERE id = ? LIMIT 1";
return $this->getConnection()->fetchAssoc($sql, array($id));
}
}
|
#include <aws/qldb/model/TagResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/<API key>.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::QLDB::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
TagResourceResult::TagResourceResult()
{
}
TagResourceResult::TagResourceResult(const Aws::<API key><JsonValue>& result)
{
*this = result;
}
TagResourceResult& TagResourceResult::operator =(const Aws::<API key><JsonValue>& result)
{
<API key>(result);
return *this;
}
|
package <API key>
import (
"fmt"
"os/exec"
"github.com/cloudfoundry/gunk/command_runner/fake_command_runner"
)
func HaveKilled(spec fake_command_runner.CommandSpec) *HaveKilledMatcher {
return &HaveKilledMatcher{Spec: spec}
}
type HaveKilledMatcher struct {
Spec fake_command_runner.CommandSpec
killed []*exec.Cmd
}
func (m *HaveKilledMatcher) Match(actual interface{}) (bool, error) {
runner, ok := actual.(*fake_command_runner.FakeCommandRunner)
if !ok {
return false, fmt.Errorf("Not a fake command runner: %#v.", actual)
}
m.killed = runner.KilledCommands()
matched := false
for _, cmd := range m.killed {
if m.Spec.Matches(cmd) {
matched = true
break
}
}
if matched {
return true, nil
} else {
return false, nil
}
}
func (m *HaveKilledMatcher) FailureMessage(actual interface{}) (message string) {
return fmt.Sprintf("Expected to kill:%s\n\nActually killed:%s", prettySpec(m.Spec), prettyCommands(m.killed))
}
func (m *HaveKilledMatcher) <API key>(actual interface{}) (message string) {
return fmt.Sprintf("Expected to not kill the following commands:%s", prettySpec(m.Spec))
}
|
package org.jf.dexlib2.writer.pool;
import org.jf.dexlib2.iface.reference.StringReference;
import org.jf.dexlib2.writer.StringSection;
import org.jf.util.<API key>;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class StringPool extends StringTypeBasePool implements StringSection<CharSequence, StringReference> {
public StringPool(@Nonnull DexPool dexPool) {
super(dexPool);
}
public void intern(@Nonnull CharSequence string) {
internedItems.put(string.toString(), 0);
}
public void internNullable(@Nullable CharSequence string) {
if (string != null) {
intern(string);
}
}
@Override public int getItemIndex(@Nonnull StringReference key) {
Integer index = internedItems.get(key.toString());
if (index == null) {
throw new <API key>("Item not found.: %s", key.toString());
}
return index;
}
@Override public boolean hasJumboIndexes() {
return internedItems.size() > 65536;
}
}
|
package org.elasticsearch.xpack.ml.inference.allocation;
import org.elasticsearch.<API key>;
import org.elasticsearch.<API key>;
import org.elasticsearch.<API key>;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.ClusterChangedEvent;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.metadata.<API key>;
import org.elasticsearch.cluster.metadata.<API key>;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.util.set.Sets;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.xpack.core.ml.MlMetadata;
import org.elasticsearch.xpack.core.ml.action.<API key>;
import org.elasticsearch.xpack.core.ml.action.<API key>;
import org.elasticsearch.xpack.core.ml.inference.allocation.AllocationState;
import org.elasticsearch.xpack.core.ml.inference.allocation.RoutingState;
import org.elasticsearch.xpack.core.ml.inference.allocation.<API key>;
import org.elasticsearch.xpack.core.ml.inference.allocation.<API key>;
import org.elasticsearch.xpack.ml.MachineLearning;
import org.elasticsearch.xpack.ml.job.NodeLoadDetector;
import org.elasticsearch.xpack.ml.process.MlMemoryTracker;
import org.junit.Before;
import java.util.Collections;
import java.util.Set;
import java.util.function.Function;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anEmptyMap;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class <API key> extends ESTestCase {
private ClusterService clusterService;
private NodeLoadDetector nodeLoadDetector;
@Before
public void setupObjects() {
clusterService = mock(ClusterService.class);
ClusterSettings clusterSettings = new ClusterSettings(
Settings.EMPTY,
Sets.newHashSet(MachineLearning.<API key>, MachineLearning.<API key>)
);
when(clusterService.getClusterSettings()).thenReturn(clusterSettings);
MlMemoryTracker memoryTracker = mock(MlMemoryTracker.class);
when(memoryTracker.isRecentlyRefreshed()).thenReturn(true);
nodeLoadDetector = new NodeLoadDetector(memoryTracker);
}
public void <API key>() {
String modelId = "existing-model";
String nodeId = "ml-node-with-room";
ClusterState currentState = ClusterState.builder(new ClusterName("<API key>"))
.nodes(DiscoveryNodes.builder().add(buildNode("ml-node-with-room", true, ByteSizeValue.ofGb(4).getBytes())).build())
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
modelId,
<API key>.Builder.empty(newParams(modelId, 10_000L)).addNewRoutingEntry(nodeId)
)
.build()
)
.build()
)
.build();
<API key>(
state -> <API key>.<API key>(
state,
new <API key>.Request(nodeId, modelId, new <API key>(RoutingState.STARTED, ""))
),
currentState
);
ClusterState newState = <API key>.<API key>(
currentState,
new <API key>.Request(nodeId, modelId, new <API key>(RoutingState.STARTED, ""))
);
assertThat(
<API key>.fromState(newState).getModelAllocation(modelId).getNodeRoutingTable().get(nodeId).getState(),
equalTo(RoutingState.STARTED)
);
expectThrows(
<API key>.class,
() -> <API key>.<API key>(
currentState,
new <API key>.Request(
"missingNode",
modelId,
new <API key>(RoutingState.STARTED, "")
)
)
);
expectThrows(
<API key>.class,
() -> <API key>.<API key>(
currentState,
new <API key>.Request(
nodeId,
"missingModel",
new <API key>(RoutingState.STARTED, "")
)
)
);
// TEST Stopped
// We should allow a "stopped" update on missing models and nodes as entries may have already been deleted
<API key>.<API key>(
currentState,
new <API key>.Request("missingNode", modelId, new <API key>(RoutingState.STOPPED, ""))
);
<API key>.<API key>(
currentState,
new <API key>.Request(nodeId, "missingModel", new <API key>(RoutingState.STOPPED, ""))
);
ClusterState updateState = <API key>.<API key>(
currentState,
new <API key>.Request(nodeId, modelId, new <API key>(RoutingState.STOPPED, ""))
);
assertThat(
<API key>.fromState(updateState).getModelAllocation(modelId).getNodeRoutingTable(),
not(hasKey(nodeId))
);
}
public void <API key>() {
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.metadata(Metadata.builder().build())
.build();
String modelId = "remove-allocation";
expectThrows(
<API key>.class,
() -> <API key>.removeAllocation(<API key>, modelId)
);
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(modelId, <API key>.Builder.empty(newParams(modelId, <API key>())))
.build()
)
.build()
)
.build();
assertThat(<API key>.fromState(<API key>).getModelAllocation(modelId), is(not(nullValue())));
ClusterState modified = <API key>.removeAllocation(<API key>, modelId);
assertThat(<API key>.fromState(modified).getModelAllocation(modelId), is(nullValue()));
}
public void <API key>() {
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.metadata(Metadata.builder().build())
.build();
assertThat(
<API key>.<API key>(<API key>),
equalTo(<API key>)
);
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.randomInstance()
)
.build()
)
.build();
ClusterState modified = <API key>.<API key>(<API key>);
assertThat(<API key>.fromState(modified).modelAllocations(), is(anEmptyMap()));
}
public void <API key>() {
ClusterState currentState = ClusterState.builder(new ClusterName("<API key>"))
.nodes(
DiscoveryNodes.builder()
.add(buildNode("ml-node-with-room", true, ByteSizeValue.ofGb(4).getBytes()))
.add(buildNode("<API key>", true, 1000L))
.add(buildNode("not-ml-node", false, ByteSizeValue.ofGb(4).getBytes()))
.add(buildNode("<API key>", true, ByteSizeValue.ofGb(4).getBytes()))
.add(buildOldNode("<API key>", true, ByteSizeValue.ofGb(4).getBytes()))
.build()
)
.metadata(Metadata.builder().putCustom(<API key>.TYPE, shutdownMetadata("<API key>")))
.build();
<API key> <API key> = <API key>();
ClusterState newState = <API key>.<API key>(currentState, newParams("new-model", 150));
<API key> createdAllocation = <API key>.fromState(newState).getModelAllocation("new-model");
assertThat(createdAllocation, is(not(nullValue())));
assertThat(createdAllocation.getNodeRoutingTable().keySet(), hasSize(2));
assertThat(createdAllocation.getNodeRoutingTable(), hasKey("ml-node-with-room"));
assertThat(createdAllocation.getNodeRoutingTable().get("ml-node-with-room").getState(), equalTo(RoutingState.STARTING));
assertThat(createdAllocation.getNodeRoutingTable(), hasKey("<API key>"));
assertThat(createdAllocation.getNodeRoutingTable().get("<API key>").getState(), equalTo(RoutingState.FAILED));
assertThat(
createdAllocation.getNodeRoutingTable().get("<API key>").getReason(),
containsString("This node has insufficient available memory.")
);
expectThrows(
<API key>.class,
() -> <API key>.<API key>(newState, newParams("new-model", 150))
);
}
public void <API key>() {
ClusterState currentState = ClusterState.builder(new ClusterName("<API key>"))
.nodes(
DiscoveryNodes.builder()
.add(buildNode("ml-node-with-room", true, ByteSizeValue.ofGb(4).getBytes()))
.build()
)
.metadata(Metadata.builder().putCustom(MlMetadata.TYPE, new MlMetadata.Builder().isResetMode(true).build()))
.build();
<API key> <API key> = <API key>();
expectThrows(
<API key>.class,
() -> <API key>.<API key>(currentState, newParams("new-model", 150))
);
ClusterState stateWithoutReset = ClusterState.builder(new ClusterName("<API key>"))
.nodes(
DiscoveryNodes.builder()
.add(buildNode("ml-node-with-room", true, ByteSizeValue.ofGb(4).getBytes()))
.build()
)
.metadata(Metadata.builder().putCustom(MlMetadata.TYPE, new MlMetadata.Builder().isResetMode(false).build()))
.build();
// Shouldn't throw
<API key>.<API key>(stateWithoutReset, newParams("new-model", 150));
}
public void <API key>() {
ClusterState currentState = ClusterState.builder(new ClusterName("<API key>"))
.nodes(
DiscoveryNodes.builder()
.add(buildNode("ml-node-with-room", true, ByteSizeValue.ofGb(4).getBytes()))
.add(buildNode("<API key>", true, ByteSizeValue.ofGb(4).getBytes()))
.add(buildNode("<API key>", true, 1000L))
.add(buildNode("not-ml-node", false, ByteSizeValue.ofGb(4).getBytes()))
.add(buildNode("<API key>", true, ByteSizeValue.ofGb(4).getBytes()))
.add(buildOldNode("<API key>", true, ByteSizeValue.ofGb(4).getBytes()))
.build()
)
.metadata(
Metadata.builder()
.putCustom(<API key>.TYPE, shutdownMetadata("<API key>"))
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
"model-1",
<API key>.Builder.empty(newParams("model-1", 10_000))
.addNewRoutingEntry("ml-node-with-room")
.<API key>("ml-node-with-room", started())
.addNewRoutingEntry("<API key>")
.<API key>("<API key>", started())
.addNewRoutingEntry("<API key>")
)
.addNewAllocation(
"model-2",
<API key>.Builder.empty(newParams("model-2", 10_000))
.addNewRoutingEntry("<API key>")
.<API key>("<API key>", started())
)
.build()
)
)
.build();
<API key> <API key> = <API key>();
// Stopping shouldn't cause any updates
<API key>(
<API key>::<API key>,
currentState
);
ClusterState modified = <API key>.<API key>(currentState);
<API key> <API key> = <API key>.fromState(modified);
assertThat(<API key>.modelAllocations().keySet(), hasSize(2));
assertThat(<API key>.modelAllocations(), allOf(hasKey("model-1"), hasKey("model-2")));
assertThat(<API key>.getModelAllocation("model-1").getNodeRoutingTable().keySet(), hasSize(3));
assertThat(
<API key>.getModelAllocation("model-1").getNodeRoutingTable(),
allOf(hasKey("ml-node-with-room"), hasKey("<API key>"), hasKey("<API key>"))
);
assertNodeState(<API key>, "model-1", "ml-node-with-room", RoutingState.STARTED);
assertNodeState(<API key>, "model-1", "<API key>", RoutingState.STARTING);
assertNodeState(<API key>, "model-1", "<API key>", RoutingState.FAILED);
assertThat(<API key>.getModelAllocation("model-2").getNodeRoutingTable().keySet(), hasSize(3));
assertThat(
<API key>.getModelAllocation("model-2").getNodeRoutingTable(),
allOf(hasKey("ml-node-with-room"), hasKey("<API key>"), hasKey("<API key>"))
);
assertNodeState(<API key>, "model-2", "ml-node-with-room", RoutingState.STARTING);
assertNodeState(<API key>, "model-2", "<API key>", RoutingState.STARTING);
assertNodeState(<API key>, "model-2", "<API key>", RoutingState.FAILED);
}
public void <API key>() {
String model1 = "model-1";
String model2 = "model-2";
String mlNode1 = "ml-node-with-room";
String mlNode2 = "<API key>";
DiscoveryNode mlNode1Node = buildNode(mlNode1, true, ByteSizeValue.ofGb(4).getBytes());
DiscoveryNode mlNode2Node = buildNode(mlNode2, true, ByteSizeValue.ofGb(4).getBytes());
ClusterState stateWithTwoNodes = ClusterState.builder(new ClusterName("<API key>"))
.nodes(DiscoveryNodes.builder().add(mlNode1Node).add(mlNode2Node))
.build();
ClusterState stateWithOneNode = ClusterState.builder(new ClusterName("<API key>"))
.nodes(DiscoveryNodes.builder().add(mlNode1Node))
.build();
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.nodes(DiscoveryNodes.builder().add(mlNode1Node).add(buildNode("not-ml-node", false, ByteSizeValue.ofGb(4).getBytes())))
.build();
// No metadata in the new state means no allocations, so no updates
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(randomFrom(<API key>, stateWithOneNode, stateWithTwoNodes)).build(),
ClusterState.builder(randomFrom(<API key>, stateWithOneNode, stateWithTwoNodes))
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build()
)
),
is(false)
);
// Even with metadata changes, unless there are node changes, do nothing
ClusterState randomState = randomFrom(<API key>, stateWithOneNode, stateWithTwoNodes);
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(randomState)
.metadata(
Metadata.builder()
.putCustom(<API key>.NAME, <API key>.randomInstance())
.build()
)
.build(),
ClusterState.builder(randomState)
.metadata(
Metadata.builder()
.putCustom(<API key>.NAME, <API key>.randomInstance())
.build()
)
.build()
)
),
is(false)
);
// If the node removed is not even an ML node, we should not attempt to re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build(),
ClusterState.builder(<API key>)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build()
)
),
is(false)
);
// If the node removed is an ML node, but no models are allocated to it, we should not attempt to re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build(),
ClusterState.builder(stateWithTwoNodes)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build()
)
),
is(false)
);
// If a new ML node is added, we should attempt to re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithTwoNodes)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build(),
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build()
)
),
is(true)
);
// If a new ML node is added, but allocation is stopping, we should not re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithTwoNodes)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
model1,
<API key>.Builder.empty(newParams(model1, 100)).stopAllocation()
)
.build()
)
.build()
)
.build(),
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build()
)
),
is(false)
);
// If a new ML node is added, but its shutting down, don't re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithTwoNodes)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.putCustom(<API key>.TYPE, shutdownMetadata(mlNode2))
.build()
)
.build(),
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(model1, <API key>.Builder.empty(newParams(model1, 100)))
.build()
)
.build()
)
.build()
)
),
is(false)
);
// If a ML node is removed and its routed to, re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
model1,
<API key>.Builder.empty(newParams(model1, 100)).addNewRoutingEntry(mlNode1)
)
.addNewAllocation(
model2,
<API key>.Builder.empty(newParams("model-2", 100))
.addNewRoutingEntry(mlNode1)
.addNewRoutingEntry(mlNode2)
)
.build()
)
.build()
)
.build(),
ClusterState.builder(stateWithTwoNodes)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
model1,
<API key>.Builder.empty(newParams(model1, 100)).addNewRoutingEntry(mlNode1)
)
.addNewAllocation(
model2,
<API key>.Builder.empty(newParams("model-2", 100))
.addNewRoutingEntry(mlNode1)
.addNewRoutingEntry(mlNode2)
)
.build()
)
.build()
)
.build()
)
),
is(true)
);
// If a ML node is removed and its routed to, but the allocation is stopping, don't re-allocate
assertThat(
<API key>.<API key>(
new ClusterChangedEvent(
"test",
ClusterState.builder(stateWithOneNode)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
model1,
<API key>.Builder.empty(newParams(model1, 100)).addNewRoutingEntry(mlNode1)
)
.addNewAllocation(
model2,
<API key>.Builder.empty(newParams("model-2", 100))
.addNewRoutingEntry(mlNode1)
.addNewRoutingEntry(mlNode2)
.stopAllocation()
)
.build()
)
.build()
)
.build(),
ClusterState.builder(stateWithTwoNodes)
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(
model1,
<API key>.Builder.empty(newParams(model1, 100)).addNewRoutingEntry(mlNode1)
)
.addNewAllocation(
model2,
<API key>.Builder.empty(newParams("model-2", 100))
.addNewRoutingEntry(mlNode1)
.addNewRoutingEntry(mlNode2)
)
.build()
)
.build()
)
.build()
)
),
is(false)
);
}
public void <API key>() {
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.metadata(Metadata.builder().build())
.build();
String modelId = "stopping-allocation";
expectThrows(
<API key>.class,
() -> <API key>.setToStopping(<API key>, modelId)
);
ClusterState <API key> = ClusterState.builder(new ClusterName("<API key>"))
.metadata(
Metadata.builder()
.putCustom(
<API key>.NAME,
<API key>.Builder.empty()
.addNewAllocation(modelId, <API key>.Builder.empty(newParams(modelId, <API key>())))
.build()
)
.build()
)
.build();
<API key> before = <API key>.fromState(<API key>);
assertThat(before.getModelAllocation(modelId), is(not(nullValue())));
assertThat(before.getModelAllocation(modelId).getAllocationState(), equalTo(AllocationState.STARTED));
ClusterState modified = <API key>.setToStopping(<API key>, modelId);
assertThat(
<API key>.fromState(modified).getModelAllocation(modelId).getAllocationState(),
equalTo(AllocationState.STOPPING)
);
}
private void <API key>(
Function<ClusterState, ClusterState> mutationFunction,
ClusterState original
) {
<API key> tempMetadata = <API key>.fromState(original);
if (tempMetadata.modelAllocations().isEmpty()) {
return;
}
<API key>.Builder builder = <API key>.builder(original);
for (String modelId : tempMetadata.modelAllocations().keySet()) {
builder.getAllocation(modelId).stopAllocation();
}
<API key> <API key> = builder.build();
ClusterState <API key> = ClusterState.builder(original)
.metadata(Metadata.builder(original.metadata()).putCustom(<API key>.NAME, <API key>).build())
.build();
assertThat(
"setting all allocations to stopping did not prevent mutation",
<API key>.fromState(mutationFunction.apply(<API key>)),
equalTo(<API key>)
);
}
private <API key> <API key>() {
return new <API key>(Settings.EMPTY, clusterService, nodeLoadDetector);
}
private static DiscoveryNode buildNode(String name, boolean isML, long nativeMemory) {
return buildNode(name, isML, nativeMemory, Version.CURRENT);
}
private static DiscoveryNode buildNode(String name, boolean isML, long nativeMemory, Version version) {
return new DiscoveryNode(
name,
name,
<API key>(),
MapBuilder.<String, String>newMapBuilder()
.put(MachineLearning.<API key>, String.valueOf(nativeMemory))
.put(MachineLearning.<API key>, String.valueOf(10))
.put(MachineLearning.<API key>, String.valueOf(10))
.map(),
isML ? DiscoveryNodeRole.roles() : Set.of(DiscoveryNodeRole.DATA_ROLE, DiscoveryNodeRole.MASTER_ROLE),
version
);
}
private static <API key> started() {
return new <API key>(RoutingState.STARTED, "");
}
private static DiscoveryNode buildOldNode(String name, boolean isML, long nativeMemory) {
return buildNode(name, isML, nativeMemory, Version.V_7_15_0);
}
private static <API key>.TaskParams newParams(String modelId, long modelSize) {
return new <API key>.TaskParams(modelId, modelSize);
}
private static void assertNodeState(<API key> metadata, String modelId, String nodeId, RoutingState routingState) {
assertThat(metadata.getModelAllocation(modelId).getNodeRoutingTable().get(nodeId).getState(), equalTo(routingState));
}
private static <API key> shutdownMetadata(String nodeId) {
return new <API key>(
Collections.singletonMap(
nodeId,
<API key>.builder()
.setType(<API key>.Type.REMOVE)
.setStartedAtMillis(<API key>())
.setReason("tests")
.setNodeId(nodeId)
.build()
)
);
}
}
|
#!/bin/bash
declare -a IMAGES=( 'ansible/ubuntu14.04-ansible:stable' 'ansible/centos7-ansible:stable' \
"williamyeh/ansible:debian8-onbuild" \
"williamyeh/ansible:debian7-onbuild" \
"williamyeh/ansible:ubuntu14.04-onbuild" \
"williamyeh/ansible:ubuntu12.04-onbuild" \
"williamyeh/ansible:centos7-onbuild" \
"williamyeh/ansible:centos6-onbuild"
)
for image in "${IMAGES[@]}" ; do
echo $image
docker pull $image
done
docker images | sort
|
#pragma once
#include "base/worker_thread.hpp"
#include "ugc/storage.hpp"
#include "ugc/types.hpp"
#include <functional>
class Index;
struct FeatureID;
namespace ugc
{
class Api
{
public:
using UGCCallback = std::function<void(UGC const &)>;
using UGCUpdateCallback = std::function<void(UGCUpdate const &)>;
explicit Api(Index const & index, std::string const & filename);
void GetUGC(FeatureID const & id, UGCCallback callback);
void GetUGCUpdate(FeatureID const & id, UGCUpdateCallback callback);
void SetUGCUpdate(FeatureID const & id, UGCUpdate const & ugc);
static UGC MakeTestUGC1(Time now = Clock::now());
static UGC MakeTestUGC2(Time now = Clock::now());
private:
void GetUGCImpl(FeatureID const & id, UGCCallback callback);
void GetUGCUpdateImpl(FeatureID const & id, UGCUpdateCallback callback);
void SetUGCUpdateImpl(FeatureID const & id, UGCUpdate const & ugc);
Index const & m_index;
base::WorkerThread m_thread;
Storage m_storage;
};
} // namespace ugc
|
if(typeof(Control)=='undefined')
Control={};
Control.TextArea=Class.create();
Object.extend(Control.TextArea.prototype,{
<API key>:500,
element:false,
onChangeTimeout:false,
initialize:function(textarea){
this.element=$(textarea);
$(this.element).observe('keyup',this.doOnChange.bindAsEventListener(this));
$(this.element).observe('paste',this.doOnChange.bindAsEventListener(this));
$(this.element).observe('input',this.doOnChange.bindAsEventListener(this));
},
doOnChange:function(event){
if(this.onChangeTimeout)
window.clearTimeout(this.onChangeTimeout);
this.onChangeTimeout=window.setTimeout(function(){
if(this.notify)
this.notify('change',this.getValue());
}.bind(this),this.<API key>);
},
getValue:function(){
return this.element.value;
},
getSelection:function(){
if(!!document.selection)
return document.selection.createRange().text;
else if(!!this.element.setSelectionRange)
return this.element.value.substring(this.element.selectionStart,this.element.selectionEnd);
else
return false;
},
replaceSelection:function(text){
var scrollTop=this.element.scrollTop;
if(!!document.selection){
this.element.focus();
var old=document.selection.createRange().text;
var range=document.selection.createRange();
range.text=text;
range-=old.length-text.length;
}else if(!!this.element.setSelectionRange){
var selection_start=this.element.selectionStart;
this.element.value=this.element.value.substring(0,selection_start)+text+this.element.value.substring(this.element.selectionEnd);
this.element.setSelectionRange(selection_start+text.length,selection_start+text.length);
}
this.doOnChange();
this.element.focus();
this.element.scrollTop=scrollTop;
},
wrapSelection:function(before,after){
this.replaceSelection(before+this.getSelection()+after);
},
<API key>:function(text){
this.replaceSelection(text+this.getSelection());
},
<API key>:function(text){
this.replaceSelection(this.getSelection()+text);
},
<API key>:function(callback,before,after){
this.replaceSelection((before||'')+$A(this.getSelection().split("\n")).inject([],callback).join("\n")+(after||''));
},
<API key>:function(text,before,after){
this.<API key>(function(lines,line){
lines.push(text+line);
return lines;
},before,after);
}
});
if(typeof(Object.Event)!='undefined')
Object.Event.extend(Control.TextArea);Control.TextArea.BBCode=Class.create();
Object.extend(Control.TextArea.BBCode.prototype,{
textarea:false,
tooltip:false,
toolbar:false,
emotions:false,
wrapper:false,
controllers:false,
initialize:function(textarea){
this.textarea=new Control.TextArea(textarea);
this._initLayout();
this._initEmotions();
this._initToolbar();
},
hide:function(){
this.wrapper.parentNode.appendChild(this.textarea.element.remove());
this.wrapper.hide();
},
show:function(){
this.controllers.appendChild(this.textarea.element.remove());
this.wrapper.show();
},
_initLayout:function(){
this.wrapper=$(document.createElement('div'));
this.wrapper.id="editor_wrapper";
this.wrapper.className="clearfix";
this.textarea.element.parentNode.insertBefore(this.wrapper,this.textarea.element);
this.emotions=$(document.createElement('div'));
this.emotions.id="bbcode_emotions";
this.emotions.innerHTML="<h5></h5>";
this.wrapper.appendChild(this.emotions);
this.controllers=$(document.createElement('div'));
this.controllers.id="bbcode_controllers";
this.wrapper.appendChild(this.controllers);
this.toolbar=$(document.createElement('div'));
this.toolbar.id="bbcode_toolbar";
this.controllers.appendChild(this.toolbar);
this.tooltip=$(document.createElement('div'));
this.tooltip.id="bbcode_tooltip";
this.tooltip.innerHTML=", ";
this.controllers.appendChild(this.tooltip);
this.controllers.appendChild(this.textarea.element.remove());
},
_initEmotions:function(){
this._addEmotion("biggrin",function(){this.<API key>(" :D ");});
this._addEmotion("smile",function(){this.<API key>(" :) ");});
this._addEmotion("sad",function(){this.<API key>(" :( ");});
this._addEmotion("surprised",function(){this.<API key>(" :o ");});
this._addEmotion("eek",function(){this.<API key>(" :shock: ");});
this._addEmotion("confused",function(){this.<API key>(" :? ");});
this._addEmotion("cool",function(){this.<API key>(" 8) ");});
this._addEmotion("lol",function(){this.<API key>(" :lol: ");});
this._addEmotion("mad",function(){this.<API key>(" :x ");});
this._addEmotion("razz",function(){this.<API key>(" :P ");});
this._addEmotion("redface",function(){this.<API key>(" :oops: ");});
this._addEmotion("cry",function(){this.<API key>(" :cry: ");});
this._addEmotion("evil",function(){this.<API key>(" :evil: ");});
this._addEmotion("twisted",function(){this.<API key>(" :twisted: ");});
this._addEmotion("rolleyes",function(){this.<API key>(" :roll: ");});
this._addEmotion("wink",function(){this.<API key>(" :wink: ");});
this._addEmotion("exclaim",function(){this.<API key>(" :!: ");});
this._addEmotion("question",function(){this.<API key>(" :?: ");});
this._addEmotion("idea",function(){this.<API key>(" :idea: ");});
this._addEmotion("arrow",function(){this.<API key>(" :arrow: ");});
},
_addEmotion:function(icon,callback){
var img=$(document.createElement('img'));
img.src="http:
img.observe('click',callback.bindAsEventListener(this.textarea));
this.emotions.appendChild(img);
},
_initToolbar:function(){
this._addButton("B",function(){this.wrapSelection('[b]','[/b]');},function(){this.innerHTML=': [b][/b] (alt+b)';},{id:'button_bold'});
this._addButton("I",function(){this.wrapSelection('[i]','[/i]');},function(){this.innerHTML=': [i][/i] (alt+i)';},{id:'button_italic'});
this._addButton("U",function(){this.wrapSelection('[u]','[/u]');},function(){this.innerHTML=': [u][/u] (alt+u)';},{id:'button_underline'});
this._addButton("Quote",function(){this.wrapSelection('[quote]','[/quote]');},function(){this.innerHTML=': [quote][/quote] [quote="javaeye"][/quote] (alt+q)';});
this._addButton("Code",function(){this.wrapSelection('[code="java"]','[/code]');},function(){this.innerHTML=': [code="ruby"]...[/code] (java, ruby, js, xml, html, php, python, c, c++, c#, sql)';});
this._addButton("List",function(){this.<API key>('[*]','[list]\n','\n[/list]')},function(){this.innerHTML=': [list] [*] [*] [/list] : [list=1] [*] [*] [/list]';});
this._addButton("Img",function(){this.wrapSelection('[img]','[/img]');},function(){this.innerHTML=': [img]http://image_url[/img] (alt+p)';});
this._addButton("URL",function(){this.wrapSelection('[url]','[/url]');},function(){this.innerHTML='URL: [url]http:
this._addButton("Flash",function(){this.wrapSelection('[flash=200,200]','[/flash]');},function(){this.innerHTML='Flash: [flash=,]http://your_flash.swf[/flash]';});
this._addButton("Table",function(){this.<API key>(function(lines,line){lines.push("|"+line+"|");return lines;},'[table]\n','\n[/table]');},function(){this.innerHTML=': [table]|[/table]';});
var color_select=[
"<br />: ",
"<select id='select_color'>",
"<option value='black' style='color: black;'></option>",
"<option value='darkred' style='color: darkred;'></option>",
"<option value='red' style='color: red;'></option>",
"<option value='orange' style='color: orange;'></option>",
"<option value='brown' style='color: brown;'></option>",
"<option value='yellow' style='color: yellow;'></option>",
"<option value='green' style='color: green;'></option>",
"<option value='olive' style='color: olive;'></option>",
"<option value='cyan' style='color: cyan;'></option>",
"<option value='blue' style='color: blue;'></option>",
"<option value='darkblue' style='color: darkblue;'></option>",
"<option value='indigo' style='color: indigo;'></option>",
"<option value='violet' style='color: violet;'></option>",
"<option value='gray' style='color: gray;'></option>",
"<option value='white' style='color: white;'></option>",
"<option value='black' style='color: black;'></option>",
"</select>"
];
this.toolbar.insert(color_select.join(""));
$('select_color').observe('change',this._change_color.bindAsEventListener(this.textarea));
$('select_color').observe('mouseover',function(){$("bbcode_tooltip").innerHTML=": [color=red][/color] color=#FF0000";});
var font_select=[
" : ",
"<select id='select_font'>",
"<option value='0'></option>",
"<option value='xx-small'>1 (xx-small)</option>",
"<option value='x-small'>2 (x-small)</option>",
"<option value='small'>3 (small)</option>",
"<option value='medium'>4 (medium)</option>",
"<option value='large'>5 (large)</option>",
"<option value='x-large'>6 (x-large)</option>",
"<option value='xx-large'>7 (xx-large)</option>",
"</select>"
];
this.toolbar.insert(font_select.join(""));
$('select_font').observe('change',this._change_font.bindAsEventListener(this.textarea));
$('select_font').observe('mouseover',function(){$("bbcode_tooltip").innerHTML=": [size=x-small][/size]";});
var align_select=[
" : ",
"<select id='select_align'>",
"<option value='0'></option>",
"<option value='left'></option>",
"<option value='center'></option>",
"<option value='right'></option>",
"</select>"
]
this.toolbar.insert(align_select.join(""));
$('select_align').observe('change',this._change_align.bindAsEventListener(this.textarea));
$('select_align').observe('mouseover',function(){$("bbcode_tooltip").innerHTML=": [align=center][/align]";});
},
_addButton:function(value,callback,tooltip,attrs){
var input=$(document.createElement('input'));
input.type="button";
input.value=value;
input.observe('click',callback.bindAsEventListener(this.textarea));
input.observe('mouseover',tooltip.bindAsEventListener(this.tooltip));
Object.extend(input,attrs||{});
this.toolbar.appendChild(input);
},
_change_color:function(){
this.wrapSelection('[color='+$F('select_color')+']','[/color]');
$('select_color').selectedIndex=0;
},
_change_font:function(){
this.wrapSelection('[size='+$F('select_font')+']','[/size]');
$('select_font').selectedIndex=0;
},
_change_align:function(){
this.wrapSelection('[align='+$F('select_align')+']','[/align]');
$('select_align').selectedIndex=0;
}
});if(typeof(tinyMCE)!='undefined'){
tinyMCE.init({
plugins:"javaeye,media,table,emotions,contextmenu,fullscreen,inlinepopups",
mode:"none",
language:"zh",
theme:"advanced",
<API key>:"formatselect,fontselect,fontsizeselect,separator,forecolor,backcolor,separator,bold,italic,underline,strikethrough,separator,bullist,numlist",
<API key>:"undo,redo,cut,copy,paste,separator,justifyleft,justifycenter,justifyright,separator,outdent,indent,separator,link,unlink,image,media,emotions,table,separator,quote,code,separator,fullscreen",
<API key>:"",
<API key>:"top",
<API key>:"left",
<API key>:"=;=;=;=;=;=;Arial=arial,helvetica,sans-serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
<API key>:true,
<API key>:true,
remove_linebreaks:false,
width:"100%",
<API key>:"pre[name|class],object[classid|codebase|width|height|align],param[name|value],embed[quality|type|pluginspage|width|height|src|align|wmode]",
relative_urls:false,
content_css:"/javascripts/tinymce/plugins/javaeye/css/content.css",
save_callback:"removeBRInPre"
});
}
function removeBRInPre(element_id,html,body){
return html.replace(/<pre([^>]*)>((?:.|\n)*?)<\/pre>/gi,function(a,b,c){
c=c.replace(/<br\s*\/?>\n*/gi,'\n');
return'<pre'+b+'>'+c+'</pre>';
});
}
Control.TextArea.Editor=Class.create();
Object.extend(Control.TextArea.Editor.prototype,{
bbcode_editor:false,
rich_editor:false,
mode:false,
in_preview:false,
initialize:function(textarea,mode,autosave){
this.editor_bbcode_flag=$("editor_bbcode_flag");
this.textarea=textarea;
this.switchMode(mode);
if(autosave)this._initAutosave();
},
switchMode:function(mode,convert){
if(this.in_preview&&this.mode==mode){
$("editor_tab_bbcode").removeClassName("activetab");
$("editor_tab_rich").removeClassName("activetab");
$("editor_tab_preview").removeClassName("activetab");
$("editor_tab_"+mode).addClassName("activetab");
$("editor_preview").hide();
$("editor_main").show();
this.in_preview=false;
return;
}
if(this.mode==mode)return;
if(convert){
var old_text=this.getValue();
if(old_text!=""){
if(!confirm(",?"))return;
$('<API key>').show();
}
}
this.mode=mode;
if($("editor_switch")){
$("editor_tab_bbcode").removeClassName("activetab");
$("editor_tab_rich").removeClassName("activetab");
$("editor_tab_preview").removeClassName("activetab");
$("editor_tab_"+mode).addClassName("activetab");
$("editor_preview").hide();
$("editor_main").show();
this.in_preview=false;
}
if(this.mode=="rich"){
this.editor_bbcode_flag.value="false";
if(this.bbcode_editor)this.bbcode_editor.hide();
this.rich_editor=true;
tinyMCE.execCommand('mceAddControl',false,this.textarea);
}else{
this.editor_bbcode_flag.value="true";
if(this.rich_editor)tinyMCE.execCommand('mceRemoveControl',false,this.textarea);
this.bbcode_editor?this.bbcode_editor.show():this.bbcode_editor=new Control.TextArea.BBCode(this.textarea);
}
if(convert&&old_text!=""){
new Ajax.Request(this.mode=="rich"?'/editor/bbcode2html':'/editor/html2bbcode',{
method:'post',
parameters:{text:old_text},
asynchronous:true,
onSuccess:function(transport){this.setValue(transport.responseText);$('<API key>').hide();}.bind(this)
});
}
},
getValue:function(){
return this.mode=="bbcode"?this.bbcode_editor.textarea.element.value:tinyMCE.activeEditor.getContent();
},
setValue:function(value){
if(this.mode=="bbcode"){
this.bbcode_editor.textarea.element.value=value;
}else{
tinyMCE.get(this.textarea).setContent(value);
}
},
preview:function(){
this.in_preview=true;
$('<API key>').show();
$("editor_preview").show();
$("editor_main").hide();
$("editor_tab_bbcode").removeClassName("activetab");
$("editor_tab_rich").removeClassName("activetab");
$("editor_tab_preview").addClassName("activetab");
new Ajax.Updater("editor_preview","/editor/preview",{
parameters:{text:this.getValue(),mode:this.mode},
evalScripts:true,
onSuccess:function(){$('<API key>').hide();}
});
},
insertImage:function(url){
if(this.mode=="bbcode"){
this.bbcode_editor.textarea.<API key>("\n[img]"+url+"[/img]\n");
}else{
tinyMCE.execCommand("mceInsertContent", false, "<br/><img src='"+url+"'/><br/> ");
}
},
_initAutosave:function(){
this.autosave_url=window.location.href;
new Ajax.Request('/editor/check_autosave',{
method:'post',
parameters:{url:this.autosave_url},
asynchronous:true,
onSuccess:this._loadAutosave.bind(this)
});
setInterval(this._autosave.bind(this),90*1000);
},
_loadAutosave:function(transport){
var text=transport.responseText;
if(text!="nil"){
eval("this.auto_save = "+text);
$('<API key>').update('<span style="color:red">'+this.auto_save.updated_at+'<a href="#" onclick=\'editor._setAutosave();return false;\'></a><a href="#" onclick=\'editor._discardAutosave();return false;\'></a></span>');
}
},
_setAutosave:function(){
$("editor_auto_save_id").value=this.auto_save.id;
$('<API key>').update("");
this.auto_save.bbcode?this.switchMode("bbcode"):this.switchMode("rich");
this.setValue(this.auto_save.body);
},
_discardAutosave:function(){
$("editor_auto_save_id").value=this.auto_save.id;
$('<API key>').update("");
},
_autosave:function(){
var body=this.getValue();
if(body.length<100)return;
new Ajax.Request('/editor/autosave',{
method:'post',
parameters:{
url:this.autosave_url,
body:body,
bbcode:this.mode=="bbcode"
},
asynchronous:true,
onSuccess:function(transport){
$('editor_auto_save_id').value=transport.responseText;
$('<API key>').update('<span style="color:red">JavaEye'+new Date().toLocaleString()+'</span>');
}
});
}
});
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_14) on Tue Aug 17 01:05:10 EDT 2010 -->
<TITLE>
org.apache.hadoop.hdfs.server.namenode.metrics (Hadoop-Hdfs 0.21.0 API)
</TITLE>
<META NAME="date" CONTENT="2010-08-17">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameTitleFont">
<A HREF="../../../../../../../org/apache/hadoop/hdfs/server/namenode/metrics/package-summary.html" target="classFrame">org.apache.hadoop.hdfs.server.namenode.metrics</A></FONT>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
Interfaces</FONT>
<FONT CLASS="FrameItemFont">
<BR>
<A HREF="FSNamesystemMBean.html" title="interface in org.apache.hadoop.hdfs.server.namenode.metrics" target="classFrame"><I>FSNamesystemMBean</I></A></FONT></TD>
</TR>
</TABLE>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
Classes</FONT>
<FONT CLASS="FrameItemFont">
<BR>
<A HREF="FSNamesystemMetrics.html" title="class in org.apache.hadoop.hdfs.server.namenode.metrics" target="classFrame">FSNamesystemMetrics</A>
<BR>
<A HREF="<API key>.html" title="class in org.apache.hadoop.hdfs.server.namenode.metrics" target="classFrame"><API key></A>
<BR>
<A HREF="NameNodeMetrics.html" title="class in org.apache.hadoop.hdfs.server.namenode.metrics" target="classFrame">NameNodeMetrics</A></FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|
#pragma once
#include <aws/dynamodb/DynamoDB_EXPORTS.h>
#include <aws/dynamodb/model/AttributeValue.h>
#include <aws/dynamodb/model/ComparisonOperator.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace DynamoDB
{
namespace Model
{
class AWS_DYNAMODB_API <API key>
{
public:
<API key>();
<API key>(Aws::Utils::Json::JsonView jsonValue);
<API key>& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const AttributeValue& GetValue() const{ return m_value; }
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
inline void SetValue(const AttributeValue& value) { m_valueHasBeenSet = true; m_value = value; }
inline void SetValue(AttributeValue&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
inline <API key>& WithValue(const AttributeValue& value) { SetValue(value); return *this;}
inline <API key>& WithValue(AttributeValue&& value) { SetValue(std::move(value)); return *this;}
/**
* <p>Causes DynamoDB to evaluate the value before attempting a conditional
* operation:</p> <ul> <li> <p>If <code>Exists</code> is <code>true</code>,
* DynamoDB will check to see if that attribute value already exists in the table.
* If it is found, then the operation succeeds. If it is not found, the operation
* fails with a <code><API key></code>.</p> </li> <li> <p>If
* <code>Exists</code> is <code>false</code>, DynamoDB assumes that the attribute
* value does not exist in the table. If in fact the value does not exist, then the
* assumption is valid and the operation succeeds. If the value is found, despite
* the assumption that it does not exist, the operation fails with a
* <code><API key></code>.</p> </li> </ul> <p>The default
* setting for <code>Exists</code> is <code>true</code>. If you supply a
* <code>Value</code> all by itself, DynamoDB assumes the attribute exists: You
* don't have to set <code>Exists</code> to <code>true</code>, because it is
* implied.</p> <p>DynamoDB returns a <code>ValidationException</code> if:</p> <ul>
* <li> <p> <code>Exists</code> is <code>true</code> but there is no
* <code>Value</code> to check. (You expect a value to exist, but don't specify
* what that value is.)</p> </li> <li> <p> <code>Exists</code> is
* <code>false</code> but you also provide a <code>Value</code>. (You cannot expect
* an attribute to have a value, while also expecting it not to exist.)</p> </li>
* </ul>
*/
inline bool GetExists() const{ return m_exists; }
/**
* <p>Causes DynamoDB to evaluate the value before attempting a conditional
* operation:</p> <ul> <li> <p>If <code>Exists</code> is <code>true</code>,
* DynamoDB will check to see if that attribute value already exists in the table.
* If it is found, then the operation succeeds. If it is not found, the operation
* fails with a <code><API key></code>.</p> </li> <li> <p>If
* <code>Exists</code> is <code>false</code>, DynamoDB assumes that the attribute
* value does not exist in the table. If in fact the value does not exist, then the
* assumption is valid and the operation succeeds. If the value is found, despite
* the assumption that it does not exist, the operation fails with a
* <code><API key></code>.</p> </li> </ul> <p>The default
* setting for <code>Exists</code> is <code>true</code>. If you supply a
* <code>Value</code> all by itself, DynamoDB assumes the attribute exists: You
* don't have to set <code>Exists</code> to <code>true</code>, because it is
* implied.</p> <p>DynamoDB returns a <code>ValidationException</code> if:</p> <ul>
* <li> <p> <code>Exists</code> is <code>true</code> but there is no
* <code>Value</code> to check. (You expect a value to exist, but don't specify
* what that value is.)</p> </li> <li> <p> <code>Exists</code> is
* <code>false</code> but you also provide a <code>Value</code>. (You cannot expect
* an attribute to have a value, while also expecting it not to exist.)</p> </li>
* </ul>
*/
inline bool ExistsHasBeenSet() const { return m_existsHasBeenSet; }
/**
* <p>Causes DynamoDB to evaluate the value before attempting a conditional
* operation:</p> <ul> <li> <p>If <code>Exists</code> is <code>true</code>,
* DynamoDB will check to see if that attribute value already exists in the table.
* If it is found, then the operation succeeds. If it is not found, the operation
* fails with a <code><API key></code>.</p> </li> <li> <p>If
* <code>Exists</code> is <code>false</code>, DynamoDB assumes that the attribute
* value does not exist in the table. If in fact the value does not exist, then the
* assumption is valid and the operation succeeds. If the value is found, despite
* the assumption that it does not exist, the operation fails with a
* <code><API key></code>.</p> </li> </ul> <p>The default
* setting for <code>Exists</code> is <code>true</code>. If you supply a
* <code>Value</code> all by itself, DynamoDB assumes the attribute exists: You
* don't have to set <code>Exists</code> to <code>true</code>, because it is
* implied.</p> <p>DynamoDB returns a <code>ValidationException</code> if:</p> <ul>
* <li> <p> <code>Exists</code> is <code>true</code> but there is no
* <code>Value</code> to check. (You expect a value to exist, but don't specify
* what that value is.)</p> </li> <li> <p> <code>Exists</code> is
* <code>false</code> but you also provide a <code>Value</code>. (You cannot expect
* an attribute to have a value, while also expecting it not to exist.)</p> </li>
* </ul>
*/
inline void SetExists(bool value) { m_existsHasBeenSet = true; m_exists = value; }
/**
* <p>Causes DynamoDB to evaluate the value before attempting a conditional
* operation:</p> <ul> <li> <p>If <code>Exists</code> is <code>true</code>,
* DynamoDB will check to see if that attribute value already exists in the table.
* If it is found, then the operation succeeds. If it is not found, the operation
* fails with a <code><API key></code>.</p> </li> <li> <p>If
* <code>Exists</code> is <code>false</code>, DynamoDB assumes that the attribute
* value does not exist in the table. If in fact the value does not exist, then the
* assumption is valid and the operation succeeds. If the value is found, despite
* the assumption that it does not exist, the operation fails with a
* <code><API key></code>.</p> </li> </ul> <p>The default
* setting for <code>Exists</code> is <code>true</code>. If you supply a
* <code>Value</code> all by itself, DynamoDB assumes the attribute exists: You
* don't have to set <code>Exists</code> to <code>true</code>, because it is
* implied.</p> <p>DynamoDB returns a <code>ValidationException</code> if:</p> <ul>
* <li> <p> <code>Exists</code> is <code>true</code> but there is no
* <code>Value</code> to check. (You expect a value to exist, but don't specify
* what that value is.)</p> </li> <li> <p> <code>Exists</code> is
* <code>false</code> but you also provide a <code>Value</code>. (You cannot expect
* an attribute to have a value, while also expecting it not to exist.)</p> </li>
* </ul>
*/
inline <API key>& WithExists(bool value) { SetExists(value); return *this;}
/**
* <p>A comparator for evaluating attributes in the
* <code>AttributeValueList</code>. For example, equals, greater than, less than,
* etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ |
* NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH
* | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison
* operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is
* supported for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, Binary, String Set, Number Set, or Binary Set.
* If an item contains an <code>AttributeValue</code> element of a different type
* than the one provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported
* for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String, Number, Binary, String Set, Number Set, or Binary Set. If an
* item contains an <code>AttributeValue</code> of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can
* contain only one <code>AttributeValue</code> of type String, Number, or Binary
* (not a set type). If an item contains an <code>AttributeValue</code> element of
* a different type than the one provided in the request, the value does not match.
* For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal.
* </p> <p> <code>AttributeValueList</code> can contain only one
* <code>AttributeValue</code> element of type String, Number, or Binary (not a set
* type). If an item contains an <code>AttributeValue</code> element of a different
* type than the one provided in the request, the value does not match. For
* example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the existence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using
* <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is
* because the attribute "<code>a</code>" exists; its data type is not relevant to
* the <code>NOT_NULL</code> comparison operator.</p> </li> <li> <p>
* <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the nonexistence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>,
* the result is a Boolean <code>false</code>. This is because the attribute
* "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code>
* comparison operator.</p> </li> <li> <p> <code>CONTAINS</code> : Checks
* for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code>
* can contain only one <code>AttributeValue</code> element of type String, Number,
* or Binary (not a set type). If the target attribute of the comparison is of type
* String, then the operator checks for a substring match. If the target attribute
* of the comparison is of type Binary, then the operator looks for a subsequence
* of the target that matches the input. If the target attribute of the comparison
* is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the
* operator evaluates to true if it finds an exact match with any member of the
* set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS
* b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a
* set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for
* absence of a subsequence, or absence of a value in a set.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If the target
* attribute of the comparison is a String, then the operator checks for the
* absence of a substring match. If the target attribute of the comparison is
* Binary, then the operator checks for the absence of a subsequence of the target
* that matches the input. If the target attribute of the comparison is a set
* ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator
* evaluates to true if it <i>does not</i> find an exact match with any member of
* the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a
* NOT CONTAINS b</code>", "<code>a</code>" can be a list; however,
* "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p>
* <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String or Binary (not a Number or a set type). The target attribute of
* the comparison must be of type String or Binary (not a Number or a set
* type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in
* a list.</p> <p> <code>AttributeValueList</code> can contain one or more
* <code>AttributeValue</code> elements of type String, Number, or Binary. These
* attributes are compared against an existing attribute of an item. If any
* elements of the input are equal to the item attribute, the expression evaluates
* to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the
* first value, and less than or equal to the second value. </p> <p>
* <code>AttributeValueList</code> must contain two <code>AttributeValue</code>
* elements of the same type, either String, Number, or Binary (not a set type). A
* target attribute matches if the target value is greater than, or equal to, the
* first element and less than, or equal to, the second element. If an item
* contains an <code>AttributeValue</code> element of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>
* </p> </li> </ul>
*/
inline const ComparisonOperator& <API key>() const{ return <API key>; }
/**
* <p>A comparator for evaluating attributes in the
* <code>AttributeValueList</code>. For example, equals, greater than, less than,
* etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ |
* NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH
* | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison
* operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is
* supported for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, Binary, String Set, Number Set, or Binary Set.
* If an item contains an <code>AttributeValue</code> element of a different type
* than the one provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported
* for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String, Number, Binary, String Set, Number Set, or Binary Set. If an
* item contains an <code>AttributeValue</code> of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can
* contain only one <code>AttributeValue</code> of type String, Number, or Binary
* (not a set type). If an item contains an <code>AttributeValue</code> element of
* a different type than the one provided in the request, the value does not match.
* For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal.
* </p> <p> <code>AttributeValueList</code> can contain only one
* <code>AttributeValue</code> element of type String, Number, or Binary (not a set
* type). If an item contains an <code>AttributeValue</code> element of a different
* type than the one provided in the request, the value does not match. For
* example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the existence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using
* <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is
* because the attribute "<code>a</code>" exists; its data type is not relevant to
* the <code>NOT_NULL</code> comparison operator.</p> </li> <li> <p>
* <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the nonexistence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>,
* the result is a Boolean <code>false</code>. This is because the attribute
* "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code>
* comparison operator.</p> </li> <li> <p> <code>CONTAINS</code> : Checks
* for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code>
* can contain only one <code>AttributeValue</code> element of type String, Number,
* or Binary (not a set type). If the target attribute of the comparison is of type
* String, then the operator checks for a substring match. If the target attribute
* of the comparison is of type Binary, then the operator looks for a subsequence
* of the target that matches the input. If the target attribute of the comparison
* is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the
* operator evaluates to true if it finds an exact match with any member of the
* set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS
* b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a
* set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for
* absence of a subsequence, or absence of a value in a set.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If the target
* attribute of the comparison is a String, then the operator checks for the
* absence of a substring match. If the target attribute of the comparison is
* Binary, then the operator checks for the absence of a subsequence of the target
* that matches the input. If the target attribute of the comparison is a set
* ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator
* evaluates to true if it <i>does not</i> find an exact match with any member of
* the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a
* NOT CONTAINS b</code>", "<code>a</code>" can be a list; however,
* "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p>
* <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String or Binary (not a Number or a set type). The target attribute of
* the comparison must be of type String or Binary (not a Number or a set
* type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in
* a list.</p> <p> <code>AttributeValueList</code> can contain one or more
* <code>AttributeValue</code> elements of type String, Number, or Binary. These
* attributes are compared against an existing attribute of an item. If any
* elements of the input are equal to the item attribute, the expression evaluates
* to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the
* first value, and less than or equal to the second value. </p> <p>
* <code>AttributeValueList</code> must contain two <code>AttributeValue</code>
* elements of the same type, either String, Number, or Binary (not a set type). A
* target attribute matches if the target value is greater than, or equal to, the
* first element and less than, or equal to, the second element. If an item
* contains an <code>AttributeValue</code> element of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>
* </p> </li> </ul>
*/
inline bool <API key>() const { return <API key>; }
/**
* <p>A comparator for evaluating attributes in the
* <code>AttributeValueList</code>. For example, equals, greater than, less than,
* etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ |
* NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH
* | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison
* operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is
* supported for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, Binary, String Set, Number Set, or Binary Set.
* If an item contains an <code>AttributeValue</code> element of a different type
* than the one provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported
* for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String, Number, Binary, String Set, Number Set, or Binary Set. If an
* item contains an <code>AttributeValue</code> of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can
* contain only one <code>AttributeValue</code> of type String, Number, or Binary
* (not a set type). If an item contains an <code>AttributeValue</code> element of
* a different type than the one provided in the request, the value does not match.
* For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal.
* </p> <p> <code>AttributeValueList</code> can contain only one
* <code>AttributeValue</code> element of type String, Number, or Binary (not a set
* type). If an item contains an <code>AttributeValue</code> element of a different
* type than the one provided in the request, the value does not match. For
* example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the existence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using
* <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is
* because the attribute "<code>a</code>" exists; its data type is not relevant to
* the <code>NOT_NULL</code> comparison operator.</p> </li> <li> <p>
* <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the nonexistence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>,
* the result is a Boolean <code>false</code>. This is because the attribute
* "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code>
* comparison operator.</p> </li> <li> <p> <code>CONTAINS</code> : Checks
* for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code>
* can contain only one <code>AttributeValue</code> element of type String, Number,
* or Binary (not a set type). If the target attribute of the comparison is of type
* String, then the operator checks for a substring match. If the target attribute
* of the comparison is of type Binary, then the operator looks for a subsequence
* of the target that matches the input. If the target attribute of the comparison
* is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the
* operator evaluates to true if it finds an exact match with any member of the
* set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS
* b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a
* set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for
* absence of a subsequence, or absence of a value in a set.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If the target
* attribute of the comparison is a String, then the operator checks for the
* absence of a substring match. If the target attribute of the comparison is
* Binary, then the operator checks for the absence of a subsequence of the target
* that matches the input. If the target attribute of the comparison is a set
* ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator
* evaluates to true if it <i>does not</i> find an exact match with any member of
* the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a
* NOT CONTAINS b</code>", "<code>a</code>" can be a list; however,
* "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p>
* <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String or Binary (not a Number or a set type). The target attribute of
* the comparison must be of type String or Binary (not a Number or a set
* type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in
* a list.</p> <p> <code>AttributeValueList</code> can contain one or more
* <code>AttributeValue</code> elements of type String, Number, or Binary. These
* attributes are compared against an existing attribute of an item. If any
* elements of the input are equal to the item attribute, the expression evaluates
* to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the
* first value, and less than or equal to the second value. </p> <p>
* <code>AttributeValueList</code> must contain two <code>AttributeValue</code>
* elements of the same type, either String, Number, or Binary (not a set type). A
* target attribute matches if the target value is greater than, or equal to, the
* first element and less than, or equal to, the second element. If an item
* contains an <code>AttributeValue</code> element of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>
* </p> </li> </ul>
*/
inline void <API key>(const ComparisonOperator& value) { <API key> = true; <API key> = value; }
/**
* <p>A comparator for evaluating attributes in the
* <code>AttributeValueList</code>. For example, equals, greater than, less than,
* etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ |
* NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH
* | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison
* operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is
* supported for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, Binary, String Set, Number Set, or Binary Set.
* If an item contains an <code>AttributeValue</code> element of a different type
* than the one provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported
* for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String, Number, Binary, String Set, Number Set, or Binary Set. If an
* item contains an <code>AttributeValue</code> of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can
* contain only one <code>AttributeValue</code> of type String, Number, or Binary
* (not a set type). If an item contains an <code>AttributeValue</code> element of
* a different type than the one provided in the request, the value does not match.
* For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal.
* </p> <p> <code>AttributeValueList</code> can contain only one
* <code>AttributeValue</code> element of type String, Number, or Binary (not a set
* type). If an item contains an <code>AttributeValue</code> element of a different
* type than the one provided in the request, the value does not match. For
* example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the existence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using
* <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is
* because the attribute "<code>a</code>" exists; its data type is not relevant to
* the <code>NOT_NULL</code> comparison operator.</p> </li> <li> <p>
* <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the nonexistence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>,
* the result is a Boolean <code>false</code>. This is because the attribute
* "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code>
* comparison operator.</p> </li> <li> <p> <code>CONTAINS</code> : Checks
* for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code>
* can contain only one <code>AttributeValue</code> element of type String, Number,
* or Binary (not a set type). If the target attribute of the comparison is of type
* String, then the operator checks for a substring match. If the target attribute
* of the comparison is of type Binary, then the operator looks for a subsequence
* of the target that matches the input. If the target attribute of the comparison
* is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the
* operator evaluates to true if it finds an exact match with any member of the
* set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS
* b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a
* set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for
* absence of a subsequence, or absence of a value in a set.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If the target
* attribute of the comparison is a String, then the operator checks for the
* absence of a substring match. If the target attribute of the comparison is
* Binary, then the operator checks for the absence of a subsequence of the target
* that matches the input. If the target attribute of the comparison is a set
* ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator
* evaluates to true if it <i>does not</i> find an exact match with any member of
* the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a
* NOT CONTAINS b</code>", "<code>a</code>" can be a list; however,
* "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p>
* <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String or Binary (not a Number or a set type). The target attribute of
* the comparison must be of type String or Binary (not a Number or a set
* type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in
* a list.</p> <p> <code>AttributeValueList</code> can contain one or more
* <code>AttributeValue</code> elements of type String, Number, or Binary. These
* attributes are compared against an existing attribute of an item. If any
* elements of the input are equal to the item attribute, the expression evaluates
* to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the
* first value, and less than or equal to the second value. </p> <p>
* <code>AttributeValueList</code> must contain two <code>AttributeValue</code>
* elements of the same type, either String, Number, or Binary (not a set type). A
* target attribute matches if the target value is greater than, or equal to, the
* first element and less than, or equal to, the second element. If an item
* contains an <code>AttributeValue</code> element of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>
* </p> </li> </ul>
*/
inline void <API key>(ComparisonOperator&& value) { <API key> = true; <API key> = std::move(value); }
/**
* <p>A comparator for evaluating attributes in the
* <code>AttributeValueList</code>. For example, equals, greater than, less than,
* etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ |
* NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH
* | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison
* operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is
* supported for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, Binary, String Set, Number Set, or Binary Set.
* If an item contains an <code>AttributeValue</code> element of a different type
* than the one provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported
* for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String, Number, Binary, String Set, Number Set, or Binary Set. If an
* item contains an <code>AttributeValue</code> of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can
* contain only one <code>AttributeValue</code> of type String, Number, or Binary
* (not a set type). If an item contains an <code>AttributeValue</code> element of
* a different type than the one provided in the request, the value does not match.
* For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal.
* </p> <p> <code>AttributeValueList</code> can contain only one
* <code>AttributeValue</code> element of type String, Number, or Binary (not a set
* type). If an item contains an <code>AttributeValue</code> element of a different
* type than the one provided in the request, the value does not match. For
* example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the existence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using
* <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is
* because the attribute "<code>a</code>" exists; its data type is not relevant to
* the <code>NOT_NULL</code> comparison operator.</p> </li> <li> <p>
* <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the nonexistence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>,
* the result is a Boolean <code>false</code>. This is because the attribute
* "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code>
* comparison operator.</p> </li> <li> <p> <code>CONTAINS</code> : Checks
* for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code>
* can contain only one <code>AttributeValue</code> element of type String, Number,
* or Binary (not a set type). If the target attribute of the comparison is of type
* String, then the operator checks for a substring match. If the target attribute
* of the comparison is of type Binary, then the operator looks for a subsequence
* of the target that matches the input. If the target attribute of the comparison
* is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the
* operator evaluates to true if it finds an exact match with any member of the
* set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS
* b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a
* set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for
* absence of a subsequence, or absence of a value in a set.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If the target
* attribute of the comparison is a String, then the operator checks for the
* absence of a substring match. If the target attribute of the comparison is
* Binary, then the operator checks for the absence of a subsequence of the target
* that matches the input. If the target attribute of the comparison is a set
* ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator
* evaluates to true if it <i>does not</i> find an exact match with any member of
* the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a
* NOT CONTAINS b</code>", "<code>a</code>" can be a list; however,
* "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p>
* <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String or Binary (not a Number or a set type). The target attribute of
* the comparison must be of type String or Binary (not a Number or a set
* type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in
* a list.</p> <p> <code>AttributeValueList</code> can contain one or more
* <code>AttributeValue</code> elements of type String, Number, or Binary. These
* attributes are compared against an existing attribute of an item. If any
* elements of the input are equal to the item attribute, the expression evaluates
* to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the
* first value, and less than or equal to the second value. </p> <p>
* <code>AttributeValueList</code> must contain two <code>AttributeValue</code>
* elements of the same type, either String, Number, or Binary (not a set type). A
* target attribute matches if the target value is greater than, or equal to, the
* first element and less than, or equal to, the second element. If an item
* contains an <code>AttributeValue</code> element of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>
* </p> </li> </ul>
*/
inline <API key>& <API key>(const ComparisonOperator& value) { <API key>(value); return *this;}
/**
* <p>A comparator for evaluating attributes in the
* <code>AttributeValueList</code>. For example, equals, greater than, less than,
* etc.</p> <p>The following comparison operators are available:</p> <p> <code>EQ |
* NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH
* | IN | BETWEEN</code> </p> <p>The following are descriptions of each comparison
* operator.</p> <ul> <li> <p> <code>EQ</code> : Equal. <code>EQ</code> is
* supported for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, Binary, String Set, Number Set, or Binary Set.
* If an item contains an <code>AttributeValue</code> element of a different type
* than the one provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>NE</code> : Not equal. <code>NE</code> is supported
* for all data types, including lists and maps.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String, Number, Binary, String Set, Number Set, or Binary Set. If an
* item contains an <code>AttributeValue</code> of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not equal <code>{"NS":["6", "2", "1"]}</code>.</p>
* <p/> </li> <li> <p> <code>LE</code> : Less than or equal. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>LT</code> : Less than. </p> <p> <code>AttributeValueList</code> can
* contain only one <code>AttributeValue</code> of type String, Number, or Binary
* (not a set type). If an item contains an <code>AttributeValue</code> element of
* a different type than the one provided in the request, the value does not match.
* For example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GE</code> : Greater than or equal.
* </p> <p> <code>AttributeValueList</code> can contain only one
* <code>AttributeValue</code> element of type String, Number, or Binary (not a set
* type). If an item contains an <code>AttributeValue</code> element of a different
* type than the one provided in the request, the value does not match. For
* example, <code>{"S":"6"}</code> does not equal <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2",
* "1"]}</code>.</p> <p/> </li> <li> <p> <code>GT</code> : Greater than. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If an item contains
* an <code>AttributeValue</code> element of a different type than the one provided
* in the request, the value does not match. For example, <code>{"S":"6"}</code>
* does not equal <code>{"N":"6"}</code>. Also, <code>{"N":"6"}</code> does not
* compare to <code>{"NS":["6", "2", "1"]}</code>.</p> <p/> </li> <li> <p>
* <code>NOT_NULL</code> : The attribute exists. <code>NOT_NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the existence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using
* <code>NOT_NULL</code>, the result is a Boolean <code>true</code>. This result is
* because the attribute "<code>a</code>" exists; its data type is not relevant to
* the <code>NOT_NULL</code> comparison operator.</p> </li> <li> <p>
* <code>NULL</code> : The attribute does not exist. <code>NULL</code> is supported
* for all data types, including lists and maps.</p> <p>This operator tests
* for the nonexistence of an attribute, not its data type. If the data type of
* attribute "<code>a</code>" is null, and you evaluate it using <code>NULL</code>,
* the result is a Boolean <code>false</code>. This is because the attribute
* "<code>a</code>" exists; its data type is not relevant to the <code>NULL</code>
* comparison operator.</p> </li> <li> <p> <code>CONTAINS</code> : Checks
* for a subsequence, or value in a set.</p> <p> <code>AttributeValueList</code>
* can contain only one <code>AttributeValue</code> element of type String, Number,
* or Binary (not a set type). If the target attribute of the comparison is of type
* String, then the operator checks for a substring match. If the target attribute
* of the comparison is of type Binary, then the operator looks for a subsequence
* of the target that matches the input. If the target attribute of the comparison
* is a set ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the
* operator evaluates to true if it finds an exact match with any member of the
* set.</p> <p>CONTAINS is supported for lists: When evaluating "<code>a CONTAINS
* b</code>", "<code>a</code>" can be a list; however, "<code>b</code>" cannot be a
* set, a map, or a list.</p> </li> <li> <p> <code>NOT_CONTAINS</code> : Checks for
* absence of a subsequence, or absence of a value in a set.</p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* element of type String, Number, or Binary (not a set type). If the target
* attribute of the comparison is a String, then the operator checks for the
* absence of a substring match. If the target attribute of the comparison is
* Binary, then the operator checks for the absence of a subsequence of the target
* that matches the input. If the target attribute of the comparison is a set
* ("<code>SS</code>", "<code>NS</code>", or "<code>BS</code>"), then the operator
* evaluates to true if it <i>does not</i> find an exact match with any member of
* the set.</p> <p>NOT_CONTAINS is supported for lists: When evaluating "<code>a
* NOT CONTAINS b</code>", "<code>a</code>" can be a list; however,
* "<code>b</code>" cannot be a set, a map, or a list.</p> </li> <li> <p>
* <code>BEGINS_WITH</code> : Checks for a prefix. </p> <p>
* <code>AttributeValueList</code> can contain only one <code>AttributeValue</code>
* of type String or Binary (not a Number or a set type). The target attribute of
* the comparison must be of type String or Binary (not a Number or a set
* type).</p> <p/> </li> <li> <p> <code>IN</code> : Checks for matching elements in
* a list.</p> <p> <code>AttributeValueList</code> can contain one or more
* <code>AttributeValue</code> elements of type String, Number, or Binary. These
* attributes are compared against an existing attribute of an item. If any
* elements of the input are equal to the item attribute, the expression evaluates
* to true.</p> </li> <li> <p> <code>BETWEEN</code> : Greater than or equal to the
* first value, and less than or equal to the second value. </p> <p>
* <code>AttributeValueList</code> must contain two <code>AttributeValue</code>
* elements of the same type, either String, Number, or Binary (not a set type). A
* target attribute matches if the target value is greater than, or equal to, the
* first element and less than, or equal to, the second element. If an item
* contains an <code>AttributeValue</code> element of a different type than the one
* provided in the request, the value does not match. For example,
* <code>{"S":"6"}</code> does not compare to <code>{"N":"6"}</code>. Also,
* <code>{"N":"6"}</code> does not compare to <code>{"NS":["6", "2", "1"]}</code>
* </p> </li> </ul>
*/
inline <API key>& <API key>(ComparisonOperator&& value) { <API key>(std::move(value)); return *this;}
inline const Aws::Vector<AttributeValue>& <API key>() const{ return <API key>; }
inline bool <API key>() const { return <API key>; }
inline void <API key>(const Aws::Vector<AttributeValue>& value) { <API key> = true; <API key> = value; }
inline void <API key>(Aws::Vector<AttributeValue>&& value) { <API key> = true; <API key> = std::move(value); }
inline <API key>& <API key>(const Aws::Vector<AttributeValue>& value) { <API key>(value); return *this;}
inline <API key>& <API key>(Aws::Vector<AttributeValue>&& value) { <API key>(std::move(value)); return *this;}
inline <API key>& <API key>(const AttributeValue& value) { <API key> = true; <API key>.push_back(value); return *this; }
inline <API key>& <API key>(AttributeValue&& value) { <API key> = true; <API key>.push_back(std::move(value)); return *this; }
private:
AttributeValue m_value;
bool m_valueHasBeenSet;
bool m_exists;
bool m_existsHasBeenSet;
ComparisonOperator <API key>;
bool <API key>;
Aws::Vector<AttributeValue> <API key>;
bool <API key>;
};
} // namespace Model
} // namespace DynamoDB
} // namespace Aws
|
<?php
namespace Topxia\Service\User\Dao;
interface UserFortuneLogDao
{
public function addLog(array $log);
}
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_14) on Tue Aug 17 01:07:09 EDT 2010 -->
<TITLE>
Uses of Class org.apache.hadoop.mapred.lib.aggregate.LongValueSum (Hadoop-Mapred 0.21.0 API)
</TITLE>
<META NAME="date" CONTENT="2010-08-17">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.hadoop.mapred.lib.aggregate.LongValueSum (Hadoop-Mapred 0.21.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../org/apache/hadoop/mapred/lib/aggregate/LongValueSum.html" title="class in org.apache.hadoop.mapred.lib.aggregate"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?org/apache/hadoop/mapred/lib/aggregate//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="LongValueSum.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.apache.hadoop.mapred.lib.aggregate.LongValueSum</B></H2>
</CENTER>
No usage of org.apache.hadoop.mapred.lib.aggregate.LongValueSum
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../org/apache/hadoop/mapred/lib/aggregate/LongValueSum.html" title="class in org.apache.hadoop.mapred.lib.aggregate"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?org/apache/hadoop/mapred/lib/aggregate//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="LongValueSum.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
Copyright © 2009 The Apache Software Foundation
</BODY>
</HTML>
|
// TYPHOON FRAMEWORK
// NOTICE: The authors permit you to use, modify, and distribute this file
#import <Foundation/Foundation.h>
#import "PFWeatherClient.h"
#import "PFThemeable.h"
@protocol PFCityDao;
@protocol PFWeatherClient;
@class <API key>;
@interface <API key> : UIViewController <UITextFieldDelegate, PFThemeable>
#pragma mark - Typhoon injected properties
@property(nonatomic, strong) id <PFCityDao> cityDao;
@property(nonatomic, strong) id <PFWeatherClient> weatherClient;
@property(nonatomic, strong) PFTheme* theme;
@property(nonatomic, strong) <API key>* rootViewController;
#pragma mark - Interface Builder injected properties
@property(nonatomic, weak) IBOutlet UITextField* nameOfCityToAdd;
@property(nonatomic, weak) IBOutlet UILabel* validationMessage;
@property(nonatomic, weak) IBOutlet <API key>* spinner;
@end
|
import os
from segments import Segment, theme
from utils import colors, glyphs
class CurrentDir(Segment):
bg = colors.background(theme.CURRENTDIR_BG)
fg = colors.foreground(theme.CURRENTDIR_FG)
def init(self, cwd):
home = os.path.expanduser('~')
self.text = cwd.replace(home, '~')
class ReadOnly(Segment):
bg = colors.background(theme.READONLY_BG)
fg = colors.foreground(theme.READONLY_FG)
def init(self, cwd):
self.text = ' ' + glyphs.WRITE_ONLY + ' '
if os.access(cwd, os.W_OK):
self.active = False
class Venv(Segment):
bg = colors.background(theme.VENV_BG)
fg = colors.foreground(theme.VENV_FG)
def init(self):
env = os.getenv('VIRTUAL_ENV')
if env is None:
self.active = False
return
env_name = os.path.basename(env)
self.text = glyphs.VIRTUAL_ENV + ' ' + env_name
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:
<html>
<head>
<title>satisfy (Spec::Matchers)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/spec/matchers/satisfy.rb, line 43</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">satisfy</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
<span class="ruby-constant">Matchers</span><span class="ruby-operator">::</span><span class="ruby-constant">Satisfy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
|
package com.kodcu.service.extension.chart;
import com.kodcu.controller.<API key>;
import com.kodcu.other.Current;
import com.kodcu.service.ThreadService;
import javafx.scene.chart.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component("area-bean")
public class <API key> extends <API key> {
private final ThreadService threadService;
private final Current current;
private final <API key> controller;
@Autowired
public <API key>(ThreadService threadService, Current current, <API key> controller) {
super(threadService, current, controller);
this.threadService = threadService;
this.current = current;
this.controller = controller;
}
@Override
protected XYChart<Number, Number> createXYChart() {
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
final XYChart<Number, Number> lineChart = new AreaChart<Number, Number>(xAxis, yAxis);
return lineChart;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.