... |
... |
@@ -46,8 +46,11 @@ class ContentAddressableStorageService(remote_execution_pb2_grpc.ContentAddressa |
46
|
46
|
|
47
|
47
|
def FindMissingBlobs(self, request, context):
|
48
|
48
|
try:
|
|
49
|
+ self.logger.debug("FindMissingBlobs request: [{}]".format(request))
|
49
|
50
|
instance = self._get_instance(request.instance_name)
|
50
|
|
- return instance.find_missing_blobs(request.blob_digests)
|
|
51
|
+ response = instance.find_missing_blobs(request.blob_digests)
|
|
52
|
+ self.logger.debug("FindMissingBlobs response: [{}]".format(response))
|
|
53
|
+ return response
|
51
|
54
|
|
52
|
55
|
except InvalidArgumentError as e:
|
53
|
56
|
self.logger.error(e)
|
... |
... |
@@ -58,8 +61,11 @@ class ContentAddressableStorageService(remote_execution_pb2_grpc.ContentAddressa |
58
|
61
|
|
59
|
62
|
def BatchUpdateBlobs(self, request, context):
|
60
|
63
|
try:
|
|
64
|
+ self.logger.debug("BatchUpdateBlobs request: [{}]".format(request))
|
61
|
65
|
instance = self._get_instance(request.instance_name)
|
62
|
|
- return instance.batch_update_blobs(request.requests)
|
|
66
|
+ response = instance.batch_update_blobs(request.requests)
|
|
67
|
+ self.logger.debug("FindMissingBlobs response: [{}]".format(response))
|
|
68
|
+ return response
|
63
|
69
|
|
64
|
70
|
except InvalidArgumentError as e:
|
65
|
71
|
self.logger.error(e)
|
... |
... |
@@ -102,6 +108,7 @@ class ByteStreamService(bytestream_pb2_grpc.ByteStreamServicer): |
102
|
108
|
|
103
|
109
|
def Read(self, request, context):
|
104
|
110
|
try:
|
|
111
|
+ self.logger.debug("Read request: [{}]".format(request))
|
105
|
112
|
path = request.resource_name.split("/")
|
106
|
113
|
instance_name = path[0]
|
107
|
114
|
|
... |
... |
@@ -141,10 +148,13 @@ class ByteStreamService(bytestream_pb2_grpc.ByteStreamServicer): |
141
|
148
|
context.set_code(grpc.StatusCode.OUT_OF_RANGE)
|
142
|
149
|
yield bytestream_pb2.ReadResponse()
|
143
|
150
|
|
|
151
|
+ self.logger.debug("Read finished.")
|
|
152
|
+
|
144
|
153
|
def Write(self, requests, context):
|
145
|
154
|
try:
|
146
|
155
|
requests, request_probe = tee(requests, 2)
|
147
|
156
|
first_request = next(request_probe)
|
|
157
|
+ self.logger.debug("First write request: [{}]".format(first_request))
|
148
|
158
|
|
149
|
159
|
path = first_request.resource_name.split("/")
|
150
|
160
|
|
... |
... |
@@ -164,7 +174,9 @@ class ByteStreamService(bytestream_pb2_grpc.ByteStreamServicer): |
164
|
174
|
raise InvalidArgumentError("Invalid resource name: [{}]".format(first_request.resource_name))
|
165
|
175
|
|
166
|
176
|
instance = self._get_instance(instance_name)
|
167
|
|
- return instance.write(requests)
|
|
177
|
+ response = instance.write(requests)
|
|
178
|
+ self.logger.debug("Write response: [{}]".format(response))
|
|
179
|
+ return response
|
168
|
180
|
|
169
|
181
|
except NotImplementedError as e:
|
170
|
182
|
self.logger.error(e)
|