Skip to content

Commit

Permalink
This closes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
davorbonaci committed Mar 23, 2016
2 parents 63490fd + a10b64e commit db160fa
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 db160fa

Please sign in to comment.