Skip to content

Plasma: typo #36

Closed
Closed

Description

@kou

Apache Arrowの中に入っているオブジェクトストアのPlasmaのドキュメントにtypoがある気がする。

https://github.com/apache/arrow/blob/master/cpp/apidoc/tutorials/plasma.md

new_object_idという変数を定義しているけど、object_idという変数を参照している。

// Receive notification of the next newly available object.
// Notification information is stored in object_id, data_size, and metadata_size
ObjectID new_object_id;
int64_t data_size;
int64_t metadata_size;
ARROW_CHECK_OK(client.GetNotification(fd, &object_id, &data_size, &metadata_size));

// Get the newly available object.
ObjectBuffer object_buffer;
ARROW_CHECK_OK(client.Get(&object_id, 1, -1, &object_buffer));

Activity

  1. kou commented on Aug 2, 2017

    @kou
    MemberAuthor

    次の例ではobject_idになっているのでobject_idにするのがよさそう。

    #include <plasma/client.h>
    
    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", "", PLASMA_DEFAULT_RELEASE_DELAY));
    
      int fd;
      ARROW_CHECK_OK(client.Subscribe(&fd));
    
      ObjectID object_id;
      int64_t data_size;
      int64_t metadata_size;
      while (true) {
        ARROW_CHECK_OK(client.GetNotification(fd, &object_id, &data_size, &metadata_size));
    
        std::cout << "Received object notification for object_id = "
                  << object_id.hex() << ", with data_size = " << data_size
                  << ", and metadata_size = " << metadata_size << std::endl;
      }
    
      // Disconnect the client.
      ARROW_CHECK_OK(client.Disconnect());
    }
  2. komainu8 commented on Aug 19, 2017

    @komainu8
    Member

    以下のPullRequestでフィードバックしました。
    apache/arrow#977

  3. komainu8 commented on Aug 19, 2017

    @komainu8
    Member

    フィードバックしたので、Closeします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions