@@ -44,51 +44,9 @@ class KafkaOptions:
4444 def __init__ (
4545 self , bootstrap_servers : str , message_format : StreamFormat , topic : str ,
4646 ):
47- self ._bootstrap_servers = bootstrap_servers
48- self ._message_format = message_format
49- self ._topic = topic
50-
51- @property
52- def bootstrap_servers (self ):
53- """
54- Returns a comma-separated list of Kafka bootstrap servers
55- """
56- return self ._bootstrap_servers
57-
58- @bootstrap_servers .setter
59- def bootstrap_servers (self , bootstrap_servers ):
60- """
61- Sets a comma-separated list of Kafka bootstrap servers
62- """
63- self ._bootstrap_servers = bootstrap_servers
64-
65- @property
66- def message_format (self ):
67- """
68- Returns the data format that is used to encode the feature data in Kafka messages
69- """
70- return self ._message_format
71-
72- @message_format .setter
73- def message_format (self , message_format ):
74- """
75- Sets the data format that is used to encode the feature data in Kafka messages
76- """
77- self ._message_format = message_format
78-
79- @property
80- def topic (self ):
81- """
82- Returns the Kafka topic to collect feature data from
83- """
84- return self ._topic
85-
86- @topic .setter
87- def topic (self , topic ):
88- """
89- Sets the Kafka topic to collect feature data from
90- """
91- self ._topic = topic
47+ self .bootstrap_servers = bootstrap_servers
48+ self .message_format = message_format
49+ self .topic = topic
9250
9351 @classmethod
9452 def from_proto (cls , kafka_options_proto : DataSourceProto .KafkaOptions ):
@@ -135,51 +93,9 @@ class KinesisOptions:
13593 def __init__ (
13694 self , record_format : StreamFormat , region : str , stream_name : str ,
13795 ):
138- self ._record_format = record_format
139- self ._region = region
140- self ._stream_name = stream_name
141-
142- @property
143- def record_format (self ):
144- """
145- Returns the data format used to encode the feature data in the Kinesis records.
146- """
147- return self ._record_format
148-
149- @record_format .setter
150- def record_format (self , record_format ):
151- """
152- Sets the data format used to encode the feature data in the Kinesis records.
153- """
154- self ._record_format = record_format
155-
156- @property
157- def region (self ):
158- """
159- Returns the AWS region of Kinesis stream
160- """
161- return self ._region
162-
163- @region .setter
164- def region (self , region ):
165- """
166- Sets the AWS region of Kinesis stream
167- """
168- self ._region = region
169-
170- @property
171- def stream_name (self ):
172- """
173- Returns the Kinesis stream name to obtain feature data from
174- """
175- return self ._stream_name
176-
177- @stream_name .setter
178- def stream_name (self , stream_name ):
179- """
180- Sets the Kinesis stream name to obtain feature data from
181- """
182- self ._stream_name = stream_name
96+ self .record_format = record_format
97+ self .region = region
98+ self .stream_name = stream_name
18399
184100 @classmethod
185101 def from_proto (cls , kinesis_options_proto : DataSourceProto .KinesisOptions ):
@@ -233,10 +149,10 @@ class DataSource(ABC):
233149 date_partition_column (optional): Timestamp column used for partitioning.
234150 """
235151
236- _event_timestamp_column : str
237- _created_timestamp_column : str
238- _field_mapping : Dict [str , str ]
239- _date_partition_column : str
152+ event_timestamp_column : str
153+ created_timestamp_column : str
154+ field_mapping : Dict [str , str ]
155+ date_partition_column : str
240156
241157 def __init__ (
242158 self ,
@@ -246,14 +162,14 @@ def __init__(
246162 date_partition_column : Optional [str ] = None ,
247163 ):
248164 """Creates a DataSource object."""
249- self ._event_timestamp_column = (
165+ self .event_timestamp_column = (
250166 event_timestamp_column if event_timestamp_column else ""
251167 )
252- self ._created_timestamp_column = (
168+ self .created_timestamp_column = (
253169 created_timestamp_column if created_timestamp_column else ""
254170 )
255- self ._field_mapping = field_mapping if field_mapping else {}
256- self ._date_partition_column = (
171+ self .field_mapping = field_mapping if field_mapping else {}
172+ self .date_partition_column = (
257173 date_partition_column if date_partition_column else ""
258174 )
259175
@@ -271,62 +187,6 @@ def __eq__(self, other):
271187
272188 return True
273189
274- @property
275- def field_mapping (self ) -> Dict [str , str ]:
276- """
277- Returns the field mapping of this data source.
278- """
279- return self ._field_mapping
280-
281- @field_mapping .setter
282- def field_mapping (self , field_mapping ):
283- """
284- Sets the field mapping of this data source.
285- """
286- self ._field_mapping = field_mapping
287-
288- @property
289- def event_timestamp_column (self ) -> str :
290- """
291- Returns the event timestamp column of this data source.
292- """
293- return self ._event_timestamp_column
294-
295- @event_timestamp_column .setter
296- def event_timestamp_column (self , event_timestamp_column ):
297- """
298- Sets the event timestamp column of this data source.
299- """
300- self ._event_timestamp_column = event_timestamp_column
301-
302- @property
303- def created_timestamp_column (self ) -> str :
304- """
305- Returns the created timestamp column of this data source.
306- """
307- return self ._created_timestamp_column
308-
309- @created_timestamp_column .setter
310- def created_timestamp_column (self , created_timestamp_column ):
311- """
312- Sets the created timestamp column of this data source.
313- """
314- self ._created_timestamp_column = created_timestamp_column
315-
316- @property
317- def date_partition_column (self ) -> str :
318- """
319- Returns the date partition column of this data source.
320- """
321- return self ._date_partition_column
322-
323- @date_partition_column .setter
324- def date_partition_column (self , date_partition_column ):
325- """
326- Sets the date partition column of this data source.
327- """
328- self ._date_partition_column = date_partition_column
329-
330190 @staticmethod
331191 @abstractmethod
332192 def from_proto (data_source : DataSourceProto ) -> Any :
@@ -450,7 +310,7 @@ def __init__(
450310 field_mapping ,
451311 date_partition_column ,
452312 )
453- self ._kafka_options = KafkaOptions (
313+ self .kafka_options = KafkaOptions (
454314 bootstrap_servers = bootstrap_servers ,
455315 message_format = message_format ,
456316 topic = topic ,
@@ -472,20 +332,6 @@ def __eq__(self, other):
472332
473333 return True
474334
475- @property
476- def kafka_options (self ):
477- """
478- Returns the kafka options of this data source
479- """
480- return self ._kafka_options
481-
482- @kafka_options .setter
483- def kafka_options (self , kafka_options ):
484- """
485- Sets the kafka options of this data source
486- """
487- self ._kafka_options = kafka_options
488-
489335 @staticmethod
490336 def from_proto (data_source : DataSourceProto ):
491337 return KafkaSource (
@@ -531,30 +377,16 @@ class RequestDataSource(DataSource):
531377 def source_datatype_to_feast_value_type () -> Callable [[str ], ValueType ]:
532378 raise NotImplementedError
533379
534- _name : str
535- _schema : Dict [str , ValueType ]
380+ name : str
381+ schema : Dict [str , ValueType ]
536382
537383 def __init__ (
538384 self , name : str , schema : Dict [str , ValueType ],
539385 ):
540386 """Creates a RequestDataSource object."""
541387 super ().__init__ ()
542- self ._name = name
543- self ._schema = schema
544-
545- @property
546- def name (self ) -> str :
547- """
548- Returns the name of this data source
549- """
550- return self ._name
551-
552- @property
553- def schema (self ) -> Dict [str , ValueType ]:
554- """
555- Returns the schema for this request data source
556- """
557- return self ._schema
388+ self .name = name
389+ self .schema = schema
558390
559391 def validate (self , config : RepoConfig ):
560392 pass
@@ -576,9 +408,9 @@ def from_proto(data_source: DataSourceProto):
576408
577409 def to_proto (self ) -> DataSourceProto :
578410 schema_pb = {}
579- for key , value in self ._schema .items ():
411+ for key , value in self .schema .items ():
580412 schema_pb [key ] = value .value
581- options = DataSourceProto .RequestDataOptions (name = self ._name , schema = schema_pb )
413+ options = DataSourceProto .RequestDataOptions (name = self .name , schema = schema_pb )
582414 data_source_proto = DataSourceProto (
583415 type = DataSourceProto .REQUEST_SOURCE , request_data_options = options
584416 )
@@ -629,7 +461,7 @@ def __init__(
629461 field_mapping ,
630462 date_partition_column ,
631463 )
632- self ._kinesis_options = KinesisOptions (
464+ self .kinesis_options = KinesisOptions (
633465 record_format = record_format , region = region , stream_name = stream_name
634466 )
635467
@@ -651,20 +483,6 @@ def __eq__(self, other):
651483
652484 return True
653485
654- @property
655- def kinesis_options (self ):
656- """
657- Returns the kinesis options of this data source
658- """
659- return self ._kinesis_options
660-
661- @kinesis_options .setter
662- def kinesis_options (self , kinesis_options ):
663- """
664- Sets the kinesis options of this data source
665- """
666- self ._kinesis_options = kinesis_options
667-
668486 def to_proto (self ) -> DataSourceProto :
669487 data_source_proto = DataSourceProto (
670488 type = DataSourceProto .STREAM_KINESIS ,
0 commit comments