|
35 | 35 | import com.google.api.gax.rpc.ResponseObserver; |
36 | 36 | import com.google.api.gax.rpc.StreamController; |
37 | 37 | import com.google.api.gax.rpc.TransportChannelProvider; |
| 38 | +import com.google.api.gax.rpc.UnimplementedException; |
38 | 39 | import com.google.auth.oauth2.GoogleCredentials; |
39 | 40 | import com.google.common.base.Preconditions; |
40 | 41 | import com.google.protobuf.Int64Value; |
@@ -281,27 +282,7 @@ public ApiFuture<AppendRowsResponse> append(AppendRowsRequest message) { |
281 | 282 | * @throws InterruptedException |
282 | 283 | */ |
283 | 284 | public void refreshAppend() throws InterruptedException { |
284 | | - appendAndRefreshAppendLock.lock(); |
285 | | - if (shutdown.get()) { |
286 | | - LOG.warning("Cannot refresh on a already shutdown writer."); |
287 | | - appendAndRefreshAppendLock.unlock(); |
288 | | - return; |
289 | | - } |
290 | | - // There could be a moment, stub is not yet initialized. |
291 | | - if (clientStream != null) { |
292 | | - LOG.info("Closing the stream " + streamName); |
293 | | - clientStream.closeSend(); |
294 | | - } |
295 | | - messagesBatch.resetAttachSchema(); |
296 | | - bidiStreamingCallable = stub.appendRowsCallable(); |
297 | | - clientStream = bidiStreamingCallable.splitCall(responseObserver); |
298 | | - while (!clientStream.isSendReady()) { |
299 | | - Thread.sleep(10); |
300 | | - } |
301 | | - Thread.sleep(this.retrySettings.getInitialRetryDelay().toMillis()); |
302 | | - // Can only unlock here since need to sleep the full 7 seconds before stream can allow appends. |
303 | | - appendAndRefreshAppendLock.unlock(); |
304 | | - LOG.info("Write Stream " + streamName + " connection established"); |
| 285 | + throw new UnimplementedException(null, GrpcStatusCode.of(Status.Code.UNIMPLEMENTED), false); |
305 | 286 | } |
306 | 287 |
|
307 | 288 | private void setupAlarm() { |
|
0 commit comments