Skip to content

Commit

Permalink
fixed_whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
elisheva-qlogic committed Oct 29, 2018
1 parent b914cae commit 4142b42
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ public static BigtableDataClient create(BigtableDataSettings settings) throws IO
* }
* }
* } catch(ApiException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down Expand Up @@ -187,8 +187,8 @@ public Row readRow(String tableId, ByteString rowKey) {
* }
* }
* } catch(ApiException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down Expand Up @@ -219,7 +219,9 @@ public Row readRow(String tableId, String rowKey) {
* }
* }
* public void onSuccess(Row result) {
* System.out.println("Got row: " + result);
* if (result != null) {
* System.out.println("Got row: " + result);
* }
* }
* }, MoreExecutors.directExecutor());
* }
Expand Down Expand Up @@ -251,7 +253,9 @@ public ApiFuture<Row> readRowAsync(String tableId, String rowKey) {
* }
* }
* public void onSuccess(Row row) {
* System.out.println("Got row: " + row);
* if (result != null) {
* System.out.println("Got row: " + result);
* }
* }
* }, MoreExecutors.directExecutor());
* }
Expand Down Expand Up @@ -452,8 +456,8 @@ public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<R
* // Do something with keyOffset
* }
* } catch(ApiException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down Expand Up @@ -549,8 +553,8 @@ public UnaryCallable<String, List<KeyOffset>> sampleRowKeysCallable() {
*
* bigtableDataClient.mutateRow(mutation);
* } catch(ApiException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down Expand Up @@ -663,11 +667,10 @@ public BulkMutationBatcher newBulkMutationBatcher() {
* }
* bigtableDataClient.bulkMutateRows(batch);
* } catch(ApiException e) {
* e.printStackTrace();
* }
* catch(MutateRowsException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* } catch(MutateRowsException e) {
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down Expand Up @@ -753,8 +756,8 @@ public UnaryCallable<BulkMutation, Void> bulkMutationCallable() {
*
* Boolean result = bigtableDataClient.checkAndMutateRow(mutation);
* } catch(ApiException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down Expand Up @@ -849,8 +852,8 @@ public UnaryCallable<ConditionalRowMutation, Boolean> checkAndMutateRowCallable(
*
* Row success = bigtableDataClient.readModifyWriteRow(mutation);
* } catch(ApiException e) {
* e.printStackTrace();
* }
* e.printStackTrace();
* }
* }</pre>
*
* @throws com.google.api.gax.rpc.ApiException when a serverside error occurs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ public void proxyReadRowStrAsyncTest() {
@Test
public void readRowTest() {
Mockito.when(mockReadRowsCallable.first().futureCall(any(Query.class)))
.thenReturn(ApiFutures.immediateFuture(Row.create(ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
.thenReturn(ApiFutures.immediateFuture(
Row.create(ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key"));

ArgumentCaptor<Query> requestCaptor = ArgumentCaptor.forClass(Query.class);
Expand All @@ -160,7 +161,8 @@ public void readRowTest() {
@Test
public void readRowStrTest() {
Mockito.when(mockReadRowsCallable.first().futureCall(any(Query.class)))
.thenReturn(ApiFutures.immediateFuture(Row.create(ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
.thenReturn(ApiFutures.immediateFuture(
Row.create(ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())));
bigtableDataClient.readRow("fake-table", "fake-row-key");

ArgumentCaptor<Query> requestCaptor = ArgumentCaptor.forClass(Query.class);
Expand Down Expand Up @@ -209,7 +211,8 @@ public void proxySampleRowKeysTest() {

@Test
public void sampleRowKeysTest() {
Mockito.when(mockSampleRowKeysCallable.futureCall(any(String.class))).thenReturn(ApiFutures.immediateFuture(Collections.emptyList()));
Mockito.when(mockSampleRowKeysCallable.futureCall(any(String.class)))
.thenReturn(ApiFutures.immediateFuture(Collections.emptyList()));
bigtableDataClient.sampleRowKeys("fake-table");
Mockito.verify(mockSampleRowKeysCallable).futureCall("fake-table");
}
Expand Down

0 comments on commit 4142b42

Please sign in to comment.