Skip to content

ARROW-3630: [Plasma][GLib] Add GLib bindings of Plasma#2848

Closed
shiro615 wants to merge 13 commits intoapache:masterfrom
shiro615:glib-support-plasma
Closed

ARROW-3630: [Plasma][GLib] Add GLib bindings of Plasma#2848
shiro615 wants to merge 13 commits intoapache:masterfrom
shiro615:glib-support-plasma

Conversation

@shiro615
Copy link
Copy Markdown
Contributor

It's GLib bindings of Plasma.

@shiro615 shiro615 force-pushed the glib-support-plasma branch from 4af3bed to 12f0389 Compare October 27, 2018 08:35
@shiro615 shiro615 changed the title ARROW-3630: [Plasma][GLib] Add GLib bindings of Plasma [WIP] ARROW-3630: [Plasma][GLib] Add GLib bindings of Plasma Oct 27, 2018
Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
This is a good start point!

G_BEGIN_DECLS

#define GPLASMA_TYPE_PLASMA_CLIENT (gplasma_plasma_client_get_type())
G_DECLARE_DERIVABLE_TYPE(GPlasmaPlasmaClient,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename to GPlasmaClient? PlasmaPlasma is redundant.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rename it.

gplasma_plasma_client_new(void)
{
auto plasma_plasma_client = std::make_shared<plasma::PlasmaClient>();
return gplasma_plasma_client_new_raw(&plasma_plasma_client);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change to gplasma_client_new(const gchar *store_socket_name, GError **error)?

GPlasmaClient *
gplasma_client_new(const gchar *store_socket_name, GError **error)
{
  auto plasma_client = std::make_shared<plasma::PlasmaClient>(); 
  auto status = client->Connect(store_socket_name, "");
  // ...
}

We will add more constructors for manager_socket_name, release_delay and num_retries in PlasmaClient::Connect() later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK! I'll change to gplasma_client_new(const gchar *store_socket_name, GError **error).

end

def test_new
assert_nothing_raised do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can test connecting to store server by running plasma_store_server.
We can get plasma_store_server path from plasma.pc: pkg-config --variable=executable plasma

Copy link
Copy Markdown
Contributor Author

@shiro615 shiro615 Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve added test cases.
Please confirm my understanding.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed. You understand correctly.

I've pushed some minor improvements such as adding missing waitpid to avoid zombi process and moving to helper/.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 27, 2018

Codecov Report

Merging #2848 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2848      +/-   ##
==========================================
+ Coverage   87.55%   87.56%   +0.01%     
==========================================
  Files         411      412       +1     
  Lines       63818    64036     +218     
==========================================
+ Hits        55874    56074     +200     
- Misses       7870     7888      +18     
  Partials       74       74
Impacted Files Coverage Δ
cpp/src/arrow/csv/column-builder.cc 94.92% <0%> (-2.18%) ⬇️
rust/src/tensor.rs 93.11% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5fafd8...c590497. Read the comment docs.

@shiro615
Copy link
Copy Markdown
Contributor Author

Thank you for review. I'll try to address them.

@shiro615 shiro615 force-pushed the glib-support-plasma branch from 91a9927 to 5c7a850 Compare October 31, 2018 00:01
@shiro615 shiro615 changed the title [WIP] ARROW-3630: [Plasma][GLib] Add GLib bindings of Plasma ARROW-3630: [Plasma][GLib] Add GLib bindings of Plasma Oct 31, 2018
Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
I'll merge when CI is green.

@kou kou closed this in 059e2d0 Oct 31, 2018
@kou
Copy link
Copy Markdown
Member

kou commented Oct 31, 2018

Merged. Thanks!

@shiro615 shiro615 deleted the glib-support-plasma branch October 31, 2018 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants