-
Notifications
You must be signed in to change notification settings - Fork 63
Initial commit for gcsync command line tool #796
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
331b5c8
Initial push for gcsync command line tool
tonyxiaowei 8b2cfa7
Merge branch 'google:main' into main
tonyxiaowei 950a0c2
Remove unintentional changes
tonyxiaowei bb67a0e
Some updates
tonyxiaowei 0e60696
Address pr comments
tonyxiaowei e700ec9
Reimplement gcsbytesource with a cached inputstream
tonyxiaowei 9639321
Merge branch 'google:main' into main
tonyxiaowei 7c064d8
remove unnecessary lines in build.gradle
tonyxiaowei 03687be
fix a typo
tonyxiaowei 604fcad
Remember to close the outputstream
tonyxiaowei 3694df9
The correct change for last committ
tonyxiaowei 3d00cd7
Fix checksumgeneratortest
tonyxiaowei 080a7dd
These lines shouldn't be commented out
tonyxiaowei 2030752
Address some comments
tonyxiaowei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * This file was generated by the Gradle 'init' task. | ||
| */ | ||
|
|
||
| plugins { | ||
| alias libs.plugins.shadow | ||
| id 'dbsync.java-application-conventions' | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation project(':dbsync:common') | ||
| implementation project(':dbsync:storage-aws') | ||
| implementation project(':dbsync:storage-gcs') | ||
| implementation libs.jopt.simple | ||
| implementation libs.jdiagnostics | ||
| implementation libs.commons.lang3 | ||
| implementation libs.google.cloud.run | ||
|
|
||
| // Test dependencies | ||
| testImplementation 'junit:junit:4.13.2' | ||
| testImplementation 'org.mockito:mockito-core:4.11.0' | ||
| testImplementation 'org.mockito:mockito-inline:4.11.0' | ||
| } | ||
|
|
||
| application { | ||
| mainClass = 'com.google.edwmigration.dbsync.gcsync.GcsyncMain' | ||
| } | ||
|
|
||
| shadowJar { | ||
| mergeServiceFiles() | ||
| } | ||
|
|
||
| test { | ||
| useJUnit() | ||
| } |
23 changes: 23 additions & 0 deletions
23
dbsync/gcsync/src/main/java/com/google/edwmigration/dbsync/gcsync/Constants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package com.google.edwmigration.dbsync.gcsync; | ||
|
|
||
| public class Constants { | ||
|
|
||
| public static final String FILES_TO_RSYNC_FILE_NAME = "filesToRsync.txt"; | ||
|
|
||
| public static final String JAR_FILE_NAME = "gcsync-all.jar"; | ||
tonyxiaowei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| public static final String CHECK_SUM_FILE_SUFFIX = "checksum"; | ||
|
|
||
| public static final String INSTRUCTION_FILE_SUFFIX = "instruction"; | ||
|
|
||
| public static final String TMP_FILE_SUFFIX = "updated"; | ||
tonyxiaowei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| public static final int BLOCK_SIZE = 4096; | ||
|
|
||
| // 10 MiB | ||
| public static final long RSYNC_SIZE_THRESHOLD = 10 * 1024 * 1024; | ||
|
|
||
| public static final String GENERATE_CHECK_SUM_MAIN = GenerateCheckSumMain.class.getName(); | ||
|
|
||
| public static final String RECONSTRUCT_FILE_MAIN = ReconstructFilesMain.class.getName(); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.