syntax = "proto3"; package cuddlyproto; enum StatusEnum { OK = 0; E_UNKWN = 1; // Unknown error E_NOENT = 2; // File does not exist E_NOBLK = 3; // Block does not exist E_EXIST = 4; // File already exists E_IO = 5; // I/O Error E_INVAL = 6; // Invalid arguments E_BUSY = 7; // File is being written to } // Represents an error message with a code and description message StatusCode { bool success = 1; StatusEnum code = 2; string message = 3; } ///Common node information shared by all the nodes in the cluster message StorageInfoProto { uint32 layoutVersion = 1; // Layout version of the file system uint32 namespaceID = 2; // File system namespace ID string clusterID = 3; // ID of the cluster uint64 creationTime = 4; // File system creation time } ///Block access token information message BlockKeyProto { uint32 keyId = 1; // Key identifier uint64 expiryDate = 2; // Expiry time in milliseconds bytes keyBytes = 3; // Key secret } ///Current key and set of block keys at the namenode. message ExportedBlockKeysProto { bool isBlockTokenEnabled = 1; uint64 keyUpdateInterval = 2; uint64 tokenLifeTime = 3; BlockKeyProto currentKey = 4; repeated BlockKeyProto allKeys = 5; } enum StorageTypeProto { DISK = 0; SSD = 1; ARCHIVE = 2; RAM_DISK = 3; PROVIDED = 4; NVDIMM = 5; } message DatanodeStorageProto { enum StorageState { NORMAL = 0; READ_ONLY_SHARED = 1; } string storageUuid = 1; StorageState state = 2; StorageTypeProto storageType = 3; } message StorageReportProto { DatanodeStorageProto storage = 1; bool failed = 2; uint64 capacity = 3; uint64 dfsUsed = 4; uint64 remaining = 5; uint64 blockPoolUsed = 6; uint64 nonDfsUsed = 7; string mount = 8; } message Block { string id = 1; uint64 len = 2; uint64 seq = 3; } message BlockWithLocations { Block block = 1; repeated string locations = 2; }