Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1770119D09 for ; Mon, 18 Apr 2016 08:31:24 +0000 (UTC) Received: (qmail 93165 invoked by uid 500); 18 Apr 2016 08:31:24 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 93103 invoked by uid 500); 18 Apr 2016 08:31:23 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 93093 invoked by uid 99); 18 Apr 2016 08:31:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 08:31:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 97C3EE022F; Mon, 18 Apr 2016 08:31:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 18 Apr 2016 08:31:23 -0000 Message-Id: <54b0cd4e2b0d4b07acb1d63239afb46d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] camel git commit: Polished Repository: camel Updated Branches: refs/heads/master fec035a51 -> bdf10d544 Polished Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4fc57240 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4fc57240 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4fc57240 Branch: refs/heads/master Commit: 4fc57240b374b9c33112d9e66b071701c70bda70 Parents: fec035a Author: Claus Ibsen Authored: Mon Apr 18 10:15:14 2016 +0200 Committer: Claus Ibsen Committed: Mon Apr 18 10:15:14 2016 +0200 ---------------------------------------------------------------------- .../camel/component/atmos/core/AtmosAPIFacade.java | 16 ++++++++-------- .../consumer/AtmosScheduledPollConsumer.java | 6 +----- .../consumer/AtmosScheduledPollGetConsumer.java | 1 - .../integration/producer/AtmosDelProducer.java | 2 -- .../integration/producer/AtmosGetProducer.java | 5 ----- .../integration/producer/AtmosMoveProducer.java | 1 - .../atmos/integration/producer/AtmosProducer.java | 10 +--------- .../integration/producer/AtmosPutProducer.java | 5 ----- 8 files changed, 10 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/core/AtmosAPIFacade.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/core/AtmosAPIFacade.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/core/AtmosAPIFacade.java index 2fe0234..77a9ded 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/core/AtmosAPIFacade.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/core/AtmosAPIFacade.java @@ -91,7 +91,7 @@ public final class AtmosAPIFacade { if (!atmosPath.equals(ATMOS_FILE_SEPARATOR)) { if (AtmosAPIFacade.client.getSystemMetadata(atmosEntry) == null) { - throw new AtmosException(atmosPath + " does not exist or can't obtain metadata"); + throw new AtmosException(atmosPath + " does not exist or cannot obtain metadata"); } } @@ -129,7 +129,7 @@ public final class AtmosAPIFacade { //list all files in a dir Collection listFiles = FileUtils.listFiles(fileLocalPath, null, true); if (listFiles == null || listFiles.isEmpty()) { - throw new AtmosException(localPath + " doesn't contain any files"); + throw new AtmosException(localPath + " does not contain any files"); } resultEntries = new HashMap(listFiles.size()); for (File file : listFiles) { @@ -141,7 +141,7 @@ public final class AtmosAPIFacade { String remainingPath = absPath.substring(indexRemainingPath); atmosPath = atmosPath + remainingPath; try { - LOG.info("uploading:" + fileLocalPath + "," + atmosPath); + LOG.debug("uploading: {} to {}", fileLocalPath, atmosPath); ObjectId uploadedFile = putSingleFile(file, atmosPath); if (uploadedFile == null) { resultEntries.put(atmosPath, AtmosResultCode.KO); @@ -227,10 +227,10 @@ public final class AtmosAPIFacade { private void downloadFilesInFolder(String atmosPath, Map resultEntries) throws AtmosException { ObjectPath atmosEntry = new ObjectPath(atmosPath); if (AtmosAPIFacade.client.getSystemMetadata(atmosEntry) == null) { - throw new AtmosException(atmosPath + " does not exist or can't obtain metadata"); + throw new AtmosException(atmosPath + " does not exist or cannot obtain metadata"); } if (!atmosEntry.isDirectory()) { - LOG.info("downloading a single file..."); + LOG.debug("downloading a single file..."); downloadSingleFile(atmosPath, resultEntries); return; } @@ -242,7 +242,7 @@ public final class AtmosAPIFacade { //get the baos of the file downloadSingleFile(atmosEntry.getPath().concat(entry.getFilename()), resultEntries); } catch (AtmosException e) { - LOG.warn("can't download from " + entry.getFilename()); + LOG.warn("Cannot download from " + entry.getFilename()); } } else { //iterate on folder @@ -258,11 +258,11 @@ public final class AtmosAPIFacade { content = AtmosAPIFacade.client.readObject(new ObjectPath(path), byte[].class); baos.write(content); } catch (IOException e) { - throw new AtmosException(path + " can't obtain a stream", e); + throw new AtmosException(path + " cannot obtain a stream", e); } if (content != null) { resultEntries.put(path, baos); - LOG.info("downloaded path:" + path + " - baos size:" + baos.size()); + LOG.debug("Downloaded path: {} size:", path, baos.size()); } } http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollConsumer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollConsumer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollConsumer.java index 24863b0..3a491ac 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollConsumer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollConsumer.java @@ -48,8 +48,6 @@ public abstract class AtmosScheduledPollConsumer extends ScheduledPollConsumer { if (configuration.getClient() == null) { //create atmos client configuration.createClient(); - - LOG.info("consumer atmos client created"); } super.doStart(); @@ -62,10 +60,8 @@ public abstract class AtmosScheduledPollConsumer extends ScheduledPollConsumer { */ @Override protected void doStop() throws Exception { - if (configuration.getClient() == null) { + if (configuration.getClient() != null) { configuration.setClient(null); - - LOG.info("consumer atmos client deleted"); } super.doStop(); } http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollGetConsumer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollGetConsumer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollGetConsumer.java index a97f15e..b1c3dc2 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollGetConsumer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/consumer/AtmosScheduledPollGetConsumer.java @@ -40,7 +40,6 @@ public class AtmosScheduledPollGetConsumer extends AtmosScheduledPollConsumer { AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()) .get(configuration.getRemotePath()); result.populateExchange(exchange); - LOG.info("consumer --> downloaded: " + result.toString()); try { // send message to next processor in the route http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosDelProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosDelProducer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosDelProducer.java index bf8c9b7..0c251e1 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosDelProducer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosDelProducer.java @@ -33,8 +33,6 @@ public class AtmosDelProducer extends AtmosProducer { AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()) .del(configuration.getRemotePath()); result.populateExchange(exchange); - log.info("Deleted: " + configuration.getRemotePath()); - } } http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosGetProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosGetProducer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosGetProducer.java index 256ad97..52f2c1f 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosGetProducer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosGetProducer.java @@ -21,11 +21,8 @@ import org.apache.camel.component.atmos.AtmosConfiguration; import org.apache.camel.component.atmos.AtmosEndpoint; import org.apache.camel.component.atmos.core.AtmosAPIFacade; import org.apache.camel.component.atmos.dto.AtmosResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class AtmosGetProducer extends AtmosProducer { - private static final transient Logger LOG = LoggerFactory.getLogger(AtmosGetProducer.class); public AtmosGetProducer(AtmosEndpoint endpoint, AtmosConfiguration configuration) { super(endpoint, configuration); @@ -36,8 +33,6 @@ public class AtmosGetProducer extends AtmosProducer { AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()) .get(configuration.getRemotePath()); result.populateExchange(exchange); - LOG.info("producer --> downloaded: " + result.toString()); - } } http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosMoveProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosMoveProducer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosMoveProducer.java index a33536a..1e0f60a 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosMoveProducer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosMoveProducer.java @@ -33,7 +33,6 @@ public class AtmosMoveProducer extends AtmosProducer { AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()) .move(configuration.getRemotePath(), configuration.getNewRemotePath()); result.populateExchange(exchange); - log.info("Moved from " + configuration.getRemotePath() + " to " + configuration.getNewRemotePath()); } } http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosProducer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosProducer.java index afea01c..bdab861 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosProducer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosProducer.java @@ -19,13 +19,9 @@ package org.apache.camel.component.atmos.integration.producer; import org.apache.camel.component.atmos.AtmosConfiguration; import org.apache.camel.component.atmos.AtmosEndpoint; import org.apache.camel.impl.DefaultProducer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public abstract class AtmosProducer extends DefaultProducer { - private static final transient Logger LOG = LoggerFactory.getLogger(AtmosProducer.class); - protected AtmosEndpoint endpoint; protected AtmosConfiguration configuration; @@ -40,8 +36,6 @@ public abstract class AtmosProducer extends DefaultProducer { if (configuration.getClient() == null) { //create atmos client configuration.createClient(); - - LOG.info("producer atmos client created"); } super.doStart(); @@ -49,10 +43,8 @@ public abstract class AtmosProducer extends DefaultProducer { @Override protected void doStop() throws Exception { - if (configuration.getClient() == null) { + if (configuration.getClient() != null) { configuration.setClient(null); - - LOG.info("producer atmos client deleted"); } super.doStop(); } http://git-wip-us.apache.org/repos/asf/camel/blob/4fc57240/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosPutProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosPutProducer.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosPutProducer.java index c6cfa1f..7328945 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosPutProducer.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/integration/producer/AtmosPutProducer.java @@ -21,11 +21,8 @@ import org.apache.camel.component.atmos.AtmosConfiguration; import org.apache.camel.component.atmos.AtmosEndpoint; import org.apache.camel.component.atmos.core.AtmosAPIFacade; import org.apache.camel.component.atmos.dto.AtmosResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class AtmosPutProducer extends AtmosProducer { - private static final transient Logger LOG = LoggerFactory.getLogger(AtmosPutProducer.class); public AtmosPutProducer(AtmosEndpoint endpoint, AtmosConfiguration configuration) { super(endpoint, configuration); @@ -36,8 +33,6 @@ public class AtmosPutProducer extends AtmosProducer { AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()) .put(configuration.getLocalPath(), configuration.getRemotePath()); result.populateExchange(exchange); - LOG.info("Uploaded: " + result.toString()); - } }