-
Notifications
You must be signed in to change notification settings - Fork 2
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
Functionality added for GCS delete multipart upload policy #18
Conversation
@@ -40,7 +45,8 @@ public class StorageClient { | |||
|
|||
private static Storage getStorageService() throws IOException { | |||
return (null == storageService) ? StorageOptions.newBuilder().setProjectId( | |||
PluginPropertyUtils.pluginProp(ConstantsUtil.PROJECT_ID)).build().getService() : storageService; | |||
PluginPropertyUtils.pluginProp(ConstantsUtil.PROJECT_ID)).build().getService() |
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.
If there is no change in code, revert them this should not be shown in PR.
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 has been done , as per the review comment
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.
Please address review comments
@@ -40,7 +45,8 @@ public class StorageClient { | |||
|
|||
private static Storage getStorageService() throws IOException { | |||
return (null == storageService) ? StorageOptions.newBuilder().setProjectId( | |||
PluginPropertyUtils.pluginProp(ConstantsUtil.PROJECT_ID)).build().getService() : storageService; | |||
PluginPropertyUtils.pluginProp(ConstantsUtil.PROJECT_ID)).build().getService() | |||
: storageService; |
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 the writing format has been changed if there is no change ?
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 has been done , as per the review comment
@@ -52,7 +58,7 @@ public static Page<Blob> listObjects(String bucketName) throws IOException { | |||
} | |||
|
|||
public static Page<Blob> listObjectsWithPrefix( | |||
String bucketName, String directoryPrefix) throws IOException { | |||
String bucketName, String directoryPrefix) throws IOException { |
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 space so that it can not be seen as a new line
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 has been done , as per the review comment
return getStorageService().get(bucketName, blobName, Storage.BlobGetOption.fields(Storage.BlobField.values())); | ||
throws StorageException, IOException { | ||
return getStorageService().get(bucketName, blobName, | ||
Storage.BlobGetOption.fields(Storage.BlobField.values())); | ||
} |
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 new line , no change here too, work on spaces . format should not be changed for existing 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
} | ||
|
||
public static Bucket getBucketMetadata(String bucketName) throws IOException { | ||
return getStorageService().get(bucketName, Storage.BucketGetOption.fields(Storage.BucketField.values())); | ||
return getStorageService().get(bucketName, | ||
Storage.BucketGetOption.fields(Storage.BucketField.values())); |
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.
Same here , dont change existing 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.
Changes has been done , as per the review comment
@@ -87,10 +95,18 @@ public static Bucket createBucket(String bucketName) throws IOException { | |||
} | |||
|
|||
public static Blob uploadObject(String bucketName, String objectName, String filePath) | |||
throws IOException, URISyntaxException { | |||
throws IOException, URISyntaxException { |
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.
Same here , undo the changes
BlobInfo.newBuilder(BlobId.of(bucketName, objectName)).build(), | ||
Files.readAllBytes(Paths.get(StorageClient.class.getResource("/" + filePath).toURI()))); | ||
BlobInfo.newBuilder(BlobId.of(bucketName, objectName)).build(), | ||
Files.readAllBytes(Paths.get(StorageClient.class.getResource("/" + filePath).toURI()))); |
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.
Same here , undo the changes
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
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.
change is not seen it is still seen as new line
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 has been done , as per the review comment
ImmutableList.of( | ||
new LifecycleRule( | ||
LifecycleAction.newAbortIncompleteMPUploadAction(), | ||
LifecycleCondition.newBuilder().setAge(age).build()))).build().update(); } |
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.
Add the curly braces below and there should be a space between the final and this curly braces after you change .
LifecycleCondition.newBuilder().setAge(age).build()))).build().update();
}
}
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.
resolve 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.
Changes has been done , as per the review comment
ImmutableList.of( | ||
new LifecycleRule( | ||
LifecycleAction.newAbortIncompleteMPUploadAction(), | ||
LifecycleCondition.newBuilder().setAge(age).build()))).build().update(); } |
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.
resolve this .
BlobInfo.newBuilder(BlobId.of(bucketName, objectName)).build(), | ||
Files.readAllBytes(Paths.get(StorageClient.class.getResource("/" + filePath).toURI()))); | ||
BlobInfo.newBuilder(BlobId.of(bucketName, objectName)).build(), | ||
Files.readAllBytes(Paths.get(StorageClient.class.getResource("/" + filePath).toURI()))); |
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.
change is not seen it is still seen as new line
@@ -40,7 +45,7 @@ public class StorageClient { | |||
|
|||
private static Storage getStorageService() throws IOException { | |||
return (null == storageService) ? StorageOptions.newBuilder().setProjectId( | |||
PluginPropertyUtils.pluginProp(ConstantsUtil.PROJECT_ID)).build().getService() : storageService; | |||
PluginPropertyUtils.pluginProp(ConstantsUtil.PROJECT_ID)).build().getService() : storageService; |
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.
new line is seeen here too
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 has been done , as per the review comment
dc1d1f6
to
9ae52cd
Compare
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.
Approved .
b7f08c0
to
b20b5f2
Compare
b20b5f2
to
51422f5
Compare
Functionality added for GCS delete multipart upload policy