Skip to content

Commit 0c00a4a

Browse files
committed
update thrift rpc code
1 parent 1b6b458 commit 0c00a4a

File tree

92 files changed

+5218
-1133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+5218
-1133
lines changed

src/Apache.IoTDB/Rpc/Generated/IClientRPCService.cs

Lines changed: 1721 additions & 274 deletions
Large diffs are not rendered by default.

src/Apache.IoTDB/Rpc/Generated/ServerProperties.cs

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,49 @@ public ServerProperties(string version, List<string> supportedTimeAggregationOpe
130130
this.TimestampPrecision = timestampPrecision;
131131
}
132132

133+
public ServerProperties DeepCopy()
134+
{
135+
var tmp397 = new ServerProperties();
136+
if((Version != null))
137+
{
138+
tmp397.Version = this.Version;
139+
}
140+
if((SupportedTimeAggregationOperations != null))
141+
{
142+
tmp397.SupportedTimeAggregationOperations = this.SupportedTimeAggregationOperations.DeepCopy();
143+
}
144+
if((TimestampPrecision != null))
145+
{
146+
tmp397.TimestampPrecision = this.TimestampPrecision;
147+
}
148+
if(__isset.maxConcurrentClientNum)
149+
{
150+
tmp397.MaxConcurrentClientNum = this.MaxConcurrentClientNum;
151+
}
152+
tmp397.__isset.maxConcurrentClientNum = this.__isset.maxConcurrentClientNum;
153+
if(__isset.thriftMaxFrameSize)
154+
{
155+
tmp397.ThriftMaxFrameSize = this.ThriftMaxFrameSize;
156+
}
157+
tmp397.__isset.thriftMaxFrameSize = this.__isset.thriftMaxFrameSize;
158+
if(__isset.isReadOnly)
159+
{
160+
tmp397.IsReadOnly = this.IsReadOnly;
161+
}
162+
tmp397.__isset.isReadOnly = this.__isset.isReadOnly;
163+
if((BuildInfo != null) && __isset.buildInfo)
164+
{
165+
tmp397.BuildInfo = this.BuildInfo;
166+
}
167+
tmp397.__isset.buildInfo = this.__isset.buildInfo;
168+
if((Logo != null) && __isset.logo)
169+
{
170+
tmp397.Logo = this.Logo;
171+
}
172+
tmp397.__isset.logo = this.__isset.logo;
173+
return tmp397;
174+
}
175+
133176
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
134177
{
135178
iprot.IncrementRecursionDepth();
@@ -165,13 +208,13 @@ public ServerProperties(string version, List<string> supportedTimeAggregationOpe
165208
if (field.Type == TType.List)
166209
{
167210
{
168-
TList _list362 = await iprot.ReadListBeginAsync(cancellationToken);
169-
SupportedTimeAggregationOperations = new List<string>(_list362.Count);
170-
for(int _i363 = 0; _i363 < _list362.Count; ++_i363)
211+
TList _list398 = await iprot.ReadListBeginAsync(cancellationToken);
212+
SupportedTimeAggregationOperations = new List<string>(_list398.Count);
213+
for(int _i399 = 0; _i399 < _list398.Count; ++_i399)
171214
{
172-
string _elem364;
173-
_elem364 = await iprot.ReadStringAsync(cancellationToken);
174-
SupportedTimeAggregationOperations.Add(_elem364);
215+
string _elem400;
216+
_elem400 = await iprot.ReadStringAsync(cancellationToken);
217+
SupportedTimeAggregationOperations.Add(_elem400);
175218
}
176219
await iprot.ReadListEndAsync(cancellationToken);
177220
}
@@ -296,9 +339,9 @@ public ServerProperties(string version, List<string> supportedTimeAggregationOpe
296339
await oprot.WriteFieldBeginAsync(field, cancellationToken);
297340
{
298341
await oprot.WriteListBeginAsync(new TList(TType.String, SupportedTimeAggregationOperations.Count), cancellationToken);
299-
foreach (string _iter365 in SupportedTimeAggregationOperations)
342+
foreach (string _iter401 in SupportedTimeAggregationOperations)
300343
{
301-
await oprot.WriteStringAsync(_iter365, cancellationToken);
344+
await oprot.WriteStringAsync(_iter401, cancellationToken);
302345
}
303346
await oprot.WriteListEndAsync(cancellationToken);
304347
}
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
/**
2+
* Autogenerated by Thrift Compiler (0.14.1)
3+
*
4+
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5+
* @generated
6+
*/
7+
using System;
8+
using System.Collections;
9+
using System.Collections.Generic;
10+
using System.Text;
11+
using System.IO;
12+
using System.Linq;
13+
using System.Threading;
14+
using System.Threading.Tasks;
15+
using Microsoft.Extensions.Logging;
16+
using Thrift;
17+
using Thrift.Collections;
18+
19+
using Thrift.Protocol;
20+
using Thrift.Protocol.Entities;
21+
using Thrift.Protocol.Utilities;
22+
using Thrift.Transport;
23+
using Thrift.Transport.Client;
24+
using Thrift.Transport.Server;
25+
using Thrift.Processor;
26+
27+
28+
#pragma warning disable IDE0079 // remove unnecessary pragmas
29+
#pragma warning disable IDE1006 // parts of the code use IDL spelling
30+
31+
32+
public partial class TAINodeConfiguration : TBase
33+
{
34+
35+
public TAINodeLocation Location { get; set; }
36+
37+
public TNodeResource Resource { get; set; }
38+
39+
public TAINodeConfiguration()
40+
{
41+
}
42+
43+
public TAINodeConfiguration(TAINodeLocation location, TNodeResource resource) : this()
44+
{
45+
this.Location = location;
46+
this.Resource = resource;
47+
}
48+
49+
public TAINodeConfiguration DeepCopy()
50+
{
51+
var tmp30 = new TAINodeConfiguration();
52+
if((Location != null))
53+
{
54+
tmp30.Location = (TAINodeLocation)this.Location.DeepCopy();
55+
}
56+
if((Resource != null))
57+
{
58+
tmp30.Resource = (TNodeResource)this.Resource.DeepCopy();
59+
}
60+
return tmp30;
61+
}
62+
63+
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
64+
{
65+
iprot.IncrementRecursionDepth();
66+
try
67+
{
68+
bool isset_location = false;
69+
bool isset_resource = false;
70+
TField field;
71+
await iprot.ReadStructBeginAsync(cancellationToken);
72+
while (true)
73+
{
74+
field = await iprot.ReadFieldBeginAsync(cancellationToken);
75+
if (field.Type == TType.Stop)
76+
{
77+
break;
78+
}
79+
80+
switch (field.ID)
81+
{
82+
case 1:
83+
if (field.Type == TType.Struct)
84+
{
85+
Location = new TAINodeLocation();
86+
await Location.ReadAsync(iprot, cancellationToken);
87+
isset_location = true;
88+
}
89+
else
90+
{
91+
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
92+
}
93+
break;
94+
case 2:
95+
if (field.Type == TType.Struct)
96+
{
97+
Resource = new TNodeResource();
98+
await Resource.ReadAsync(iprot, cancellationToken);
99+
isset_resource = true;
100+
}
101+
else
102+
{
103+
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
104+
}
105+
break;
106+
default:
107+
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
108+
break;
109+
}
110+
111+
await iprot.ReadFieldEndAsync(cancellationToken);
112+
}
113+
114+
await iprot.ReadStructEndAsync(cancellationToken);
115+
if (!isset_location)
116+
{
117+
throw new TProtocolException(TProtocolException.INVALID_DATA);
118+
}
119+
if (!isset_resource)
120+
{
121+
throw new TProtocolException(TProtocolException.INVALID_DATA);
122+
}
123+
}
124+
finally
125+
{
126+
iprot.DecrementRecursionDepth();
127+
}
128+
}
129+
130+
public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
131+
{
132+
oprot.IncrementRecursionDepth();
133+
try
134+
{
135+
var struc = new TStruct("TAINodeConfiguration");
136+
await oprot.WriteStructBeginAsync(struc, cancellationToken);
137+
var field = new TField();
138+
if((Location != null))
139+
{
140+
field.Name = "location";
141+
field.Type = TType.Struct;
142+
field.ID = 1;
143+
await oprot.WriteFieldBeginAsync(field, cancellationToken);
144+
await Location.WriteAsync(oprot, cancellationToken);
145+
await oprot.WriteFieldEndAsync(cancellationToken);
146+
}
147+
if((Resource != null))
148+
{
149+
field.Name = "resource";
150+
field.Type = TType.Struct;
151+
field.ID = 2;
152+
await oprot.WriteFieldBeginAsync(field, cancellationToken);
153+
await Resource.WriteAsync(oprot, cancellationToken);
154+
await oprot.WriteFieldEndAsync(cancellationToken);
155+
}
156+
await oprot.WriteFieldStopAsync(cancellationToken);
157+
await oprot.WriteStructEndAsync(cancellationToken);
158+
}
159+
finally
160+
{
161+
oprot.DecrementRecursionDepth();
162+
}
163+
}
164+
165+
public override bool Equals(object that)
166+
{
167+
if (!(that is TAINodeConfiguration other)) return false;
168+
if (ReferenceEquals(this, other)) return true;
169+
return System.Object.Equals(Location, other.Location)
170+
&& System.Object.Equals(Resource, other.Resource);
171+
}
172+
173+
public override int GetHashCode() {
174+
int hashcode = 157;
175+
unchecked {
176+
if((Location != null))
177+
{
178+
hashcode = (hashcode * 397) + Location.GetHashCode();
179+
}
180+
if((Resource != null))
181+
{
182+
hashcode = (hashcode * 397) + Resource.GetHashCode();
183+
}
184+
}
185+
return hashcode;
186+
}
187+
188+
public override string ToString()
189+
{
190+
var sb = new StringBuilder("TAINodeConfiguration(");
191+
if((Location != null))
192+
{
193+
sb.Append(", Location: ");
194+
Location.ToString(sb);
195+
}
196+
if((Resource != null))
197+
{
198+
sb.Append(", Resource: ");
199+
Resource.ToString(sb);
200+
}
201+
sb.Append(')');
202+
return sb.ToString();
203+
}
204+
}
205+

0 commit comments

Comments
 (0)