@ThreadSafe public final class GrpcUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Scope |
combine(Scope scope1,
Scope scope2) |
static boolean |
contains(Scope source,
Scope target) |
static MountPOptions |
fromMountEntry(File.AddMountPointEntry mountEntryPoint)
Creates mount proto options from
File.AddMountPointEntry . |
static BlockInfo |
fromProto(BlockInfo blockPInfo)
Converts a proto type to a wire type.
|
static BlockLocation |
fromProto(BlockLocation blockPLocation)
Converts a proto type to a wire type.
|
static FileBlockInfo |
fromProto(FileBlockInfo fileBlockPInfo)
Converts a proto type to a wire type.
|
static FileInfo |
fromProto(FileInfo pInfo)
Converts a proto type to a wire type.
|
static DescendantType |
fromProto(LoadDescendantPType pDescendantType)
Converts a proto type to a wire type.
|
static TieredIdentity.LocalityTier |
fromProto(LocalityTier localityPTier)
Converts a proto type to a wire type.
|
static MountPointInfo |
fromProto(MountPointInfo mountPointPInfo)
Converts a proto type to a wire type.
|
static AccessControlList |
fromProto(PAcl pAcl) |
static AclAction |
fromProto(PAclAction pAction) |
static AclEntry |
fromProto(PAclEntry pAclEntry) |
static AclEntryType |
fromProto(PAclEntryType pAclEntryType) |
static TieredIdentity |
fromProto(TieredIdentity tieredPIdentity)
Converts a proto type to a wire type.
|
static WorkerInfo |
fromProto(WorkerInfo workerInfo)
Converts a proto type to a wire type.
|
static WorkerNetAddress |
fromProto(WorkerNetAddress workerNetPAddress)
Converts a proto type to a wire type.
|
static InetSocketAddress[] |
netAddressToSocketAddress(List<NetAddress> request)
Convert a list of
NetAddress to InetSocketAddress . |
static GetStatusPOptions |
toGetStatusOptions(ExistsPOptions existsOptions)
Converts from proto type to options.
|
static PAcl |
toProto(AccessControlList acl) |
static PAclAction |
toProto(AclAction action) |
static PAclEntry |
toProto(AclEntry aclEntry) |
static PAclEntryType |
toProto(AclEntryType aclEntryType) |
static BlockInfo |
toProto(BlockInfo blockInfo)
Converts wire type to proto type.
|
static BlockLocation |
toProto(BlockLocation blockLocation)
Converts wire type to proto type.
|
static CommandType |
toProto(CommandType commandType) |
static PAcl |
toProto(DefaultAccessControlList defaultAcl) |
static LoadDescendantPType |
toProto(DescendantType loadDescendantType)
Converts options to proto type.
|
static FileBlockInfo |
toProto(FileBlockInfo fileBlockInfo)
Converts wire type to proto type.
|
static FileInfo |
toProto(FileInfo fileInfo)
Converts a wire type to a proto type.
|
static FileSystemCommand |
toProto(FileSystemCommand fsCommand) |
static LoadMetadataPType |
toProto(LoadMetadataType loadMetadataType)
Converts options to proto type.
|
static GetRegisterLeasePResponse |
toProto(long workerId,
Optional<RegisterLease> lease) |
static MountPointInfo |
toProto(MountPointInfo info)
Converts wire type to proto type.
|
static PersistFile |
toProto(PersistFile persistFile) |
static LocalityTier |
toProto(TieredIdentity.LocalityTier localityTier)
Converts wire type to proto type.
|
static TieredIdentity |
toProto(TieredIdentity tieredIdentity)
Converts wire type to proto type.
|
static UfsInfo |
toProto(UfsInfo ufsInfo) |
static WorkerInfo |
toProto(WorkerInfo workerInfo)
Converts wire type to proto type.
|
static WorkerNetAddress |
toProto(WorkerNetAddress workerNetAddress)
Converts wire type to proto type.
|
public static GetStatusPOptions toGetStatusOptions(ExistsPOptions existsOptions)
existsOptions
- the proto options to convertpublic static MountPOptions fromMountEntry(File.AddMountPointEntry mountEntryPoint)
File.AddMountPointEntry
.mountEntryPoint
- mount point entrypublic static AccessControlList fromProto(PAcl pAcl)
pAcl
- the proto representationAccessControlList
instance created from the proto representationpublic static AclEntry fromProto(PAclEntry pAclEntry)
pAclEntry
- the proto representationAclEntry
instance created from the proto representationpublic static AclAction fromProto(PAclAction pAction)
pAction
- the proto representationAclAction
created from the proto representationpublic static AclEntryType fromProto(PAclEntryType pAclEntryType)
pAclEntryType
- the proto representationAclEntryType
created from the proto representationpublic static BlockLocation fromProto(BlockLocation blockPLocation)
blockPLocation
- the proto type to convertpublic static BlockInfo fromProto(BlockInfo blockPInfo)
blockPInfo
- the proto type to convertpublic static DescendantType fromProto(LoadDescendantPType pDescendantType)
pDescendantType
- the proto representation of a descendant typepublic static FileInfo fromProto(FileInfo pInfo)
pInfo
- the proto representation of a file informationpublic static FileBlockInfo fromProto(FileBlockInfo fileBlockPInfo)
fileBlockPInfo
- the proto type to convertpublic static TieredIdentity fromProto(TieredIdentity tieredPIdentity)
tieredPIdentity
- the proto type to convertpublic static TieredIdentity.LocalityTier fromProto(LocalityTier localityPTier)
localityPTier
- the proto type to convertpublic static MountPointInfo fromProto(MountPointInfo mountPointPInfo)
mountPointPInfo
- the proto type to convertpublic static WorkerInfo fromProto(WorkerInfo workerInfo)
workerInfo
- the proto type to convertpublic static WorkerNetAddress fromProto(WorkerNetAddress workerNetPAddress)
workerNetPAddress
- the proto type to convertpublic static PAcl toProto(AccessControlList acl)
acl
- the access control list to convertpublic static PAcl toProto(DefaultAccessControlList defaultAcl)
defaultAcl
- the default access control list to convertpublic static PAclAction toProto(AclAction action)
action
- the acl action to convertpublic static PAclEntry toProto(AclEntry aclEntry)
aclEntry
- the acl entry to convertpublic static PAclEntryType toProto(AclEntryType aclEntryType)
aclEntryType
- the acl entry type to convertpublic static BlockInfo toProto(BlockInfo blockInfo)
blockInfo
- the wire type to convertpublic static BlockLocation toProto(BlockLocation blockLocation)
blockLocation
- the wire type to convertpublic static FileInfo toProto(FileInfo fileInfo)
fileInfo
- the wire representation of a file informationpublic static FileBlockInfo toProto(FileBlockInfo fileBlockInfo)
fileBlockInfo
- the wire representation to convertpublic static LoadMetadataPType toProto(LoadMetadataType loadMetadataType)
loadMetadataType
- the LoadMetadataType
public static LoadDescendantPType toProto(DescendantType loadDescendantType)
loadDescendantType
- the DescendantType
public static LocalityTier toProto(TieredIdentity.LocalityTier localityTier)
localityTier
- the wire representation to convertpublic static MountPointInfo toProto(MountPointInfo info)
info
- the wire representation to convertpublic static TieredIdentity toProto(TieredIdentity tieredIdentity)
tieredIdentity
- the wire representation to convertpublic static WorkerInfo toProto(WorkerInfo workerInfo)
workerInfo
- the wire representation to convertpublic static WorkerNetAddress toProto(WorkerNetAddress workerNetAddress)
workerNetAddress
- the wire representation to convertpublic static CommandType toProto(CommandType commandType)
commandType
- wire typepublic static PersistFile toProto(PersistFile persistFile)
persistFile
- wire typepublic static FileSystemCommand toProto(FileSystemCommand fsCommand)
fsCommand
- wire typepublic static UfsInfo toProto(UfsInfo ufsInfo)
ufsInfo
- wire typepublic static GetRegisterLeasePResponse toProto(long workerId, Optional<RegisterLease> lease)
workerId
- the worker that requests a leaselease
- the lease decision from the masterGetRegisterLeasePResponse
public static boolean contains(Scope source, Scope target)
source
- source enumtarget
- target enumpublic static Scope combine(Scope scope1, Scope scope2)
scope1
- source1scope2
- source2public static InetSocketAddress[] netAddressToSocketAddress(List<NetAddress> request) throws UnknownHostException
NetAddress
to InetSocketAddress
.request
- the net addressesUnknownHostException
Copyright © 2023. All Rights Reserved.