Hi there:
i got two questions:
Q1:
I am try to call the FsShell.doMain() with my own code , which is only
a easy wrapper of the FsShell.
But when i am trying to create many dirs , 10000 etc. Exception like "Not
enough memory for more threads" throw , i have set the -Xmx512m.
Then i trying to view the process info while the program running , then
i found there are more and more threads invoked during the process , and eat
more and more memory ,all threads still there without exit.
Then i came to the source code , and found that while the FsShell.Main()
for terminal call there is one line "System.exit(return_value_of_doMain)" ,
Is that mean the call of the ToolBase.run() which implemented in
FsShell.java is always create a new thread and have to be force terminated
by System.exit() to kill the process ?
So , if that is , how can i write my own code to use hadoop with FsShell
in multi-thread mode , or is there any other way to do this ?
Q2:
I svn code , and run it in eclipse [the only reason i refer to eclipse
is to indicate my environment],
under Unbuntu 7.04.
all about casual , i want to see how much time the FsShell.doMain()
take , I use "new Date()" and
get the interval with "DateEnd.getTime() - DateBeg.getTime()"
Then i found that: even mkdir take more then 1000 [getTime shows]
if there's no arguments , it take 25 , but even if i just give it a wrong
argument , such as "-sl", it take more than 1000 , is that means the
argument check take most of the time cost?
--
View this message in context:
http://www.nabble.com/Calling-FsShell.doMain%28%29-hold-so-many-threads-tf4133557.html#a11756139
Sent from the Hadoop Users mailing list archive at Nabble.com.