You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/12/12 10:18:06 UTC

[camel] branch master updated: CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - ipfs. Also fixed so the endpoint is singleton and other cleanups.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 52bb90b  CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - ipfs. Also fixed so the endpoint is singleton and other cleanups.
52bb90b is described below

commit 52bb90bd2fb42c45e18d60bf1e1f1108dc7cf71d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 12 11:17:45 2019 +0100

    CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - ipfs. Also fixed so the endpoint is singleton and other cleanups.
---
 .../camel-ipfs/src/main/docs/ipfs-component.adoc   |   8 +-
 .../apache/camel/component/ipfs/IPFSComponent.java |  10 +-
 .../camel/component/ipfs/IPFSConfiguration.java    |  41 +++++---
 .../apache/camel/component/ipfs/IPFSEndpoint.java  |  94 ++-----------------
 .../apache/camel/component/ipfs/IPFSProducer.java  | 103 +++++++++++++++++----
 .../camel/component/ipfs/SimpleIPFSTest.java       |  57 ++++++------
 .../src/test/resources/log4j2.properties           |   4 +-
 .../endpoint/dsl/IPFSEndpointBuilderFactory.java   |  21 +----
 8 files changed, 169 insertions(+), 169 deletions(-)

diff --git a/components/camel-ipfs/src/main/docs/ipfs-component.adoc b/components/camel-ipfs/src/main/docs/ipfs-component.adoc
index 11896fb..6ec9bda 100644
--- a/components/camel-ipfs/src/main/docs/ipfs-component.adoc
+++ b/components/camel-ipfs/src/main/docs/ipfs-component.adoc
@@ -60,9 +60,9 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *ipfsHost* | The ipfs host |  | String
-| *ipfsPort* | The ipfs port |  | int
-| *ipfsCmd* | The ipfs command |  | String
+| *ipfsHost* | *Required* The ipfs host |  | String
+| *ipfsPort* | *Required* The ipfs port |  | int
+| *ipfsCmd* | *Required* The ipfs command |  | String
 |===
 
 
@@ -73,7 +73,7 @@ with the following path and query parameters:
 |===
 | Name | Description | Default | Type
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *outdir* (producer) | The ipfs output directory |  | Path
+| *outdir* (producer) | The ipfs output directory |  | String
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 |===
diff --git a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSComponent.java b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSComponent.java
index dcd4116..63aa466 100644
--- a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSComponent.java
+++ b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSComponent.java
@@ -27,11 +27,11 @@ import org.apache.camel.support.DefaultComponent;
 public class IPFSComponent extends DefaultComponent {
 
     @Override
-    protected Endpoint createEndpoint(String urispec, String remaining, Map<String, Object> params) throws Exception {
+    protected Endpoint createEndpoint(String urispec, String remaining, Map<String, Object> parameters) throws Exception {
 
-        // Init the configuration
-        IPFSConfiguration config = new IPFSConfiguration(this);
-        setProperties(config, params);
+        IPFSConfiguration config = new IPFSConfiguration();
+        IPFSEndpoint endpoint = new IPFSEndpoint(urispec, this, config);
+        setProperties(endpoint, parameters);
 
         // Derive host:port and cmd from the give uri
         URI uri = new URI(urispec);
@@ -50,6 +50,6 @@ public class IPFSComponent extends DefaultComponent {
         }
         config.setIpfsCmd(cmd);
 
-        return new IPFSEndpoint(urispec, this, config);
+        return endpoint;
     }
 }
diff --git a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSConfiguration.java b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSConfiguration.java
index 7d81c85..a2a4b3a 100644
--- a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSConfiguration.java
+++ b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSConfiguration.java
@@ -16,9 +16,11 @@
  */
 package org.apache.camel.component.ipfs;
 
+import java.net.URI;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
@@ -32,19 +34,34 @@ public class IPFSConfiguration {
         add, cat, get, version 
     }
 
-    @UriPath(description = "The ipfs host")
-    private String ipfsHost = "127.0.0.1";
-    @UriPath(description = "The ipfs port")
-    private int ipfsPort = 5001;
-    @UriPath(description = "The ipfs command", enums = "add,cat,get,version")
+    @UriPath(description = "The ipfs host") @Metadata(required = true)
+    private String ipfsHost;
+    @UriPath(description = "The ipfs port") @Metadata(required = true)
+    private int ipfsPort;
+    @UriPath(description = "The ipfs command", enums = "add,cat,get,version") @Metadata(required = true)
     private String ipfsCmd;
     @UriParam(description = "The ipfs output directory")
-    private Path outdir;
-    
-    public IPFSConfiguration(IPFSComponent component) {
-        ObjectHelper.notNull(component, "component");
-    }
+    private String outdir;
 
+    public void init(String urispec, String remaining) throws Exception {
+        // Derive host:port and cmd from the give uri
+        URI uri = new URI(urispec);
+        String host = uri.getHost();
+        int port = uri.getPort();
+        String cmd = remaining;
+        if (!cmd.equals(host)) {
+            if (host != null) {
+                setIpfsHost(host);
+            }
+            if (port > 0) {
+                setIpfsPort(port);
+            }
+            int idx = cmd.indexOf('/');
+            cmd = cmd.substring(idx + 1);
+        }
+        setIpfsCmd(cmd);
+    }
+    
     public String getIpfsCmd() {
         return ipfsCmd;
     }
@@ -69,11 +86,11 @@ public class IPFSConfiguration {
         this.ipfsPort = ipfsPort;
     }
 
-    public Path getOutdir() {
+    public String getOutdir() {
         return outdir;
     }
 
     public void setOutdir(String outdir) {
-        this.outdir = Paths.get(outdir);
+        this.outdir = outdir;
     }
 }
diff --git a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSEndpoint.java b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSEndpoint.java
index 391a654..c9657ea 100644
--- a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSEndpoint.java
+++ b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSEndpoint.java
@@ -41,47 +41,21 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * The camel-ipfs component provides access to the Interplanetary File System
- * (IPFS).
+ * The camel-ipfs component provides access to the Interplanetary File System (IPFS).
  */
 @UriEndpoint(firstVersion = "2.23.0", scheme = "ipfs", title = "IPFS",
-        syntax = "ipfs:ipfsHost:ipfsPort/ipfsCmd", producerOnly = true, label = "file,ipfs", generateConfigurer = false)
+        syntax = "ipfs:ipfsHost:ipfsPort/ipfsCmd", producerOnly = true, label = "file,ipfs")
 public class IPFSEndpoint extends DefaultEndpoint {
 
-    public static final long DEFAULT_TIMEOUT = 10000L;
-    
-    private static final Logger LOG = LoggerFactory.getLogger(IPFSComponent.class);
-    
     @UriParam
-    private final IPFSConfiguration config;
+    private final IPFSConfiguration configuration;
 
-    private IPFSClient client;
-
-    public IPFSEndpoint(String uri, IPFSComponent component, IPFSConfiguration config) {
+    public IPFSEndpoint(String uri, IPFSComponent component, IPFSConfiguration configuration) {
         super(uri, component);
-        this.config = config;
-        this.client = createClient(config);
-    }
-
-    public IPFSClient getIPFSClient() {
-        return client;
-    }
-
-    public void setClient(IPFSClient client) {
-        this.client = client;
+        this.configuration = configuration;
     }
 
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
-        try {
-            client.connect();
-        } catch (IPFSException ex) {
-            LOG.warn(ex.getMessage());
-        }
-    }
-    
-    @Override
     public IPFSComponent getComponent() {
         return (IPFSComponent)super.getComponent();
     }
@@ -96,62 +70,8 @@ public class IPFSEndpoint extends DefaultEndpoint {
         return new IPFSProducer(this);
     }
 
-    @Override
-    public boolean isSingleton() {
-        return false;
-    }
-
-    IPFSConfiguration getConfiguration() {
-        return config;
-    }
-
-    IPFSCommand getCommand() {
-        String cmd = config.getIpfsCmd();
-        try {
-            return IPFSCommand.valueOf(cmd);
-        } catch (IllegalArgumentException ex) {
-            throw new IllegalArgumentException("Unsupported command: " + cmd);
-        }
-    }
-
-    String ipfsVersion() throws IOException {
-        return ipfs().version();
+    public IPFSConfiguration getConfiguration() {
+        return configuration;
     }
 
-    List<String> ipfsAdd(Path path) throws IOException {
-        List<Multihash> cids = ipfs().add(path);
-        return cids.stream().map(mh -> mh.toBase58()).collect(Collectors.toList());
-    }
-
-    InputStream ipfsCat(String cid) throws IOException, TimeoutException {
-        Multihash mhash = Multihash.fromBase58(cid);
-        Future<InputStream> future = ipfs().cat(mhash);
-        try {
-            return future.get(DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException | ExecutionException ex) {
-            throw new IOException("Cannot obtain: " + cid, ex);
-        }
-    }
-
-    Path ipfsGet(String cid, Path outdir) throws IOException, TimeoutException {
-        Multihash mhash = Multihash.fromBase58(cid);
-        Future<Path> future = ipfs().get(mhash, outdir);
-        try {
-            return future.get(DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException | ExecutionException ex) {
-            throw new IOException("Cannot obtain: " + cid, ex);
-        }
-    }
-
-    private IPFSClient ipfs() {
-        if (!client.hasConnection()) {
-            client.connect();
-        }
-        return client;
-    }
-    
-    private IPFSClient createClient(IPFSConfiguration config) {
-        IPFSClient ipfsClient = new DefaultIPFSClient(config.getIpfsHost(), config.getIpfsPort());
-        return ipfsClient;
-    }
 }
diff --git a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSProducer.java b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSProducer.java
index 8a44616..90bbfa6 100644
--- a/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSProducer.java
+++ b/components/camel-ipfs/src/main/java/org/apache/camel/component/ipfs/IPFSProducer.java
@@ -17,17 +17,30 @@
 package org.apache.camel.component.ipfs;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.List;
-
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.stream.Collectors;
+
+import io.ipfs.multihash.Multihash;
+import io.nessus.ipfs.client.DefaultIPFSClient;
+import io.nessus.ipfs.client.IPFSClient;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.ipfs.IPFSConfiguration.IPFSCommand;
 import org.apache.camel.support.DefaultProducer;
 
 public class IPFSProducer extends DefaultProducer {
 
+    private static final long DEFAULT_TIMEOUT = 10000L;
+
+    private IPFSClient client;
+
     public IPFSProducer(IPFSEndpoint endpoint) {
         super(endpoint);
     }
@@ -38,39 +51,44 @@ public class IPFSProducer extends DefaultProducer {
     }
 
     @Override
-    public void process(Exchange exchange) throws Exception {
+    protected void doStart() throws Exception {
+        super.doStart();
+        if (this.client == null) {
+            this.client = createClient(getEndpoint().getConfiguration());
+        }
+    }
 
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+        // client has no disconnect api
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
         IPFSEndpoint endpoint = getEndpoint();
-        IPFSCommand cmd = endpoint.getCommand();
+        IPFSCommand cmd = getCommand();
 
         if (IPFSCommand.version == cmd) {
-
-            String resp = endpoint.ipfsVersion();
+            String resp = ipfsVersion();
             exchange.getMessage().setBody(resp);
-
         } else if (IPFSCommand.add == cmd) {
-
             Path path = pathFromBody(exchange);
-            List<String> cids = endpoint.ipfsAdd(path);
+            List<String> cids = ipfsAdd(path);
             Object resp = cids;
             if (path.toFile().isFile()) {
                 resp = cids.size() > 0 ? cids.get(0) : null;
             }
             exchange.getMessage().setBody(resp);
-
         } else if (IPFSCommand.cat == cmd) {
-
             String cid = exchange.getMessage().getBody(String.class);
-            InputStream resp = endpoint.ipfsCat(cid);
+            InputStream resp = ipfsCat(cid);
             exchange.getMessage().setBody(resp);
-
         } else if (IPFSCommand.get == cmd) {
-
-            Path outdir = endpoint.getConfiguration().getOutdir();
+            String outdir = endpoint.getConfiguration().getOutdir();
             String cid = exchange.getMessage().getBody(String.class);
-            Path resp = endpoint.ipfsGet(cid, outdir);
+            Path resp = ipfsGet(cid, new File(outdir).toPath());
             exchange.getMessage().setBody(resp);
-
         } else {
             throw new UnsupportedOperationException(cmd.toString());
         }
@@ -89,4 +107,57 @@ public class IPFSProducer extends DefaultProducer {
         }
         throw new IllegalArgumentException("Invalid path: " + body);
     }
+
+
+    private IPFSClient createClient(IPFSConfiguration config) {
+        IPFSClient ipfsClient = new DefaultIPFSClient(config.getIpfsHost(), config.getIpfsPort());
+        return ipfsClient;
+    }
+
+    public IPFSCommand getCommand() {
+        String cmd = getEndpoint().getConfiguration().getIpfsCmd();
+        try {
+            return IPFSCommand.valueOf(cmd);
+        } catch (IllegalArgumentException ex) {
+            throw new IllegalArgumentException("Unsupported command: " + cmd);
+        }
+    }
+
+    public String ipfsVersion() throws IOException {
+        return ipfs().version();
+    }
+
+    public List<String> ipfsAdd(Path path) throws IOException {
+        List<Multihash> cids = ipfs().add(path);
+        return cids.stream().map(mh -> mh.toBase58()).collect(Collectors.toList());
+    }
+
+    public InputStream ipfsCat(String cid) throws IOException, TimeoutException {
+        Multihash mhash = Multihash.fromBase58(cid);
+        Future<InputStream> future = ipfs().cat(mhash);
+        try {
+            return future.get(DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS);
+        } catch (InterruptedException | ExecutionException ex) {
+            throw new IOException("Cannot obtain: " + cid, ex);
+        }
+    }
+
+    public Path ipfsGet(String cid, Path outdir) throws IOException, TimeoutException {
+        Multihash mhash = Multihash.fromBase58(cid);
+        Future<Path> future = ipfs().get(mhash, outdir);
+        try {
+            return future.get(DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS);
+        } catch (InterruptedException | ExecutionException ex) {
+            throw new IOException("Cannot obtain: " + cid, ex);
+        }
+    }
+
+    private IPFSClient ipfs() {
+        if (!client.hasConnection()) {
+            client.connect();
+        }
+        return client;
+    }
+
+
 }
diff --git a/components/camel-ipfs/src/test/java/org/apache/camel/component/ipfs/SimpleIPFSTest.java b/components/camel-ipfs/src/test/java/org/apache/camel/component/ipfs/SimpleIPFSTest.java
index a5528b7..d1fc10a 100644
--- a/components/camel-ipfs/src/test/java/org/apache/camel/component/ipfs/SimpleIPFSTest.java
+++ b/components/camel-ipfs/src/test/java/org/apache/camel/component/ipfs/SimpleIPFSTest.java
@@ -43,15 +43,14 @@ public class SimpleIPFSTest {
         camelctx.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:startA").to("ipfs:version");
-                from("direct:startB").to("ipfs:127.0.0.1/version");
+                from("direct:startA").to("ipfs:127.0.0.1:5001/version");
+                from("direct:startB").to("ipfs:127.0.0.1:5001/version");
                 from("direct:startC").to("ipfs:127.0.0.1:5001/version");
             }
         });
 
         camelctx.start();
-        assumeIPFSAvailable(camelctx);
-        
+
         try {
             ProducerTemplate producer = camelctx.createProducerTemplate();
             String resA = producer.requestBody("direct:startA", null, String.class);
@@ -60,6 +59,9 @@ public class SimpleIPFSTest {
             Arrays.asList(resA, resB, resC).forEach(res -> {
                 Assert.assertTrue("Expecting 0.4 in: " + resA, resA.startsWith("0.4"));
             });
+        } catch (Exception e) {
+            boolean notRunning = e.getCause().getMessage().contains("Is IPFS running");
+            Assume.assumeFalse("IPFS is running", notRunning);
         } finally {
             camelctx.stop();
         }
@@ -74,18 +76,20 @@ public class SimpleIPFSTest {
         camelctx.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").to("ipfs:add");
+                from("direct:start").to("ipfs:127.0.0.1:5001/add");
             }
         });
 
         camelctx.start();
