beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [1/2] incubator-beam git commit: [BEAM-930] Fix findbugs and re-enable Maven plugin in MongoDbIO and MongoDbGridFSIO
Date Tue, 15 Nov 2016 17:14:13 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/master bb8887398 -> 47646d641


[BEAM-930] Fix findbugs and re-enable Maven plugin in MongoDbIO and MongoDbGridFSIO


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

Branch: refs/heads/master
Commit: 2d2acb496e16be1cde20433fc0c08656f31749f3
Parents: bb88873
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Tue Nov 15 16:00:16 2016 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Tue Nov 15 16:00:16 2016 +0100

----------------------------------------------------------------------
 sdks/java/io/mongodb/pom.xml                           | 13 -------------
 .../apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java    |  8 ++++----
 .../java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java |  4 ++--
 3 files changed, 6 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2d2acb49/sdks/java/io/mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/java/io/mongodb/pom.xml b/sdks/java/io/mongodb/pom.xml
index 17dc6e7..4b100a9 100644
--- a/sdks/java/io/mongodb/pom.xml
+++ b/sdks/java/io/mongodb/pom.xml
@@ -31,19 +31,6 @@
   <description>IO to read and write on MongoDB.</description>
 
   <build>
-    <pluginManagement>
-      <plugins>
-        <!-- BEAM-930 -->
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>findbugs-maven-plugin</artifactId>
-          <configuration>
-            <skip>true</skip>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2d2acb49/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java
b/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java
index 26e2c2f..a482df4 100644
--- a/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java
+++ b/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java
@@ -630,11 +630,11 @@ public class MongoDbGridFSIO {
 
     private final Write<T> spec;
 
-    private Mongo mongo;
-    private GridFS gridfs;
+    private transient Mongo mongo;
+    private transient GridFS gridfs;
 
-    private GridFSInputFile gridFsFile;
-    private OutputStream outputStream;
+    private transient GridFSInputFile gridFsFile;
+    private transient OutputStream outputStream;
 
     public GridFsWriteFn(Write<T> spec) {
       this.spec = spec;

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2d2acb49/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
b/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
index 2729602..71c017d 100644
--- a/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
+++ b/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
@@ -224,7 +224,7 @@ public class MongoDbIO {
       BasicDBObject stat = new BasicDBObject();
       stat.append("collStats", spec.collection());
       Document stats = mongoDatabase.runCommand(stat);
-      return Long.valueOf(stats.get("size").toString());
+      return Long.parseLong(stats.get("size").toString());
     }
 
     @Override
@@ -456,7 +456,7 @@ public class MongoDbIO {
 
     private static class WriteFn extends DoFn<Document, Void> {
       private final Write spec;
-      private MongoClient client;
+      private transient MongoClient client;
       private List<Document> batch;
 
       public WriteFn(Write spec) {


Mime
View raw message