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

make some region_command support jq #1420

Merged
merged 2 commits into from Jan 29, 2019

Conversation

Projects
None yet
6 participants
@fredchenbj
Copy link
Contributor

fredchenbj commented Jan 28, 2019

What problem does this PR solve?

make some region_command, such as region topwrite support --jq.

Tests

  • Manual test

Side effects

bin/pd-ctl -u http://10.136.133.23:2379 -d region topwrite 1 --jq=".regions[] | {start_key: .start_key, end_key: .end_key, peer_stores: [.peers[].store_id], leader:.leader.store_id, id: .id, written_bytes: .written_bytes}"
unknown flag: --jq
{"start_key":"fm_bench_mark_user:-1254349631","end_key":"fm_bench_mark_user:-1256054961","peer_stores":[17,8,1],"leader":17,"id":86367,"written_bytes":28664496}

See above, it ouputs unexpected message "unknown flag: --jq".

fredchenbj added some commits Jan 28, 2019

add some jq output
Signed-off-by: fredchenbj <cfworking@163.com>
add some jqs
Signed-off-by: fredchenbj <cfworking@163.com>
@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Jan 28, 2019

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

1 similar comment
@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Jan 28, 2019

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@CLAassistant

This comment has been minimized.

Copy link

CLAassistant commented Jan 28, 2019

CLA assistant check
All committers have signed the CLA.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 28, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@8d6c936). Click here to learn what that means.
The diff coverage is 42.3%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1420   +/-   ##
=========================================
  Coverage          ?   67.44%           
=========================================
  Files             ?      157           
  Lines             ?    14820           
  Branches          ?        0           
=========================================
  Hits              ?     9996           
  Misses            ?     3892           
  Partials          ?      932
Impacted Files Coverage Δ
tools/pd-ctl/pdctl/command/region_command.go 46.76% <42.3%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d6c936...b8a0769. Read the comment docs.

@nolouch
Copy link
Member

nolouch left a comment

LGTM! thanks

@rleungx
Copy link
Member

rleungx left a comment

LGTM.

@nolouch nolouch merged commit 21a3537 into pingcap:master Jan 29, 2019

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch No report found to compare against
Details
codecov/project No report found to compare against
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment