beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [1/2] beam git commit: Rename class Logger object names to the standard convention 'LOG'
Date Thu, 01 Jun 2017 12:00:45 GMT
Repository: beam
Updated Branches:
  refs/heads/master 2df9dbd24 -> b83300682


Rename class Logger object names to the standard convention 'LOG'


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

Branch: refs/heads/master
Commit: 5cf5a1b2ba41b1c0c0961eb535e6ba220f61435f
Parents: 2df9dbd
Author: Ismaël Mejía <iemejia@apache.org>
Authored: Sun May 28 11:46:03 2017 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Thu Jun 1 14:00:21 2017 +0200

----------------------------------------------------------------------
 .../apache/beam/sdk/transforms/GroupIntoBatches.java    | 12 ++++++------
 .../main/java/org/apache/beam/sdk/util/ClassPath.java   |  8 ++++----
 .../beam/sdk/transforms/GroupIntoBatchesTest.java       |  4 ++--
 .../beam/sdk/io/elasticsearch/ElasticsearchIOIT.java    |  4 ++--
 .../sdk/io/hadoop/inputformat/HIFIOWithElasticTest.java | 10 +++++-----
 5 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/5cf5a1b2/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java
index b023363..a79b07b 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java
@@ -99,7 +99,7 @@ public class GroupIntoBatches<K, InputT>
   static class GroupIntoBatchesDoFn<K, InputT>
       extends DoFn<KV<K, InputT>, KV<K, Iterable<InputT>>> {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(GroupIntoBatchesDoFn.class);
+    private static final Logger LOG = LoggerFactory.getLogger(GroupIntoBatchesDoFn.class);
     private static final String END_OF_WINDOW_ID = "endOFWindow";
     private static final String BATCH_ID = "batch";
     private static final String NUM_ELEMENTS_IN_BATCH_ID = "numElementsInBatch";
@@ -160,13 +160,13 @@ public class GroupIntoBatches<K, InputT>
         BoundedWindow window) {
       Instant windowExpires = window.maxTimestamp().plus(allowedLateness);
 
-      LOGGER.debug(
+      LOG.debug(
           "*** SET TIMER *** to point in time {} for window {}",
           windowExpires.toString(), window.toString());
       timer.set(windowExpires);
       key.write(c.element().getKey());
       batch.add(c.element().getValue());
-      LOGGER.debug("*** BATCH *** Add element for window {} ", window.toString());
+      LOG.debug("*** BATCH *** Add element for window {} ", window.toString());
       // blind add is supported with combiningState
       numElementsInBatch.add(1L);
       Long num = numElementsInBatch.read();
@@ -175,7 +175,7 @@ public class GroupIntoBatches<K, InputT>
         batch.readLater();
       }
       if (num >= batchSize) {
-        LOGGER.debug("*** END OF BATCH *** for window {}", window.toString());
+        LOG.debug("*** END OF BATCH *** for window {}", window.toString());
         flushBatch(c, key, batch, numElementsInBatch);
       }
     }
@@ -188,7 +188,7 @@ public class GroupIntoBatches<K, InputT>
         @StateId(NUM_ELEMENTS_IN_BATCH_ID)
             CombiningState<Long, long[], Long> numElementsInBatch,
         BoundedWindow window) {
-      LOGGER.debug(
+      LOG.debug(
           "*** END OF WINDOW *** for timer timestamp {} in windows {}",
           context.timestamp(), window.toString());
       flushBatch(context, key, batch, numElementsInBatch);
@@ -205,7 +205,7 @@ public class GroupIntoBatches<K, InputT>
         c.output(KV.of(key.read(), values));
       }
       batch.clear();
-      LOGGER.debug("*** BATCH *** clear");
+      LOG.debug("*** BATCH *** clear");
       numElementsInBatch.clear();
     }
   }

