Skip to content
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

Readme Update #14

Merged
merged 2 commits into from May 3, 2020
Merged

Readme Update #14

merged 2 commits into from May 3, 2020

Conversation

gkiran292
Copy link
Contributor

Updating the client code to break when the transfer is completed and adding "start agent" part

Updating the client code to break when the transfer is completed and adding "start agent" part
README.md Outdated
@@ -73,6 +74,9 @@ public class SampleClient {
try {
TransferStateApiResponse transferState = client.getTransferState(TransferStateApiRequest.newBuilder().setTransferId(transferApiResponse.getTransferId()).build());
System.out.println("Latest Transfer State " + transferState.getState());
if (transferState.getState().equals("COMPLETED")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if ("COMPLETED".equals(transferState.getState()) || "FAILED".equals(transferState.getState()))) {

This is to avoid NPEs

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it retry if FAILED

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to ask should it come out if it fails?. I am sure I can do that too. Since it was the sample program just added that line to close the program gracefully.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the API says it failed, it was failed after retry. So you don't have anything more to do in this transfer. You are good to quit after Failed message

README.md Outdated
@@ -73,6 +74,9 @@ public class SampleClient {
try {
TransferStateApiResponse transferState = client.getTransferState(TransferStateApiRequest.newBuilder().setTransferId(transferApiResponse.getTransferId()).build());
System.out.println("Latest Transfer State " + transferState.getState());
if (transferState.getState().equals("COMPLETED")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If the API says it failed, it was failed after retry. So you don't have anything more to do in this transfer. You are good to quit after Failed message

@gkiran292
Copy link
Contributor Author

If the API says it failed, it was failed after retry. So you don't have anything more to do in this transfer. You are good to quit after Failed message

Done I have committed the changes!

@DImuthuUpe DImuthuUpe merged commit 601b272 into apache:master May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants