You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2014/03/13 12:18:47 UTC

svn commit: r901424 - in /websites/production/camel/content: cache/main.pageCache camel-maven-plugin.html hdfs2.html

Author: buildbot
Date: Thu Mar 13 11:18:47 2014
New Revision: 901424

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-maven-plugin.html
    websites/production/camel/content/hdfs2.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/camel-maven-plugin.html
==============================================================================
--- websites/production/camel/content/camel-maven-plugin.html (original)
+++ websites/production/camel/content/camel-maven-plugin.html Thu Mar 13 11:18:47 2014
@@ -40,6 +40,8 @@
   <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
   <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
   <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushBash.js' type='text/javascript'></script>
   
   <script type="text/javascript">
   SyntaxHighlighter.defaults['toolbar'] = false;
@@ -84,29 +86,14 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="CamelMavenPlugin-CamelMavenPlugin">Camel Maven Plugin</h2>
-
-<p>The <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/tooling/maven/camel-maven-plugin">Camel Maven Plugin</a> allows you to run your <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> using <a shape="rect" href="spring.html">Spring</a> for <a shape="rect" href="dependency-injection.html">Dependency Injection</a> inside Maven along with being able to support <a shape="rect" href="visualisation.html">Visualisation</a> along with integration of the <a shape="rect" href="visualisation.html">Visualisation</a> diagrams into the standard maven reports for your project.</p>
-
-<h3 id="CamelMavenPlugin-GoalsSupported">Goals Supported</h3>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Documentation </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Goal </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="camel-run-maven-goal.html">camel:run</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> camel:run </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Boots up Camel in the context of a separately initiated Java thread using the <a shape="rect" href="spring.html">Spring</a> configuration at <strong>META-INF/spring/*.xml</strong> and runs your routing rules. From Camel 2.10 onwards also OSGi blueprint is supported to load from <strong>OSGI-INF/blueprint/*.xml</strong> (requires to configure the plugin to use blueprint). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="
 rect" href="camel-embedded-maven-goal.html">camel:embedded</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> camel:embedded </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Boots up Camel using the <a shape="rect" href="spring.html">Spring</a> configuration at <strong>META-INF/spring/*.xml</strong> and runs your routing rules. From Camel 2.10 onwards also OSGi blueprint is supported to load from <strong>OSGI-INF/blueprint/*.xml</strong> (requires to configure the plugin to use blueprint). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="camel-dot-maven-goal.html">camel:dot</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> camel:dot </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>deprecated</strong>: Generates DOT files and then HTML, PNG, SVG files for your EIP routing rules with integration into Maven Reports. This plugin <strong>only</strong> supports Spring XML files. </
 p></td></tr></tbody></table></div>
-
-
-<h3 id="CamelMavenPlugin-Addingtheplugintoyourpom.xml">Adding the plugin to your pom.xml</h3>
-
-<p>Add the following in your &lt;build&gt;&lt;plugins&gt; section</p>
-
-    <div class="aui-message warning shadowed information-macro">
+<div class="wiki-content maincontent"><h2 id="CamelMavenPlugin-CamelMavenPlugin">Camel Maven Plugin</h2><p>The <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/tooling/maven/camel-maven-plugin">Camel Maven Plugin</a> allows you to run your <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> using <a shape="rect" href="spring.html">Spring</a> for <a shape="rect" href="dependency-injection.html">Dependency Injection</a> inside Maven along with being able to support <a shape="rect" href="visualisation.html">Visualisation</a> along with integration of the <a shape="rect" href="visualisation.html">Visualisation</a> diagrams into the standard maven reports for your project.</p><h3 id="CamelMavenPlugin-GoalsSupported">Goals Supported</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Documentation</p></th><th colspan="1" rowspan="1" clas
 s="confluenceTh"><p>Goal</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="camel-run-maven-goal.html">camel:run</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>camel:run</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Boots up Camel in the context of a separately initiated Java thread using the <a shape="rect" href="spring.html">Spring</a> configuration at <strong>META-INF/spring/*.xml</strong> and runs your routing rules. From Camel 2.10 onwards also OSGi blueprint is supported to load from <strong>OSGI-INF/blueprint/*.xml</strong> (requires to configure the plugin to use blueprint).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="camel-embedded-maven-goal.html">camel:embedded</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>camel:embedded</p></td><td colspan="1" rowspan="1" class="conf
 luenceTd"><p>Boots up Camel using the <a shape="rect" href="spring.html">Spring</a> configuration at <strong>META-INF/spring/*.xml</strong> and runs your routing rules. From Camel 2.10 onwards also OSGi blueprint is supported to load from <strong>OSGI-INF/blueprint/*.xml</strong> (requires to configure the plugin to use blueprint).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="camel-dot-maven-goal.html">camel:dot</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>camel:dot</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated</strong>: Generates DOT files and then HTML, PNG, SVG files for your EIP routing rules with integration into Maven Reports. This plugin <strong>only</strong> supports Spring XML files.</p></td></tr></tbody></table></div><h3 id="CamelMavenPlugin-Addingtheplugintoyourpom.xml">Adding the plugin to your pom.xml</h3><p>Add the following in your &lt;build&gt;&lt;plugins&gt; section</p>
     <div class="aui-message warning shadowed information-macro">
                             <span class="aui-icon icon-warning">Icon</span>
                 <div class="message-content">
-                            <p>You may override the default Spring application context file uri <strong>META-INF/spring/*.xml</strong> by using the applicationContextUri property in the camel-maven-plugin configuration.  Paths may be split using a semi-colon (;).</p>
+                            <p>You may override the default Spring application context file uri <strong>META-INF/spring/*.xml</strong> by using the applicationContextUri property in the camel-maven-plugin configuration. Paths may be split using a semi-colon (;).</p>
                     </div>
     </div>
-
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;plugin&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;plugin&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
   &lt;configuration&gt;
@@ -114,13 +101,8 @@
   &lt;/configuration&gt;
 &lt;/plugin&gt;
 ]]></script>
-</div></div>
-
-<p>You can also specify what Main class to use when running the plugin. By default this is org.apache.camel.spring.Main.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;plugin&gt;
+</div></div><p><span style="line-height: 1.4285715;">You can also specify what Main class to use when running the plugin. By default this is <code>org.apache.camel.spring.Main</code>.</span></p><p><span style="line-height: 1.4285715;">&#160;</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;plugin&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
   &lt;!-- optional, default value: org.apache.camel.spring.Main --&gt;
@@ -129,13 +111,8 @@
   &lt;/configuration&gt;
 &lt;/plugin&gt;
 ]]></script>
-</div></div>
-
-<h3 id="CamelMavenPlugin-Filebasedspringconfigurationfiles">File based spring configuration files</h3>
-<p>From Camel 1.4 onwards loading Spring context files via a file location is also supported. You configure this with the <strong>fileApplicationContextUri</strong> option. Paths may be split using a semi-colon (;). This sort of file location is useful for web application projects that store spring configuration files in WEB-INF. It can also be used to replace configuration that requires an OSGi container with an equivalent non-OSGi configuration. </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;plugin&gt;
+</div></div><h3 id="CamelMavenPlugin-Filebasedspringconfigurationfiles"><span style="font-size: 16.0px;line-height: 1.5625;">File based spring configuration files</span></h3><p>From Camel 1.4 onwards loading Spring context files via a file location is also supported. You configure this with the <strong>fileApplicationContextUri</strong> option. Paths may be split using a semi-colon (;). This sort of file location is useful for web application projects that store spring configuration files in WEB-INF. It can also be used to replace configuration that requires an OSGi container with an equivalent non-OSGi configuration.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;plugin&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
   &lt;configuration&gt;
@@ -146,19 +123,8 @@
   &lt;/configuration&gt;
 &lt;/plugin&gt;
 ]]></script>
-</div></div>
-
-<h3 id="CamelMavenPlugin-Classpath">Classpath</h3>
-
-<p>The plugin will construct a classpath of any Maven dependency with scope "compile".  The classpath is output as an INFO log statement upon startup.</p>
-
-<h3 id="CamelMavenPlugin-RouteInformation">Route Information</h3>
-
-<p>Information about the generated routes is available through the GraphViz report, and also through the log statements generated by the run goal.  If you would like to see this information then add a log4j (or other commons-logging implementation) config file with the following levels.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>src/main/resources/log4.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-log4j.rootLogger=INFO, stdout
+</div></div><h3 id="CamelMavenPlugin-Classpath"><span style="font-size: 16.0px;line-height: 1.5625;">Classpath</span></h3><p>The plugin will construct a classpath of any Maven dependency with scope "compile". The classpath is output as an INFO log statement upon startup.</p><h3 id="CamelMavenPlugin-RouteInformation">Route Information</h3><p>Information about the generated routes is available through the GraphViz report, and also through the log statements generated by the run goal. If you would like to see this information then add a log4j (or other commons-logging implementation) config file with the following levels.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>src/main/resources/log4.properties</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[log4j.rootLogger=INFO, stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
@@ -166,26 +132,12 @@ log4j.appender.stdout.layout.ConversionP
 log4j.logger.org.apache.camel.impl.DefaultCamelContext=DEBUG, stdout
 log4j.additivity.org.apache.camel.impl.DefaultCamelContext=false
 ]]></script>
-</div></div>
-
-<p>This should produce a log statement similar to:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-670  [org.apache.camel.spring.Main.main()] DEBUG org.apache.camel.impl.DefaultCamelContext  
+</div></div><p>This should produce a log statement similar to:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[670  [org.apache.camel.spring.Main.main()] DEBUG org.apache.camel.impl.DefaultCamelContext  
   - Adding routes from: Routes: [Route[ [From[jms:queue:queueA]] -&gt; [To[jms:queue:queueB], To[jms:queue:queueC]]]] routes: []
 ]]></script>
-</div></div>
-
-<h3 id="CamelMavenPlugin-IntegrationintoMavenReports">Integration into Maven Reports</h3>
-
-<p>If you add the camel-maven-plugin to your &lt;reporting&gt; section of your pom you will automatically get the <a shape="rect" href="visualisation.html">Visualisation</a> reporting generated for your project as part of the regular maven site generation.</p>
-
-<p>For example add the following into your pom</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;project&gt;
+</div></div><h3 id="CamelMavenPlugin-IntegrationintoMavenReports">Integration into Maven Reports</h3><p>If you add the camel-maven-plugin to your &lt;reporting&gt; section of your pom you will automatically get the <a shape="rect" href="visualisation.html">Visualisation</a> reporting generated for your project as part of the regular maven site generation.</p><p>For example add the following into your pom</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;project&gt;
   ...
   &lt;reporting&gt;
     &lt;plugins&gt;
@@ -197,26 +149,14 @@ log4j.additivity.org.apache.camel.impl.D
   &lt;/reporting&gt;  
 &lt;/project&gt;
 ]]></script>
-</div></div>
-
-<p>Then when you run</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-mvn site
+</div></div><p><span style="line-height: 1.4285715;">Then when you run</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: bash; gutter: false" type="syntaxhighlighter"><![CDATA[mvn site
 ]]></script>
-</div></div>
-
-<p>Your context will be booted up via the <strong>META-INF/spring/*.xml</strong> files, the DOT file generated and a nice HTML report created. </p>
-
-    <div class="aui-message hint shadowed information-macro">
+</div></div><p>Your context will be booted up via the <strong>META-INF/spring/*.xml</strong> files, the DOT file generated and a nice HTML report created.</p>    <div class="aui-message hint shadowed information-macro">
                     <p class="title">GraphViz DOT required</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            
-<p>Note to get the nice HTML, PNG and SVG outputs from the DOT files you will need to install the <a shape="rect" class="external-link" href="http://graphviz.org" rel="nofollow">GraphViz</a> DOT executable and add it to your PATH so that the plugin can invoke DOT to generate the PNG/SVG files. </p>
-
-<p>For more details see the <a shape="rect" href="camel-dot-maven-goal.html">camel:dot</a>.</p>
+                            <p>Note to get the nice HTML, PNG and SVG outputs from the DOT files you will need to install the <a shape="rect" class="external-link" href="http://graphviz.org" rel="nofollow">GraphViz</a> DOT executable and add it to your PATH so that the plugin can invoke DOT to generate the PNG/SVG files.</p><p>For more details see the <a shape="rect" href="camel-dot-maven-goal.html">camel:dot</a>.</p>
                     </div>
     </div></div>
         </td>

Modified: websites/production/camel/content/hdfs2.html
==============================================================================
--- websites/production/camel/content/hdfs2.html (original)
+++ websites/production/camel/content/hdfs2.html Thu Mar 13 11:18:47 2014
@@ -106,11 +106,31 @@
                     </div>
     </div>
 <p>for example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[hdfs://localhost/tmp/simple-file?splitStrategy=IDLE:1000,BYTES:5
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[hdfs2://localhost/tmp/simple-file?splitStrategy=IDLE:1000,BYTES:5
 ]]></script>
 </div></div><p>it means: a new file is created either when it has been idle for more than 1 second or if more than 5 bytes have been written. So, running <code>hadoop fs -ls /tmp/simple-file</code> you'll see that multiple files have been created.</p><h3 id="HDFS2-MessageHeaders">Message Headers</h3><p>The following headers are supported by this component:</p><h4 id="HDFS2-Produceronly">Producer only</h4><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelFileName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.13:</strong> Specifies the name of the file to write (relative to the endpoint path). The name can be a <code>String</code> or an <a shape="rect" href="expression.html" title="Expression">Expression</a> object. Only relevant when not using a split strategy. </p></td></tr></tbody></table>
-</div><h3 id="HDFS2-Controllingtoclosefilestream">Controlling to close file stream</h3><p>When using the <a shape="rect" href="hdfs2.html">HDFS2</a> producer <strong>without</strong> a split strategy, then the file output stream is by default closed after the write. However you may want to keep the stream open, and only explicitly close the stream later. For that you can use the header <code>HdfsConstants.HDFS_CLOSE</code> (value = <code>"CamelHdfsClose"</code>) to control this. Setting this value to a boolean allows you to explicit control whether the stream should be closed or not.</p><p>Notice this does not apply if you use a split strategy, as there are various strategies that can control when the stream is closed.</p><h3 id="HDFS2-UsingthiscomponentinOSGi">Using this component in OSGi</h3><p>This component is fully functional in an OSGi environment, however, it requires some actions from the user. Hadoop uses the thread context class loader in order to load resources. Usually, 
 the thread context classloader will be the bundle class loader of the bundle that contains the routes. So, the default configuration files need to be visible from the bundle class loader. A typical way to deal with it is to keep a copy of core-default.xml in your bundle root. That file can be found in the hadoop-common.jar.</p></div>
+</div><h3 id="HDFS2-Controllingtoclosefilestream">Controlling to close file stream</h3><p>When using the <a shape="rect" href="hdfs2.html">HDFS2</a> producer <strong>without</strong> a split strategy, then the file output stream is by default closed after the write. However you may want to keep the stream open, and only explicitly close the stream later. For that you can use the header <code>HdfsConstants.HDFS_CLOSE</code> (value = <code>"CamelHdfsClose"</code>) to control this. Setting this value to a boolean allows you to explicit control whether the stream should be closed or not.</p><p>Notice this does not apply if you use a split strategy, as there are various strategies that can control when the stream is closed.</p><h3 id="HDFS2-UsingthiscomponentinOSGi">Using this component in OSGi</h3><p>There are some quirks when running this component in an OSGi environment related to the mechanism Hadoop 2.x uses to discover different <code>org.apache.hadoop.fs.FileSystem</code> implemen
 tations. Hadoop 2.x uses <code>java.util.ServiceLoader</code> which looks for <code>/META-INF/services/org.apache.hadoop.fs.FileSystem</code> files defining available filesystem types and implementations. These resources are not available when running inside OSGi.</p><p>As with&#160;<code>camel-hdfs</code> component, the default configuration files need to be visible from the bundle class loader. A typical way to deal with it is to keep a copy of&#160;<code>core-default.xml</code> (and e.g., <code>hdfs-default.xml</code>) in your bundle root.</p><h4 id="HDFS2-Usingthiscomponentwithmanuallydefinedroutes">Using this component with manually defined routes</h4><p>There are two options:</p><ol><li>Package <code>/META-INF/services/org.apache.hadoop.fs.FileSystem</code> resource with bundle that defines the routes. This resource should list all the required Hadoop 2.x filesystem implementations.</li><li>Provide boilerplate initialization code which populates internal, static cache inside <
 code>org.apache.hadoop.fs.FileSystem</code> class:</li></ol><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
+conf.setClass(&quot;fs.file.impl&quot;, org.apache.hadoop.fs.LocalFileSystem.class, FileSystem.class);
+conf.setClass(&quot;fs.hdfs.impl&quot;, org.apache.hadoop.hdfs.DistributedFileSystem.class, FileSystem.class);
+...
+FileSystem.get(&quot;file:///&quot;, conf);
+FileSystem.get(&quot;hdfs://localhost:9000/&quot;, conf);
+...]]></script>
+</div></div><h4 id="HDFS2-UsingthiscomponentwithBlueprintcontainer">Using this component with Blueprint container</h4><p>Two options:</p><ol><li>Package <code>/META-INF/services/org.apache.hadoop.fs.FileSystem</code> resource with bundle that contains blueprint definition.</li><li>Add the following to the blueprint definition file:</li></ol><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;hdfsOsgiHelper&quot; class=&quot;org.apache.camel.component.hdfs2.HdfsOsgiHelper&quot;&gt;
+   &lt;argument&gt;
+      &lt;map&gt;
+         &lt;entry key=&quot;file:///&quot; value=&quot;org.apache.hadoop.fs.LocalFileSystem&quot;  /&gt;
+         &lt;entry key=&quot;hdfs://localhost:9000/&quot; value=&quot;org.apache.hadoop.hdfs.DistributedFileSystem&quot; /&gt;
+         ...
+      &lt;/map&gt;
+   &lt;/argument&gt;
+&lt;/bean&gt;
+
+&lt;bean id=&quot;hdfs2&quot; class=&quot;org.apache.camel.component.hdfs2.HdfsComponent&quot; depends-on=&quot;hdfsOsgiHelper&quot; /&gt;]]></script>
+</div></div><p>This way Hadoop 2.x will have correct mapping of URI schemes to filesystem implementations.</p></div>
         </td>
         <td valign="top">
           <div class="navigation">