Skip to content

Minimal presto-pinot driver exposing just pinot-common and some helper#1

Merged
highker merged 1 commit into
prestodb:masterfrom
agrawaldevesh:master
Oct 22, 2019
Merged

Minimal presto-pinot driver exposing just pinot-common and some helper#1
highker merged 1 commit into
prestodb:masterfrom
agrawaldevesh:master

Conversation

@agrawaldevesh
Copy link
Copy Markdown

This is so that the accompanying presto-pinot connector in
prestodb/presto proper has simpler dependencies.

This is in line with the approach taken by other heavy weight connectors
like presto-kudu and presto-cassandra.

The basic approach is that the stuff in pinot-common is exposed out as
is and the rest are shaded, since this is the public api. Also added a
class taken from the Pinot broker to federate a PQL to bunch of servers.

The helper class PinotScatterGatherQueryClient does the job of the pinot
to send the query to a pinot server via the internal thrift protocol.

TODO: Couldn't figure out what to do with the logging classes. Currently
they aren't exposed out but what happens if this library need to do some
logging ?

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 21, 2019
@highker highker requested review from highker and wenleix October 21, 2019 18:29
Comment thread pom.xml Outdated
Copy link
Copy Markdown

@highker highker left a comment

Choose a reason for hiding this comment

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

The shading looks great. Minor comments on coding style

Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
@agrawaldevesh
Copy link
Copy Markdown
Author

I think I have addressed all of the code review comments now and am looking forward to seeing this approved and a version 0.1.0 of this jar released to mavencentral such that I can unblock prestodb/presto#13504.

Thank you !

Copy link
Copy Markdown

@highker highker left a comment

Choose a reason for hiding this comment

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

LGTM % nits

Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
Comment thread src/main/java/com/facebook/presto/pinot/PinotScatterGatherQueryClient.java Outdated
}
}

private static class ScatterGatherRequestImpl
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you address this comment as well?

return dataTableMap;
}

private CompositeFuture<byte[]> routeScatterGather(ScatterGatherRequestImpl scatterRequest, ScatterGatherStats scatterGatherStats)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you address this comment as well?

@Override
public byte[] getRequestForService(List<String> segments)
{
InstanceRequest r = new InstanceRequest();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you address this comment as well?

This is so that the accompanying presto-pinot connector in
prestodb/presto proper has simpler dependencies.

This is in line with the approach taken by other heavy weight connectors
like presto-kudu and presto-cassandra.

The basic approach is that the stuff in pinot-common is exposed out as
is and the rest are shaded, since this is the public api. Also added a
class taken from the Pinot broker to federate a PQL to bunch of servers.

The helper class PinotScatterGatherQueryClient does the job of the pinot
to send the query to a pinot server via the internal thrift protocol.

TODO: Couldn't figure out what to do with the logging classes. Currently
they aren't exposed out but what happens if this library need to do some
logging ?
@highker highker merged commit b8da82f into prestodb:master Oct 22, 2019
@highker highker assigned wenleix and unassigned agrawaldevesh Oct 22, 2019
@highker
Copy link
Copy Markdown

highker commented Oct 22, 2019

@wenleix, could you help doing a release? THANKS!

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants