1 /** 2 * Copyright 2020 Huawei Technologies Co., Ltd 3 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 8 * http://www.apache.org/licenses/LICENSE-2.0 9 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_ENGINE_CACHE_STUB_H_ 17 #define MINDSPORE_CCSRC_MINDDATA_DATASET_ENGINE_CACHE_STUB_H_ 18 19 #include <memory> 20 #include <string> 21 #include "minddata/dataset/engine/cache/cache_common.h" 22 #include "minddata/dataset/engine/cache/cache_request.h" 23 #include "minddata/dataset/util/service.h" 24 25 namespace mindspore { 26 namespace dataset { 27 class CacheClientGreeter : public Service { 28 public: CacheClientGreeter(const std::string & hostname,int32_t port,int32_t num_workers)29 explicit CacheClientGreeter(const std::string &hostname, int32_t port, int32_t num_workers) {} ~CacheClientGreeter()30 ~CacheClientGreeter() override {} DoServiceStart()31 Status DoServiceStart() override { RETURN_STATUS_UNEXPECTED("Not supported"); } DoServiceStop()32 Status DoServiceStop() override { RETURN_STATUS_UNEXPECTED("Not supported"); } 33 SharedMemoryBaseAddr()34 void *SharedMemoryBaseAddr() { return nullptr; } HandleRequest(std::shared_ptr<BaseRequest> rq)35 Status HandleRequest(std::shared_ptr<BaseRequest> rq) { RETURN_STATUS_UNEXPECTED("Not supported"); } AttachToSharedMemory(bool * local_bypass)36 Status AttachToSharedMemory(bool *local_bypass) { RETURN_STATUS_UNEXPECTED("Not supported"); } GetHostname()37 std::string GetHostname() const { return "Not supported"; } GetPort()38 int32_t GetPort() const { return 0; } 39 }; 40 } // namespace dataset 41 } // namespace mindspore 42 43 #endif // MINDSPORE_CCSRC_MINDDATA_DATASET_ENGINE_CACHE_STUB_H_ 44