You can call this operation to view the logs of a node instance container.

Request parameters

Name Type Required Example Description
AppId String Yes application_1542620905989_0010 The ID of the application.
ContainerId String Yes container_1542620905989_0010_01_000001 The ID of the container.
LogName String Yes stderr The type of the log. Valid values: stderr, syslog, and stdout.
NodeInstanceId String Yes FNI-0D2534B3AB675B63 The ID of the node instance.
ProjectId String Yes FP-BECB9D35CB121F32 The ID of the project.
RegionId String Yes cn-hangzhou The ID of the region.
Length Integer No 200 The length of the log. Length constraints: Maximum length of 1,000.
Offset Integer No 0 The offset.

Response parameters

Name Type Example Description
RequestId String 4E216C44-F828-4D59-B398-253DCF86F23C The ID of the request.
LogEnd Boolean true Indicates whether all logs are shown.
LogEntrys The entry of the log.
Content String 2018-11-19 17:55:11,792 INFO [RMCommunicator Allocator] org.apache.hadoop.yarn.util.RackResolver: Resolved emr-worker-1.cluster-500160492 to /default-rack The content of the log.

Examples

  • Sample requests
    
    /? Action=DescribeFlowNodeInstanceContainerLog
    &AppId=application_1542620905989_0010
    &ContainerId=container_1542620905989_0010_01_000001
    &LogName=stderr
    &NodeInstanceId=FNI-0D2534B3AB675B63
    &ProjectId=FP-BECB9D35CB121F32
    &RegionId=cn-hangzhou
    &Length=200
    &Offset=0
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"code":"200",
    	"data":{
    		"LogEnd":false,
    		"LogEntrys":{
    			"LogEntry":[
    				{
    					"Content":"2018-11-19 17:55:11,792 INFO [RMCommunicator Allocator] org.apache.hadoop.yarn.util.RackResolver: Resolved emr-worker-1.cluster-500160492 to /default-rack"
    				},
    				{
    					"Content":"2018-11-19 17:55:11,793 INFO [RMCommunicator Allocator] org.apache.hadoop.yarn.util.RackResolver: Resolved emr-worker-2.cluster-500160492 to /default-rack"
    				}
    			]
    		},
    		"RequestId":"4E216C44-F828-4D59-B398-253DCF86F23C"
    	},
    	"requestId":"4E216C44-F828-4D59-B398-253DCF86F23C",
    	"successResponse":true
    }
  • Error response examples
    JSON format
    {
    	"code":"FLOW_API_FAILED",
    	"message":"flow node instance does not exist [FNI-0D2534B3AB675B6]",
    	"requestId":"D737D945-7F58-4E9D-8E19-E720556C46D5",
    	"successResponse": true
    }

Error codes

View error codes.