github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/pingcap/go-hbase/protobuf/RegionServerStatus.proto (about)

     1  package proto;
     2  /**
     3   * Licensed to the Apache Software Foundation (ASF) under one
     4   * or more contributor license agreements.  See the NOTICE file
     5   * distributed with this work for additional information
     6   * regarding copyright ownership.  The ASF licenses this file
     7   * to you under the Apache License, Version 2.0 (the
     8   * "License"); you may not use this file except in compliance
     9   * with the License.  You may obtain a copy of the License at
    10   *
    11   *     http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   */
    19  
    20  // This file contains protocol buffers that are used for RegionServerStatusProtocol.
    21  
    22  option java_package = "org.apache.hadoop.hbase.protobuf.generated";
    23  option java_outer_classname = "RegionServerStatusProtos";
    24  option java_generic_services = true;
    25  option java_generate_equals_and_hash = true;
    26  option optimize_for = SPEED;
    27  
    28  import "HBase.proto";
    29  import "ClusterStatus.proto";
    30  
    31  message RegionServerStartupRequest {
    32    /** Port number this regionserver is up on */
    33    required uint32 port = 1;
    34  
    35    /** This servers' startcode */
    36    required uint64 server_start_code = 2;
    37  
    38    /** Current time of the region server in ms */
    39    required uint64 server_current_time = 3;
    40  }
    41  
    42  message RegionServerStartupResponse {
    43    /**
    44     * Configuration for the regionserver to use: e.g. filesystem,
    45     * hbase rootdir, the hostname to use creating the RegionServer ServerName,
    46     * etc
    47     */
    48    repeated NameStringPair map_entries = 1;
    49  }
    50  
    51  message RegionServerReportRequest {
    52    required ServerName server = 1;
    53  
    54    /** load the server is under */
    55    optional ServerLoad load = 2;
    56  }
    57  
    58  message RegionServerReportResponse {
    59  }
    60  
    61  message ReportRSFatalErrorRequest {
    62    /** name of the server experiencing the error */
    63    required ServerName server = 1;
    64  
    65    /** informative text to expose in the master logs and UI */
    66    required string error_message = 2;
    67  }
    68  
    69  message ReportRSFatalErrorResponse {
    70  }
    71  
    72  message GetLastFlushedSequenceIdRequest {
    73    /** region name */
    74    required bytes region_name = 1;
    75  }
    76  
    77  message GetLastFlushedSequenceIdResponse {
    78    /** the last HLog sequence id flushed from MemStore to HFile for the region */
    79    required uint64 last_flushed_sequence_id = 1;
    80  }
    81  
    82  message RegionStateTransition {
    83    required TransitionCode transition_code = 1;
    84  
    85    /** Mutliple regions are involved during merging/splitting */
    86    repeated RegionInfo region_info = 2;
    87  
    88    /** For newly opened region, the open seq num is needed */
    89    optional uint64 open_seq_num = 3;
    90  
    91    enum TransitionCode {
    92      OPENED = 0;
    93      FAILED_OPEN = 1;
    94      /** No failed_close, in which case region server will abort */
    95      CLOSED = 2;
    96  
    97      /** Ask master for ok to split/merge region(s) */
    98      READY_TO_SPLIT = 3;
    99      READY_TO_MERGE = 4;
   100  
   101      SPLIT_PONR = 5;
   102      MERGE_PONR = 6;
   103  
   104      SPLIT = 7;
   105      MERGED = 8;
   106      SPLIT_REVERTED = 9;
   107      MERGE_REVERTED = 10;
   108    }
   109  }
   110  
   111  message ReportRegionStateTransitionRequest {
   112    /** This region server's server name */
   113    required ServerName server = 1;
   114  
   115    repeated RegionStateTransition transition = 2;
   116  }
   117  
   118  message ReportRegionStateTransitionResponse {
   119    /** Error message if failed to update the region state */
   120    optional string error_message = 1;
   121  }
   122  
   123  service RegionServerStatusService {
   124    /** Called when a region server first starts. */
   125    rpc RegionServerStartup(RegionServerStartupRequest)
   126      returns(RegionServerStartupResponse);
   127  
   128    /** Called to report the load the RegionServer is under. */
   129    rpc RegionServerReport(RegionServerReportRequest)
   130      returns(RegionServerReportResponse);
   131  
   132    /**
   133     * Called by a region server to report a fatal error that is causing it to
   134     * abort.
   135     */
   136    rpc ReportRSFatalError(ReportRSFatalErrorRequest)
   137      returns(ReportRSFatalErrorResponse);
   138  
   139    /** Called to get the sequence id of the last MemStore entry flushed to an
   140     * HFile for a specified region. Used by the region server to speed up
   141     * log splitting. */
   142    rpc GetLastFlushedSequenceId(GetLastFlushedSequenceIdRequest)
   143      returns(GetLastFlushedSequenceIdResponse);
   144  
   145    /**
   146     * Called by a region server to report the progress of a region
   147     * transition. If the request fails, the transition should
   148     * be aborted.
   149     */
   150    rpc ReportRegionStateTransition(ReportRegionStateTransitionRequest)
   151      returns(ReportRegionStateTransitionResponse);
   152  }