-        assumeIPFSAvailable(camelctx);
-        
+
         try {
             Path path = Paths.get("src/test/resources/html/index.html");
             ProducerTemplate producer = camelctx.createProducerTemplate();
             String res = producer.requestBody("direct:start", path, String.class);
             Assert.assertEquals(hash, res);
+        } catch (Exception e) {
+            boolean notRunning = e.getCause().getMessage().contains("Is IPFS running");
+            Assume.assumeFalse("IPFS is running", notRunning);
         } finally {
             camelctx.stop();
         }
@@ -101,19 +105,21 @@ public class SimpleIPFSTest {
         camelctx.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").to("ipfs:add");
+                from("direct:start").to("ipfs:127.0.0.1:5001/add");
             }
         });
 
         camelctx.start();
-        assumeIPFSAvailable(camelctx);
-        
+
         try {
             Path path = Paths.get("src/test/resources/html");
             ProducerTemplate producer = camelctx.createProducerTemplate();
             List<String> res = producer.requestBody("direct:start", path, List.class);
             Assert.assertEquals(10, res.size());
             Assert.assertEquals(hash, res.get(9));
+        } catch (Exception e) {
+            boolean notRunning = e.getCause().getMessage().contains("Is IPFS running");
+            Assume.assumeFalse("IPFS is running", notRunning);
         } finally {
             camelctx.stop();
         }
