long.sort-connector-doris.2.0.0.source-code.ProxySdk.proto Maven / Gradle / Ivy
The newest version!
/*
* 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.
*/
syntax = "proto2";
package org.apache.inlong.sdk.commons.protocol;
enum INLONG_COMPRESSED_TYPE
{
INLONG_NO_COMPRESS = 0;
INLONG_GZ = 1;
INLONG_SNAPPY = 2;
};
message MapFieldEntry {
optional string key = 1;
optional string value = 2;
}
message MessagePackHeader {
required string inlongGroupId = 1; //inlongGroupId
required string inlongStreamId = 2; //inlongStreamId
required int64 packId = 3; //pack id
required int64 packTime = 4; //pack time, milliseconds
required int32 msgCount = 5; //message count
required int32 srcLength = 6; //total length of raw messages body
required int32 compressLen = 7; //compress length of messages
required INLONG_COMPRESSED_TYPE compressType = 8; //compress type
repeated MapFieldEntry params = 9; //additional parameters
}
message MessageObj {
required int64 msgTime = 1; //message generation time, milliseconds
required string sourceIp = 2; // agent ip of message generation
required bytes body = 3; //message body
repeated MapFieldEntry params = 4; //additional parameters
}
message MessageObjs {
repeated MessageObj msgs = 1; //message list
}
message MessagePack {
required MessagePackHeader header = 1; //message pack header
required bytes compressBytes = 2; //compressed bytes of MessageObjs serialization bytes, or MessageObjs serialization bytes(compressType=INLONG_NO_COMPRESS)
}
enum ResultCode{
SUCCUSS = 0; // success
FAIL = -1; // general error code
ERR_VERSION_ERROR = -101; // not support version
ERR_LENGTH_ERROR = -102; // error length, the length is negitive or over.
ERR_REJECT = -103; // Proxy rejects the request, because proxy can not process more data, or the cache cluster can not be connected.
ERR_PACKAGE_ERROR = -104; // request data can not be decoded with PB protocol.
ERR_ID_ERROR = -105; // inlongGroupId or inlongStreamId is bad; The length is wrong, or the CRC check is wrong.
}
message ResponseInfo {
required ResultCode result = 1; //response result
required int64 packId = 2; //pack id
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy