Skip to content

Commit

Permalink
Allow YCSB at a given commit to be pulled into an existing directory.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 703568293
  • Loading branch information
p3rf Team authored and copybara-github committed Dec 6, 2024
1 parent 1fa4881 commit 8ebfc7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,5 @@
- Update bigtable_walkthrough/README.md to help reduce the user frictions.
- Remove default boot_disk_type in GCP.
- Update AWS and Azure default disks to gp3 and PremiumV2_LRS respectively.
- When `--ycsb_commit` is set, YCSB at the given commit can be pulled into
`YCSB_DIR` even if the directory already exists.
7 changes: 5 additions & 2 deletions perfkitbenchmarker/linux_packages/ycsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,11 @@ def Install(vm):
)
if _YCSB_COMMIT.value:
vm.RemoteCommand(
f'git clone {GITHUB_URL} {YCSB_DIR}; cd {YCSB_DIR} && git checkout'
f' {_YCSB_COMMIT.value};'
f'mkdir -p {YCSB_DIR} && cd {YCSB_DIR} && git init && (git config'
# Check to see if the origin remote already exists before adding. This
# avoids a "remote already exists" error.
f' remote.origin.url >&- || git remote add origin {GITHUB_URL}.git) &&'
f' git fetch origin && git checkout {_YCSB_COMMIT.value};'
)
build_cmd = f'{linux_packages.INSTALL_DIR}/maven/bin/mvn clean package'
if _YCSB_BINDING.value:
Expand Down

0 comments on commit 8ebfc7e

Please sign in to comment.