-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add spark-doris-connector extension #2228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great Job! I left some minor comments. Thanks @vinson0526
...nsion/spark-doris-connector/src/main/java/org/apache/doris/spark/serialization/RowBatch.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor comments
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/backend/BackendClient.java
Show resolved
Hide resolved
...ion/spark-doris-connector/src/main/java/org/apache/doris/spark/cfg/ConfigurationOptions.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/backend/BackendClient.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/backend/BackendClient.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/backend/BackendClient.java
Outdated
Show resolved
Hide resolved
...ion/spark-doris-connector/src/main/java/org/apache/doris/spark/cfg/ConfigurationOptions.java
Outdated
Show resolved
Hide resolved
...ion/spark-doris-connector/src/main/java/org/apache/doris/spark/cfg/ConfigurationOptions.java
Outdated
Show resolved
Hide resolved
...ion/spark-doris-connector/src/main/java/org/apache/doris/spark/cfg/ConfigurationOptions.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Outdated
Show resolved
Hide resolved
extension/spark-doris-connector/src/main/java/org/apache/doris/spark/rest/RestService.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor comment. @imay Can you spare some time take a look?
open(); | ||
} | ||
TException ex = null; | ||
for (int attempt = 0; attempt < retries; ++attempt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe getNext does not need to retry? Can you explain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe failed because of network error.
logger.debug("CloseScanner to '{}', parameter is '{}'.", routing, closeParams); | ||
if (!isConnected) { | ||
try { | ||
open(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why the open()
be invoked here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of 'close' be called outside, you never know how user use it
return; | ||
} | ||
} | ||
for (int attempt = 0; attempt < retries; ++attempt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe close() does not need be invoked many times weather fail or not. @imay WDYT?Doris would process any expired context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retry is try to resolve network error mainly
private[spark] class DorisPartition(rddId: Int, idx: Int, val dorisPartition: PartitionDefinition) | ||
extends Partition { | ||
|
||
override def hashCode(): Int = 41 * (41 * (41 + rddId) + idx) + dorisPartition.hashCode() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override def hashCode(): Int = 41 * (41 * (41 + rddId) + idx) + dorisPartition.hashCode() | |
override def hashCode(): Int = 31 * (31 * (31 + rddId) + idx) + dorisPartition.hashCode() |
...nsion/spark-doris-connector/src/main/scala/org/apache/doris/spark/rdd/ScalaValueReader.scala
Show resolved
Hide resolved
...nsion/spark-doris-connector/src/main/scala/org/apache/doris/spark/rdd/ScalaValueReader.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @vinson0526 |
Spark-Doris-Connector for Spark to query data from Doris.
More info in: #1525