This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit fa8b1232d8eaee0679b6fe160f66db73cf5a4af2 Author: Chesnay Schepler <ches...@apache.org> AuthorDate: Wed Oct 5 17:51:30 2022 +0200 [FLINK-29511][rest][docs] Sort schemas in OpenAPI spec --- docs/static/generated/rest_v1_dispatcher.yml | 2168 ++++++++++---------- docs/static/generated/rest_v1_sql_gateway.yml | 284 +-- .../flink/docs/rest/OpenApiSpecGenerator.java | 12 + 3 files changed, 1238 insertions(+), 1226 deletions(-) diff --git a/docs/static/generated/rest_v1_dispatcher.yml b/docs/static/generated/rest_v1_dispatcher.yml index 6c53eec1f9f..812e618a1b6 100644 --- a/docs/static/generated/rest_v1_dispatcher.yml +++ b/docs/static/generated/rest_v1_dispatcher.yml @@ -1512,6 +1512,8 @@ paths: $ref: '#/components/schemas/ThreadDumpInfo' components: schemas: + AggregatedMetricsResponseBody: + type: object AggregatedTaskDetailsInfo: type: object properties: @@ -1529,32 +1531,6 @@ components: additionalProperties: type: integer format: int64 - JarFileInfo: - type: object - properties: - entry: - type: array - items: - $ref: '#/components/schemas/JarEntryInfo' - id: - type: string - name: - type: string - uploaded: - type: integer - format: int64 - Node: - type: object - properties: - children: - type: array - items: - $ref: '#/components/schemas/Node' - name: - type: string - value: - type: integer - format: int32 AggregationMode: type: string enum: @@ -1562,6 +1538,27 @@ components: - MAX - SUM - AVG + ApplicationStatus: + type: string + enum: + - SUCCEEDED + - FAILED + - CANCELED + - UNKNOWN + AsynchronousOperationInfo: + type: object + properties: + failure-cause: + $ref: '#/components/schemas/SerializedThrowable' + AsynchronousOperationResult: + type: object + properties: + operation: + oneOf: + - $ref: '#/components/schemas/AsynchronousOperationInfo' + - $ref: '#/components/schemas/SavepointInfo' + status: + $ref: '#/components/schemas/QueueStatus' CheckpointAlignment: type: object properties: @@ -1577,510 +1574,717 @@ components: processed: type: integer format: int64 - SavepointInfo: - type: object - properties: - failure-cause: - $ref: '#/components/schemas/SerializedThrowable' - location: - type: string - AsynchronousOperationInfo: - type: object - properties: - failure-cause: - $ref: '#/components/schemas/SerializedThrowable' - TaskManagerMetricsInfo: + CheckpointConfigInfo: type: object properties: - directCount: + aligned_checkpoint_timeout: type: integer format: int64 - directMax: + changelog_periodic_materialization_interval: type: integer format: int64 - directUsed: + changelog_storage: + type: string + checkpoint_storage: + type: string + checkpoints_after_tasks_finish: + type: boolean + externalization: + $ref: '#/components/schemas/ExternalizedCheckpointInfo' + interval: type: integer format: int64 - garbageCollectors: - type: array - items: - $ref: '#/components/schemas/GarbageCollectorInfo' - heapCommitted: + max_concurrent: type: integer format: int64 - heapMax: + min_pause: type: integer format: int64 - heapUsed: + mode: + $ref: '#/components/schemas/ProcessingMode' + state_backend: + type: string + state_changelog_enabled: + type: boolean + timeout: type: integer format: int64 - mappedCount: + tolerable_failed_checkpoints: type: integer - format: int64 - mappedMax: + format: int32 + unaligned_checkpoints: + type: boolean + CheckpointDuration: + type: object + properties: + async: type: integer format: int64 - mappedUsed: + sync: type: integer format: int64 - memorySegmentsAvailable: + CheckpointStatistics: + required: + - className + type: object + properties: + alignment_buffered: type: integer format: int64 - memorySegmentsTotal: + checkpoint_type: + $ref: '#/components/schemas/RestAPICheckpointType' + checkpointed_size: type: integer format: int64 - nettyShuffleMemoryAvailable: + className: + type: string + end_to_end_duration: type: integer format: int64 - nettyShuffleMemorySegmentsAvailable: + id: type: integer format: int64 - nettyShuffleMemorySegmentsTotal: + is_savepoint: + type: boolean + latest_ack_timestamp: type: integer format: int64 - nettyShuffleMemorySegmentsUsed: + num_acknowledged_subtasks: type: integer - format: int64 - nettyShuffleMemoryTotal: + format: int32 + num_subtasks: type: integer - format: int64 - nettyShuffleMemoryUsed: + format: int32 + persisted_data: type: integer format: int64 - nonHeapCommitted: + processed_data: type: integer format: int64 - nonHeapMax: + state_size: type: integer format: int64 - nonHeapUsed: + status: + $ref: '#/components/schemas/CheckpointStatsStatus' + tasks: + type: object + additionalProperties: + $ref: '#/components/schemas/TaskCheckpointStatistics' + trigger_timestamp: type: integer format: int64 - JarEntryInfo: - type: object - properties: - description: - type: string - name: - type: string - TriggerId: - pattern: "[0-9a-f]{32}" + discriminator: + propertyName: className + CheckpointStatsStatus: type: string - JobVertexFlameGraph: + enum: + - IN_PROGRESS + - COMPLETED + - FAILED + CheckpointingStatistics: type: object properties: - data: - $ref: '#/components/schemas/Node' - endTimestamp: - type: integer - format: int64 - JobDetailsInfo: + counts: + $ref: '#/components/schemas/Counts' + history: + type: array + items: + $ref: '#/components/schemas/CheckpointStatistics' + latest: + $ref: '#/components/schemas/LatestCheckpoints' + summary: + $ref: '#/components/schemas/Summary' + ClusterDataSetEntry: type: object properties: - duration: - type: integer - format: int64 - end-time: - type: integer - format: int64 - isStoppable: - type: boolean - jid: - $ref: '#/components/schemas/JobID' - maxParallelism: - type: integer - format: int64 - name: - type: string - now: - type: integer - format: int64 - plan: + id: type: string - start-time: - type: integer - format: int64 - state: - $ref: '#/components/schemas/JobStatus' - status-counts: - type: object - additionalProperties: - type: integer - format: int32 - timestamps: - type: object - additionalProperties: - type: integer - format: int64 - vertices: + isComplete: + type: boolean + ClusterDataSetListResponseBody: + type: object + properties: + dataSets: type: array items: - $ref: '#/components/schemas/JobVertexDetailsInfo' - IOMetricsInfo: + $ref: '#/components/schemas/ClusterDataSetEntry' + ClusterOverviewWithVersion: type: object properties: - accumulated-backpressured-time: + flink-commit: + type: string + flink-version: + type: string + jobs-cancelled: type: integer - format: int64 - accumulated-busy-time: - type: number - format: double - accumulated-idle-time: + format: int32 + jobs-failed: type: integer - format: int64 - read-bytes: + format: int32 + jobs-finished: type: integer - format: int64 - read-bytes-complete: - type: boolean - read-records: + format: int32 + jobs-running: type: integer - format: int64 - read-records-complete: - type: boolean - write-bytes: + format: int32 + slots-available: type: integer - format: int64 - write-bytes-complete: - type: boolean - write-records: + format: int32 + slots-free-and-blocked: type: integer - format: int64 - write-records-complete: - type: boolean - SavepointFormatType: - type: string - enum: - - CANONICAL - - NATIVE - SerializedThrowable: + format: int32 + slots-total: + type: integer + format: int32 + taskmanagers: + type: integer + format: int32 + taskmanagers-blocked: + type: integer + format: int32 + CompletedCheckpointStatistics: type: object + allOf: + - $ref: '#/components/schemas/CheckpointStatistics' + - type: object + properties: + external_path: + type: string + discarded: + type: boolean + CompletedSubtaskCheckpointStatistics: + type: object + allOf: + - $ref: '#/components/schemas/SubtaskCheckpointStatistics' + - type: object + properties: + ack_timestamp: + type: integer + format: int64 + end_to_end_duration: + type: integer + format: int64 + checkpointed_size: + type: integer + format: int64 + state_size: + type: integer + format: int64 + checkpoint: + $ref: '#/components/schemas/CheckpointDuration' + alignment: + $ref: '#/components/schemas/CheckpointAlignment' + start_delay: + type: integer + format: int64 + unaligned_checkpoint: + type: boolean + aborted: + type: boolean + ConfigurationInfo: + type: array properties: - serialized-throwable: - type: string - format: binary - TaskManagersInfo: + empty: + type: boolean + items: + $ref: '#/components/schemas/ConfigurationInfoEntry' + ConfigurationInfoEntry: type: object properties: - taskmanagers: - type: array - items: - $ref: '#/components/schemas/TaskManagerInfo' - RestoreMode: - type: string - enum: - - CLAIM - - NO_CLAIM - - LEGACY - SubtaskExecutionAttemptDetailsInfo: + key: + type: string + value: + type: string + Counts: type: object properties: - attempt: + completed: + type: integer + format: int64 + failed: + type: integer + format: int64 + in_progress: type: integer format: int32 - duration: + restored: type: integer format: int64 - end-time: + total: type: integer format: int64 - host: - type: string - metrics: - $ref: '#/components/schemas/IOMetricsInfo' - other-concurrent-attempts: + CurrentAttempts: + type: object + properties: + currentAttempts: + uniqueItems: true type: array items: - $ref: '#/components/schemas/SubtaskExecutionAttemptDetailsInfo' - start-time: + type: integer + format: int32 + representativeAttempt: + type: integer + format: int32 + DashboardConfiguration: + type: object + properties: + features: + $ref: '#/components/schemas/Features' + flink-revision: + type: string + flink-version: + type: string + refresh-interval: type: integer format: int64 - status: - $ref: '#/components/schemas/ExecutionState' - status-duration: - type: object - additionalProperties: - type: integer - format: int64 - subtask: + timezone-name: + type: string + timezone-offset: type: integer format: int32 - taskmanager-id: + DistributedCacheFile: + type: object + properties: + entryName: type: string - JobResult: + fileName: + type: string + EnvironmentInfo: type: object properties: - accumulatorResults: + classpath: + type: array + items: + type: string + environment: + type: array + items: + $ref: '#/components/schemas/EnvironmentVariableItem' + jvm: + $ref: '#/components/schemas/JVMInfo' + EnvironmentVariableItem: + type: object + properties: + key: + type: string + value: + type: string + ExceptionInfo: + type: object + properties: + exceptionName: + type: string + location: + type: string + stacktrace: + type: string + taskName: + type: string + timestamp: + type: integer + format: int64 + ExecutionConfigInfo: + type: object + properties: + execution-mode: + type: string + job-parallelism: + type: integer + format: int32 + object-reuse-mode: + type: boolean + restart-strategy: + type: string + user-config: type: object additionalProperties: - $ref: '#/components/schemas/SerializedValueOptionalFailureObject' - applicationStatus: - $ref: '#/components/schemas/ApplicationStatus' - jobId: - $ref: '#/components/schemas/JobID' - netRuntime: + type: string + ExecutionExceptionInfo: + type: object + properties: + exception: + type: string + location: + type: string + task: + type: string + timestamp: type: integer format: int64 - serializedThrowable: - $ref: '#/components/schemas/SerializedThrowable' - success: + ExecutionState: + type: string + enum: + - CREATED + - SCHEDULED + - DEPLOYING + - RUNNING + - FINISHED + - CANCELING + - CANCELED + - FAILED + - RECONCILING + - INITIALIZING + ExternalizedCheckpointInfo: + type: object + properties: + delete_on_cancellation: type: boolean - JobVertexDetailsInfo: + enabled: + type: boolean + FailedCheckpointStatistics: + type: object + allOf: + - $ref: '#/components/schemas/CheckpointStatistics' + - type: object + properties: + failure_timestamp: + type: integer + format: int64 + failure_message: + type: string + Features: type: object properties: - aggregated: - $ref: '#/components/schemas/AggregatedTaskDetailsInfo' - id: - $ref: '#/components/schemas/JobVertexID' - maxParallelism: + web-cancel: + type: boolean + web-history: + type: boolean + web-submit: + type: boolean + GarbageCollectorInfo: + type: object + properties: + count: type: integer - format: int32 + format: int64 name: type: string - now: + time: type: integer format: int64 - parallelism: + HardwareDescription: + type: object + properties: + cpuCores: type: integer format: int32 - subtasks: + freeMemory: + type: integer + format: int64 + managedMemory: + type: integer + format: int64 + physicalMemory: + type: integer + format: int64 + IOMetricsInfo: + type: object + properties: + accumulated-backpressured-time: + type: integer + format: int64 + accumulated-busy-time: + type: number + format: double + accumulated-idle-time: + type: integer + format: int64 + read-bytes: + type: integer + format: int64 + read-bytes-complete: + type: boolean + read-records: + type: integer + format: int64 + read-records-complete: + type: boolean + write-bytes: + type: integer + format: int64 + write-bytes-complete: + type: boolean + write-records: + type: integer + format: int64 + write-records-complete: + type: boolean + Id: + type: string + enum: + - IN_PROGRESS + - COMPLETED + IntermediateDataSetID: + pattern: "[0-9a-f]{32}" + type: string + JVMInfo: + type: object + properties: + arch: + type: string + options: type: array items: - $ref: '#/components/schemas/SubtaskExecutionAttemptDetailsInfo' - DistributedCacheFile: + type: string + version: + type: string + JarEntryInfo: type: object properties: - entryName: + description: type: string - fileName: + name: type: string - RestoredCheckpointStatistics: + JarFileInfo: type: object properties: - external_path: - type: string + entry: + type: array + items: + $ref: '#/components/schemas/JarEntryInfo' id: + type: string + name: + type: string + uploaded: type: integer format: int64 - is_savepoint: - type: boolean - restore_timestamp: + JarListInfo: + type: object + properties: + address: + type: string + files: + type: array + items: + $ref: '#/components/schemas/JarFileInfo' + JarPlanRequestBody: + type: object + properties: + entryClass: + type: string + jobId: + $ref: '#/components/schemas/JobID' + parallelism: type: integer - format: int64 - SavepointTriggerRequestBody: + format: int32 + programArgs: + type: string + programArgsList: + type: array + items: + type: string + JarRunRequestBody: type: object properties: - cancel-job: + allowNonRestoredState: type: boolean - formatType: - $ref: '#/components/schemas/SavepointFormatType' - target-directory: + entryClass: type: string - triggerId: - $ref: '#/components/schemas/TriggerId' - ThreadDumpInfo: - type: object - properties: - threadInfos: + jobId: + $ref: '#/components/schemas/JobID' + parallelism: + type: integer + format: int32 + programArgs: + type: string + programArgsList: type: array items: - $ref: '#/components/schemas/ThreadInfo' - AsynchronousOperationResult: + type: string + restoreMode: + $ref: '#/components/schemas/RestoreMode' + savepointPath: + type: string + JarRunResponseBody: type: object properties: - operation: - oneOf: - - $ref: '#/components/schemas/AsynchronousOperationInfo' - - $ref: '#/components/schemas/SavepointInfo' + jobid: + $ref: '#/components/schemas/JobID' + JarUploadResponseBody: + type: object + properties: + filename: + type: string status: - $ref: '#/components/schemas/QueueStatus' - CheckpointingStatistics: + $ref: '#/components/schemas/UploadStatus' + JobAccumulator: + type: object + JobAccumulatorsInfo: type: object properties: - counts: - $ref: '#/components/schemas/Counts' - history: + job-accumulators: type: array items: - $ref: '#/components/schemas/CheckpointStatistics' - latest: - $ref: '#/components/schemas/LatestCheckpoints' - summary: - $ref: '#/components/schemas/Summary' - HardwareDescription: + $ref: '#/components/schemas/JobAccumulator' + serialized-user-task-accumulators: + type: object + additionalProperties: + $ref: '#/components/schemas/SerializedValueOptionalFailureObject' + user-task-accumulators: + type: array + items: + $ref: '#/components/schemas/UserTaskAccumulator' + JobConfigInfo: type: object properties: - cpuCores: - type: integer - format: int32 - freeMemory: - type: integer - format: int64 - managedMemory: - type: integer - format: int64 - physicalMemory: - type: integer - format: int64 - TaskCheckpointStatistics: + executionConfigInfo: + $ref: '#/components/schemas/ExecutionConfigInfo' + jobId: + $ref: '#/components/schemas/JobID' + jobName: + type: string + JobDetails: type: object properties: - alignment_buffered: - type: integer - format: int64 - checkpointed_size: - type: integer - format: int64 - end_to_end_duration: + currentExecutionAttempts: + type: object + additionalProperties: + type: object + additionalProperties: + $ref: '#/components/schemas/CurrentAttempts' + duration: type: integer format: int64 - id: + endTime: type: integer format: int64 - latest_ack_timestamp: + jobId: + $ref: '#/components/schemas/JobID' + jobName: + type: string + lastUpdateTime: type: integer format: int64 - num_acknowledged_subtasks: - type: integer - format: int32 - num_subtasks: + numTasks: type: integer format: int32 - persisted_data: - type: integer - format: int64 - processed_data: - type: integer - format: int64 - state_size: + startTime: type: integer format: int64 - status: - $ref: '#/components/schemas/CheckpointStatsStatus' - JobStatusInfo: - type: object - properties: status: $ref: '#/components/schemas/JobStatus' - LogUrlResponse: - type: object - properties: - url: - type: string - JobAccumulator: - type: object - Id: - type: string - enum: - - IN_PROGRESS - - COMPLETED - JobID: - pattern: "[0-9a-f]{32}" - type: string - CheckpointStatistics: - required: - - className + tasksPerState: + type: array + items: + type: integer + format: int32 + JobDetailsInfo: type: object properties: - alignment_buffered: - type: integer - format: int64 - checkpoint_type: - $ref: '#/components/schemas/RestAPICheckpointType' - checkpointed_size: - type: integer - format: int64 - className: - type: string - end_to_end_duration: + duration: type: integer format: int64 - id: + end-time: type: integer format: int64 - is_savepoint: + isStoppable: type: boolean - latest_ack_timestamp: - type: integer - format: int64 - num_acknowledged_subtasks: - type: integer - format: int32 - num_subtasks: - type: integer - format: int32 - persisted_data: + jid: + $ref: '#/components/schemas/JobID' + maxParallelism: type: integer format: int64 - processed_data: + name: + type: string + now: type: integer format: int64 - state_size: + plan: + type: string + start-time: type: integer format: int64 - status: - $ref: '#/components/schemas/CheckpointStatsStatus' - tasks: + state: + $ref: '#/components/schemas/JobStatus' + status-counts: type: object additionalProperties: - $ref: '#/components/schemas/TaskCheckpointStatistics' - trigger_timestamp: + type: integer + format: int32 + timestamps: + type: object + additionalProperties: + type: integer + format: int64 + vertices: + type: array + items: + $ref: '#/components/schemas/JobVertexDetailsInfo' + JobExceptionHistory: + type: object + properties: + entries: + type: array + items: + $ref: '#/components/schemas/RootExceptionInfo' + truncated: + type: boolean + JobExceptionsInfoWithHistory: + type: object + properties: + all-exceptions: + type: array + items: + $ref: '#/components/schemas/ExecutionExceptionInfo' + exceptionHistory: + $ref: '#/components/schemas/JobExceptionHistory' + root-exception: + type: string + timestamp: type: integer format: int64 - discriminator: - propertyName: className - JobConfigInfo: + truncated: + type: boolean + JobExecutionResultResponseBody: + required: + - status type: object properties: - executionConfigInfo: - $ref: '#/components/schemas/ExecutionConfigInfo' - jobId: - $ref: '#/components/schemas/JobID' - jobName: - type: string - MetricCollectionResponseBody: + job-execution-result: + $ref: '#/components/schemas/JobResult' + status: + $ref: '#/components/schemas/QueueStatus' + JobID: + pattern: "[0-9a-f]{32}" + type: string + JobIdWithStatus: + type: object + properties: + id: + $ref: '#/components/schemas/JobID' + status: + $ref: '#/components/schemas/JobStatus' + JobIdsWithStatusOverview: type: object properties: - metrics: + jobs: type: array items: - $ref: '#/components/schemas/Metric' - ClusterOverviewWithVersion: + $ref: '#/components/schemas/JobIdWithStatus' + JobPlanInfo: type: object properties: - flink-commit: - type: string - flink-version: - type: string - jobs-cancelled: - type: integer - format: int32 - jobs-failed: - type: integer - format: int32 - jobs-finished: - type: integer - format: int32 - jobs-running: - type: integer - format: int32 - slots-available: - type: integer - format: int32 - slots-free-and-blocked: - type: integer - format: int32 - slots-total: - type: integer - format: int32 - taskmanagers: - type: integer - format: int32 - taskmanagers-blocked: - type: integer - format: int32 - AggregatedMetricsResponseBody: + plan: + $ref: '#/components/schemas/RawJson' + JobResult: type: object + properties: + accumulatorResults: + type: object + additionalProperties: + $ref: '#/components/schemas/SerializedValueOptionalFailureObject' + applicationStatus: + $ref: '#/components/schemas/ApplicationStatus' + jobId: + $ref: '#/components/schemas/JobID' + netRuntime: + type: integer + format: int64 + serializedThrowable: + $ref: '#/components/schemas/SerializedThrowable' + success: + type: boolean JobStatus: type: string enum: @@ -2095,364 +2299,193 @@ components: - RESTARTING - SUSPENDED - RECONCILING - SubtasksAllAccumulatorsInfo: + JobStatusInfo: type: object properties: - id: - $ref: '#/components/schemas/JobVertexID' - parallelism: - type: integer - format: int32 - subtasks: - type: array - items: - $ref: '#/components/schemas/SubtaskAccumulatorsInfo' - ResourceID: - pattern: "[0-9a-f]{32}" - type: string - ClusterDataSetListResponseBody: + status: + $ref: '#/components/schemas/JobStatus' + JobSubmitRequestBody: type: object properties: - dataSets: + jobArtifactFileNames: type: array items: - $ref: '#/components/schemas/ClusterDataSetEntry' - UploadStatus: - type: string - enum: - - success - SavepointDisposalRequest: - type: object - properties: - savepoint-path: - type: string - PendingSubtaskCheckpointStatistics: - type: object - allOf: - - $ref: '#/components/schemas/SubtaskCheckpointStatistics' - JVMInfo: - type: object - properties: - arch: + $ref: '#/components/schemas/DistributedCacheFile' + jobGraphFileName: type: string - options: + jobJarFileNames: type: array items: type: string - version: - type: string - LogInfo: - type: object - properties: - mtime: - type: integer - format: int64 - name: - type: string - size: - type: integer - format: int64 - CompletedCheckpointStatistics: - type: object - allOf: - - $ref: '#/components/schemas/CheckpointStatistics' - - type: object - properties: - external_path: - type: string - discarded: - type: boolean - JarRunRequestBody: + JobSubmitResponseBody: type: object properties: - allowNonRestoredState: - type: boolean - entryClass: - type: string - jobId: - $ref: '#/components/schemas/JobID' - parallelism: - type: integer - format: int32 - programArgs: - type: string - programArgsList: - type: array - items: - type: string - restoreMode: - $ref: '#/components/schemas/RestoreMode' - savepointPath: + jobUrl: type: string - SubtaskAccumulatorsInfo: + JobVertexAccumulatorsInfo: type: object properties: - attempt: - type: integer - format: int32 - host: + id: type: string - subtask: - type: integer - format: int32 user-accumulators: type: array items: $ref: '#/components/schemas/UserAccumulator' - JobPlanInfo: - type: object - properties: - plan: - $ref: '#/components/schemas/RawJson' - TaskExecutorMemoryConfiguration: + JobVertexBackPressureInfo: type: object properties: - frameworkHeap: - type: integer - format: int64 - frameworkOffHeap: - type: integer - format: int64 - jvmMetaspace: - type: integer - format: int64 - jvmOverhead: - type: integer - format: int64 - managedMemory: - type: integer - format: int64 - networkMemory: - type: integer - format: int64 - taskHeap: - type: integer - format: int64 - taskOffHeap: - type: integer - format: int64 - totalFlinkMemory: - type: integer - format: int64 - totalProcessMemory: + backpressure-level: + $ref: '#/components/schemas/VertexBackPressureLevel' + end-timestamp: type: integer format: int64 - FailedCheckpointStatistics: - type: object - allOf: - - $ref: '#/components/schemas/CheckpointStatistics' - - type: object - properties: - failure_timestamp: - type: integer - format: int64 - failure_message: - type: string - JobVertexAccumulatorsInfo: - type: object - properties: - id: - type: string - user-accumulators: + status: + $ref: '#/components/schemas/VertexBackPressureStatus' + subtasks: type: array items: - $ref: '#/components/schemas/UserAccumulator' - ConfigurationInfo: - type: array - properties: - empty: - type: boolean - items: - $ref: '#/components/schemas/ConfigurationInfoEntry' - Type: - type: string - enum: - - FULL - - ON_CPU - - OFF_CPU - UserAccumulator: + $ref: '#/components/schemas/SubtaskBackPressureInfo' + JobVertexDetailsInfo: type: object properties: + aggregated: + $ref: '#/components/schemas/AggregatedTaskDetailsInfo' + id: + $ref: '#/components/schemas/JobVertexID' + maxParallelism: + type: integer + format: int32 name: type: string - type: - type: string - value: - type: string - VertexBackPressureLevel: - type: string - enum: - - ok - - low - - high - CheckpointDuration: + now: + type: integer + format: int64 + parallelism: + type: integer + format: int32 + subtasks: + type: array + items: + $ref: '#/components/schemas/SubtaskExecutionAttemptDetailsInfo' + JobVertexFlameGraph: type: object properties: - async: - type: integer - format: int64 - sync: + data: + $ref: '#/components/schemas/Node' + endTimestamp: type: integer format: int64 - ExceptionInfo: + JobVertexID: + pattern: "[0-9a-f]{32}" + type: string + JobVertexTaskManagersInfo: type: object properties: - exceptionName: - type: string - location: - type: string - stacktrace: - type: string - taskName: + id: + $ref: '#/components/schemas/JobVertexID' + name: type: string - timestamp: + now: type: integer format: int64 - SubtaskCheckpointStatistics: - required: - - className + taskmanagers: + type: array + items: + $ref: '#/components/schemas/TaskManagersInfo' + LatestCheckpoints: type: object properties: - className: - type: string - index: + completed: + $ref: '#/components/schemas/CompletedCheckpointStatistics' + failed: + $ref: '#/components/schemas/FailedCheckpointStatistics' + restored: + $ref: '#/components/schemas/RestoredCheckpointStatistics' + savepoint: + $ref: '#/components/schemas/CompletedCheckpointStatistics' + LogInfo: + type: object + properties: + mtime: type: integer - format: int32 - status: + format: int64 + name: type: string - discriminator: - propertyName: className - TerminationMode: - type: string - enum: - - CANCEL - - STOP - CompletedSubtaskCheckpointStatistics: - type: object - allOf: - - $ref: '#/components/schemas/SubtaskCheckpointStatistics' - - type: object - properties: - ack_timestamp: - type: integer - format: int64 - end_to_end_duration: - type: integer - format: int64 - checkpointed_size: - type: integer - format: int64 - state_size: - type: integer - format: int64 - checkpoint: - $ref: '#/components/schemas/CheckpointDuration' - alignment: - $ref: '#/components/schemas/CheckpointAlignment' - start_delay: - type: integer - format: int64 - unaligned_checkpoint: - type: boolean - aborted: - type: boolean - PendingCheckpointStatistics: - type: object - allOf: - - $ref: '#/components/schemas/CheckpointStatistics' - ExecutionState: - type: string - enum: - - CREATED - - SCHEDULED - - DEPLOYING - - RUNNING - - FINISHED - - CANCELING - - CANCELED - - FAILED - - RECONCILING - - INITIALIZING - CurrentAttempts: + size: + type: integer + format: int64 + LogListInfo: type: object properties: - currentAttempts: - uniqueItems: true + logs: type: array items: - type: integer - format: int32 - representativeAttempt: - type: integer - format: int32 - ProcessingMode: - type: string - enum: - - AT_LEAST_ONCE - - EXACTLY_ONCE - JobSubmitResponseBody: + $ref: '#/components/schemas/LogInfo' + LogUrlResponse: type: object properties: - jobUrl: + url: type: string - UserTaskAccumulator: + Metric: + required: + - id type: object properties: - name: - type: string - type: + id: type: string value: type: string - JobExceptionHistory: + MetricCollectionResponseBody: type: object properties: - entries: + metrics: type: array items: - $ref: '#/components/schemas/RootExceptionInfo' - truncated: - type: boolean - SubtaskTimeInfo: + $ref: '#/components/schemas/Metric' + MultipleJobsDetails: type: object properties: - duration: - type: integer - format: int64 - host: + jobs: + type: array + items: + $ref: '#/components/schemas/JobDetails' + Node: + type: object + properties: + children: + type: array + items: + $ref: '#/components/schemas/Node' + name: type: string - subtask: + value: type: integer format: int32 - timestamps: - type: object - additionalProperties: - type: integer - format: int64 - CheckpointStatsStatus: - type: string - enum: - - IN_PROGRESS - - COMPLETED - - FAILED - RestAPICheckpointType: - type: string - enum: - - CHECKPOINT - - SAVEPOINT - - SYNC_SAVEPOINT - VertexBackPressureStatus: + PendingCheckpointStatistics: + type: object + allOf: + - $ref: '#/components/schemas/CheckpointStatistics' + PendingSubtaskCheckpointStatistics: + type: object + allOf: + - $ref: '#/components/schemas/SubtaskCheckpointStatistics' + ProcessingMode: type: string enum: - - deprecated - - ok - ExternalizedCheckpointInfo: + - AT_LEAST_ONCE + - EXACTLY_ONCE + QueueStatus: + required: + - id type: object properties: - delete_on_cancellation: - type: boolean - enabled: - type: boolean + id: + $ref: '#/components/schemas/Id' + RawJson: + type: object + ResourceID: + pattern: "[0-9a-f]{32}" + type: string ResourceProfileInfo: type: object properties: @@ -2476,155 +2509,98 @@ components: taskOffHeapMemory: type: integer format: int32 - ClusterDataSetEntry: - type: object - properties: - id: - type: string - isComplete: - type: boolean - JobVertexBackPressureInfo: - type: object - properties: - backpressure-level: - $ref: '#/components/schemas/VertexBackPressureLevel' - end-timestamp: - type: integer - format: int64 - status: - $ref: '#/components/schemas/VertexBackPressureStatus' - subtasks: - type: array - items: - $ref: '#/components/schemas/SubtaskBackPressureInfo' - JobIdWithStatus: - type: object - properties: - id: - $ref: '#/components/schemas/JobID' - status: - $ref: '#/components/schemas/JobStatus' - ConfigurationInfoEntry: + RestAPICheckpointType: + type: string + enum: + - CHECKPOINT + - SAVEPOINT + - SYNC_SAVEPOINT + RestoreMode: + type: string + enum: + - CLAIM + - NO_CLAIM + - LEGACY + RestoredCheckpointStatistics: type: object properties: - key: - type: string - value: + external_path: type: string - QueueStatus: - required: - - id - type: object - properties: id: - $ref: '#/components/schemas/Id' - LatestCheckpoints: - type: object - properties: - completed: - $ref: '#/components/schemas/CompletedCheckpointStatistics' - failed: - $ref: '#/components/schemas/FailedCheckpointStatistics' - restored: - $ref: '#/components/schemas/RestoredCheckpointStatistics' - savepoint: - $ref: '#/components/schemas/CompletedCheckpointStatistics' - JobSubmitRequestBody: + type: integer + format: int64 + is_savepoint: + type: boolean + restore_timestamp: + type: integer + format: int64 + RootExceptionInfo: type: object properties: - jobArtifactFileNames: + concurrentExceptions: type: array items: - $ref: '#/components/schemas/DistributedCacheFile' - jobGraphFileName: + $ref: '#/components/schemas/ExceptionInfo' + exceptionName: type: string - jobJarFileNames: - type: array - items: - type: string - SubtaskExecutionAttemptAccumulatorsInfo: - type: object - properties: - attempt: - type: integer - format: int32 - id: + location: type: string - subtask: + stacktrace: + type: string + taskName: + type: string + timestamp: type: integer - format: int32 - user-accumulators: - type: array - items: - $ref: '#/components/schemas/UserAccumulator' - SubtasksTimesInfo: + format: int64 + SavepointDisposalRequest: type: object properties: - id: + savepoint-path: type: string - name: + SavepointFormatType: + type: string + enum: + - CANONICAL + - NATIVE + SavepointInfo: + type: object + properties: + failure-cause: + $ref: '#/components/schemas/SerializedThrowable' + location: type: string - now: - type: integer - format: int64 - subtasks: - type: array - items: - $ref: '#/components/schemas/SubtaskTimeInfo' - StopWithSavepointRequestBody: + SavepointTriggerRequestBody: type: object properties: - drain: + cancel-job: type: boolean formatType: $ref: '#/components/schemas/SavepointFormatType' - targetDirectory: + target-directory: type: string triggerId: $ref: '#/components/schemas/TriggerId' - DashboardConfiguration: - type: object - properties: - features: - $ref: '#/components/schemas/Features' - flink-revision: - type: string - flink-version: - type: string - refresh-interval: - type: integer - format: int64 - timezone-name: - type: string - timezone-offset: - type: integer - format: int32 - GarbageCollectorInfo: + SerializedThrowable: type: object properties: - count: - type: integer - format: int64 - name: + serialized-throwable: type: string - time: - type: integer - format: int64 - JobAccumulatorsInfo: + format: binary + SerializedValueOptionalFailureObject: type: object properties: - job-accumulators: - type: array - items: - $ref: '#/components/schemas/JobAccumulator' - serialized-user-task-accumulators: - type: object - additionalProperties: - $ref: '#/components/schemas/SerializedValueOptionalFailureObject' - user-task-accumulators: + byteArray: type: array items: - $ref: '#/components/schemas/UserTaskAccumulator' + type: string + format: byte + SlotInfo: + type: object + properties: + jobId: + $ref: '#/components/schemas/JobID' + resource: + $ref: '#/components/schemas/ResourceProfileInfo' StatsSummaryDto: type: object properties: @@ -2652,152 +2628,178 @@ components: p999: type: number format: double - TaskManagerDetailsInfo: + StopWithSavepointRequestBody: type: object properties: - allocatedSlots: - type: array - items: - $ref: '#/components/schemas/SlotInfo' - blocked: + drain: type: boolean - dataPort: - type: integer - format: int32 - freeResource: - $ref: '#/components/schemas/ResourceProfileInfo' - freeSlots: - type: integer - format: int32 - hardware: - $ref: '#/components/schemas/HardwareDescription' - id: - $ref: '#/components/schemas/ResourceID' - jmxPort: - type: integer - format: int32 - memoryConfiguration: - $ref: '#/components/schemas/TaskExecutorMemoryConfiguration' - metrics: - $ref: '#/components/schemas/TaskManagerMetricsInfo' - path: + formatType: + $ref: '#/components/schemas/SavepointFormatType' + targetDirectory: type: string - slotsNumber: - type: integer - format: int32 - timeSinceLastHeartbeat: - type: integer - format: int64 - totalResource: - $ref: '#/components/schemas/ResourceProfileInfo' - ExecutionConfigInfo: + triggerId: + $ref: '#/components/schemas/TriggerId' + SubtaskAccumulatorsInfo: type: object properties: - execution-mode: - type: string - job-parallelism: + attempt: type: integer format: int32 - object-reuse-mode: - type: boolean - restart-strategy: + host: type: string - user-config: - type: object - additionalProperties: - type: string - Counts: + subtask: + type: integer + format: int32 + user-accumulators: + type: array + items: + $ref: '#/components/schemas/UserAccumulator' + SubtaskBackPressureInfo: type: object properties: - completed: - type: integer - format: int64 - failed: - type: integer - format: int64 - in_progress: + attempt-number: type: integer format: int32 - restored: - type: integer - format: int64 - total: + backpressure-level: + $ref: '#/components/schemas/VertexBackPressureLevel' + busyRatio: + type: number + format: double + idleRatio: + type: number + format: double + other-concurrent-attempts: + type: array + items: + $ref: '#/components/schemas/SubtaskBackPressureInfo' + ratio: + type: number + format: double + subtask: type: integer - format: int64 - JobExecutionResultResponseBody: + format: int32 + SubtaskCheckpointStatistics: required: - - status + - className type: object properties: - job-execution-result: - $ref: '#/components/schemas/JobResult' + className: + type: string + index: + type: integer + format: int32 status: - $ref: '#/components/schemas/QueueStatus' - JobVertexID: - pattern: "[0-9a-f]{32}" - type: string - JarRunResponseBody: - type: object - properties: - jobid: - $ref: '#/components/schemas/JobID' - MultipleJobsDetails: + type: string + discriminator: + propertyName: className + SubtaskExecutionAttemptAccumulatorsInfo: type: object properties: - jobs: + attempt: + type: integer + format: int32 + id: + type: string + subtask: + type: integer + format: int32 + user-accumulators: type: array items: - $ref: '#/components/schemas/JobDetails' - JobDetails: + $ref: '#/components/schemas/UserAccumulator' + SubtaskExecutionAttemptDetailsInfo: type: object properties: - currentExecutionAttempts: - type: object - additionalProperties: - type: object - additionalProperties: - $ref: '#/components/schemas/CurrentAttempts' + attempt: + type: integer + format: int32 duration: type: integer format: int64 - endTime: + end-time: type: integer format: int64 - jobId: - $ref: '#/components/schemas/JobID' - jobName: + host: type: string - lastUpdateTime: + metrics: + $ref: '#/components/schemas/IOMetricsInfo' + other-concurrent-attempts: + type: array + items: + $ref: '#/components/schemas/SubtaskExecutionAttemptDetailsInfo' + start-time: type: integer format: int64 - numTasks: + status: + $ref: '#/components/schemas/ExecutionState' + status-duration: + type: object + additionalProperties: + type: integer + format: int64 + subtask: type: integer format: int32 - startTime: + taskmanager-id: + type: string + SubtaskTimeInfo: + type: object + properties: + duration: type: integer format: int64 - status: - $ref: '#/components/schemas/JobStatus' - tasksPerState: + host: + type: string + subtask: + type: integer + format: int32 + timestamps: + type: object + additionalProperties: + type: integer + format: int64 + SubtasksAllAccumulatorsInfo: + type: object + properties: + id: + $ref: '#/components/schemas/JobVertexID' + parallelism: + type: integer + format: int32 + subtasks: type: array items: - type: integer - format: int32 - ThreadInfo: + $ref: '#/components/schemas/SubtaskAccumulatorsInfo' + SubtasksTimesInfo: type: object properties: - stringifiedThreadInfo: + id: type: string - threadName: + name: type: string - JobIdsWithStatusOverview: - type: object - properties: - jobs: + now: + type: integer + format: int64 + subtasks: type: array items: - $ref: '#/components/schemas/JobIdWithStatus' - TaskCheckpointStatisticsWithSubtaskDetails: + $ref: '#/components/schemas/SubtaskTimeInfo' + Summary: + type: object + properties: + alignment: + $ref: '#/components/schemas/CheckpointAlignment' + checkpoint_duration: + $ref: '#/components/schemas/CheckpointDuration' + checkpointed_size: + $ref: '#/components/schemas/StatsSummaryDto' + end_to_end_duration: + $ref: '#/components/schemas/StatsSummaryDto' + start_delay: + $ref: '#/components/schemas/StatsSummaryDto' + state_size: + $ref: '#/components/schemas/StatsSummaryDto' + TaskCheckpointStatistics: type: object properties: alignment_buffered: @@ -2832,170 +2834,118 @@ components: format: int64 status: $ref: '#/components/schemas/CheckpointStatsStatus' - subtasks: - type: array - items: - $ref: '#/components/schemas/SubtaskCheckpointStatistics' - summary: - $ref: '#/components/schemas/Summary' - Features: - type: object - properties: - web-cancel: - type: boolean - web-history: - type: boolean - web-submit: - type: boolean - JobVertexTaskManagersInfo: - type: object - properties: - id: - $ref: '#/components/schemas/JobVertexID' - name: - type: string - now: - type: integer - format: int64 - taskmanagers: - type: array - items: - $ref: '#/components/schemas/TaskManagersInfo' - CheckpointConfigInfo: + TaskCheckpointStatisticsWithSubtaskDetails: type: object properties: - aligned_checkpoint_timeout: + alignment_buffered: type: integer format: int64 - changelog_periodic_materialization_interval: + checkpointed_size: type: integer format: int64 - changelog_storage: - type: string - checkpoint_storage: - type: string - checkpoints_after_tasks_finish: - type: boolean - externalization: - $ref: '#/components/schemas/ExternalizedCheckpointInfo' - interval: + end_to_end_duration: type: integer format: int64 - max_concurrent: + id: type: integer format: int64 - min_pause: + latest_ack_timestamp: type: integer format: int64 - mode: - $ref: '#/components/schemas/ProcessingMode' - state_backend: - type: string - state_changelog_enabled: - type: boolean - timeout: + num_acknowledged_subtasks: type: integer - format: int64 - tolerable_failed_checkpoints: + format: int32 + num_subtasks: type: integer format: int32 - unaligned_checkpoints: - type: boolean - JobExceptionsInfoWithHistory: - type: object - properties: - all-exceptions: - type: array - items: - $ref: '#/components/schemas/ExecutionExceptionInfo' - exceptionHistory: - $ref: '#/components/schemas/JobExceptionHistory' - root-exception: - type: string - timestamp: + persisted_data: type: integer format: int64 - truncated: - type: boolean - LogListInfo: - type: object - properties: - logs: - type: array - items: - $ref: '#/components/schemas/LogInfo' - ExecutionExceptionInfo: - type: object - properties: - exception: - type: string - location: - type: string - task: - type: string - timestamp: + processed_data: type: integer format: int64 - JarPlanRequestBody: - type: object - properties: - entryClass: - type: string - jobId: - $ref: '#/components/schemas/JobID' - parallelism: + state_size: type: integer - format: int32 - programArgs: - type: string - programArgsList: - type: array - items: - type: string - JarUploadResponseBody: - type: object - properties: - filename: - type: string + format: int64 status: - $ref: '#/components/schemas/UploadStatus' - RawJson: - type: object - SerializedValueOptionalFailureObject: - type: object - properties: - byteArray: + $ref: '#/components/schemas/CheckpointStatsStatus' + subtasks: type: array items: - type: string - format: byte - JarListInfo: + $ref: '#/components/schemas/SubtaskCheckpointStatistics' + summary: + $ref: '#/components/schemas/Summary' + TaskExecutorMemoryConfiguration: type: object properties: - address: - type: string - files: - type: array - items: - $ref: '#/components/schemas/JarFileInfo' - RootExceptionInfo: + frameworkHeap: + type: integer + format: int64 + frameworkOffHeap: + type: integer + format: int64 + jvmMetaspace: + type: integer + format: int64 + jvmOverhead: + type: integer + format: int64 + managedMemory: + type: integer + format: int64 + networkMemory: + type: integer + format: int64 + taskHeap: + type: integer + format: int64 + taskOffHeap: + type: integer + format: int64 + totalFlinkMemory: + type: integer + format: int64 + totalProcessMemory: + type: integer + format: int64 + TaskManagerDetailsInfo: type: object properties: - concurrentExceptions: + allocatedSlots: type: array items: - $ref: '#/components/schemas/ExceptionInfo' - exceptionName: - type: string - location: - type: string - stacktrace: - type: string - taskName: + $ref: '#/components/schemas/SlotInfo' + blocked: + type: boolean + dataPort: + type: integer + format: int32 + freeResource: + $ref: '#/components/schemas/ResourceProfileInfo' + freeSlots: + type: integer + format: int32 + hardware: + $ref: '#/components/schemas/HardwareDescription' + id: + $ref: '#/components/schemas/ResourceID' + jmxPort: + type: integer + format: int32 + memoryConfiguration: + $ref: '#/components/schemas/TaskExecutorMemoryConfiguration' + metrics: + $ref: '#/components/schemas/TaskManagerMetricsInfo' + path: type: string - timestamp: + slotsNumber: + type: integer + format: int32 + timeSinceLastHeartbeat: type: integer format: int64 + totalResource: + $ref: '#/components/schemas/ResourceProfileInfo' TaskManagerInfo: type: object properties: @@ -3028,93 +2978,143 @@ components: format: int64 totalResource: $ref: '#/components/schemas/ResourceProfileInfo' - ApplicationStatus: - type: string - enum: - - SUCCEEDED - - FAILED - - CANCELED - - UNKNOWN - EnvironmentInfo: + TaskManagerMetricsInfo: type: object properties: - classpath: - type: array - items: - type: string - environment: + directCount: + type: integer + format: int64 + directMax: + type: integer + format: int64 + directUsed: + type: integer + format: int64 + garbageCollectors: type: array items: - $ref: '#/components/schemas/EnvironmentVariableItem' - jvm: - $ref: '#/components/schemas/JVMInfo' - Summary: + $ref: '#/components/schemas/GarbageCollectorInfo' + heapCommitted: + type: integer + format: int64 + heapMax: + type: integer + format: int64 + heapUsed: + type: integer + format: int64 + mappedCount: + type: integer + format: int64 + mappedMax: + type: integer + format: int64 + mappedUsed: + type: integer + format: int64 + memorySegmentsAvailable: + type: integer + format: int64 + memorySegmentsTotal: + type: integer + format: int64 + nettyShuffleMemoryAvailable: + type: integer + format: int64 + nettyShuffleMemorySegmentsAvailable: + type: integer + format: int64 + nettyShuffleMemorySegmentsTotal: + type: integer + format: int64 + nettyShuffleMemorySegmentsUsed: + type: integer + format: int64 + nettyShuffleMemoryTotal: + type: integer + format: int64 + nettyShuffleMemoryUsed: + type: integer + format: int64 + nonHeapCommitted: + type: integer + format: int64 + nonHeapMax: + type: integer + format: int64 + nonHeapUsed: + type: integer + format: int64 + TaskManagersInfo: type: object properties: - alignment: - $ref: '#/components/schemas/CheckpointAlignment' - checkpoint_duration: - $ref: '#/components/schemas/CheckpointDuration' - checkpointed_size: - $ref: '#/components/schemas/StatsSummaryDto' - end_to_end_duration: - $ref: '#/components/schemas/StatsSummaryDto' - start_delay: - $ref: '#/components/schemas/StatsSummaryDto' - state_size: - $ref: '#/components/schemas/StatsSummaryDto' - IntermediateDataSetID: - pattern: "[0-9a-f]{32}" + taskmanagers: + type: array + items: + $ref: '#/components/schemas/TaskManagerInfo' + TerminationMode: type: string - Metric: - required: - - id + enum: + - CANCEL + - STOP + ThreadDumpInfo: type: object properties: - id: - type: string - value: - type: string - EnvironmentVariableItem: + threadInfos: + type: array + items: + $ref: '#/components/schemas/ThreadInfo' + ThreadInfo: type: object properties: - key: + stringifiedThreadInfo: type: string - value: + threadName: type: string + TriggerId: + pattern: "[0-9a-f]{32}" + type: string TriggerResponse: type: object properties: request-id: $ref: '#/components/schemas/TriggerId' - SlotInfo: + Type: + type: string + enum: + - FULL + - ON_CPU + - OFF_CPU + UploadStatus: + type: string + enum: + - success + UserAccumulator: type: object properties: - jobId: - $ref: '#/components/schemas/JobID' - resource: - $ref: '#/components/schemas/ResourceProfileInfo' - SubtaskBackPressureInfo: + name: + type: string + type: + type: string + value: + type: string + UserTaskAccumulator: type: object properties: - attempt-number: - type: integer - format: int32 - backpressure-level: - $ref: '#/components/schemas/VertexBackPressureLevel' - busyRatio: - type: number - format: double - idleRatio: - type: number - format: double - other-concurrent-attempts: - type: array - items: - $ref: '#/components/schemas/SubtaskBackPressureInfo' - ratio: - type: number - format: double - subtask: - type: integer - format: int32 + name: + type: string + type: + type: string + value: + type: string + VertexBackPressureLevel: + type: string + enum: + - ok + - low + - high + VertexBackPressureStatus: + type: string + enum: + - deprecated + - ok diff --git a/docs/static/generated/rest_v1_sql_gateway.yml b/docs/static/generated/rest_v1_sql_gateway.yml index a0eb74981b7..f467b9925f4 100644 --- a/docs/static/generated/rest_v1_sql_gateway.yml +++ b/docs/static/generated/rest_v1_sql_gateway.yml @@ -232,13 +232,68 @@ components: properties: status: type: string - WatermarkSpec: + Column: type: object properties: - rowtimeAttribute: + comment: type: string - watermarkExpression: - $ref: '#/components/schemas/ResolvedExpression' + dataType: + $ref: '#/components/schemas/DataType' + name: + type: string + persisted: + type: boolean + physical: + type: boolean + ConstraintType: + type: string + enum: + - PRIMARY_KEY + - UNIQUE_KEY + DataType: + type: object + properties: + children: + type: array + items: + $ref: '#/components/schemas/DataType' + logicalType: + $ref: '#/components/schemas/LogicalType' + ExecuteStatementRequestBody: + type: object + properties: + executionConfig: + type: object + additionalProperties: + type: string + executionTimeout: + type: integer + format: int64 + statement: + type: string + ExecuteStatementResponseBody: + type: object + properties: + operationHandle: + type: string + Expression: + type: object + FetchResultsResponseBody: + type: object + properties: + nextResultUri: + type: string + resultType: + type: string + results: + $ref: '#/components/schemas/ResultSet' + GetApiVersionResponseBody: + type: object + properties: + versions: + type: array + items: + type: string GetInfoResponseBody: type: object properties: @@ -246,22 +301,22 @@ components: type: string version: type: string + GetSessionConfigResponseBody: + type: object + properties: + properties: + type: object + additionalProperties: + type: string + IntermediateDataSetID: + pattern: "[0-9a-f]{32}" + type: string + JobID: + pattern: "[0-9a-f]{32}" + type: string JobVertexID: pattern: "[0-9a-f]{32}" type: string - ResolvedExpression: - type: object - properties: - children: - type: array - items: - $ref: '#/components/schemas/Expression' - outputDataType: - $ref: '#/components/schemas/DataType' - resolvedChildren: - type: array - items: - $ref: '#/components/schemas/ResolvedExpression' LogicalType: type: object properties: @@ -273,31 +328,6 @@ components: type: boolean typeRoot: $ref: '#/components/schemas/LogicalTypeRoot' - UniqueConstraint: - type: object - properties: - columns: - type: array - items: - type: string - enforced: - type: boolean - name: - type: string - type: - $ref: '#/components/schemas/ConstraintType' - ExecuteStatementRequestBody: - type: object - properties: - executionConfig: - type: object - additionalProperties: - type: string - executionTimeout: - type: integer - format: int64 - statement: - type: string LogicalTypeRoot: type: string enum: @@ -330,85 +360,44 @@ components: - RAW - SYMBOL - UNRESOLVED - OperationHandle: - type: object - properties: - identifier: - type: string - format: uuid - ExecuteStatementResponseBody: + OpenSessionRequestBody: type: object properties: - operationHandle: + properties: + type: object + additionalProperties: + type: string + sessionName: type: string - FetchResultsResponseBody: + OpenSessionResponseBody: type: object properties: - nextResultUri: - type: string - resultType: + sessionHandle: type: string - results: - $ref: '#/components/schemas/ResultSet' - RowData: - type: object - properties: - arity: - type: integer - format: int32 - rowKind: - $ref: '#/components/schemas/RowKind' - Column: + OperationHandle: type: object properties: - comment: - type: string - dataType: - $ref: '#/components/schemas/DataType' - name: + identifier: type: string - persisted: - type: boolean - physical: - type: boolean - TriggerId: - pattern: "[0-9a-f]{32}" - type: string - ResourceID: - pattern: "[0-9a-f]{32}" - type: string - OpenSessionRequestBody: + format: uuid + OperationStatusResponseBody: type: object properties: - properties: - type: object - additionalProperties: - type: string - sessionName: + status: type: string - ResultSet: + ResolvedExpression: type: object properties: - data: + children: type: array items: - $ref: '#/components/schemas/RowData' - nextToken: - type: integer - format: int64 - resultSchema: - $ref: '#/components/schemas/ResolvedSchema' - resultType: - $ref: '#/components/schemas/ResultType' - DataType: - type: object - properties: - children: + $ref: '#/components/schemas/Expression' + outputDataType: + $ref: '#/components/schemas/DataType' + resolvedChildren: type: array items: - $ref: '#/components/schemas/DataType' - logicalType: - $ref: '#/components/schemas/LogicalType' + $ref: '#/components/schemas/ResolvedExpression' ResolvedSchema: type: object properties: @@ -438,45 +427,37 @@ components: type: array items: $ref: '#/components/schemas/WatermarkSpec' - GetSessionConfigResponseBody: - type: object - properties: - properties: - type: object - additionalProperties: - type: string - SerializedThrowable: - type: object - properties: - serialized-throwable: - type: string - format: binary - GetApiVersionResponseBody: + ResourceID: + pattern: "[0-9a-f]{32}" + type: string + ResultSet: type: object properties: - versions: + data: type: array items: - type: string - OperationStatusResponseBody: - type: object - properties: - status: - type: string - SessionHandle: - type: object - properties: - identifier: - type: string - format: uuid + $ref: '#/components/schemas/RowData' + nextToken: + type: integer + format: int64 + resultSchema: + $ref: '#/components/schemas/ResolvedSchema' + resultType: + $ref: '#/components/schemas/ResultType' ResultType: type: string enum: - NOT_READY - PAYLOAD - EOS - Expression: + RowData: type: object + properties: + arity: + type: integer + format: int32 + rowKind: + $ref: '#/components/schemas/RowKind' RowKind: type: string enum: @@ -484,19 +465,38 @@ components: - UPDATE_BEFORE - UPDATE_AFTER - DELETE - OpenSessionResponseBody: + SerializedThrowable: type: object properties: - sessionHandle: + serialized-throwable: type: string - ConstraintType: - type: string - enum: - - PRIMARY_KEY - - UNIQUE_KEY - IntermediateDataSetID: - pattern: "[0-9a-f]{32}" - type: string - JobID: + format: binary + SessionHandle: + type: object + properties: + identifier: + type: string + format: uuid + TriggerId: pattern: "[0-9a-f]{32}" type: string + UniqueConstraint: + type: object + properties: + columns: + type: array + items: + type: string + enforced: + type: boolean + name: + type: string + type: + $ref: '#/components/schemas/ConstraintType' + WatermarkSpec: + type: object + properties: + rowtimeAttribute: + type: string + watermarkExpression: + $ref: '#/components/schemas/ResolvedExpression' diff --git a/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java b/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java index 0f86b11f385..5508e5ee08c 100644 --- a/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java +++ b/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java @@ -138,6 +138,7 @@ public class OpenApiSpecGenerator { overrideSerializeThrowableSchema(openApi); sortProperties(openApi); + sortSchemas(openApi); Files.deleteIfExists(outputFile); Files.write(outputFile, Yaml.pretty(openApi).getBytes(StandardCharsets.UTF_8)); @@ -157,6 +158,17 @@ public class OpenApiSpecGenerator { } } + @SuppressWarnings("rawtypes") + private static void sortSchemas(OpenAPI openApi) { + Components components = openApi.getComponents(); + Map<String, Schema> schemas = components.getSchemas(); + final LinkedHashMap<String, Schema> sortedSchemas = new LinkedHashMap<>(); + schemas.entrySet().stream() + .sorted(Map.Entry.comparingByKey()) + .forEach(entry -> sortedSchemas.put(entry.getKey(), entry.getValue())); + components.setSchemas(sortedSchemas); + } + private static boolean shouldBeDocumented(MessageHeaders spec) { return spec.getClass().getAnnotation(Documentation.ExcludeFromDocumentation.class) == null; }