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

Note We recommend that you do not use the DescribeFlowNodeInstanceContainerLog API because of its low data return rate and throttling limits performance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeFlowNodeInstanceContainerLog

The operation that you want to perform. For API requests using the HTTP or HTTPS URL, this parameter is required. Set the value to DescribeFlowNodeInstanceContainerLog.

AppId String Yes application_1542620905989_emergency response parameters *

The application ID of the job.

ContainerId String Yes container_1542620905989_0010_01_00 automatic snapshot policies *

The ID of the container.

LogName String Yes stderr

Log name:

  • stderr
  • syslog
  • stdout
NodeInstanceId String Yes FNI-0D2534B3AB67****

The ID of the job instance.

ProjectId String Yes FP-BECB9D35CB12****

The ID of the project.

Region ID String Yes cn-hangzhou

The ID of the region where the streaming domain resides.

Offset String Optional 0

The offset of the SQL result.

Length String Optional 200

The number of the log entries to return. The maximum number of log entries to return at a time is 1,000.

Response parameters

Parameter Type Example Description
LogEnd Boolean True

Indicates whether the log stream ended.

LogEntrys Array

An array of log entries.

LogEntry
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 log entry.

RequestId String 4E216C44-F828-4D59-B398-253DCF86F23C

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeFlowNodeInstanceContainerLog
&AppId=application_1542620905989_ static website hosting *
&ContainerId=container_1542620905989_0010_01_00 static website hosting *
&LogName=stderr
&NodeInstanceId=FNI-0D2534B3AB67****
&ProjectId=FP-BECB9D35CB12****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeFlowNodeInstanceContainerLogResponse>
      <data>
            <RequestId>4E216C44-F828-4D59-B398-253DCF86F23C</RequestId>
            <LogEnd>false</LogEnd>
            <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>
                  </LogEntry>
                  <LogEntry>
                        <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</Content>
                  </LogEntry>
            </LogEntrys>
      </data>
      <requestId>4E216C44-F828-4D59-B398-253DCF86F23C</requestId>
</DescribeFlowNodeInstanceContainerLogResponse>

JSON format

{
    "data": {
        "RequestId": "4E216C44-F828-4D59-B398-253DCF86F23C",
        "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"
}

Error codes

For a list of error codes, visit the API Error Center.