You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@distributedlog.apache.org by si...@apache.org on 2016/12/20 06:28:08 UTC

incubator-distributedlog git commit: DL-28: using /* */ style comment to avoid scrooge windows platform issue

Repository: incubator-distributedlog
Updated Branches:
  refs/heads/master 306a2a97c -> 60610047a


DL-28: using /* */ style comment to avoid scrooge windows platform issue

Author: xieliang <xi...@gmail.com>

Reviewers: Sijie Guo <si...@apache.org>, Leigh Stewart <ls...@apache.org>

Closes #73 from xieliang/DL-28


Project: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/commit/60610047
Tree: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/tree/60610047
Diff: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/diff/60610047

Branch: refs/heads/master
Commit: 60610047a47de433c32fc961a3222483ccfb1a79
Parents: 306a2a9
Author: xieliang <xi...@gmail.com>
Authored: Mon Dec 19 22:28:24 2016 -0800
Committer: Sijie Guo <si...@apache.org>
Committed: Mon Dec 19 22:28:24 2016 -0800

----------------------------------------------------------------------
 .../src/main/thrift/service.thrift              | 111 ++++++++++---------
 1 file changed, 57 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/60610047/distributedlog-protocol/src/main/thrift/service.thrift
----------------------------------------------------------------------
diff --git a/distributedlog-protocol/src/main/thrift/service.thrift b/distributedlog-protocol/src/main/thrift/service.thrift
index 315f448..ba0de74 100644
--- a/distributedlog-protocol/src/main/thrift/service.thrift
+++ b/distributedlog-protocol/src/main/thrift/service.thrift
@@ -17,144 +17,147 @@
  */
 namespace java com.twitter.distributedlog.thrift.service
 
-// Response stats codes
+/* Response stats codes */
 enum StatusCode {
-    // 2xx: action requested by the client was received, understood, accepted and processed successfully.
+    /* 2xx: action requested by the client was received, understood, accepted and processed successfully. */
 
-    // standard response for successful requests.
+    /* standard response for successful requests. */
     SUCCESS = 200,
 
-    // 3xx: client must take additional action to complete the request.
-    // client closed.
+    /* 3xx: client must take additional action to complete the request. */
+
+    /* client closed. */
     CLIENT_CLOSED = 301,
-    // found the stream in a different server, a redirection is required by client.
+    /* found the stream in a different server, a redirection is required by client. */
     FOUND = 302,
 
-    // 4xx: client seems to have erred.
+    /* 4xx: client seems to have erred. */
 
-    // request is denied for some reason
+    /* request is denied for some reason */
     REQUEST_DENIED = 403,
-    // request record too large
+    /* request record too large */
     TOO_LARGE_RECORD = 413,
 
-    // 5xx: server failed to fulfill an apparently valid request.
+    /* 5xx: server failed to fulfill an apparently valid request. */
 
-    // Generic error message, given when no more specific message is suitable.
+    /* Generic error message, given when no more specific message is suitable. */
     INTERNAL_SERVER_ERROR = 500,
-    // Not implemented
+    /* Not implemented */
     NOT_IMPLEMENTED = 501,
-    // Already Closed Exception
+    /* Already Closed Exception */
     ALREADY_CLOSED = 502,
-    // Service is currently unavailable (because it is overloaded or down for maintenance).
+    /* Service is currently unavailable (because it is overloaded or down for maintenance). */
     SERVICE_UNAVAILABLE = 503,
-    // Locking exception
+    /* Locking exception */
     LOCKING_EXCEPTION = 504,
-    // ZooKeeper Errors
+    /* ZooKeeper Errors */
     ZOOKEEPER_ERROR = 505,
-    // Metadata exception
+    /* Metadata exception */
     METADATA_EXCEPTION = 506,
-    // BK Transmit Error
+    /* BK Transmit Error */
     BK_TRANSMIT_ERROR = 507,
-    // Flush timeout
+    /* Flush timeout */
     FLUSH_TIMEOUT = 508,
-    // Log empty
+    /* Log empty */
     LOG_EMPTY = 509,
-    // Log not found
+    /* Log not found */
     LOG_NOT_FOUND = 510,
-    // Truncated Transactions
+    /* Truncated Transactions */
     TRUNCATED_TRANSACTION = 511,
-    // End of Stream
+    /* End of Stream */
     END_OF_STREAM = 512,
-    // Transaction Id Out of Order
+    /* Transaction Id Out of Order */
     TRANSACTION_OUT_OF_ORDER = 513,
-    // Write exception
+    /* Write exception */
     WRITE_EXCEPTION = 514,
-    // Stream Unavailable
+    /* Stream Unavailable */
     STREAM_UNAVAILABLE = 515,
-    // Write cancelled exception
+    /* Write cancelled exception */
     WRITE_CANCELLED_EXCEPTION = 516,
-    // over-capacity/backpressure
+    /* over-capacity/backpressure */
     OVER_CAPACITY = 517,
-    // stream exists but is not ready (recovering etc.).
-    // the difference between NOT_READY and UNAVAILABLE is that UNAVAILABLE
-    // indicates the stream is no longer owned by the proxy and we should
-    // redirect. NOT_READY indicates the stream exist at the proxy but isn't
-    // ready for writes.
+    /** stream exists but is not ready (recovering etc.).
+        the difference between NOT_READY and UNAVAILABLE is that UNAVAILABLE
+        indicates the stream is no longer owned by the proxy and we should
+        redirect. NOT_READY indicates the stream exist at the proxy but isn't
+        eady for writes. */
     STREAM_NOT_READY = 518,
-    // Region Unavailable
+    /* Region Unavailable */
     REGION_UNAVAILABLE = 519,
-    // Invalid Enveloped Entry
+    /* Invalid Enveloped Entry */
     INVALID_ENVELOPED_ENTRY = 520,
-    // Unsupported metadata version
+    /* Unsupported metadata version */
     UNSUPPORTED_METADATA_VERSION = 521,
-    // Log Already Exists
+    /* Log Already Exists */
     LOG_EXISTS = 522,
-    // Checksum failed on the request
+    /* Checksum failed on the request */
     CHECKSUM_FAILED = 523,
-    // Overcapacity: too many streams
+    /* Overcapacity: too many streams */
     TOO_MANY_STREAMS = 524,
 
-    // 6xx: unexpected
+    /* 6xx: unexpected */
+
     UNEXPECTED = 600,
     INTERRUPTED = 601,
     INVALID_STREAM_NAME = 602,
     ILLEGAL_STATE = 603,
 
-    // 10xx: reader exceptions
+    /* 10xx: reader exceptions */
+
     RETRYABLE_READ = 1000,
     LOG_READ_ERROR = 1001,
-    // Read cancelled exception
+    /* Read cancelled exception */
     READ_CANCELLED_EXCEPTION = 1002,
 }
 
