beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tg...@apache.org
Subject [2/2] beam git commit: Rename invalid Loggers to be consistent with the project standard (LOG)
Date Tue, 21 Feb 2017 17:49:17 GMT
Rename invalid Loggers to be consistent with the project standard (LOG)


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

Branch: refs/heads/master
Commit: 9088a5e4cf7877b2bcd30d02e67d217d2dee5794
Parents: e70e608
Author: Ismaël Mejía <iemejia@gmail.com>
Authored: Tue Feb 21 16:15:53 2017 +0100
Committer: Thomas Groh <tgroh@google.com>
Committed: Tue Feb 21 09:47:30 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/beam/fn/harness/FnHarness.java   |  6 +++---
 .../beam/fn/harness/control/BeamFnControlClient.java      |  4 ++--
 .../beam/fn/harness/control/ProcessBundleHandler.java     |  6 +++---
 .../apache/beam/fn/harness/control/RegisterHandler.java   |  6 +++---
 .../harness/data/BeamFnDataBufferingOutboundObserver.java |  4 ++--
 .../apache/beam/fn/harness/data/BeamFnDataGrpcClient.java |  4 ++--
 .../beam/fn/harness/data/BeamFnDataGrpcMultiplexer.java   | 10 +++++-----
 .../beam/fn/harness/data/BeamFnDataInboundObserver.java   |  4 ++--
 .../apache/beam/runners/core/BeamFnDataReadRunner.java    |  4 ++--
 .../beam/sdk/io/elasticsearch/ElasticsearchIOTest.java    |  8 ++++----
 10 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java
