-
Notifications
You must be signed in to change notification settings - Fork 3.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
Add MSQ Durable Storage Connector for Google Cloud Storage and change current Google Cloud Storage client library #15398
Add MSQ Durable Storage Connector for Google Cloud Storage and change current Google Cloud Storage client library #15398
Conversation
...le-extensions/src/test/java/org/apache/druid/storage/google/GoogleDataSegmentKillerTest.java
Fixed
Show fixed
Hide fixed
...core/google-extensions/src/test/java/org/apache/druid/storage/google/GoogleTaskLogsTest.java
Fixed
Show fixed
Hide fixed
...core/google-extensions/src/test/java/org/apache/druid/storage/google/GoogleTaskLogsTest.java
Fixed
Show fixed
Hide fixed
…ath call removal in deleteRecursively
{ | ||
// Continuation token is an index in the "objects" list. | ||
final String continuationToken = getPageToken(); | ||
final int startIndex = continuationToken == null ? 0 : Integer.parseInt(continuationToken); | ||
final int startIndex = pageToken == null ? 0 : Integer.parseInt(pageToken); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note test
...le-extensions/src/test/java/org/apache/druid/storage/google/GoogleDataSegmentKillerTest.java
Fixed
Show fixed
Hide fixed
...core/google-extensions/src/test/java/org/apache/druid/storage/google/GoogleTaskLogsTest.java
Fixed
Show fixed
Hide fixed
...core/google-extensions/src/test/java/org/apache/druid/storage/google/GoogleTaskLogsTest.java
Fixed
Show fixed
Hide fixed
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.
Changes overall LGTM. Minor comments.
@@ -48,16 +48,11 @@ | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>com.google.apis</groupId> |
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.
We might want to update :
druid/integration-tests-ex/cases/pom.xml
Lines 154 to 164 in 8812495
<dependency> | |
<groupId>com.google.apis</groupId> | |
<artifactId>google-api-services-storage</artifactId> | |
<version>${com.google.apis.storage.version}</version> | |
<exclusions> | |
<exclusion> | |
<groupId>com.google.api-client</groupId> | |
<artifactId>google-api-client</artifactId> | |
</exclusion> | |
</exclusions> | |
</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.
Removed now.
...ions-core/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleStorage.java
Outdated
Show resolved
Hide resolved
...ions-core/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleStorage.java
Show resolved
Hide resolved
// list with prefix can return directories, but they should always end with `/`, ignore them. | ||
// also skips empty objects. | ||
if (!next.getName().endsWith("/") && next.getSize().signum() > 0) { | ||
if (!next.getName().endsWith("/") && Long.signum(next.getSize()) > 0) { |
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.
Nit: Why would size be negative ever ?
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 more a check meant for != 0
...-extensions/src/main/java/org/apache/druid/storage/google/output/GoogleStorageConnector.java
Show resolved
Hide resolved
import java.io.OutputStream; | ||
import java.util.Iterator; | ||
|
||
public class GoogleStorageConnector extends ChunkingStorageConnector<GoogleInputRange> |
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 donot see test cases for this class.
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.
Added for this and some other classes as well.
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.
Changes LGTM.
Will merge post a green build.
&& Objects.equals(bucket, that.bucket) | ||
&& Objects.equals(path, that.path); | ||
} | ||
|
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.
nit: Lets add a toString to this as well.
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
Thanks @gargvishesh for working on this. |
Description
The PR addresses 2 things: