blob: 3e4369f54c2cc9f64c25b193ba466886aca0d0c6 [file] [log] [blame]
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pyarrow.plasma.PlasmaClient &mdash; Apache Arrow v2.0.0</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<link rel="canonical" href="https://arrow.apache.org/docs/python/generated/pyarrow.plasma.PlasmaClient.html" />
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="pyarrow.plasma.PlasmaBuffer" href="pyarrow.plasma.PlasmaBuffer.html" />
<link rel="prev" title="pyarrow.plasma.ObjectID" href="pyarrow.plasma.ObjectID.html" />
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '20']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> Apache Arrow
</a>
<div class="version">
2.0.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Specifications and Protocols</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../format/Versioning.html">Format Versioning and Stability</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../format/Columnar.html">Arrow Columnar Format</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../format/Flight.html">Arrow Flight RPC</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../format/Integration.html">Integration Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../format/CDataInterface.html">The Arrow C data interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../format/CStreamInterface.html">The Arrow C stream interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../format/Other.html">Other Data Structures</a></li>
</ul>
<p class="caption"><span class="caption-text">Libraries</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../status.html">Implementation Status</a></li>
<li class="toctree-l1"><a class="reference external" href="https://arrow.apache.org/docs/c_glib/">C/GLib</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cpp/index.html">C++</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/apache/arrow/blob/master/csharp/README.md">C#</a></li>
<li class="toctree-l1"><a class="reference external" href="https://godoc.org/github.com/apache/arrow/go/arrow">Go</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../java/index.html">Java</a></li>
<li class="toctree-l1"><a class="reference external" href="https://arrow.apache.org/docs/js/">JavaScript</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/apache/arrow/blob/master/matlab/README.md">MATLAB</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Python</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../install.html">Installing PyArrow</a></li>
<li class="toctree-l2"><a class="reference internal" href="../memory.html">Memory and IO Interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../data.html">Data Types and In-Memory Data Model</a></li>
<li class="toctree-l2"><a class="reference internal" href="../compute.html">Compute Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ipc.html">Streaming, Serialization, and IPC</a></li>
<li class="toctree-l2"><a class="reference internal" href="../filesystems.html">Filesystem Interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="../filesystems_deprecated.html">Filesystem Interface (legacy)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plasma.html">The Plasma In-Memory Object Store</a></li>
<li class="toctree-l2"><a class="reference internal" href="../numpy.html">NumPy Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../pandas.html">Pandas Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../timestamps.html">Timestamps</a></li>
<li class="toctree-l2"><a class="reference internal" href="../csv.html">Reading CSV files</a></li>
<li class="toctree-l2"><a class="reference internal" href="../feather.html">Feather File Format</a></li>
<li class="toctree-l2"><a class="reference internal" href="../json.html">Reading JSON files</a></li>
<li class="toctree-l2"><a class="reference internal" href="../parquet.html">Reading and Writing the Apache Parquet Format</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dataset.html">Tabular Datasets</a></li>
<li class="toctree-l2"><a class="reference internal" href="../cuda.html">CUDA Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../extending_types.html">Extending pyarrow</a></li>
<li class="toctree-l2"><a class="reference internal" href="../extending.html">Using pyarrow from C++ and Cython Code</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../api/datatypes.html">Data Types and Schemas</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/arrays.html">Arrays and Scalars</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/memory.html">Buffers and Memory</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/compute.html">Compute Functions</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/files.html">Streams and File Access</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/tables.html">Tables and Tensors</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/ipc.html">Serialization and IPC</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/flight.html">Arrow Flight</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/formats.html">Tabular File Formats</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/filesystems.html">Filesystems</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/dataset.html">Dataset</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../api/plasma.html">Plasma In-Memory Object Store</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../api/plasma.html#classes">Classes</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../api/cuda.html">CUDA Integration</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/misc.html">Miscellaneous</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../getting_involved.html">Getting Involved</a></li>
<li class="toctree-l2"><a class="reference internal" href="../benchmarks.html">Benchmarks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="https://arrow.apache.org/docs/r/">R</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/apache/arrow/blob/master/ruby/README.md">Ruby</a></li>
<li class="toctree-l1"><a class="reference external" href="https://docs.rs/crate/arrow/">Rust</a></li>
</ul>
<p class="caption"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../developers/contributing.html">Contributing to Apache Arrow</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/cpp/index.html">C++ Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/python.html">Python Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/archery.html">Daily Development using Archery</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/crossbow.html">Packaging and Testing with Crossbow</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/docker.html">Running Docker Builds</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/benchmarks.html">Benchmarks</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developers/documentation.html">Building the Documentation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Apache Arrow</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Python bindings</a> &raquo;</li>
<li><a href="../api.html">API Reference</a> &raquo;</li>
<li><a href="../api/plasma.html">Plasma In-Memory Object Store</a> &raquo;</li>
<li>pyarrow.plasma.PlasmaClient</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/python/generated/pyarrow.plasma.PlasmaClient.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pyarrow-plasma-plasmaclient">
<h1>pyarrow.plasma.PlasmaClient<a class="headerlink" href="#pyarrow-plasma-plasmaclient" title="Permalink to this headline"></a></h1>
<dl class="py class">
<dt id="pyarrow.plasma.PlasmaClient">
<em class="property">class </em><code class="sig-prename descclassname">pyarrow.plasma.</code><code class="sig-name descname">PlasmaClient</code><a class="headerlink" href="#pyarrow.plasma.PlasmaClient" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.lib._Weakrefable</span></code></p>
<p>The PlasmaClient is used to interface with a plasma store and manager.</p>
<p>The PlasmaClient can ask the PlasmaStore to allocate a new buffer, seal a
buffer, and get a buffer. Buffers are referred to by object IDs, which are
strings.</p>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
</dd></dl>
<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.__init__" title="pyarrow.plasma.PlasmaClient.__init__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code></a>()</p></td>
<td><p>Initialize self.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.contains" title="pyarrow.plasma.PlasmaClient.contains"><code class="xref py py-obj docutils literal notranslate"><span class="pre">contains</span></code></a>(self, ObjectID object_id)</p></td>
<td><p>Check if the object is present and sealed in the PlasmaStore.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.create" title="pyarrow.plasma.PlasmaClient.create"><code class="xref py py-obj docutils literal notranslate"><span class="pre">create</span></code></a>(self, ObjectID object_id, …)</p></td>
<td><p>Create a new buffer in the PlasmaStore for a particular object ID.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.create_and_seal" title="pyarrow.plasma.PlasmaClient.create_and_seal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">create_and_seal</span></code></a>(self, ObjectID object_id, …)</p></td>
<td><p>Store a new object in the PlasmaStore for a particular object ID.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.debug_string" title="pyarrow.plasma.PlasmaClient.debug_string"><code class="xref py py-obj docutils literal notranslate"><span class="pre">debug_string</span></code></a>(self)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.decode_notifications" title="pyarrow.plasma.PlasmaClient.decode_notifications"><code class="xref py py-obj docutils literal notranslate"><span class="pre">decode_notifications</span></code></a>(self, const uint8_t *buf)</p></td>
<td><p>Get the notification from the buffer.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.delete" title="pyarrow.plasma.PlasmaClient.delete"><code class="xref py py-obj docutils literal notranslate"><span class="pre">delete</span></code></a>(self, object_ids)</p></td>
<td><p>Delete the objects with the given IDs from other object store.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.disconnect" title="pyarrow.plasma.PlasmaClient.disconnect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">disconnect</span></code></a>(self)</p></td>
<td><p>Disconnect this client from the Plasma store.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.evict" title="pyarrow.plasma.PlasmaClient.evict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">evict</span></code></a>(self, int64_t num_bytes)</p></td>
<td><p>Evict some objects until to recover some bytes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.get" title="pyarrow.plasma.PlasmaClient.get"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get</span></code></a>(self, object_ids, int timeout_ms=-1[, …])</p></td>
<td><p>Get one or more Python values from the object store.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.get_buffers" title="pyarrow.plasma.PlasmaClient.get_buffers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_buffers</span></code></a>(self, object_ids[, timeout_ms, …])</p></td>
<td><p>Returns data buffer from the PlasmaStore based on object ID.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.get_metadata" title="pyarrow.plasma.PlasmaClient.get_metadata"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_metadata</span></code></a>(self, object_ids[, timeout_ms])</p></td>
<td><p>Returns metadata buffer from the PlasmaStore based on object ID.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.get_next_notification" title="pyarrow.plasma.PlasmaClient.get_next_notification"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_next_notification</span></code></a>(self)</p></td>
<td><p>Get the next notification from the notification socket.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.get_notification_socket" title="pyarrow.plasma.PlasmaClient.get_notification_socket"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_notification_socket</span></code></a>(self)</p></td>
<td><p>Get the notification socket.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.hash" title="pyarrow.plasma.PlasmaClient.hash"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hash</span></code></a>(self, ObjectID object_id)</p></td>
<td><p>Compute the checksum of an object in the object store.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.list" title="pyarrow.plasma.PlasmaClient.list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code></a>(self)</p></td>
<td><p>Experimental: List the objects in the store.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.put" title="pyarrow.plasma.PlasmaClient.put"><code class="xref py py-obj docutils literal notranslate"><span class="pre">put</span></code></a>(self, value, ObjectID object_id=None, …)</p></td>
<td><p>Store a Python value into the object store.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.put_raw_buffer" title="pyarrow.plasma.PlasmaClient.put_raw_buffer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">put_raw_buffer</span></code></a>(self, value, …)</p></td>
<td><p>Store Python buffer into the object store.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.seal" title="pyarrow.plasma.PlasmaClient.seal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">seal</span></code></a>(self, ObjectID object_id)</p></td>
<td><p>Seal the buffer in the PlasmaStore for a particular object ID.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.set_client_options" title="pyarrow.plasma.PlasmaClient.set_client_options"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_client_options</span></code></a>(self, client_name, …)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.store_capacity" title="pyarrow.plasma.PlasmaClient.store_capacity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">store_capacity</span></code></a>(self)</p></td>
<td><p>Get the memory capacity of the store.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.subscribe" title="pyarrow.plasma.PlasmaClient.subscribe"><code class="xref py py-obj docutils literal notranslate"><span class="pre">subscribe</span></code></a>(self)</p></td>
<td><p>Subscribe to notifications about sealed objects.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.to_capsule" title="pyarrow.plasma.PlasmaClient.to_capsule"><code class="xref py py-obj docutils literal notranslate"><span class="pre">to_capsule</span></code></a>(self)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.plasma.PlasmaClient.store_socket_name" title="pyarrow.plasma.PlasmaClient.store_socket_name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">store_socket_name</span></code></a></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.contains">
<code class="sig-name descname">contains</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">ObjectID object_id</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.contains" title="Permalink to this definition"></a></dt>
<dd><p>Check if the object is present and sealed in the PlasmaStore.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a>) – A string used to identify an object.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.create">
<code class="sig-name descname">create</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">ObjectID object_id</em>, <em class="sig-param">int64_t data_size</em>, <em class="sig-param">string metadata=b''</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.create" title="Permalink to this definition"></a></dt>
<dd><p>Create a new buffer in the PlasmaStore for a particular object ID.</p>
<p>The returned buffer is mutable until seal is called.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a>) – The object ID used to identify an object.</p></li>
<li><p><strong>size</strong> (<em>int</em>) – The size in bytes of the created buffer.</p></li>
<li><p><strong>metadata</strong> (<em>bytes</em>) – An optional string of bytes encoding whatever metadata the user
wishes to encode.</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>PlasmaObjectExists</strong> – This exception is raised if the object could not be created because
there already is an object with the same ID in the plasma store.</p></li>
<li><p><strong>PlasmaStoreFull</strong> – This exception is raised if the object could: not be created because the plasma store is unable to evict
enough objects to create room for it.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.create_and_seal">
<code class="sig-name descname">create_and_seal</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">ObjectID object_id</em>, <em class="sig-param">string data</em>, <em class="sig-param">string metadata=b''</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.create_and_seal" title="Permalink to this definition"></a></dt>
<dd><p>Store a new object in the PlasmaStore for a particular object ID.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a>) – The object ID used to identify an object.</p></li>
<li><p><strong>data</strong> (<em>bytes</em>) – The object to store.</p></li>
<li><p><strong>metadata</strong> (<em>bytes</em>) – An optional string of bytes encoding whatever metadata the user
wishes to encode.</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>PlasmaObjectExists</strong> – This exception is raised if the object could not be created because
there already is an object with the same ID in the plasma store.</p></li>
<li><p><strong>PlasmaStoreFull</strong> – This exception is raised if the object could: not be created because the plasma store is unable to evict
enough objects to create room for it.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.debug_string">
<code class="sig-name descname">debug_string</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.debug_string" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.decode_notifications">
<code class="sig-name descname">decode_notifications</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">const uint8_t *buf</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.decode_notifications" title="Permalink to this definition"></a></dt>
<dd><p>Get the notification from the buffer.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><ul class="simple">
<li><p><em>[ObjectID]</em> – The list of object IDs in the notification message.</p></li>
<li><p><em>c_vector[int64_t]</em> – The data sizes of the objects in the notification message.</p></li>
<li><p><em>c_vector[int64_t]</em> – The metadata sizes of the objects in the notification message.</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.delete">
<code class="sig-name descname">delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em>, <em class="sig-param"><span class="n">object_ids</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete the objects with the given IDs from other object store.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>object_ids</strong> (<em>list</em>) – A list of strings used to identify the objects.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.disconnect">
<code class="sig-name descname">disconnect</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.disconnect" title="Permalink to this definition"></a></dt>
<dd><p>Disconnect this client from the Plasma store.</p>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.evict">
<code class="sig-name descname">evict</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">int64_t num_bytes</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.evict" title="Permalink to this definition"></a></dt>
<dd><p>Evict some objects until to recover some bytes.</p>
<p>Recover at least num_bytes bytes if possible.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>num_bytes</strong> (<em>int</em>) – The number of bytes to attempt to recover.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.get">
<code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">object_ids</em>, <em class="sig-param">int timeout_ms=-1</em>, <em class="sig-param">serialization_context=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.get" title="Permalink to this definition"></a></dt>
<dd><p>Get one or more Python values from the object store.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>object_ids</strong> (<em>list</em><em> or </em><a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a>) – Object ID or list of object IDs associated to the values we get
from the store.</p></li>
<li><p><strong>timeout_ms</strong> (<em>int</em><em>, </em><em>default -1</em>) – The number of milliseconds that the get call should block before
timing out and returning. Pass -1 if the call should block and 0
if the call should return immediately.</p></li>
<li><p><strong>serialization_context</strong> (<a class="reference internal" href="pyarrow.SerializationContext.html#pyarrow.SerializationContext" title="pyarrow.SerializationContext"><em>pyarrow.SerializationContext</em></a><em>, </em><em>default None</em>) – Custom serialization and deserialization context.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>list or object</em> – Python value or list of Python values for the data associated with
the object_ids and ObjectNotAvailable if the object was not
available.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.get_buffers">
<code class="sig-name descname">get_buffers</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em>, <em class="sig-param"><span class="n">object_ids</span></em>, <em class="sig-param"><span class="n">timeout_ms</span><span class="o">=</span><span class="default_value">- 1</span></em>, <em class="sig-param"><span class="n">with_meta</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.get_buffers" title="Permalink to this definition"></a></dt>
<dd><p>Returns data buffer from the PlasmaStore based on object ID.</p>
<p>If the object has not been sealed yet, this call will block. The
retrieved buffer is immutable.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>object_ids</strong> (<em>list</em>) – A list of ObjectIDs used to identify some objects.</p></li>
<li><p><strong>timeout_ms</strong> (<em>int</em>) – The number of milliseconds that the get call should block before
timing out and returning. Pass -1 if the call should block and 0
if the call should return immediately.</p></li>
<li><p><strong>with_meta</strong> (<em>bool</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>list</em> – If with_meta=False, this is a list of PlasmaBuffers for the data
associated with the object_ids and None if the object was not
available. If with_meta=True, this is a list of tuples of
PlasmaBuffer and metadata bytes.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.get_metadata">
<code class="sig-name descname">get_metadata</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em>, <em class="sig-param"><span class="n">object_ids</span></em>, <em class="sig-param"><span class="n">timeout_ms</span><span class="o">=</span><span class="default_value">- 1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.get_metadata" title="Permalink to this definition"></a></dt>
<dd><p>Returns metadata buffer from the PlasmaStore based on object ID.</p>
<p>If the object has not been sealed yet, this call will block. The
retrieved buffer is immutable.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>object_ids</strong> (<em>list</em>) – A list of ObjectIDs used to identify some objects.</p></li>
<li><p><strong>timeout_ms</strong> (<em>int</em>) – The number of milliseconds that the get call should block before
timing out and returning. Pass -1 if the call should block and 0
if the call should return immediately.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>list</em> – List of PlasmaBuffers for the metadata associated with the
object_ids and None if the object was not available.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.get_next_notification">
<code class="sig-name descname">get_next_notification</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.get_next_notification" title="Permalink to this definition"></a></dt>
<dd><p>Get the next notification from the notification socket.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><ul class="simple">
<li><p><em>ObjectID</em> – The object ID of the object that was stored.</p></li>
<li><p><em>int</em> – The data size of the object that was stored.</p></li>
<li><p><em>int</em> – The metadata size of the object that was stored.</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.get_notification_socket">
<code class="sig-name descname">get_notification_socket</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.get_notification_socket" title="Permalink to this definition"></a></dt>
<dd><p>Get the notification socket.</p>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.hash">
<code class="sig-name descname">hash</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">ObjectID object_id</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.hash" title="Permalink to this definition"></a></dt>
<dd><p>Compute the checksum of an object in the object store.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a>) – A string used to identify an object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>bytes</em> – A digest string object’s hash. If the object isn’t in the object
store, the string will have length zero.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.list">
<code class="sig-name descname">list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.list" title="Permalink to this definition"></a></dt>
<dd><p>Experimental: List the objects in the store.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><p><em>dict</em> – Dictionary from ObjectIDs to an “info” dictionary describing the
object. The “info” dictionary has the following entries:</p>
<dl class="simple">
<dt>data_size</dt><dd><p>size of the object in bytes</p>
</dd>
<dt>metadata_size</dt><dd><p>size of the object metadata in bytes</p>
</dd>
<dt>ref_count</dt><dd><p>Number of clients referencing the object buffer</p>
</dd>
<dt>create_time</dt><dd><p>Unix timestamp of the creation of the object</p>
</dd>
<dt>construct_duration</dt><dd><p>Time the creation of the object took in seconds</p>
</dd>
<dt>state</dt><dd><p>”created” if the object is still being created and
“sealed” if it is already sealed</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.put">
<code class="sig-name descname">put</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">value</em>, <em class="sig-param">ObjectID object_id=None</em>, <em class="sig-param">int memcopy_threads=6</em>, <em class="sig-param">serialization_context=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.put" title="Permalink to this definition"></a></dt>
<dd><p>Store a Python value into the object store.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>value</strong> (<em>object</em>) – A Python object to store.</p></li>
<li><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a><em>, </em><em>default None</em>) – If this is provided, the specified object ID will be used to refer
to the object.</p></li>
<li><p><strong>memcopy_threads</strong> (<em>int</em><em>, </em><em>default 6</em>) – The number of threads to use to write the serialized object into
the object store for large objects.</p></li>
<li><p><strong>serialization_context</strong> (<a class="reference internal" href="pyarrow.SerializationContext.html#pyarrow.SerializationContext" title="pyarrow.SerializationContext"><em>pyarrow.SerializationContext</em></a><em>, </em><em>default None</em>) – Custom serialization and deserialization context.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>The object ID associated to the Python object.</em></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.put_raw_buffer">
<code class="sig-name descname">put_raw_buffer</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">value</em>, <em class="sig-param">ObjectID object_id=None</em>, <em class="sig-param">string metadata=b''</em>, <em class="sig-param">int memcopy_threads=6</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.put_raw_buffer" title="Permalink to this definition"></a></dt>
<dd><p>Store Python buffer into the object store.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>value</strong> (<em>Python object that implements the buffer protocol</em>) – A Python buffer object to store.</p></li>
<li><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a><em>, </em><em>default None</em>) – If this is provided, the specified object ID will be used to refer
to the object.</p></li>
<li><p><strong>metadata</strong> (<em>bytes</em>) – An optional string of bytes encoding whatever metadata the user
wishes to encode.</p></li>
<li><p><strong>memcopy_threads</strong> (<em>int</em><em>, </em><em>default 6</em>) – The number of threads to use to write the serialized object into
the object store for large objects.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>The object ID associated to the Python buffer object.</em></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.seal">
<code class="sig-name descname">seal</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">ObjectID object_id</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.seal" title="Permalink to this definition"></a></dt>
<dd><p>Seal the buffer in the PlasmaStore for a particular object ID.</p>
<p>Once a buffer has been sealed, the buffer is immutable and can only be
accessed through get.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>object_id</strong> (<a class="reference internal" href="pyarrow.plasma.ObjectID.html#pyarrow.plasma.ObjectID" title="pyarrow.plasma.ObjectID"><em>ObjectID</em></a>) – A string used to identify an object.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.set_client_options">
<code class="sig-name descname">set_client_options</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">client_name</em>, <em class="sig-param">int64_t limit_output_memory</em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.set_client_options" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.store_capacity">
<code class="sig-name descname">store_capacity</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.store_capacity" title="Permalink to this definition"></a></dt>
<dd><p>Get the memory capacity of the store.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><em>int</em> – The memory capacity of the store in bytes.</p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyarrow.plasma.PlasmaClient.store_socket_name">
<code class="sig-name descname">store_socket_name</code><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.store_socket_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.subscribe">
<code class="sig-name descname">subscribe</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.subscribe" title="Permalink to this definition"></a></dt>
<dd><p>Subscribe to notifications about sealed objects.</p>
</dd></dl>
<dl class="py method">
<dt id="pyarrow.plasma.PlasmaClient.to_capsule">
<code class="sig-name descname">to_capsule</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">self</span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.plasma.PlasmaClient.to_capsule" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="pyarrow.plasma.PlasmaBuffer.html" class="btn btn-neutral float-right" title="pyarrow.plasma.PlasmaBuffer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="pyarrow.plasma.ObjectID.html" class="btn btn-neutral float-left" title="pyarrow.plasma.ObjectID" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2016-2019 Apache Software Foundation
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script type="text/javascript" src="/docs/_static/versionwarning.js"></script></body>
</html>