I've a little application, a web scraper, designed to work as a normal Java application from console but to save the execution results in HDFS when possible. As a normal application, it works without need to user interaction and produce an output file.
1-when the application is deployed and run the web console asks for the path of the input file, I took the example from the demo application WordCounter, but then this parameter is apparently lost and the argshttp://] value received by main() is an empty vector. I wrote a little application to see the args[ content and it seems to be always empty despite the execution parameters asked in the web console. How can I pass parameters ? Then, is there a way to deploy a file in hdfs working directory of the application?
2-When I deploy the application from Eclipse it asks for a jar saying "- Add .jar archives for the java action ", so I have to:
*from the project use export->jar file and export the application in a jar external to the application folder in the workspace
*from the file manager copy this file to the project folder
*refresh the project to make Eclipse see this Jar
*use the BI application publish wizard and select this file when asked
this way the application is deployed, but I gues that's not the way it's supposed to publish an application. Is there a easier way?
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
3 replies Latest Post - 2012-10-12T10:24:14Z by SystemAdmin
Pinned topic Run single node application in BigInsights and emtpy args
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-12T10:24:14Z at 2012-10-12T10:24:14Z by SystemAdmin
Re: Run single node application in BigInsights and emtpy args2012-10-11T12:52:09Z in response to SystemAdminThe problem 1 is solved, in application.xml there was the parameter request, but in workflow.xml there was no <arg> tag using it. In the WordCount application there's no such a tag, maybe because it's a mapreduce application and not a Java-main one, although it has a main method too.
tfriedr 1100005PSS28 PostsACCEPTED ANSWER
Re: Run single node application in BigInsights and emtpy args2012-10-11T23:27:26Z in response to SystemAdminThe Application publish wizard provides a way to create a Jar during publish. On the last page of the publish wizard, there is a Create Jar button which will launch the Jar export wizard from Eclipse. To save the Jar file within the project, set the Jar file location to <project_name>/<jar_name>. Once the Jar was created, back in the publish wizard, click Add... to add the Jar to the application.
Re: Run single node application in BigInsights and emtpy args2012-10-12T10:24:14Z in response to SystemAdminOk, thanks.
I saw there's a REST interface to publish and run applications, so I could use it to make the publication a quick process, but it needs a zip file. Is that the BIApp.zip file generated by Eclipse? Is there a documentation about it' structure ?