@@ -128,17 +134,19 @@ public class SimpleIPFSTest {
         camelctx.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").to("ipfs:cat");
+                from("direct:start").to("ipfs:127.0.0.1:5001/cat");
             }
         });
 
         camelctx.start();
-        assumeIPFSAvailable(camelctx);
-        
+
         try {
             ProducerTemplate producer = camelctx.createProducerTemplate();
             InputStream res = producer.requestBody("direct:start", hash, InputStream.class);
             verifyFileContent(res);
+        } catch (Exception e) {
+            boolean notRunning = e.getCause().getMessage().contains("Is IPFS running");
+            Assume.assumeFalse("IPFS is running", notRunning);
         } finally {
             camelctx.stop();
         }
@@ -153,18 +161,20 @@ public class SimpleIPFSTest {
         camelctx.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").to("ipfs:get?outdir=target");
+                from("direct:start").to("ipfs:127.0.0.1:5001/get?outdir=target");
             }
         });
 
         camelctx.start();
-        assumeIPFSAvailable(camelctx);
-        
+
         try {
             ProducerTemplate producer = camelctx.createProducerTemplate();
             Path res = producer.requestBody("direct:start", hash, Path.class);
             Assert.assertEquals(Paths.get("target", hash), res);
             verifyFileContent(new FileInputStream(res.toFile()));
+        } catch (Exception e) {
+            boolean notRunning = e.getCause().getMessage().contains("Is IPFS running");
+            Assume.assumeFalse("IPFS is running", notRunning);
         } finally {
             camelctx.stop();
         }
