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.
Description
Instance i = odps.instances().get("<instance_id>");
String logviewUrl = odps.logview().generateLogView(i, <hours>);
Parameters:
Instance_id: the instance id 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.