in stream/distributedlog/core/src/main/java/org/apache/distributedlog/thrift/BKDLConfigFormat.java [1028:1127]
public void read(org.apache.thrift.protocol.TProtocol iprot, BKDLConfigFormat struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // BK_ZK_SERVERS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.bkZkServers = iprot.readString();
struct.setBkZkServersIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // BK_LEDGERS_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.bkLedgersPath = iprot.readString();
struct.setBkLedgersPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // SANITY_CHECK_TXN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.sanityCheckTxnID = iprot.readBool();
struct.setSanityCheckTxnIDIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // ENCODE_REGION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.encodeRegionID = iprot.readBool();
struct.setEncodeRegionIDIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // BK_ZK_SERVERS_FOR_READER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.bkZkServersForReader = iprot.readString();
struct.setBkZkServersForReaderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // DL_ZK_SERVERS_FOR_WRITER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dlZkServersForWriter = iprot.readString();
struct.setDlZkServersForWriterIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // DL_ZK_SERVERS_FOR_READER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dlZkServersForReader = iprot.readString();
struct.setDlZkServersForReaderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // ACL_ROOT_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.aclRootPath = iprot.readString();
struct.setAclRootPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // FIRST_LOG_SEGMENT_SEQ_NO
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.firstLogSegmentSeqNo = iprot.readI64();
struct.setFirstLogSegmentSeqNoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // FEDERATED_NAMESPACE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.federatedNamespace = iprot.readBool();
struct.setFederatedNamespaceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}