@@ -179,19 +189,21 @@ public class SimpleIPFSTest {
         camelctx.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").to("ipfs:get?outdir=target");
+                from("direct:start").to("ipfs:127.0.0.1:5001/get?outdir=target");
             }
         });
 
         camelctx.start();
-        assumeIPFSAvailable(camelctx);
-        
+
         try {
             ProducerTemplate producer = camelctx.createProducerTemplate();
             Path res = producer.requestBody("direct:start", hash, Path.class);
             Assert.assertEquals(Paths.get("target", hash), res);
             Assert.assertTrue(res.toFile().isDirectory());
             Assert.assertTrue(res.resolve("index.html").toFile().exists());
+        } catch (Exception e) {
+            boolean notRunning = e.getCause().getMessage().contains("Is IPFS running");
+            Assume.assumeFalse("IPFS is running", notRunning);
         } finally {
             camelctx.stop();
         }
@@ -203,11 +215,4 @@ public class SimpleIPFSTest {
         Assert.assertEquals("The quick brown fox jumps over the lazy dog.", new String(baos.toByteArray()));
     }
 
-    private void assumeIPFSAvailable(CamelContext camelctx) throws Exception {
-        IPFSEndpoint ipfsEp = camelctx.getEndpoints().stream()
-                .filter(ep -> ep instanceof IPFSEndpoint)
-                .map(ep -> (IPFSEndpoint)ep)
-                .findFirst().get();
-        Assume.assumeTrue(ipfsEp.getIPFSClient().hasConnection());
-    }
 }
