mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
address code review comments
This commit is contained in:
parent
bdb4dcbbfa
commit
b6a957fd3e
2 changed files with 4 additions and 4 deletions
|
|
@ -283,13 +283,13 @@ public class YarnRemoteInterpreterProcess extends RemoteInterpreterProcess {
|
|||
} catch (URISyntaxException e) {
|
||||
throw new IOException("Invalid uri: " + distArchive, e);
|
||||
}
|
||||
if (distArchiveURI.getScheme() == null || "file".equals(distArchiveURI.getScheme())) {
|
||||
if ("file".equals(distArchiveURI.getScheme())) {
|
||||
// zeppelin.yarn.dist.archives is local file
|
||||
srcPath = localFs.makeQualified(new Path(distArchiveURI));
|
||||
destPath = copyFileToRemote(stagingDir, srcPath, (short) 1);
|
||||
} else {
|
||||
// zeppelin.yarn.dist.archives is files on any hadoop compatible file system
|
||||
destPath = new Path(removeLink(distArchive));
|
||||
destPath = new Path(removeFragment(distArchive));
|
||||
}
|
||||
String linkName = srcPath.getName();
|
||||
if (distArchiveURI.getFragment() != null) {
|
||||
|
|
@ -358,7 +358,7 @@ public class YarnRemoteInterpreterProcess extends RemoteInterpreterProcess {
|
|||
return amContainer;
|
||||
}
|
||||
|
||||
private String removeLink(String path) {
|
||||
private String removeFragment(String path) {
|
||||
int pos = path.lastIndexOf("#");
|
||||
if (pos != -1) {
|
||||
return path.substring(0, pos);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class NotebookSocket extends WebSocketAdapter {
|
|||
}
|
||||
|
||||
public synchronized void send(String serializeMessage) throws IOException {
|
||||
connection.getRemote().sendString(serializeMessage);
|
||||
connection.getRemote().sendStringByFuture(serializeMessage);
|
||||
}
|
||||
|
||||
public String getUser() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue