-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[feat][starrocks] add starrocks sync/sql connector #1237
Conversation
0ffd5cf
to
0de4a23
Compare
LGTM |
0de4a23
to
684e2dd
Compare
...ks/src/main/java/com/dtstack/chunjun/connector/starrocks/source/be/StarRocksToJavaTrans.java
Show resolved
Hide resolved
...ks/src/main/java/com/dtstack/chunjun/connector/starrocks/source/be/StarRocksToJavaTrans.java
Outdated
Show resolved
Hide resolved
import com.starrocks.shade.org.apache.thrift.protocol.TProtocol; | ||
import com.starrocks.shade.org.apache.thrift.transport.TSocket; | ||
import com.starrocks.shade.org.apache.thrift.transport.TTransportException; | ||
import com.starrocks.thrift.*; |
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.
Do not import *.
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.
done
|
||
import java.io.IOException; | ||
import java.io.Serializable; | ||
import java.util.*; |
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.
Do not import *.
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.
done
<version>5.1.49</version> | ||
</dependency> | ||
|
||
<!-- <dependency>--> |
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.
Remove useless code.
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.
done
|
||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>fastjson</artifactId> |
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.
Duplicate dependencies are depended on the project, and we have other json-processed dependencies, like Gson, in the root pom.
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>5.1.49</version> |
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.
Is this version same as other connector?
...java/com/dtstack/chunjun/connector/starrocks/connection/StarRocksJdbcConnectionProvider.java
Outdated
Show resolved
Hide resolved
6b3b8c7
to
061c85c
Compare
} | ||
|
||
@Override | ||
protected void closeInternal() {} |
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.
Nothing to do here?
.../src/main/java/com/dtstack/chunjun/connector/starrocks/source/StarRocksLruTableFunction.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/dtstack/chunjun/connector/starrocks/source/StarRocksLruTableFunction.java
Show resolved
Hide resolved
} | ||
} | ||
} | ||
beReader.close(); |
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.
'close()' method should be called in 'finally' block.
if (offsetOfBatchForRead < flinkRowsCount) { | ||
return true; | ||
} | ||
this.close(); |
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.
Why call the 'close()' method 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.
fixed:close in finally
.getPartitions() | ||
.forEach( | ||
(tabletId, tablet) -> { | ||
int tabletCount = Integer.MAX_VALUE; |
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 think this code block should be called in a method.
Review done. |
061c85c
to
6188550
Compare
6188550
to
e796c65
Compare
Purpose of this pull request
Which issue you fix
Fixes # (issue).
Checklist: