Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #166 from dhalperi/backport-32
Browse files Browse the repository at this point in the history
  • Loading branch information
davorbonaci committed Mar 25, 2016
2 parents f66acc5 + 39e70e6 commit 0a051dd
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ private <T> PCollection<T> applyWindow(
return super.apply(new AssignWindows<>(transform), input);
}

private String debuggerMessage(String projectId, String uniquifier) {
return String.format("To debug your job, visit Google Cloud Debugger at: "
+ "https://console.developers.google.com/debug?project=%s&dbgee=%s",
projectId, uniquifier);
}

private void maybeRegisterDebuggee(DataflowPipelineOptions options, String uniquifier) {
if (!options.getEnableCloudDebugger()) {
return;
Expand All @@ -436,6 +442,8 @@ private void maybeRegisterDebuggee(DataflowPipelineOptions options, String uniqu
Clouddebugger debuggerClient = Transport.newClouddebuggerClient(options).build();
Debuggee debuggee = registerDebuggee(debuggerClient, uniquifier);
options.setDebuggee(debuggee);

System.out.println(debuggerMessage(options.getProject(), debuggee.getUniquifier()));
}

private Debuggee registerDebuggee(Clouddebugger debuggerClient, String uniquifier) {
Expand Down

0 comments on commit 0a051dd

Please sign in to comment.