Skip to content
This repository was archived by the owner on May 10, 2022. It is now read-only.

add copy_data operator in PegasusCli#23

Merged
qinzuoyan merged 5 commits intothrift-0.11.0-inlinedfrom
copy_date
Dec 10, 2018
Merged

add copy_data operator in PegasusCli#23
qinzuoyan merged 5 commits intothrift-0.11.0-inlinedfrom
copy_date

Conversation

@qinzuoyan
Copy link
Member

and support Compress/Uncompress when copying data.

@qinzuoyan qinzuoyan added the enhancement New feature or request label Dec 7, 2018
targetTable.set(p.getKey().getKey(), p.getKey().getValue(), newValue, 0);
count++;
if (count % 10000 == 0) {
System.out.printf("Copied %d key-value pairs.\n", count);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方是不是还应该打印一下当前时间

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉必要性不是特别大

try {
PegasusTableInterface targetTable = targetClient.openTable(targetTableName);
List<PegasusScannerInterface> scanners = client.getUnorderedScanners(appName, 1, new ScanOptions());
int count = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里要不要assert一下scanners.size() <= 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其实不用,我getScanner的时候已经传了count = 1

@qinzuoyan qinzuoyan merged commit 5b9a69a into thrift-0.11.0-inlined Dec 10, 2018
@qinzuoyan qinzuoyan deleted the copy_date branch December 10, 2018 03:47
qinzuoyan added a commit that referenced this pull request Dec 12, 2018
vagetablechicken pushed a commit to vagetablechicken/pegasus-java-client that referenced this pull request Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments