|
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; |
@@ -309,27 +310,7 @@ public void flushAll(long timeoutMillis) throws Exception { |
309 | 310 | * @throws InterruptedException |
310 | 311 | */ |
311 | 312 | public void refreshAppend() throws InterruptedException { |
312 | | - appendAndRefreshAppendLock.lock(); |
313 | | - if (shutdown.get()) { |
314 | | - LOG.warning("Cannot refresh on a already shutdown writer."); |
315 | | - appendAndRefreshAppendLock.unlock(); |
316 | | - return; |
317 | | - } |
318 | | - // There could be a moment, stub is not yet initialized. |
319 | | - if (clientStream != null) { |
320 | | - LOG.info("Closing the stream " + streamName); |
321 | | - clientStream.closeSend(); |
322 | | - } |
323 | | - messagesBatch.resetAttachSchema(); |
324 | | - bidiStreamingCallable = stub.appendRowsCallable(); |
325 | | - clientStream = bidiStreamingCallable.splitCall(responseObserver); |
326 | | - while (!clientStream.isSendReady()) { |
327 | | - Thread.sleep(10); |
328 | | - } |
329 | | - Thread.sleep(this.retrySettings.getInitialRetryDelay().toMillis()); |
330 | | - // Can only unlock here since need to sleep the full 7 seconds before stream can allow appends. |
331 | | - appendAndRefreshAppendLock.unlock(); |
332 | | - LOG.info("Write Stream " + streamName + " connection established"); |
| 313 | + throw new UnimplementedException(null, GrpcStatusCode.of(Status.Code.UNIMPLEMENTED), false); |
333 | 314 | } |
334 | 315 |
|
335 | 316 | private void setupAlarm() { |
|
0 commit comments