Hi Kobe,

There is no an example for your specific use case.
However your understanding is correct on how this should be implemented.

This is exactly what I had in mind when was going the suggestions in the previous reply

           IgniteFileSystem fs = ignite.fileSystem("myigfs");

            // Image path.
            IgfsPath workDir = new IgfsPath("/data/content.gif");

--
Denis


On 1/13/2016 3:11 AM, Kobe wrote:
Denis Magda wrote
Hi Kobe,

If I understood you task properly you want to map a path portion of an
HTTP request to an IGFS path.

If this is your case then I would suggest doing the following:
- create a Web application that is running in a Tomcat container;
- the application will use Ignite in the embedded mode (start an Ignite
node from the app code);
- process incoming HTTP requests as usual extracting the path part from a
request;
- take instance of Igfs from previously started Ignite node and pass the
path and content to it. Refer to IgfsExample that is a part of Ignite
bundle/sources for more details.

Regards,
Denis
Denis,

I went through the IGFS examples and did not quite see what I wanted. My
problem is simply this:
I am generating content into a file in IGFS that needs to be displayed on
the browser. If the content (on the server) were in file
webapps/myapp/content.gif I would return the URL
       http://<server>/myapp/content.gif
to the browser to the content may be rendered on the browser.

Since my content is in IGFS, what would be the file:// URL of a file in
(embedded) IGFS instance
"myigfs" in path /data/content.gif as shown below?

            IgniteFileSystem fs = ignite.fileSystem("myigfs");

             // Image path.
             IgfsPath workDir = new IgfsPath("/data/content.gif");
Thanx,

kobe




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/How-is-igfs-URL-resolved-tp2142p2523.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to