-// Response Header
+/* Response Header */
 struct ResponseHeader {
     1: required StatusCode code;
     2: optional string errMsg;
     3: optional string location;
 }
 
-// Write Response
+/* Write Response */
 struct WriteResponse {
     1: required ResponseHeader header;
     2: optional string dlsn;
 }
 
-// Bulk write response
+/* Bulk write response */
 struct BulkWriteResponse {
     1: required ResponseHeader header;
     2: optional list<WriteResponse> writeResponses;
 }
 
-// Write Context
+/* Write Context */
 struct WriteContext {
     1: optional set<string> triedHosts;
     2: optional i64 crc32;
     3: optional bool isRecordSet;
 }
 
-// HeartBeat Options
+/* HeartBeat Options */
 struct HeartbeatOptions {
     1: optional bool sendHeartBeatToReader;
 }
 
-// Server Status
+/* Server Status */
 enum ServerStatus {
-    // service is writing and accepting new streams
+    /* service is writing and accepting new streams */
     WRITE_AND_ACCEPT    = 100,
-    // service is only writing to old streams, not accepting new streams
+    /* service is only writing to old streams, not accepting new streams */
     WRITE_ONLY          = 200,
-    // service is shutting down, will not write
+    /* service is shutting down, will not write */
     DOWN                = 300,
 }
 
-// Server Info
+/* Server Info */
 struct ServerInfo {
     1: optional map<string, string> ownerships;
     2: optional ServerStatus serverStatus;
 }
 
-// Client Info
+/* Client Info */
 struct ClientInfo {
     1: optional string streamNameRegex;
     2: optional bool getOwnerships;
@@ -184,6 +187,6 @@ service DistributedLogService {
 
     WriteResponse delete(string stream, WriteContext ctx);
 
-    // Admin Methods
+    /* Admin Methods */
     void setAcceptNewStream(bool enabled);
 }