本文整理汇总了Java中org.apache.hadoop.nfs.NfsTime类的典型用法代码示例。如果您正苦于以下问题:Java NfsTime类的具体用法?Java NfsTime怎么用?Java NfsTime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NfsTime类属于org.apache.hadoop.nfs包,在下文中一共展示了NfsTime类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: FSINFO3Response
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public FSINFO3Response(int status, Nfs3FileAttributes postOpAttr, int rtmax,
int rtpref, int rtmult, int wtmax, int wtpref, int wtmult, int dtpref,
long maxFileSize, NfsTime timeDelta, int properties) {
super(status);
this.postOpAttr = postOpAttr;
this.rtmax = rtmax;
this.rtpref = rtpref;
this.rtmult = rtmult;
this.wtmax = wtmax;
this.wtpref = wtpref;
this.wtmult = wtmult;
this.dtpref = dtpref;
this.maxFileSize = maxFileSize;
this.timeDelta = timeDelta;
this.properties = properties;
}
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:FSINFO3Response.java
示例2: Nfs3FileAttributes
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public Nfs3FileAttributes(NfsFileType nfsType, int nlink, short mode, int uid,
int gid, long size, long fsid, long fileId, long mtime, long atime, Specdata3 rdev) {
this.type = nfsType.toValue();
this.mode = mode;
this.nlink = nlink;
this.uid = uid;
this.gid = gid;
this.size = size;
this.used = this.size;
this.rdev = new Specdata3();
this.fsid = fsid;
this.fileId = fileId;
this.mtime = new NfsTime(mtime);
this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
this.ctime = this.mtime;
this.rdev = rdev;
}
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:Nfs3FileAttributes.java
示例3: deserialize
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public static Nfs3FileAttributes deserialize(XDR xdr) {
Nfs3FileAttributes attr = new Nfs3FileAttributes();
attr.type = xdr.readInt();
attr.mode = xdr.readInt();
attr.nlink = xdr.readInt();
attr.uid = xdr.readInt();
attr.gid = xdr.readInt();
attr.size = xdr.readHyper();
attr.used = xdr.readHyper();
attr.rdev = new Specdata3(xdr.readInt(), xdr.readInt());
attr.fsid = xdr.readHyper();
attr.fileId = xdr.readHyper();
attr.atime = NfsTime.deserialize(xdr);
attr.mtime = NfsTime.deserialize(xdr);
attr.ctime = NfsTime.deserialize(xdr);
return attr;
}
开发者ID:naver,项目名称:hadoop,代码行数:18,代码来源:Nfs3FileAttributes.java
示例4: Nfs3FileAttributes
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public Nfs3FileAttributes(NfsFileType nfsType, int nlink, short mode, int uid,
int gid, long size, long fsid, long fileId, long mtime, long atime) {
this.type = nfsType.toValue();
this.mode = mode;
this.nlink = (type == NfsFileType.NFSDIR.toValue()) ? (nlink + 2) : 1;
this.uid = uid;
this.gid = gid;
this.size = size;
if(type == NfsFileType.NFSDIR.toValue()) {
this.size = getDirSize(nlink);
}
this.used = this.size;
this.rdev = new Specdata3();
this.fsid = fsid;
this.fileId = fileId;
this.mtime = new NfsTime(mtime);
this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
this.ctime = this.mtime;
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:20,代码来源:Nfs3FileAttributes.java
示例5: deserialize
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public static Nfs3FileAttributes deserialize(XDR xdr) {
Nfs3FileAttributes attr = new Nfs3FileAttributes();
attr.type = xdr.readInt();
attr.mode = xdr.readInt();
attr.nlink = xdr.readInt();
attr.uid = xdr.readInt();
attr.gid = xdr.readInt();
attr.size = xdr.readHyper();
attr.used = xdr.readHyper();
// Ignore rdev
xdr.readInt();
xdr.readInt();
attr.rdev = new Specdata3();
attr.fsid = xdr.readHyper();
attr.fileId = xdr.readHyper();
attr.atime = NfsTime.deserialize(xdr);
attr.mtime = NfsTime.deserialize(xdr);
attr.ctime = NfsTime.deserialize(xdr);
return attr;
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:21,代码来源:Nfs3FileAttributes.java
示例6: Nfs3FileAttributes
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public Nfs3FileAttributes(boolean isDir, int nlink, short mode, int uid,
int gid, long size, long fsid, long fileid, long mtime, long atime) {
this.type = isDir ? NfsFileType.NFSDIR.toValue() : NfsFileType.NFSREG
.toValue();
this.mode = mode;
this.nlink = isDir ? (nlink + 2) : 1;
this.uid = uid;
this.gid = gid;
this.size = size;
if(isDir) {
this.size = getDirSize(nlink);
}
this.used = this.size;
this.rdev = new Specdata3();
this.fsid = fsid;
this.fileid = fileid;
this.mtime = new NfsTime(mtime);
this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
this.ctime = this.mtime;
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:21,代码来源:Nfs3FileAttributes.java
示例7: deserialize
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public static Nfs3FileAttributes deserialize(XDR xdr) {
Nfs3FileAttributes attr = new Nfs3FileAttributes();
attr.type = xdr.readInt();
attr.mode = xdr.readInt();
attr.nlink = xdr.readInt();
attr.uid = xdr.readInt();
attr.gid = xdr.readInt();
attr.size = xdr.readHyper();
attr.used = xdr.readHyper();
// Ignore rdev
xdr.readInt();
xdr.readInt();
attr.rdev = new Specdata3();
attr.fsid = xdr.readHyper();
attr.fileid = xdr.readHyper();
attr.atime = NfsTime.deserialize(xdr);
attr.mtime = NfsTime.deserialize(xdr);
attr.ctime = NfsTime.deserialize(xdr);
return attr;
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:21,代码来源:Nfs3FileAttributes.java
示例8: Nfs3FileAttributes
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public Nfs3FileAttributes(NfsFileType nfsType, int nlink, short mode, int uid,
int gid, long size, long fsid, long fileid, long mtime, long atime) {
this.type = nfsType.toValue();
this.mode = mode;
this.nlink = (type == NfsFileType.NFSDIR.toValue()) ? (nlink + 2) : 1;
this.uid = uid;
this.gid = gid;
this.size = size;
if(type == NfsFileType.NFSDIR.toValue()) {
this.size = getDirSize(nlink);
}
this.used = this.size;
this.rdev = new Specdata3();
this.fsid = fsid;
this.fileid = fileid;
this.mtime = new NfsTime(mtime);
this.atime = atime != 0 ? new NfsTime(atime) : this.mtime;
this.ctime = this.mtime;
}
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:20,代码来源:Nfs3FileAttributes.java
示例9: getWccAttr
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public static WccAttr getWccAttr(DFSClient client, String fileIdPath)
throws IOException {
HdfsFileStatus fstat = getFileStatus(client, fileIdPath);
if (fstat == null) {
return null;
}
long size = fstat.isDir() ? getDirSize(fstat.getChildrenNum()) : fstat
.getLen();
return new WccAttr(size, new NfsTime(fstat.getModificationTime()),
new NfsTime(fstat.getModificationTime()));
}
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:Nfs3Utils.java
示例10: deserialize
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public static SETATTR3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
SetAttr3 attr = new SetAttr3();
attr.deserialize(xdr);
boolean check = xdr.readBoolean();
NfsTime ctime;
if (check) {
ctime = NfsTime.deserialize(xdr);
} else {
ctime = null;
}
return new SETATTR3Request(handle, attr, check, ctime);
}
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:SETATTR3Request.java
示例11: SETATTR3Request
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public SETATTR3Request(FileHandle handle, SetAttr3 attr, boolean check,
NfsTime ctime) {
super(handle);
this.attr = attr;
this.check = check;
this.ctime = ctime;
}
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:SETATTR3Request.java
示例12: SetAttr3
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public SetAttr3(int mode, int uid, int gid, long size, NfsTime atime,
NfsTime mtime, EnumSet<SetAttrField> updateFields) {
this.mode = mode;
this.uid = uid;
this.gid = gid;
this.size = size;
this.updateFields = updateFields;
}
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:SetAttr3.java
示例13: deserialize
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
public static FSINFO3Response deserialize(XDR xdr) {
int status = xdr.readInt();
xdr.readBoolean();
Nfs3FileAttributes postOpObjAttr = Nfs3FileAttributes.deserialize(xdr);
int rtmax = 0;
int rtpref = 0;
int rtmult = 0;
int wtmax = 0;
int wtpref = 0;
int wtmult = 0;
int dtpref = 0;
long maxFileSize = 0;
NfsTime timeDelta = null;
int properties = 0;
if (status == Nfs3Status.NFS3_OK) {
rtmax = xdr.readInt();
rtpref = xdr.readInt();
rtmult = xdr.readInt();
wtmax = xdr.readInt();
wtpref = xdr.readInt();
wtmult = xdr.readInt();
dtpref = xdr.readInt();
maxFileSize = xdr.readHyper();
timeDelta = NfsTime.deserialize(xdr);
properties = xdr.readInt();
}
return new FSINFO3Response(status, postOpObjAttr, rtmax, rtpref, rtmult,
wtmax, wtpref, wtmult, dtpref, maxFileSize, timeDelta, properties);
}
开发者ID:naver,项目名称:hadoop,代码行数:32,代码来源:FSINFO3Response.java
示例14: testSerializeDeserialize
import org.apache.hadoop.nfs.NfsTime; //导入依赖的package包/类
@Test
public void testSerializeDeserialize() {
// Serialize NfsTime
NfsTime t1 = new NfsTime(1001);
XDR xdr = new XDR();
t1.serialize(xdr);
// Deserialize it back
NfsTime t2 = NfsTime.deserialize(xdr.asReadOnlyWrap());
// Ensure the NfsTimes are equal
Assert.assertEquals(t1, t2);
}
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TestNfsTime.java
注:本文中的org.apache.hadoop.nfs.NfsTime类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论