Surendra Kumar

Ranch Hand
+ Follow
since Jul 04, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
14
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Surendra Kumar

Hadoop is basically for batch processing. Hadoop jobs (MapReduce, Hive, or PIG) take minutes to hours to complete depending on the data size.
The next gen tools like Spark can be used for fast in-memory processing.

You may run batch jobs and data generated on HDFS can be exposed as a service using HDFS FileSystem Java APIs.
This would be just like any other service.
You can make it a REST or SOAP service and deploy on to a server like Tomcat.

8 years ago

Surendra Kumar wrote:You may static variables and finally override the cleanup() method to finally write the word that max length.


I mean to say, use map to output word and its length; and then in reduce, use static variables for max length, and compute max length of word from input, and finally write the output in cleanup() method.
9 years ago
You may static variables and finally override the cleanup() method to finally write the word that max length.
9 years ago
When you hit enter, the form's action is triggered based on the method attribute. And that actions should support both GET and POST methods.
If not you would get that error.

So to fix, change method attribute in form to correct value.
Or change controller to accept both methods.
9 years ago
Spring MVC (Spring Web MVC) is only for web applications.
If yours is not a web app, you don't need to use it.
9 years ago
What Spring version does the book cover?
Also, what modules of Spring does it cover? Like Spring Security, Data, etc...
9 years ago
Isn't URL based security only for web applications?
What do you use for non-web applications?
9 years ago
XML namespace for 'mybatis' seems to be missing. Try adding this.

9 years ago
What are the reasons for not using EJB much?
Is it only because of expensive containers?
Yes, you can add security to REST. You may look at Spring Security.
9 years ago

Siddharth Bhargava wrote:
try{
ApplicationContext ctx = new ClassPathXmlApplicationContext(SPRING_XML);
} catch(Exception e) {
e.printstacktrace();
}



That works.

But those initialization exception are fatal and need not be checked.
You don't need to do that.
9 years ago
Yes, you're right. You may get BeanCreationException if there is any problem in creating those beans, and you can catch that in the main method.

See this post.
9 years ago
You don't get any exceptions in xml files.

You get database exception in DAO and you can catch them in service layer (where you call DAO methods), as mentioned above, and catch DataAccessException.

Similarly you may get MailException in code where you are sending mail. You catch it there, log it, and take appropriate action (like passing a meaningful message to top layer (main method)).
9 years ago