Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!

Chandrasekaran SanthanaKrishnan

+ Follow
since Mar 29, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chandrasekaran SanthanaKrishnan

In which scenario does Microservices architecture fit?

When we have a webservice doing different functionalities or when there is a set of RESTFUL services?
also which is the best devops strategy for Microservices on Cloud?

1 month ago
Probably this is late. So how did you actually design the appication in the end?
11 months ago
edited :

Chandrasekaran SanthanaKrishnan wrote:This was the regex used:

if((this.queryString.matches("(.*)/(.*)")) || (this.queryString.matches("(.*)+(.*)")))

We did test few scenarios. May be we did not have the right string that would cause a CPU spin. But we found that this LOC was causing problem in the ThreadDump.

when replaced with the following, it fixed the issue:

this.queryString.contains("/") || this.queryString.contains("+")

Thanks for the replies.

1 year ago
This was the regex used:


We did test few scenarios. May be we did not have the right string that would cause a CPU spin. But we found that this LOC was causing problem in the ThreadDump.

Thanks for the replies.
1 year ago
Recently a line of code using Regex caused problems. It actually spun up the server CPU to 100% whenever the LOC was executed.

why does this happen?
Is there a way to identify whether the regex will cause problems beforehand?
1 year ago

hbase, cassandra and mongodb

why did you choose these three DBs?

We have been using MarkLogic NoSQL DB. it will serve your purpose.
1 year ago
That sounds very practical and reasonable. Thanks for the response.
3 years ago

There are different kinds of applications used in an Enterprise. Is it a good option to move the entire set to cloud or do we need to move only certain applications? which is beneficial?
3 years ago
Andrew Monkhouse,

The first step I did after creating the java program was to run it from command prompt and test it.

It was working.

And I don't have to root access to this machine.
7 years ago
Hi stefan wagner,

'Not working' is a poor error description. What didn't work? Did you get an error message? Which? How did you experience that it didn't work? What result did you expect, what did you get?

Sorry for that vague reply.
I meant the solution did not workout.
I did not get any error message. I did not get the returned value in the variable in my script.
I expect a string to be returned from the class and that is not happening.

Backticks are deprecated (Ommm, Ommm) because you can't nest them easily. Since classes should wear uppercase initials, you call `java Test`, not `java test`.

The example i have quoted here has class name starting will small letters, but when I am trying here locally my class name is proper.

should be public
* named with capital T
* main method is empty - so nothing happens
* sample-method returns a String, but does no output.

yes for all the above lines.

7 years ago
anirudh jagithyala,

I did that exactly as you have said.

Its not working.
7 years ago
Thanks Tim.

I tried that diff for local directories.

Problem is dir B is in remote host.

I do not know if i can do NFS. If so how to do that?

is there any other way without NFS?
7 years ago
I have a requirement.
I need to write a shell script which will compare two directories residing in two different servers (SERVER A and SERVER B) and list out the discrepancies if found any.

directory structure is different in both the servers

dir structure in Server A - /home/dir/dir2
dir structure in Server B - /office/folder/subfolder/subsubfolder

Script will be working in SERVER A.

Please help.

Server A is Solaris OS.
7 years ago
I have a requirement where I am running a script and invoking a java program which will return a string (filename).

This returned value must be assigned to a local variable using which i have to find diff between two files.

saving output in a local file and then cat the file and assign it to variable is also not working.

below mentioned method is also not working:

please give a solution

ps: I am running the shell script on solaris OS.
7 years ago