http://git-wip-us.apache.org/repos/asf/beam/blob/5cf5a1b2/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ClassPath.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ClassPath.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ClassPath.java
index 271bce0..2f9e049 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ClassPath.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/ClassPath.java
@@ -75,7 +75,7 @@ import org.slf4j.LoggerFactory;
 @Beta
 final class ClassPath {
 
-  private static final Logger logger = LoggerFactory.getLogger(ClassPath.class.getName());
+  private static final Logger LOG = LoggerFactory.getLogger(ClassPath.class.getName());
 
   private static final Predicate<ClassInfo> IS_TOP_LEVEL =
       new Predicate<ClassInfo>() {
@@ -374,7 +374,7 @@ final class ClassPath {
           return;
         }
       } catch (SecurityException e) {
-        logger.warn("Cannot access " + file + ": " + e);
+        LOG.warn("Cannot access " + file + ": " + e);
         return;
       }
       if (file.isDirectory()) {
@@ -429,7 +429,7 @@ final class ClassPath {
             url = getClassPathEntry(jarFile, path);
           } catch (MalformedURLException e) {
             // Ignore bad entry
-            logger.warn("Invalid Class-Path entry: " + path);
+            LOG.warn("Invalid Class-Path entry: " + path);
             continue;
           }
           if (url.getProtocol().equals("file")) {
@@ -509,7 +509,7 @@ final class ClassPath {
         throws IOException {
       File[] files = directory.listFiles();
       if (files == null) {
-        logger.warn("Cannot read directory " + directory);
+        LOG.warn("Cannot read directory " + directory);
         // IO error, just skip the directory
         return;
       }

http://git-wip-us.apache.org/repos/asf/beam/blob/5cf5a1b2/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/GroupIntoBatchesTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/GroupIntoBatchesTest.java
b/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/GroupIntoBatchesTest.java
index 54e2d5a..c213d6a 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/GroupIntoBatchesTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/GroupIntoBatchesTest.java
@@ -56,7 +56,7 @@ public class GroupIntoBatchesTest implements Serializable {
   private static final int BATCH_SIZE = 5;
   private static final long NUM_ELEMENTS = 10;
   private static final int ALLOWED_LATENESS = 0;
-  private static final Logger LOGGER = LoggerFactory.getLogger(GroupIntoBatchesTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(GroupIntoBatchesTest.class);
   @Rule public transient TestPipeline pipeline = TestPipeline.create();
   private transient ArrayList<KV<String, String>> data = createTestData();
 
@@ -159,7 +159,7 @@ public class GroupIntoBatchesTest implements Serializable {
             new DoFn<KV<String, String>, Void>() {
               @ProcessElement
               public void processElement(ProcessContext c, BoundedWindow window) {
-                LOGGER.debug(
+                LOG.debug(
                     "*** ELEMENT: ({},{}) *** with timestamp %s in window %s",
                     c.element().getKey(),
                     c.element().getValue(),

http://git-wip-us.apache.org/repos/asf/beam/blob/5cf5a1b2/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOIT.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOIT.java
b/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOIT.java
index d968bc2..2d6393a 100644
--- a/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOIT.java
+++ b/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOIT.java
@@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
  * </pre>
  */
 public class ElasticsearchIOIT {
-  private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchIOIT.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ElasticsearchIOIT.class);
   private static TransportClient client;
   private static IOTestPipelineOptions options;
   private static ElasticsearchIO.ConnectionConfiguration readConnectionConfiguration;
@@ -142,7 +142,7 @@ public class ElasticsearchIOIT {
     // can't use equal assert as Elasticsearch indexes never have same size
     // (due to internal Elasticsearch implementation)
     long estimatedSize = initialSource.getEstimatedSizeBytes(options);
-    LOGGER.info("Estimated size: {}", estimatedSize);
+    LOG.info("Estimated size: {}", estimatedSize);
     assertThat(
         "Wrong estimated size bellow minimum",
         estimatedSize,

http://git-wip-us.apache.org/repos/asf/beam/blob/5cf5a1b2/sdks/java/io/hadoop/jdk1.8-tests/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithElasticTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/hadoop/jdk1.8-tests/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithElasticTest.java
b/sdks/java/io/hadoop/jdk1.8-tests/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithElasticTest.java
index 99d371d..8745521 100644
--- a/sdks/java/io/hadoop/jdk1.8-tests/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithElasticTest.java
+++ b/sdks/java/io/hadoop/jdk1.8-tests/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithElasticTest.java
@@ -74,7 +74,7 @@ import org.slf4j.LoggerFactory;
 public class HIFIOWithElasticTest implements Serializable {
 
   private static final long serialVersionUID = 1L;
-  private static final Logger LOGGER = LoggerFactory.getLogger(HIFIOWithElasticTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(HIFIOWithElasticTest.class);
   private static final String ELASTIC_IN_MEM_HOSTNAME = "127.0.0.1";
   private static final String ELASTIC_IN_MEM_PORT = "9200";
   private static final String ELASTIC_INTERNAL_VERSION = "5.x";
@@ -217,9 +217,9 @@ public class HIFIOWithElasticTest implements Serializable {
           .put("node.ingest", TRUE).build();
       node = new PluginNode(settings);
       node.start();
-      LOGGER.info("Elastic in memory server started.");
+      LOG.info("Elastic in memory server started.");
       prepareElasticIndex();
-      LOGGER.info("Prepared index " + ELASTIC_INDEX_NAME
+      LOG.info("Prepared index " + ELASTIC_INDEX_NAME
           + "and populated data on elastic in memory server.");
     }
 
@@ -243,9 +243,9 @@ public class HIFIOWithElasticTest implements Serializable {
     public static void shutdown() throws IOException {
       DeleteIndexRequest indexRequest = new DeleteIndexRequest(ELASTIC_INDEX_NAME);
       node.client().admin().indices().delete(indexRequest).actionGet();
-      LOGGER.info("Deleted index " + ELASTIC_INDEX_NAME + " from elastic in memory server");
+      LOG.info("Deleted index " + ELASTIC_INDEX_NAME + " from elastic in memory server");
       node.close();
-      LOGGER.info("Closed elastic in memory server node.");
+      LOG.info("Closed elastic in memory server node.");
       deleteElasticDataDirectory();
     }
 


Mime
View raw message