address comments

This commit is contained in:
Jeff Zhang 2017-11-12 09:18:41 +08:00
parent 7e885bd388
commit a87c4250f9
2 changed files with 4 additions and 2 deletions

View file

@ -39,7 +39,7 @@ public class ZeppelinDevServer extends
private DevInterpreter interpreter = null;
private InterpreterOutput out;
public ZeppelinDevServer(int port) throws TException, IOException {
super(null, port, "");
super(null, port, ":");
}
@Override

View file

@ -29,6 +29,8 @@ import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Collections;
import org.apache.commons.lang.StringUtils;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
@ -70,7 +72,7 @@ public class RemoteInterpreterUtils {
TServerSocket tSocket = null;
// ':' is the default value which means no constraints on the portRange
if (portRange == null || portRange.equals(":")) {
if (StringUtils.isBlank(portRange) || portRange.equals(":")) {
try {
tSocket = new TServerSocket(0);
return tSocket;