1 Star 1 Fork 2

MnTingge/nfs-client-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

EMC NFS Java Client

Description

This project is an NFS Java client, with some extra abstraction to allow extensions to handle other NFS versions (it currently handles only NFS v3). The package com.emc.ecs.nfsclient.nfs has generic classes and interfaces, while com.emc.ecs.nfsclient.nfs.nfs3 has the NFS Version 3 implementation based on RFC 1813 (https://tools.ietf.org/html/rfc1813). For full details on the semantics of these calls and the allowed parameter values, please consult the RFC.

The project also includes NFS equivalents to java.io.File and related functionality. The classes for this, both the generic and the NFS3-specific versions, are in the package com.emc.ecs.nfsclient.nfs.io.

Installation

You can download the library as a Maven dependency from Maven Central Repository:

<dependency>
    <groupId>com.emc.ecs</groupId>
    <artifactId>nfs-client</artifactId>
    <version>1.0.3</version>
</dependency>

You can also use it as a Gradle dependency:

compile group: 'com.emc.ecs', name: 'nfs-client', version: '1.0.3'

How to build the client

To build and fully test this code, you will need to set up an NFS export that can be used for unit testing, and add the parameters for this export to test.properties. The test client will need read/write access to this share. If you do not do this, you can still build the client, but most of the JUnit tests will be skipped.

How to import into eclipse and IDEA

To import the code into eclipse or IDEA, you will need to create a gradle.properties file in the folder ~/.gradle. This file will need to define the following values.

# path to Java 6 jre/lib (if installed)
#java6Lib=
java7Lib=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib
# set these if you plan on publishing. note: you will be prompted for passwords if necessary
sonatypeUsername=
githubUsername=
gitUsername=
# Located on the signing server. KeyId can be found using gpg --list-keys
signingKeyId=
signingSecretKeyRingFile=

How to use the bare client

The Nfs client instances provide both direct and lightly wrapped access to all NFS functionality. Working examples for how to instantiate an Nfs3 client and how to exercise most NFS functionality are available in the JUnit tests. Test_Nfs3.java

How to use the NfsFile instances

The NfsFile instances provide file-based access to NFS functionality, including caching of repeatedly used data to minimize the number of remote calls. Working examples for how to instantiate Nfs3File instances and how to exercise most NfsFile functionality are available in the JUnit tests. Test_Nfs3File.java.

How to use the NfsFileInputStream and NfsFileOutputStream instances

The NfsFileInputStream and NfsFileOutputStream instances provide easy access to NFS IO functionality, and include optimizations of buffer sizes. Working examples for how to instantiate NfsFileInputStream and NfsFileOutputStream instances and how to exercise most NFS IO functionality are available in the JUnit tests. Test_Streams.java.

How to use the tools jar

The tools jar currently contains only functionality for load testing NFS client IO functionality, as this is the most likely bottleneck. Working examples of how to exercise this code are available in the tools jar JUnit tests. Test_LoadTest.java.

Copyright 2016#if($today.year > 2016)-$today.year#end, Dell Inc. or its subsidiaries. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use these files except in compliance with the License. A copy of the License is located at http://www.apache.org/licenses/LICENSE-2.0.txt or in the "license" file accompanying these files. These files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

Native Java NFS client 展开 收起
README
Apache-2.0
取消

发行版

暂无发行版

贡献者 (5)

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/MnTingge/nfs-client-java.git
git@gitee.com:MnTingge/nfs-client-java.git
MnTingge
nfs-client-java
nfs-client-java
master

搜索帮助