mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
address comments
This commit is contained in:
1 parent
583cd97c40
commit
bcb3204007
3 files changed
+14
-11
No files matched your search
@@ -80,7 +80,7 @@ using namespace plasma;
|
||||
int main(int argc, char** argv) {
|
||||
// Start up and connect a Plasma client.
|
||||
PlasmaClient client;
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma", ""));
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma"));
|
||||
// Disconnect the Plasma client.
|
||||
ARROW_CHECK_OK(client.Disconnect());
|
||||
}
|
||||
@@ -226,7 +226,7 @@ using namespace plasma;
|
||||
int main(int argc, char** argv) {
|
||||
// Start up and connect a Plasma client.
|
||||
PlasmaClient client;
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma", ""));
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma"));
|
||||
// Create an object with a fixed ObjectID.
|
||||
ObjectID object_id = ObjectID::from_binary("00000000000000000000");
|
||||
int64_t data_size = 1000;
|
||||
@@ -332,7 +332,7 @@ using namespace plasma;
|
||||
int main(int argc, char** argv) {
|
||||
// Start up and connect a Plasma client.
|
||||
PlasmaClient client;
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma", ""));
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma"));
|
||||
ObjectID object_id = ObjectID::from_binary("00000000000000000000");
|
||||
ObjectBuffer object_buffer;
|
||||
ARROW_CHECK_OK(client.Get(&object_id, 1, -1, &object_buffer));
|
||||
@@ -421,7 +421,7 @@ using namespace plasma;
|
||||
int main(int argc, char** argv) {
|
||||
// Start up and connect a Plasma client.
|
||||
PlasmaClient client;
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma", ""));
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/plasma"));
|
||||
|
||||
int fd;
|
||||
ARROW_CHECK_OK(client.Subscribe(&fd));
|
||||
|
||||
@@ -60,7 +60,7 @@ socket name:
|
||||
.. code-block:: python
|
||||
|
||||
import pyarrow.plasma as plasma
|
||||
client = plasma.connect("/tmp/plasma", "", 0)
|
||||
client = plasma.connect("/tmp/plasma")
|
||||
|
||||
If the following error occurs from running the above Python code, that
|
||||
means that either the socket given is incorrect, or the ``./plasma_store`` is
|
||||
@@ -68,7 +68,7 @@ not currently running. Check to see if the Plasma store is still running.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
>>> client = plasma.connect("/tmp/plasma", "", 0)
|
||||
>>> client = plasma.connect("/tmp/plasma")
|
||||
Connection to socket failed for pathname /tmp/plasma
|
||||
Could not connect to socket /tmp/plasma
|
||||
|
||||
@@ -179,7 +179,7 @@ the object buffer.
|
||||
|
||||
# Create a different client. Note that this second client could be
|
||||
# created in the same or in a separate, concurrent Python session.
|
||||
client2 = plasma.connect("/tmp/plasma", "", 0)
|
||||
client2 = plasma.connect("/tmp/plasma")
|
||||
|
||||
# Get the object in the second client. This blocks until the object has been sealed.
|
||||
object_id2 = plasma.ObjectID(20 * b"a")
|
||||
@@ -221,7 +221,7 @@ of the object info might change in the future):
|
||||
import pyarrow.plasma as plasma
|
||||
import time
|
||||
|
||||
client = plasma.connect("/tmp/plasma", "", 0)
|
||||
client = plasma.connect("/tmp/plasma")
|
||||
|
||||
client.put("hello, world")
|
||||
# Sleep a little so we get different creation times
|
||||
@@ -452,7 +452,7 @@ You can test this with the following script:
|
||||
import pyarrow.plasma as plasma
|
||||
import time
|
||||
|
||||
client = plasma.connect("/tmp/plasma", "", 0)
|
||||
client = plasma.connect("/tmp/plasma")
|
||||
|
||||
data = np.random.randn(100000000)
|
||||
tensor = pa.Tensor.from_numpy(data)
|
||||
|
||||
@@ -760,7 +760,7 @@ cdef class PlasmaClient:
|
||||
return result
|
||||
|
||||
|
||||
def connect(store_socket_name, manager_socket_name, int release_delay,
|
||||
def connect(store_socket_name, manager_socket_name=None, int release_delay=0,
|
||||
int num_retries=-1):
|
||||
"""
|
||||
Return a new PlasmaClient that is connected a plasma store and
|
||||
@@ -772,13 +772,16 @@ def connect(store_socket_name, manager_socket_name, int release_delay,
|
||||
Name of the socket the plasma store is listening at.
|
||||
manager_socket_name : str
|
||||
Name of the socket the plasma manager is listening at.
|
||||
release_delay : int
|
||||
This parameter has already been deprecated.
|
||||
release_delay : int, default 0
|
||||
The maximum number of objects that the client will keep and
|
||||
delay releasing (for caching reasons).
|
||||
num_retries : int, default -1
|
||||
Number of times to try to connect to plasma store. Default value of -1
|
||||
uses the default (50)
|
||||
"""
|
||||
if manager_socket_name is not None:
|
||||
print("warning: manager_socket_name parameter for connect() is already deprecated.")
|
||||
cdef PlasmaClient result = PlasmaClient()
|
||||
result.store_socket_name = store_socket_name.encode()
|
||||
result.manager_socket_name = manager_socket_name.encode()
|
||||
|
||||
Reference in new issue
Block a user