| // 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. |
| |
| syntax = "proto2"; |
| package heron.proto.system; |
| |
| option java_package = "org.apache.heron.proto.system"; |
| option java_outer_classname = "Common"; |
| |
| enum StatusCode { |
| OK = 1; |
| NOTOK = 2; //generic not ok message |
| |
| // These are messages that are seen by the external applications |
| INVALID_TOPOLOGY_NAME = 100; |
| TOPOLOGY_ALREADY_ACTIVE = 101; |
| TOPOLOGY_ALREADY_DEACTIVE = 102; |
| NOT_YET_IMPLEMENTED = 103; |
| |
| // Internal errors start at 1000 |
| INVALID_STMGR = 1000; |
| STMGR_DIDNT_REGISTER = 1001; |
| DUPLICATE_STRMGR = 1002; |
| |
| // State specific errors |
| PATH_DOES_NOT_EXIST = 2000; |
| PATH_ALREADY_EXISTS = 2001; |
| TMASTERLOCATION_ALREADY_EXISTS = 2002; |
| STATE_CORRUPTED = 2003; |
| STATE_READ_ERROR = 2004; |
| STATE_WRITE_ERROR = 2005; |
| METRICSCACHELOCATION_ALREADY_EXISTS = 2006; |
| } |
| |
| message Status { |
| required StatusCode status = 1; |
| optional string message = 2; |
| } |