Class PBHelper
java.lang.Object
org.apache.hadoop.hdfs.protocolPB.PBHelper
Utilities for converting protobuf classes to and from implementation classes
and other helper utilities to help in dealing with protobuf.
Note that when converting from an internal type to protobuf type, the
converter never return null for protobuf type. The check for internal type
being null must be done before calling the convert() method.
For those helper methods that convert HDFS client-side data structures from
and to protobuf, see
PBHelperClient.-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto.Stateconvert(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState s) static FileRegionconvert(org.apache.hadoop.hdfs.protocol.proto.AliasMapProtocolProtos.KeyValueProto keyValueProto) static BalancerBandwidthCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BalancerBandwidthCommandProto balancerCmd) static BlockCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockCommandProto blkCmd) static BlockECReconstructionCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockECReconstructionCommandProto blkECReconstructionCmdProto) static BlockIdCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockIdCommandProto blkIdCmd) static BlockRecoveryCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockRecoveryCommandProto recoveryCmd) static BlockReportContextconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockReportContextProto proto) static DatanodeCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeCommandProto proto) static DatanodeRegistrationconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeRegistrationProto proto) static FinalizeCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.FinalizeCommandProto finalizeCmd) static KeyUpdateCommandconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.KeyUpdateCommandProto keyUpdateCmd) static ReceivedDeletedBlockInfoconvert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.ReceivedDeletedBlockInfoProto proto) static BlockKeyconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockKeyProto k) static BlocksWithLocationsconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlocksWithLocationsProto blocks) convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockWithLocationsProto b) static CheckpointSignatureconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.CheckpointSignatureProto s) static ExportedBlockKeysconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ExportedBlockKeysProto keys) static NamenodeCommandconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeCommandProto cmd) static NamenodeRegistrationconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto reg) convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto.NamenodeRoleProto role) static NamespaceInfoconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamespaceInfoProto info) static NNHAStatusHeartbeatconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto s) static org.apache.hadoop.ha.HAServiceProtocol.HAServiceStateconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto.State s) convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RecoveringBlockProto b) static RemoteEditLogManifestconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProto manifest) static RemoteEditLogconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogProto l) convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ReplicaStateProto state) static StorageInfoconvert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.StorageInfoProto info, HdfsServerConstants.NodeType type) static JournalInfoconvert(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalInfoProto info) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockKeyProtostatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ExportedBlockKeysProtoconvert(ExportedBlockKeys keys) static org.apache.hadoop.hdfs.protocol.proto.AliasMapProtocolProtos.KeyValueProtoconvert(FileRegion fileRegion) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto.NamenodeRoleProtostatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ReplicaStateProtostatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.StorageInfoProtoconvert(StorageInfo info) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.CheckpointSignatureProtostatic org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BalancerBandwidthCommandProtoconvert(BalancerBandwidthCommand bbCmd) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockCommandProtoconvert(BlockCommand cmd) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockECReconstructionCommandProtoconvert(BlockECReconstructionCommand blkECReconstructionCmd) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockIdCommandProtoconvert(BlockIdCommand cmd) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockRecoveryCommandProtostatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RecoveringBlockProtostatic org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockReportContextProtoconvert(BlockReportContext context) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlocksWithLocationsProtoconvert(BlocksWithLocations blks) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockWithLocationsProtostatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.CheckpointCommandProtoconvert(CheckpointCommand cmd) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeCommandProtoconvert(DatanodeCommand datanodeCommand) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeRegistrationProtoconvert(DatanodeRegistration registration) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.FinalizeCommandProtoconvert(FinalizeCommand cmd) static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalInfoProtoMethod used for convertingJournalProtocolProtos.JournalInfoProtosent from Namenode to Journal receivers toNamenodeRegistration.static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.KeyUpdateCommandProtoconvert(KeyUpdateCommand cmd) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeCommandProtoconvert(NamenodeCommand cmd) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProtostatic org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamespaceInfoProtoconvert(NamespaceInfo info) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProtostatic org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.ReceivedDeletedBlockInfoProtoconvert(ReceivedDeletedBlockInfo receivedDeletedBlockInfo) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogProtoconvert(RemoteEditLog log) static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProtoconvert(RemoteEditLogManifest manifest) convertBlockECReconstructionInfo(org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProto blockEcReconstructionInfoProto) static org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProtoconvertBlockECRecoveryInfo(BlockECReconstructionCommand.BlockECReconstructionInfo blockEcRecoveryInfo) static BlockKey[]convertBlockKeys(List<org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockKeyProto> list) static org.apache.hadoop.hdfs.server.protocol.SlowDiskReportsconvertSlowDiskInfo(List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowDiskReportProto> slowDiskProtos) static List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowDiskReportProto>convertSlowDiskInfo(org.apache.hadoop.hdfs.server.protocol.SlowDiskReports slowDisks) static org.apache.hadoop.hdfs.server.protocol.SlowPeerReportsconvertSlowPeerInfo(List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowPeerReportProto> slowPeerProtos) static List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowPeerReportProto>convertSlowPeerInfo(org.apache.hadoop.hdfs.server.protocol.SlowPeerReports slowPeers) static VolumeFailureSummaryconvertVolumeFailureSummary(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.VolumeFailureSummaryProto proto) static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.VolumeFailureSummaryProtoconvertVolumeFailureSummary(VolumeFailureSummary volumeFailureSummary)
-
Method Details
-
convert
public static HdfsServerConstants.NamenodeRole convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto.NamenodeRoleProto role) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto.NamenodeRoleProto convert(HdfsServerConstants.NamenodeRole role) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.StorageInfoProto convert(StorageInfo info) -
convert
public static StorageInfo convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.StorageInfoProto info, HdfsServerConstants.NodeType type) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto convert(NamenodeRegistration reg) -
convert
public static NamenodeRegistration convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeRegistrationProto reg) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockWithLocationsProto convert(BlocksWithLocations.BlockWithLocations blk) -
convert
public static BlocksWithLocations.BlockWithLocations convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockWithLocationsProto b) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlocksWithLocationsProto convert(BlocksWithLocations blks) -
convert
public static BlocksWithLocations convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlocksWithLocationsProto blocks) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockKeyProto convert(BlockKey key) -
convert
public static BlockKey convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.BlockKeyProto k) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ExportedBlockKeysProto convert(ExportedBlockKeys keys) -
convert
public static ExportedBlockKeys convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ExportedBlockKeysProto keys) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.CheckpointSignatureProto convert(CheckpointSignature s) -
convert
public static CheckpointSignature convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.CheckpointSignatureProto s) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogProto convert(RemoteEditLog log) -
convert
public static RemoteEditLog convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogProto l) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProto convert(RemoteEditLogManifest manifest) -
convert
public static RemoteEditLogManifest convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProto manifest) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.CheckpointCommandProto convert(CheckpointCommand cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeCommandProto convert(NamenodeCommand cmd) -
convertBlockKeys
-
convert
public static NamespaceInfo convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamespaceInfoProto info) -
convert
public static NamenodeCommand convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamenodeCommandProto cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RecoveringBlockProto convert(BlockRecoveryCommand.RecoveringBlock b) -
convert
public static BlockRecoveryCommand.RecoveringBlock convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RecoveringBlockProto b) -
convert
public static HdfsServerConstants.ReplicaState convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ReplicaStateProto state) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.ReplicaStateProto convert(HdfsServerConstants.ReplicaState state) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeRegistrationProto convert(DatanodeRegistration registration) -
convert
public static DatanodeRegistration convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeRegistrationProto proto) -
convert
public static DatanodeCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeCommandProto proto) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BalancerBandwidthCommandProto convert(BalancerBandwidthCommand bbCmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.KeyUpdateCommandProto convert(KeyUpdateCommand cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockRecoveryCommandProto convert(BlockRecoveryCommand cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.FinalizeCommandProto convert(FinalizeCommand cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockCommandProto convert(BlockCommand cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockIdCommandProto convert(BlockIdCommand cmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.DatanodeCommandProto convert(DatanodeCommand datanodeCommand) -
convert
public static KeyUpdateCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.KeyUpdateCommandProto keyUpdateCmd) -
convert
public static FinalizeCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.FinalizeCommandProto finalizeCmd) -
convert
public static BlockRecoveryCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockRecoveryCommandProto recoveryCmd) -
convert
public static BlockCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockCommandProto blkCmd) -
convert
public static BlockIdCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockIdCommandProto blkIdCmd) -
convert
public static BalancerBandwidthCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BalancerBandwidthCommandProto balancerCmd) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.ReceivedDeletedBlockInfoProto convert(ReceivedDeletedBlockInfo receivedDeletedBlockInfo) -
convert
public static ReceivedDeletedBlockInfo convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.ReceivedDeletedBlockInfoProto proto) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NamespaceInfoProto convert(NamespaceInfo info) -
convert
public static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto.State s) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto.State convert(org.apache.hadoop.ha.HAServiceProtocol.HAServiceState s) -
convert
public static NNHAStatusHeartbeat convert(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto s) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb) -
convertVolumeFailureSummary
public static VolumeFailureSummary convertVolumeFailureSummary(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.VolumeFailureSummaryProto proto) -
convertVolumeFailureSummary
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.VolumeFailureSummaryProto convertVolumeFailureSummary(VolumeFailureSummary volumeFailureSummary) -
convertSlowPeerInfo
public static List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowPeerReportProto> convertSlowPeerInfo(org.apache.hadoop.hdfs.server.protocol.SlowPeerReports slowPeers) -
convertSlowPeerInfo
public static org.apache.hadoop.hdfs.server.protocol.SlowPeerReports convertSlowPeerInfo(List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowPeerReportProto> slowPeerProtos) -
convertSlowDiskInfo
public static List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowDiskReportProto> convertSlowDiskInfo(org.apache.hadoop.hdfs.server.protocol.SlowDiskReports slowDisks) -
convertSlowDiskInfo
public static org.apache.hadoop.hdfs.server.protocol.SlowDiskReports convertSlowDiskInfo(List<org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.SlowDiskReportProto> slowDiskProtos) -
convert
public static JournalInfo convert(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalInfoProto info) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalInfoProto convert(JournalInfo j) Method used for convertingJournalProtocolProtos.JournalInfoProtosent from Namenode to Journal receivers toNamenodeRegistration. -
convert
public static BlockReportContext convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockReportContextProto proto) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockReportContextProto convert(BlockReportContext context) -
convertBlockECReconstructionInfo
public static BlockECReconstructionCommand.BlockECReconstructionInfo convertBlockECReconstructionInfo(org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProto blockEcReconstructionInfoProto) -
convertBlockECRecoveryInfo
public static org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.BlockECReconstructionInfoProto convertBlockECRecoveryInfo(BlockECReconstructionCommand.BlockECReconstructionInfo blockEcRecoveryInfo) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockECReconstructionCommandProto convert(BlockECReconstructionCommand blkECReconstructionCmd) -
convert
public static BlockECReconstructionCommand convert(org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.BlockECReconstructionCommandProto blkECReconstructionCmdProto) -
convert
public static org.apache.hadoop.hdfs.protocol.proto.AliasMapProtocolProtos.KeyValueProto convert(FileRegion fileRegion) -
convert
public static FileRegion convert(org.apache.hadoop.hdfs.protocol.proto.AliasMapProtocolProtos.KeyValueProto keyValueProto)
-