#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "6")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub created_by: ::prost::alloc::string::String,
#[prost(enumeration = "job::Status", tag = "7")]
pub status: i32,
#[prost(message, optional, tag = "13")]
pub application_info: ::core::option::Option<ApplicationInfo>,
#[prost(oneof = "job::JobSpec", tags = "8, 9, 10, 11")]
pub job_spec: ::core::option::Option<job::JobSpec>,
}
pub mod job {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Provisioning = 1,
Pending = 2,
Running = 3,
Error = 4,
Done = 5,
Cancelled = 6,
Cancelling = 7,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Provisioning => "PROVISIONING",
Status::Pending => "PENDING",
Status::Running => "RUNNING",
Status::Error => "ERROR",
Status::Done => "DONE",
Status::Cancelled => "CANCELLED",
Status::Cancelling => "CANCELLING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PROVISIONING" => Some(Self::Provisioning),
"PENDING" => Some(Self::Pending),
"RUNNING" => Some(Self::Running),
"ERROR" => Some(Self::Error),
"DONE" => Some(Self::Done),
"CANCELLED" => Some(Self::Cancelled),
"CANCELLING" => Some(Self::Cancelling),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum JobSpec {
#[prost(message, tag = "8")]
MapreduceJob(super::MapreduceJob),
#[prost(message, tag = "9")]
SparkJob(super::SparkJob),
#[prost(message, tag = "10")]
PysparkJob(super::PysparkJob),
#[prost(message, tag = "11")]
HiveJob(super::HiveJob),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplicationAttempt {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub am_container_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplicationInfo {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub application_attempts: ::prost::alloc::vec::Vec<ApplicationAttempt>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MapreduceJob {
#[prost(string, repeated, tag = "1")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub jar_file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub archive_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "5")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "mapreduce_job::Driver", tags = "6, 7")]
pub driver: ::core::option::Option<mapreduce_job::Driver>,
}
pub mod mapreduce_job {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Driver {
#[prost(string, tag = "6")]
MainJarFileUri(::prost::alloc::string::String),
#[prost(string, tag = "7")]
MainClass(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparkJob {
#[prost(string, repeated, tag = "1")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub jar_file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub archive_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "5")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "6")]
pub main_jar_file_uri: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub main_class: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub packages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub repositories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "10")]
pub exclude_packages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PysparkJob {
#[prost(string, repeated, tag = "1")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub jar_file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub archive_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "5")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "6")]
pub main_python_file_uri: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "7")]
pub python_file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub packages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub repositories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "10")]
pub exclude_packages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryList {
#[prost(string, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HiveJob {
#[prost(map = "string, string", tag = "1")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(bool, tag = "2")]
pub continue_on_failure: bool,
#[prost(map = "string, string", tag = "3")]
pub script_variables: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "4")]
pub jar_file_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(oneof = "hive_job::QueryType", tags = "5, 6")]
pub query_type: ::core::option::Option<hive_job::QueryType>,
}
pub mod hive_job {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum QueryType {
#[prost(string, tag = "5")]
QueryFileUri(::prost::alloc::string::String),
#[prost(message, tag = "6")]
QueryList(super::QueryList),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SupportJob {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "support_job::Status", tag = "6")]
pub status: i32,
#[prost(string, tag = "7")]
pub cmd: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub timeout: i64,
#[prost(string, tag = "9")]
pub created_by: ::prost::alloc::string::String,
}
pub mod support_job {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Provisioning = 1,
Pending = 2,
Running = 3,
Error = 4,
Done = 5,
Cancelled = 6,
Cancelling = 7,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Provisioning => "PROVISIONING",
Status::Pending => "PENDING",
Status::Running => "RUNNING",
Status::Error => "ERROR",
Status::Done => "DONE",
Status::Cancelled => "CANCELLED",
Status::Cancelling => "CANCELLING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PROVISIONING" => Some(Self::Provisioning),
"PENDING" => Some(Self::Pending),
"RUNNING" => Some(Self::Running),
"ERROR" => Some(Self::Error),
"DONE" => Some(Self::Done),
"CANCELLED" => Some(Self::Cancelled),
"CANCELLING" => Some(Self::Cancelling),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsResponse {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<Job>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateJobStatusRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub job_id: ::prost::alloc::string::String,
#[prost(enumeration = "job::Status", tag = "3")]
pub status: i32,
#[prost(message, optional, tag = "4")]
pub application_info: ::core::option::Option<ApplicationInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateJobStatusResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSupportJobsResponse {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<SupportJob>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSupportJobStatusRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub job_id: ::prost::alloc::string::String,
#[prost(enumeration = "support_job::Status", tag = "3")]
pub status: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveSupportJobLogRequest {
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub output: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveSupportJobLogResponse {}
pub mod job_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct JobServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl JobServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> JobServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> JobServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
JobServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn list_active(
&mut self,
request: impl tonic::IntoRequest<super::ListJobsRequest>,
) -> std::result::Result<
tonic::Response<super::ListJobsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.dataproc.manager.v1.JobService/ListActive",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.dataproc.manager.v1.JobService",
"ListActive",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_status(
&mut self,
request: impl tonic::IntoRequest<super::UpdateJobStatusRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateJobStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.dataproc.manager.v1.JobService/UpdateStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.dataproc.manager.v1.JobService",
"UpdateStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_support_active(
&mut self,
request: impl tonic::IntoRequest<super::ListJobsRequest>,
) -> std::result::Result<
tonic::Response<super::ListSupportJobsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.dataproc.manager.v1.JobService/ListSupportActive",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.dataproc.manager.v1.JobService",
"ListSupportActive",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_support_status(
&mut self,
request: impl tonic::IntoRequest<super::UpdateSupportJobStatusRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateJobStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.dataproc.manager.v1.JobService/UpdateSupportStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.dataproc.manager.v1.JobService",
"UpdateSupportStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn save_support_log(
&mut self,
request: impl tonic::IntoRequest<super::SaveSupportJobLogRequest>,
) -> std::result::Result<
tonic::Response<super::SaveSupportJobLogResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.dataproc.manager.v1.JobService/SaveSupportLog",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.dataproc.manager.v1.JobService",
"SaveSupportLog",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HbaseNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub requests: i64,
#[prost(int64, tag = "3")]
pub heap_size_mb: i64,
#[prost(int64, tag = "4")]
pub max_heap_size_mb: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HbaseInfo {
#[prost(bool, tag = "1")]
pub available: bool,
#[prost(int64, tag = "2")]
pub regions: i64,
#[prost(int64, tag = "3")]
pub requests: i64,
#[prost(double, tag = "4")]
pub average_load: f64,
#[prost(message, repeated, tag = "5")]
pub live_nodes: ::prost::alloc::vec::Vec<HbaseNodeInfo>,
#[prost(message, repeated, tag = "6")]
pub dead_nodes: ::prost::alloc::vec::Vec<HbaseNodeInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HdfsNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub used: i64,
#[prost(int64, tag = "3")]
pub remaining: i64,
#[prost(int64, tag = "4")]
pub capacity: i64,
#[prost(int64, tag = "5")]
pub num_blocks: i64,
#[prost(string, tag = "6")]
pub state: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HdfsInfo {
#[prost(bool, tag = "1")]
pub available: bool,
#[prost(double, tag = "2")]
pub percent_remaining: f64,
#[prost(int64, tag = "3")]
pub used: i64,
#[prost(int64, tag = "4")]
pub free: i64,
#[prost(int64, tag = "5")]
pub total_blocks: i64,
#[prost(int64, tag = "6")]
pub missing_blocks: i64,
#[prost(int64, tag = "7")]
pub missing_blocks_replica_one: i64,
#[prost(message, repeated, tag = "8")]
pub live_nodes: ::prost::alloc::vec::Vec<HdfsNodeInfo>,
#[prost(message, repeated, tag = "9")]
pub dead_nodes: ::prost::alloc::vec::Vec<HdfsNodeInfo>,
#[prost(string, tag = "11")]
pub safemode: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "12")]
pub decommissioning_nodes: ::prost::alloc::vec::Vec<HdfsNodeInfo>,
#[prost(message, repeated, tag = "13")]
pub decommissioned_nodes: ::prost::alloc::vec::Vec<HdfsNodeInfo>,
#[prost(string, repeated, tag = "14")]
pub requested_decommission_hosts: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HiveInfo {
#[prost(bool, tag = "1")]
pub available: bool,
#[prost(int64, tag = "2")]
pub queries_succeeded: i64,
#[prost(int64, tag = "3")]
pub queries_failed: i64,
#[prost(int64, tag = "4")]
pub queries_executing: i64,
#[prost(int64, tag = "5")]
pub sessions_open: i64,
#[prost(int64, tag = "6")]
pub sessions_active: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct YarnNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub state: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub num_containers: i64,
#[prost(int64, tag = "4")]
pub used_memory_mb: i64,
#[prost(int64, tag = "5")]
pub available_memory_mb: i64,
#[prost(int64, tag = "6")]
pub update_time: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct YarnInfo {
#[prost(bool, tag = "1")]
pub available: bool,
#[prost(message, repeated, tag = "2")]
pub live_nodes: ::prost::alloc::vec::Vec<YarnNodeInfo>,
#[prost(string, repeated, tag = "3")]
pub requested_decommission_hosts: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZookeeperInfo {
#[prost(bool, tag = "1")]
pub alive: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OozieInfo {
#[prost(bool, tag = "1")]
pub alive: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LivyInfo {
#[prost(bool, tag = "1")]
pub alive: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitActs {
#[prost(enumeration = "InitActsState", tag = "1")]
pub state: i32,
#[prost(string, repeated, tag = "2")]
pub fqdns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Info {
#[prost(message, optional, tag = "1")]
pub hdfs: ::core::option::Option<HdfsInfo>,
#[prost(message, optional, tag = "2")]
pub yarn: ::core::option::Option<YarnInfo>,
#[prost(message, optional, tag = "3")]
pub hive: ::core::option::Option<HiveInfo>,
#[prost(message, optional, tag = "4")]
pub zookeeper: ::core::option::Option<ZookeeperInfo>,
#[prost(message, optional, tag = "5")]
pub hbase: ::core::option::Option<HbaseInfo>,
#[prost(message, optional, tag = "6")]
pub oozie: ::core::option::Option<OozieInfo>,
#[prost(int64, tag = "7")]
pub report_count: i64,
#[prost(message, optional, tag = "8")]
pub livy: ::core::option::Option<LivyInfo>,
#[prost(message, optional, tag = "9")]
pub init_acts: ::core::option::Option<InitActs>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportRequest {
#[prost(string, tag = "1")]
pub cid: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub topology_revision: i64,
#[prost(message, optional, tag = "3")]
pub info: ::core::option::Option<Info>,
#[prost(message, optional, tag = "4")]
pub collected_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportReply {
#[prost(int64, tag = "1")]
pub decommission_timeout: i64,
#[prost(string, repeated, tag = "2")]
pub yarn_hosts_to_decommission: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "3")]
pub hdfs_hosts_to_decommission: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InitActsState {
Unspecified = 0,
Failed = 1,
Successful = 2,
InProgress = 3,
}
impl InitActsState {
pub fn as_str_name(&self) -> &'static str {
match self {
InitActsState::Unspecified => "INIT_ACTS_STATE_UNSPECIFIED",
InitActsState::Failed => "FAILED",
InitActsState::Successful => "SUCCESSFUL",
InitActsState::InProgress => "IN_PROGRESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INIT_ACTS_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"FAILED" => Some(Self::Failed),
"SUCCESSFUL" => Some(Self::Successful),
"IN_PROGRESS" => Some(Self::InProgress),
_ => None,
}
}
}
pub mod dataproc_manager_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DataprocManagerServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DataprocManagerServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DataprocManagerServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DataprocManagerServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
DataprocManagerServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn report(
&mut self,
request: impl tonic::IntoRequest<super::ReportRequest>,
) -> std::result::Result<tonic::Response<super::ReportReply>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.dataproc.manager.v1.DataprocManagerService/Report",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.dataproc.manager.v1.DataprocManagerService",
"Report",
),
);
self.inner.unary(req, path, codec).await
}
}
}