本文整理汇总了Java中org.apache.hadoop.hdfs.nfs.mount.Mountd类的典型用法代码示例。如果您正苦于以下问题:Java Mountd类的具体用法?Java Mountd怎么用?Java Mountd使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Mountd类属于org.apache.hadoop.hdfs.nfs.mount包,在下文中一共展示了Mountd类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testExportPoint
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
@Test
public void testExportPoint() throws IOException {
NfsConfiguration config = new NfsConfiguration();
MiniDFSCluster cluster = null;
String exportPoint = "/myexport1";
config.setStrings(NfsConfigKeys.DFS_NFS_EXPORT_POINT_KEY, exportPoint);
// Use emphral port in case tests are running in parallel
config.setInt("nfs3.mountd.port", 0);
config.setInt("nfs3.server.port", 0);
try {
cluster = new MiniDFSCluster.Builder(config).numDataNodes(1).build();
cluster.waitActive();
// Start nfs
final Nfs3 nfsServer = new Nfs3(config);
nfsServer.startServiceInternal(false);
Mountd mountd = nfsServer.getMountd();
RpcProgramMountd rpcMount = (RpcProgramMountd) mountd.getRpcProgram();
assertTrue(rpcMount.getExports().size() == 1);
String exportInMountd = rpcMount.getExports().get(0);
assertTrue(exportInMountd.equals(exportPoint));
} finally {
if (cluster != null) {
cluster.shutdown();
}
}
}
示例2: testExportPoint
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
@Test
public void testExportPoint() throws IOException {
Configuration config = new Configuration();
MiniDFSCluster cluster = null;
String exportPoint = "/myexport1";
config.setStrings(Nfs3Constant.EXPORT_POINT, exportPoint);
// Use emphral port in case tests are running in parallel
config.setInt("nfs3.mountd.port", 0);
config.setInt("nfs3.server.port", 0);
try {
cluster = new MiniDFSCluster.Builder(config).numDataNodes(1).build();
cluster.waitActive();
// Start nfs
final Nfs3 nfsServer = new Nfs3(config);
nfsServer.startServiceInternal(false);
Mountd mountd = nfsServer.getMountd();
RpcProgramMountd rpcMount = (RpcProgramMountd) mountd.getRpcProgram();
assertTrue(rpcMount.getExports().size() == 1);
String exportInMountd = rpcMount.getExports().get(0);
assertTrue(exportInMountd.equals(exportPoint));
} finally {
if (cluster != null) {
cluster.shutdown();
}
}
}
示例3: Nfs3
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
public Nfs3(NfsConfiguration conf, DatagramSocket registrationSocket,
boolean allowInsecurePorts) throws IOException {
super(RpcProgramNfs3.createRpcProgramNfs3(conf, registrationSocket,
allowInsecurePorts), conf);
mountd = new Mountd(conf, registrationSocket, allowInsecurePorts);
}
示例4: getMountd
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
public Mountd getMountd() {
return mountd;
}
示例5: Nfs3
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
public Nfs3(List<String> exports) throws IOException {
super(new Mountd(exports), new RpcProgramNfs3(exports));
}
示例6: Nfs3
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
public Nfs3(Configuration conf) throws IOException {
super(new RpcProgramNfs3(conf), conf);
mountd = new Mountd(conf);
}
示例7: Nfs3
import org.apache.hadoop.hdfs.nfs.mount.Mountd; //导入依赖的package包/类
public Nfs3(List<String> exports) throws IOException {
super(new Mountd(exports), new RpcProgramNfs3());
}