beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [1/2] beam git commit: Datastore: fix use of deprecated function
Date Wed, 26 Apr 2017 02:48:06 GMT
Repository: beam
Updated Branches:
  refs/heads/master 1675f03f7 -> afb96d72a


Datastore: fix use of deprecated function

getMutableProperties().put() has been deprecated in favor of putProperties()


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/6abc21e4
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/6abc21e4
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/6abc21e4

Branch: refs/heads/master
Commit: 6abc21e493183deb8d446b53fee91c1b3d6e38f7
Parents: 1675f03
Author: Dan Halperin <dhalperi@google.com>
Authored: Tue Apr 25 17:34:07 2017 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Tue Apr 25 19:47:58 2017 -0700

----------------------------------------------------------------------
 .../org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java    | 4 ++--
 .../java/org/apache/beam/sdk/io/gcp/datastore/V1TestUtil.java    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/6abc21e4/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java
b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java
index c09a1fa..ba8ac84 100644
--- a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java
+++ b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java
@@ -943,7 +943,7 @@ public class DatastoreV1Test {
     RunQueryResponse.Builder statKindResponse = RunQueryResponse.newBuilder();
     Entity.Builder entity = Entity.newBuilder();
     entity.setKey(makeKey("dummyKind", "dummyId"));
-    entity.getMutableProperties().put("entity_bytes", makeValue(entitySizeInBytes).build());
+    entity.putProperties("entity_bytes", makeValue(entitySizeInBytes).build());
     EntityResult.Builder entityResult = EntityResult.newBuilder();
     entityResult.setEntity(entity);
     QueryResultBatch.Builder batch = QueryResultBatch.newBuilder();
@@ -957,7 +957,7 @@ public class DatastoreV1Test {
     RunQueryResponse.Builder timestampResponse = RunQueryResponse.newBuilder();
     Entity.Builder entity = Entity.newBuilder();
     entity.setKey(makeKey("dummyKind", "dummyId"));
-    entity.getMutableProperties().put("timestamp", makeValue(new Date(timestamp * 1000)).build());
+    entity.putProperties("timestamp", makeValue(new Date(timestamp * 1000)).build());
     EntityResult.Builder entityResult = EntityResult.newBuilder();
     entityResult.setEntity(entity);
     QueryResultBatch.Builder batch = QueryResultBatch.newBuilder();

http://git-wip-us.apache.org/repos/asf/beam/blob/6abc21e4/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/V1TestUtil.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/V1TestUtil.java
b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/V1TestUtil.java
index 526f035..25558c0 100644
--- a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/V1TestUtil.java
+++ b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/V1TestUtil.java
@@ -104,7 +104,7 @@ class V1TestUtil {
     }
 
     entityBuilder.setKey(keyBuilder.build());
-    entityBuilder.getMutableProperties().put("value", makeValue(value).build());
+    entityBuilder.putProperties("value", makeValue(value).build());
     return entityBuilder.build();
   }
 


Mime
View raw message