Skip to content

0.1.2

Compare
Choose a tag to compare
@mziccard mziccard released this 16 Jan 01:17

Features

Core

  • By default, requests are now retried (#547).

    For example:

    // Use the default retry strategy
    Storage storageWithRetries = StorageOptions.defaultInstance().service();
    
    // Don't use retries
    Storage storageWithoutRetries = StorageOptions.builder()
        .retryParams(RetryParams.noRetries())
        .build()
        .service()

BigQuery

Fixes

Datastore

  • QueryResults.cursorAfter() is now set when all results from a query have been exhausted (#549).

    When running large queries, users may see Datastore-internal errors with code 500 due to a Datastore issue. This issue will be fixed in the next version of Datastore. Until then, users can set a limit on their query and use the cursor to get more results in subsequent queries. Here is an example:

    int limit = 100;
    StructuredQuery<Entity> query = Query.entityQueryBuilder()
        .kind("user")
        .limit(limit)
        .build();
    while (true) {
      QueryResults<Entity> results = datastore.run(query);
      int resultCount = 0;
      while (results.hasNext()) {
        Entity result = results.next(); // consume all results
        // do something with the result
        resultCount++;
      }
      if (resultCount < limit) {
        break;
      }
      query = query.toBuilder().startCursor(results.cursorAfter()).build();
    }
  • load is renamed to get in functional classes (#535)