-
Notifications
You must be signed in to change notification settings - Fork 517
chore: Migrate gsutil usage to gcloud storage #1377
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
base: main
Are you sure you want to change the base?
Changes from all commits
038c722
1bf5dc7
1ee1781
0b155f1
ca2b328
4a6c2b5
eaa011b
ad553fb
a5bc40c
af0a60c
e6db087
7b54073
403c1fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,11 +15,11 @@ def setUp(self): | |||||||||||||||||
| super().setUp() | ||||||||||||||||||
| self.GCS_BUCKET = "test-hbase-{}-{}".format(self.datetime_str(), | ||||||||||||||||||
| self.random_str()) | ||||||||||||||||||
| self.assert_command('gsutil mb -c regional -l {} gs://{}'.format( | ||||||||||||||||||
| self.assert_command('gcloud storage buckets create --default-storage-class=regional --location {} gs://{}'.format( | ||||||||||||||||||
| self.REGION, self.GCS_BUCKET)) | ||||||||||||||||||
|
Comment on lines
+18
to
19
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This command string is getting long. To improve readability, you could break it into multiple lines and assign it to a variable before passing it to
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| def tearDown(self): | ||||||||||||||||||
| self.assert_command('gsutil -m rm -rf gs://{}'.format(self.GCS_BUCKET)) | ||||||||||||||||||
| self.assert_command('gcloud storage rm --recursive --continue-on-error gs://{}'.format(self.GCS_BUCKET)) | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||
| super().tearDown() | ||||||||||||||||||
|
|
||||||||||||||||||
| def verify_instance(self, name): | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,9 +46,18 @@ function set_hive_lineage_conf() { | |
| done | ||
| } | ||
|
|
||
| function version_le() { [[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]]; } | ||
| function version_lt() { [[ "$1" = "$2" ]] && return 1 || version_le "$1" "$2"; } | ||
|
|
||
| GCLOUD_SDK_VERSION="$(gcloud --version | awk -F'SDK ' '/Google Cloud SDK/ {print $2}')" | ||
| GSUTIL="gcloud storage" | ||
| if version_lt "${GCLOUD_SDK_VERSION}" "402.0.0"; then | ||
| GSUTIL="gsutil" | ||
| fi | ||
|
|
||
| function install_jars() { | ||
| echo "Installing openlineage-hive hook" | ||
| gsutil cp -P "$INSTALLATION_SOURCE/hive-openlineage-hook-$HIVE_OL_HOOK_VERSION.jar" "$HIVE_LIB_DIR/hive-openlineage-hook.jar" | ||
| ${GSUTIL} cp -P "$INSTALLATION_SOURCE/hive-openlineage-hook-$HIVE_OL_HOOK_VERSION.jar" "$HIVE_LIB_DIR/hive-openlineage-hook.jar" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes it works backward compatibility is there |
||
| } | ||
|
|
||
| function restart_hive_server2_master() { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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 this function is not used, then can be removed. Applicable to all files.
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.
its being used in version_lt