Files
impala/common/protobuf/common.proto
wzhou-code eda2aa5553 IMPALA-11129: Support running KRPC over Unix Domain Socket
This patch make following changes to support running KRPC over UDS.
  - Add FLAGS_rpc_use_unix_domain_socket to enable running KRPC over
    UDS. Add FLAGS_uds_address_unique_id to specify unique Id for UDS
    address. It could be 'ip_address', 'backend_id', or 'none'.
  - Add variable uds_address in NetworkAddressPB and TNetworkAddress.
    Replace TNetworkAddress with NetworkAddressPB for KRPC related
    class variables and APIs.
  - Set UDS address for each daemon as @impala-kprc:<unique_id>
    during initialization with unique_id specified by starting flag
    FLAGS_uds_address_unique_id.
  - When FLAG_rpc_use_unix_domain_socket is true, the socket of KRPC
    server will be binded to the UDS address of the daemon.
    KRPC Client will connect to KRPC server with the UDS address of
    the server when creating proxy service, which in turn call
    kudu::Socket::Connect() function to connect KRPC server.
  - rpcz Web page show TCP related stats as 'N/A' when using UDS.
    Show remote UDS address for KRPC inbound connections on rpcz Web
    page as '*' when using UDS since the remote UDS addresses are
    not available.
  - Add new unit-tests for UDS.
  - BackendId of admissiond is not available. Use admissiond's IP
    address as unique ID for UDS.
    TODO: Advertise BackendId of admissiond in global admission
    control mode.

Testing:
  - Passed core test with FLAG_rpc_use_unix_domain_socket as fault
    value false.
  - Passed core test with FLAG_rpc_use_unix_domain_socket as true.

Change-Id: I439f5a03eb425c17451bcaa96a154bb0bca17ee7
Reviewed-on: http://gerrit.cloudera.org:8080/18369
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2022-05-25 06:27:24 +00:00

86 lines
2.4 KiB
Protocol Buffer

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
// Common protobuf definitions.
syntax="proto2";
package impala;
// Refer to Types.thrift for documentation.
// UDS is limited to KRPC.
message NetworkAddressPB {
required string hostname = 1;
required int32 port = 2;
optional string uds_address = 3;
}
// Unique-id used for setting UDS address.
enum UdsAddressUniqueIdPB {
IP_ADDRESS = 0;
BACKEND_ID = 1;
NO_UNIQUE_ID = 2;
}
// Proto-serialized version of Impala's Status object.
message StatusPB {
optional int32 status_code = 1;
repeated string error_msgs = 2;
}
// 128-bit ID (equivalent to TUniqueID).
message UniqueIdPB {
required fixed64 hi = 1;
required fixed64 lo = 2;
}
// The compression codec. Currently used to indicate the compression used in
// row batches and HDFS files. Corresponds to THdfsCompression.
enum CompressionTypePB {
NONE = 0;
DEFAULT = 1;
GZIP = 2;
DEFLATE = 3;
BZIP2 = 4;
SNAPPY = 5;
SNAPPY_BLOCKED = 6;
LZO = 7;
LZ4 = 8;
ZLIB = 9;
ZSTD = 10;
BROTLI = 11;
LZ4_BLOCKED = 12;
}
// This is a union over all possible return types.
// TODO: if we upgrade to proto3, then we can use the oneof feature in Protobuf 3 in
// the following to save some memory because only one of the fields below is set at a
// time.
message ColumnValuePB {
optional bool bool_val = 1;
optional int32 byte_val = 6;
optional int32 short_val = 7;
optional int32 int_val = 2;
optional int64 long_val = 3;
optional double double_val = 4;
optional string string_val = 5;
optional string binary_val = 8;
optional string timestamp_val = 9;
optional bytes decimal_val = 10;
optional int32 date_val = 11;
}