StorageInfo.java
上传用户:quxuerui
上传日期:2018-01-08
资源大小:41811k
文件大小:1k
- package org.apache.hadoop.hdfs.server.common;
- /**
- * Common class for storage information.
- *
- * TODO namespaceID should be long and computed as hash(address + port)
- */
- public class StorageInfo {
- public int layoutVersion; // Version read from the stored file.
- public int namespaceID; // namespace id of the storage
- public long cTime; // creation timestamp
-
- public StorageInfo () {
- this(0, 0, 0L);
- }
-
- public StorageInfo(int layoutV, int nsID, long cT) {
- layoutVersion = layoutV;
- namespaceID = nsID;
- cTime = cT;
- }
-
- public StorageInfo(StorageInfo from) {
- setStorageInfo(from);
- }
- public int getLayoutVersion(){ return layoutVersion; }
- public int getNamespaceID() { return namespaceID; }
- public long getCTime() { return cTime; }
- public void setStorageInfo(StorageInfo from) {
- layoutVersion = from.layoutVersion;
- namespaceID = from.namespaceID;
- cTime = from.cTime;
- }
- }