diff --git a/components/camel-ipfs/src/test/resources/log4j2.properties b/components/camel-ipfs/src/test/resources/log4j2.properties
index 081914f..a5fae67 100644
--- a/components/camel-ipfs/src/test/resources/log4j2.properties
+++ b/components/camel-ipfs/src/test/resources/log4j2.properties
@@ -15,12 +15,12 @@
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
 
-rootLogger.level = DEBUG
+rootLogger.level = INFO
 rootLogger.appenderRef.file.ref = file
 
 appender.file.name = file
 appender.file.type = File
-appender.file.fileName = target/camel-test.log
+appender.file.fileName = target/camel-ipfs-test.log
 appender.file.layout.type = PatternLayout
 appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/IPFSEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/IPFSEndpointBuilderFactory.java
index 0433471..b95e0aa 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/IPFSEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/IPFSEndpointBuilderFactory.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.builder.endpoint.dsl;
 
-import java.nio.file.Path;
 import javax.annotation.Generated;
 import org.apache.camel.builder.EndpointConsumerBuilder;
 import org.apache.camel.builder.EndpointProducerBuilder;
@@ -80,19 +79,7 @@ public interface IPFSEndpointBuilderFactory {
         /**
          * The ipfs output directory.
          * 
-         * The option is a: <code>java.nio.file.Path</code> type.
-         * 
-         * Group: producer
-         */
-        default IPFSEndpointBuilder outdir(Path outdir) {
-            doSetProperty("outdir", outdir);
-            return this;
-        }
-        /**
-         * The ipfs output directory.
-         * 
-         * The option will be converted to a <code>java.nio.file.Path</code>
-         * type.
+         * The option is a: <code>java.lang.String</code> type.
          * 
          * Group: producer
          */
@@ -173,13 +160,13 @@ public interface IPFSEndpointBuilderFactory {
      * 
      * Syntax: <code>ipfs:ipfsHost:ipfsPort/ipfsCmd</code>
      * 
-     * Path parameter: ipfsHost
+     * Path parameter: ipfsHost (required)
      * The ipfs host
      * 
-     * Path parameter: ipfsPort
+     * Path parameter: ipfsPort (required)
      * The ipfs port
      * 
-     * Path parameter: ipfsCmd
+     * Path parameter: ipfsCmd (required)
      * The ipfs command
      * The value can be one of: add, cat, get, version
      */