This topic describes how to use MaxCompute SDK for Java to generate a Logview URL for an instance. You can use the Logview URL of an instance to quickly locate problems.

Background information

You can view and debug submitted MaxCompute jobs in Logview. For more information, see Logview.

MaxCompute SDK for Java provides the Logview interface. For more information, see MaxCompute SDK for Java.


Instance i = odps.instances().get("<instance_id>"); 
String logviewUrl = odps.logview().generateLogView(i, 7 * 24);
  • Instance: the name of the instance that you want to view.
  • hours: the timeout period. Unit: hours. For example, set the value to 7*24.
Note You can also run the wait< instance_id> command on the MaxCompute client to obtain the Logview URL of an instance.