index 3e06f38..738d6eb 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java
@@ -56,7 +56,7 @@ public class FnHarness {
   private static final String CONTROL_API_SERVICE_DESCRIPTOR = "CONTROL_API_SERVICE_DESCRIPTOR";
   private static final String LOGGING_API_SERVICE_DESCRIPTOR = "LOGGING_API_SERVICE_DESCRIPTOR";
   private static final String PIPELINE_OPTIONS = "PIPELINE_OPTIONS";
-  private static final Logger LOGGER = LoggerFactory.getLogger(FnHarness.class);
+  private static final Logger LOG = LoggerFactory.getLogger(FnHarness.class);
 
   private static BeamFnApi.ApiServiceDescriptor getApiServiceDescriptor(String env)
       throws TextFormat.ParseException {
@@ -99,7 +99,7 @@ public class FnHarness {
         channelFactory::forDescriptor,
         streamObserverFactory::from)) {
 
-      LOGGER.info("Fn Harness started");
+      LOG.info("Fn Harness started");
       EnumMap<BeamFnApi.InstructionRequest.RequestCase,
               ThrowingFunction<BeamFnApi.InstructionRequest,
                                BeamFnApi.InstructionResponse.Builder>> handlers =
@@ -120,7 +120,7 @@ public class FnHarness {
           streamObserverFactory::from,
           handlers);
 
-      LOGGER.info("Entering instruction processing loop");
+      LOG.info("Entering instruction processing loop");
       control.processInstructionRequests(options.as(GcsOptions.class).getExecutorService());
     } catch (Throwable t) {
       t.printStackTrace(originalErrStream);

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/BeamFnControlClient.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/BeamFnControlClient.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/BeamFnControlClient.java
index 7f44a01..6d75315 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/BeamFnControlClient.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/BeamFnControlClient.java
@@ -52,7 +52,7 @@ import org.slf4j.LoggerFactory;
  * {@link org.apache.beam.fn.v1.BeamFnApi.InstructionRequest}s.
  */
 public class BeamFnControlClient {
-  private static final Logger LOGGER = LoggerFactory.getLogger(BeamFnControlClient.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BeamFnControlClient.class);
   private static final BeamFnApi.InstructionRequest POISON_PILL =
       BeamFnApi.InstructionRequest.newBuilder().setInstructionId(Long.MIN_VALUE).build();
 
@@ -88,7 +88,7 @@ public class BeamFnControlClient {
   private class InboundObserver implements StreamObserver<BeamFnApi.InstructionRequest>
{
     @Override
     public void onNext(BeamFnApi.InstructionRequest value) {
-      LOGGER.info("InstructionRequest received {}", value);
+      LOG.info("InstructionRequest received {}", value);
       Uninterruptibles.putUninterruptibly(bufferedInstructions, value);
     }
 

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
index 05c2aab..d764a95 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
@@ -82,7 +82,7 @@ public class ProcessBundleHandler {
   private static final String JAVA_DO_FN_URN = "urn:org.apache.beam:dofn:java:0.1";
   private static final String JAVA_SOURCE_URN = "urn:org.apache.beam:source:java:0.1";
 
-  private static final Logger LOGGER = LoggerFactory.getLogger(ProcessBundleHandler.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ProcessBundleHandler.class);
 
   private final PipelineOptions options;
   private final Function<Long, Message> fnApiRegistry;
@@ -234,13 +234,13 @@ public class ProcessBundleHandler {
 
     // Already in reverse order so we don't need to do anything.
     for (ThrowingRunnable startFunction : startFunctions) {
-      LOGGER.debug("Starting function {}", startFunction);
+      LOG.debug("Starting function {}", startFunction);
       startFunction.run();
     }
 
     // Need to reverse this since we want to call finish in topological order.
     for (ThrowingRunnable finishFunction : Lists.reverse(finishFunctions)) {
-      LOGGER.debug("Finishing function {}", finishFunction);
+      LOG.debug("Finishing function {}", finishFunction);
       finishFunction.run();
     }
 

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/RegisterHandler.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/RegisterHandler.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/RegisterHandler.java
index 14e26f0..be75b50 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/RegisterHandler.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/RegisterHandler.java
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
  * occurs.
  */
 public class RegisterHandler {
-  private static final Logger LOGGER = LoggerFactory.getLogger(RegisterHandler.class);
+  private static final Logger LOG = LoggerFactory.getLogger(RegisterHandler.class);
   private final ConcurrentMap<Long, CompletableFuture<Message>> idToObject;
 
   public RegisterHandler() {
@@ -71,12 +71,12 @@ public class RegisterHandler {
     BeamFnApi.RegisterRequest registerRequest = request.getRegister();
     for (BeamFnApi.ProcessBundleDescriptor processBundleDescriptor
         : registerRequest.getProcessBundleDescriptorList()) {
-      LOGGER.debug("Registering {} with type {}",
+      LOG.debug("Registering {} with type {}",
           processBundleDescriptor.getId(),
           processBundleDescriptor.getClass());
       computeIfAbsent(processBundleDescriptor.getId()).complete(processBundleDescriptor);
       for (BeamFnApi.Coder coder : processBundleDescriptor.getCodersList()) {
-        LOGGER.debug("Registering {} with type {}",
+        LOG.debug("Registering {} with type {}",
             coder.getFunctionSpec().getId(),
             coder.getClass());
         computeIfAbsent(coder.getFunctionSpec().getId()).complete(coder);

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataBufferingOutboundObserver.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataBufferingOutboundObserver.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataBufferingOutboundObserver.java
index 3bf44ab..25560ef 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataBufferingOutboundObserver.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataBufferingOutboundObserver.java
@@ -54,7 +54,7 @@ public class BeamFnDataBufferingOutboundObserver<T>
     implements CloseableThrowingConsumer<WindowedValue<T>> {
   private static final String BEAM_FN_API_DATA_BUFFER_LIMIT = "beam_fn_api_data_buffer_limit=";
   private static final int DEFAULT_BUFFER_LIMIT_BYTES = 1_000_000;
-  private static final Logger LOGGER =
+  private static final Logger LOG =
       LoggerFactory.getLogger(BeamFnDataBufferingOutboundObserver.class);
 
   private long byteCounter;
@@ -99,7 +99,7 @@ public class BeamFnDataBufferingOutboundObserver<T>
         .setInstructionReference(outputLocation.getKey())
         .setTarget(outputLocation.getValue());
 
-    LOGGER.debug("Closing stream for instruction {} and "
+    LOG.debug("Closing stream for instruction {} and "
         + "target {} having transmitted {} values {} bytes",
         outputLocation.getKey(),
         outputLocation.getValue(),

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcClient.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcClient.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcClient.java
index 9bbdc78..8db1f48 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcClient.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcClient.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
  * <p>TODO: Handle closing clients that are currently not a consumer nor are being
consumed.
  */
 public class BeamFnDataGrpcClient implements BeamFnDataClient {
-  private static final Logger LOGGER = LoggerFactory.getLogger(BeamFnDataGrpcClient.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BeamFnDataGrpcClient.class);
 
   private final ConcurrentMap<BeamFnApi.ApiServiceDescriptor, BeamFnDataGrpcMultiplexer>
cache;
   private final Function<BeamFnApi.ApiServiceDescriptor, ManagedChannel> channelFactory;
@@ -78,7 +78,7 @@ public class BeamFnDataGrpcClient implements BeamFnDataClient {
       KV<Long, BeamFnApi.Target> inputLocation,
       Coder<WindowedValue<T>> coder,
       ThrowingConsumer<WindowedValue<T>> consumer) {
-    LOGGER.debug("Registering consumer instruction {} for target {}",
+    LOG.debug("Registering consumer instruction {} for target {}",
         inputLocation.getKey(),
         inputLocation.getValue());
 

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcMultiplexer.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcMultiplexer.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcMultiplexer.java
index ea059df..fe3a693 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcMultiplexer.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataGrpcMultiplexer.java
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
  * the output location with a specific outbound observer.
  */
 public class BeamFnDataGrpcMultiplexer {
-  private static final Logger LOGGER = LoggerFactory.getLogger(BeamFnDataGrpcMultiplexer.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BeamFnDataGrpcMultiplexer.class);
   private final BeamFnApi.ApiServiceDescriptor apiServiceDescriptor;
   private final StreamObserver<BeamFnApi.Elements> inboundObserver;
   private final StreamObserver<BeamFnApi.Elements> outboundObserver;
@@ -110,14 +110,14 @@ public class BeamFnDataGrpcMultiplexer {
          * instead of relying on the Runner harness to do all the failure handling.
          */
         } catch (ExecutionException | InterruptedException e) {
-          LOGGER.error(
+          LOG.error(
               "Client interrupted during handling of data for instruction {} and target {}",
               data.getInstructionReference(),
               data.getTarget(),
               e);
           outboundObserver.onError(e);
         } catch (RuntimeException e) {
-          LOGGER.error(
+          LOG.error(
               "Client failed to handle data for instruction {} and target {}",
               data.getInstructionReference(),
               data.getTarget(),
@@ -129,12 +129,12 @@ public class BeamFnDataGrpcMultiplexer {
 
     @Override
     public void onError(Throwable t) {
-      LOGGER.error("Failed to handle for {}", apiServiceDescriptor, t);
+      LOG.error("Failed to handle for {}", apiServiceDescriptor, t);
     }
 
     @Override
     public void onCompleted() {
-      LOGGER.warn("Hanged up for {}.", apiServiceDescriptor);
+      LOG.warn("Hanged up for {}.", apiServiceDescriptor);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataInboundObserver.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataInboundObserver.java
b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataInboundObserver.java
index f8b5ab8..24365d8 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataInboundObserver.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataInboundObserver.java
@@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
  * provided {@link Coder} passing the individual decoded elements to the provided consumer.
  */
 public class BeamFnDataInboundObserver<T> implements Consumer<BeamFnApi.Elements.Data>
{
-  private static final Logger LOGGER = LoggerFactory.getLogger(BeamFnDataInboundObserver.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BeamFnDataInboundObserver.class);
   private final ThrowingConsumer<WindowedValue<T>> consumer;
   private final Coder<WindowedValue<T>> coder;
   private final CompletableFuture<Void> readFuture;
@@ -57,7 +57,7 @@ public class BeamFnDataInboundObserver<T> implements Consumer<BeamFnApi.Elements
     }
     try {
       if (t.getData().isEmpty()) {
-        LOGGER.debug("Closing stream for instruction {} and "
+        LOG.debug("Closing stream for instruction {} and "
             + "target {} having consumed {} values {} bytes",
             t.getInstructionReference(),
             t.getTarget(),

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/harness/src/main/java/org/apache/beam/runners/core/BeamFnDataReadRunner.java
----------------------------------------------------------------------
diff --git a/sdks/java/harness/src/main/java/org/apache/beam/runners/core/BeamFnDataReadRunner.java
b/sdks/java/harness/src/main/java/org/apache/beam/runners/core/BeamFnDataReadRunner.java
index 92042d0..a6b8b33 100644
--- a/sdks/java/harness/src/main/java/org/apache/beam/runners/core/BeamFnDataReadRunner.java
+++ b/sdks/java/harness/src/main/java/org/apache/beam/runners/core/BeamFnDataReadRunner.java
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
  * {@link #blockTillReadFinishes()} to finish.
  */
 public class BeamFnDataReadRunner<OutputT> {
-  private static final Logger LOGGER = LoggerFactory.getLogger(BeamFnDataReadRunner.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BeamFnDataReadRunner.class);
   private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
 
   private final BeamFnApi.ApiServiceDescriptor apiServiceDescriptor;
@@ -91,7 +91,7 @@ public class BeamFnDataReadRunner<OutputT> {
   }
 
   public void blockTillReadFinishes() throws Exception {
-    LOGGER.debug("Waiting for process bundle instruction {} and target {} to close.",
+    LOG.debug("Waiting for process bundle instruction {} and target {} to close.",
         processBundleInstructionIdSupplier.get(), inputTarget);
     readFuture.get();
   }

http://git-wip-us.apache.org/repos/asf/beam/blob/9088a5e4/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOTest.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOTest.java
b/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOTest.java
index 8b4cb13..b41d698 100644
--- a/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOTest.java
+++ b/sdks/java/io/elasticsearch/src/test/java/org/apache/beam/sdk/io/elasticsearch/ElasticsearchIOTest.java
@@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
 @RunWith(JUnit4.class)
 public class ElasticsearchIOTest implements Serializable {
 
-  private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchIOTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ElasticsearchIOTest.class);
 
   private static final String ES_INDEX = "beam";
   private static final String ES_TYPE = "test";
@@ -90,7 +90,7 @@ public class ElasticsearchIOTest implements Serializable {
     connectionConfiguration =
         ElasticsearchIO.ConnectionConfiguration.create(
             new String[] {"http://" + ES_IP + ":" + esHttpPort}, ES_INDEX, ES_TYPE);
-    LOGGER.info("Starting embedded Elasticsearch instance ({})", esHttpPort);
+    LOG.info("Starting embedded Elasticsearch instance ({})", esHttpPort);
     Settings.Builder settingsBuilder =
         Settings.settingsBuilder()
             .put("cluster.name", "beam")
@@ -106,7 +106,7 @@ public class ElasticsearchIOTest implements Serializable {
             // and queue of 50 was full. No pb with real ES instance (cf testWrite integration
test)
             .put("threadpool.bulk.queue_size", 100);
     node = NodeBuilder.nodeBuilder().settings(settingsBuilder).build();
-    LOGGER.info("Elasticsearch node created");
+    LOG.info("Elasticsearch node created");
     node.start();
   }
 
@@ -130,7 +130,7 @@ public class ElasticsearchIOTest implements Serializable {
     // 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", estimatedSize, greaterThan(AVERAGE_DOC_SIZE * NUM_DOCS));
   }
 


Mime
View raw message