Add the missed file in commit r1499029
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1499041 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
37f587563a
commit
70e9e58ff3
@ -50,7 +50,6 @@ public MountdBase(List<String> exports, RpcProgram program) throws IOException {
|
|||||||
|
|
||||||
/* Start UDP server */
|
/* Start UDP server */
|
||||||
private void startUDPServer() {
|
private void startUDPServer() {
|
||||||
rpcProgram.register(PortmapMapping.TRANSPORT_UDP);
|
|
||||||
SimpleUdpServer udpServer = new SimpleUdpServer(rpcProgram.getPort(),
|
SimpleUdpServer udpServer = new SimpleUdpServer(rpcProgram.getPort(),
|
||||||
rpcProgram, 1);
|
rpcProgram, 1);
|
||||||
udpServer.run();
|
udpServer.run();
|
||||||
@ -58,14 +57,17 @@ private void startUDPServer() {
|
|||||||
|
|
||||||
/* Start TCP server */
|
/* Start TCP server */
|
||||||
private void startTCPServer() {
|
private void startTCPServer() {
|
||||||
rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
|
|
||||||
SimpleTcpServer tcpServer = new SimpleTcpServer(rpcProgram.getPort(),
|
SimpleTcpServer tcpServer = new SimpleTcpServer(rpcProgram.getPort(),
|
||||||
rpcProgram, 1);
|
rpcProgram, 1);
|
||||||
tcpServer.run();
|
tcpServer.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start(boolean register) {
|
||||||
startUDPServer();
|
startUDPServer();
|
||||||
startTCPServer();
|
startTCPServer();
|
||||||
|
if (register) {
|
||||||
|
rpcProgram.register(PortmapMapping.TRANSPORT_UDP);
|
||||||
|
rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,12 @@ protected Nfs3Base(MountdBase mountd, RpcProgram program) {
|
|||||||
this.rpcProgram = program;
|
this.rpcProgram = program;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start(boolean register) {
|
||||||
mountd.start(); // Start mountd
|
mountd.start(register); // Start mountd
|
||||||
rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
|
|
||||||
startTCPServer(); // Start TCP server
|
startTCPServer(); // Start TCP server
|
||||||
|
if (register) {
|
||||||
|
rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startTCPServer() {
|
private void startTCPServer() {
|
||||||
|
@ -96,6 +96,22 @@ public Nfs3FileAttributes(boolean isDir, int nlink, short mode, int uid,
|
|||||||
this.ctime = this.mtime;
|
this.ctime = this.mtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Nfs3FileAttributes(Nfs3FileAttributes other) {
|
||||||
|
this.type = other.getType();
|
||||||
|
this.mode = other.getMode();
|
||||||
|
this.nlink = other.getNlink();
|
||||||
|
this.uid = other.getUid();
|
||||||
|
this.gid = other.getGid();
|
||||||
|
this.size = other.getSize();
|
||||||
|
this.used = other.getUsed();
|
||||||
|
this.rdev = new Specdata3();
|
||||||
|
this.fsid = other.getFsid();
|
||||||
|
this.fileid = other.getFileid();
|
||||||
|
this.mtime = new NfsTime(other.getMtime());
|
||||||
|
this.atime = new NfsTime(other.getAtime());
|
||||||
|
this.ctime = new NfsTime(other.getCtime());
|
||||||
|
}
|
||||||
|
|
||||||
public void serialize(XDR xdr) {
|
public void serialize(XDR xdr) {
|
||||||
xdr.writeInt(type);
|
xdr.writeInt(type);
|
||||||
xdr.writeInt(mode);
|
xdr.writeInt(mode);
|
||||||
|
@ -61,6 +61,7 @@ public static class DirList3 {
|
|||||||
|
|
||||||
public DirList3(Entry3[] entries, boolean eof) {
|
public DirList3(Entry3[] entries, boolean eof) {
|
||||||
this.entries = ObjectArrays.newArray(entries, entries.length);
|
this.entries = ObjectArrays.newArray(entries, entries.length);
|
||||||
|
System.arraycopy(this.entries, 0, entries, 0, entries.length);
|
||||||
this.eof = eof;
|
this.eof = eof;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ public static class DirListPlus3 {
|
|||||||
|
|
||||||
public DirListPlus3(EntryPlus3[] entries, boolean eof) {
|
public DirListPlus3(EntryPlus3[] entries, boolean eof) {
|
||||||
this.entries = ObjectArrays.newArray(entries, entries.length);
|
this.entries = ObjectArrays.newArray(entries, entries.length);
|
||||||
|
System.arraycopy(this.entries, 0, entries, 0, entries.length);
|
||||||
this.eof = eof;
|
this.eof = eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +92,11 @@
|
|||||||
<artifactId>hadoop-auth</artifactId>
|
<artifactId>hadoop-auth</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
<artifactId>hadoop-nfs</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-hdfs</artifactId>
|
<artifactId>hadoop-hdfs</artifactId>
|
||||||
|
Loading…
Reference in New Issue
Block a user