kangpinghuang commented on a change in pull request #429: add rowset meta 
manager
URL: https://github.com/apache/incubator-doris/pull/429#discussion_r241677871
 
 

 ##########
 File path: be/src/olap/rowset/rowset_meta.h
 ##########
 @@ -0,0 +1,173 @@
+// 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.
+
+#ifndef DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_H
+#define DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_H
+
+#include "gen_cpp/olap_file.pb.h"
+
+#include <memory>
+#include <vector>
+
+#include "olap/new_status.h"
+
+namespace doris {
+
+class RowsetMeta {
+public:
+    virtual void init(const RowsetMetaPb& rowset_meta_pb) {
+        _rowset_meta_pb = rowset_meta_pb;
+    }
+
+    virtual bool deserialize_extra_properties() {
+        return true;
+    }
+
+    virtual void get_rowset_meta_pb(RowsetMetaPb* rowset_meta_pb) {
+        *rowset_meta_pb = _rowset_meta_pb;
+    }
+
+    virtual int64_t get_rowset_id() {
+        return _rowset_meta_pb.rowset_id();
+    }
+
+    virtual void set_rowset_id(int64_t rowset_id) {
+        _rowset_meta_pb.set_rowset_id(rowset_id);
+    }
+
+    virtual int64_t get_tablet_id() {
+        return _rowset_meta_pb.tablet_id();
+    }
+
+    virtual void set_tablet_id(int64_t tablet_id) {
+        _rowset_meta_pb.set_tablet_id(tablet_id);
+    }
+
+    virtual int32_t get_tablet_schema_hash() {
+        return _rowset_meta_pb.tablet_schema_hash();
+    }
+
+    virtual void set_tablet_schema_hash(int64_t tablet_schema_hash) {
+        _rowset_meta_pb.set_tablet_schema_hash(tablet_schema_hash);
+    }
+
+    virtual RowsetType get_rowset_type() {
+        return _rowset_meta_pb.rowset_type();
+    }
+
+    virtual void set_rowset_type(RowsetType rowset_type) {
+        _rowset_meta_pb.set_rowset_type(rowset_type);
+    }
+
+    virtual RowsetState get_rowset_state() {
+        return _rowset_meta_pb.rowset_state();
+    }
+
+    virtual void set_rowset_state(RowsetState rowset_state) {
+        _rowset_meta_pb.set_rowset_state(rowset_state);
+    }
+
+    virtual int get_start_version() {
+        return _rowset_meta_pb.start_version();
+    }
+
+    virtual void set_start_version(int start_version) {
+        _rowset_meta_pb.set_start_version(start_version);
 
 Review comment:
   ok

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to