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 issues.

Background information

You can use Logview URLs to view and debug the MaxCompute jobs that you submitted. For more information, see Use Logview to view job information.

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.