I'm trying to create a directory using the "hdfs dfs -mkdir /user/19491/testfolder" with the following code:
formattedSeconds =(double) miliseconds / 1000;
After running this code, the folder is created but the exit status returned is -1. Which according to this link suggests a error. Why is this so? The folder is created so shouldn't it return 0?
答案 0 :(得分:0)
(假设您正在使用jsch)getExitStatus
在命令尚未完成时返回-1。
http://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/Channel.html#getExitStatus()
我认为在hdfs
命令完成之前会稍微调用该函数。此example会一直等到频道关闭。