@Test public void testConvertBlockRecoveryCommand() { DatanodeInfo di1 = DFSTestUtil.getLocalDatanodeInfo(); DatanodeInfo di2 = DFSTestUtil.getLocalDatanodeInfo(); DatanodeInfo[] dnInfo = new DatanodeInfo[] { di1, di2 }; List<RecoveringBlock> blks = ImmutableList.of( new RecoveringBlock(getExtendedBlock(1), dnInfo, 3), new RecoveringBlock(getExtendedBlock(2), dnInfo, 3) ); BlockRecoveryCommand cmd = new BlockRecoveryCommand(blks); BlockRecoveryCommandProto proto = PBHelper.convert(cmd); assertEquals(1, proto.getBlocks(0).getBlock().getB().getBlockId()); assertEquals(2, proto.getBlocks(1).getBlock().getB().getBlockId()); BlockRecoveryCommand cmd2 = PBHelper.convert(proto); List<RecoveringBlock> cmd2Blks = Lists.newArrayList( cmd2.getRecoveringBlocks()); assertEquals(blks.get(0).getBlock(), cmd2Blks.get(0).getBlock()); assertEquals(blks.get(1).getBlock(), cmd2Blks.get(1).getBlock()); assertEquals(Joiner.on(",").join(blks), Joiner.on(",").join(cmd2Blks)); assertEquals(cmd.toString(), cmd2.toString()); }
public static NamenodeRole convert(NamenodeRoleProto role) { switch (role) { case NAMENODE: return NamenodeRole.NAMENODE; case BACKUP: return NamenodeRole.BACKUP; case CHECKPOINT: return NamenodeRole.CHECKPOINT; } return null; }
PBHelper { public static NamenodeRole convert(NamenodeRoleProto role) { switch (role) { case NAMENODE: return NamenodeRole.NAMENODE; case BACKUP: return NamenodeRole.BACKUP; case CHECKPOINT: return NamenodeRole.CHECKPOINT; } return null; } }
PBHelper { public static NamenodeRole convert(NamenodeRoleProto role) { switch (role) { case NAMENODE: return NamenodeRole.NAMENODE; case BACKUP: return NamenodeRole.BACKUP; case CHECKPOINT: return NamenodeRole.CHECKPOINT; } return null; } private  PBHelper(); }
PBHelper { public static NamenodeRole convert(NamenodeRoleProto role) { switch (role) { case NAMENODE: return NamenodeRole.NAMENODE; case BACKUP: return NamenodeRole.BACKUP; case CHECKPOINT: return NamenodeRole.CHECKPOINT; } return null; } private  PBHelper(); static ByteString getByteString(byte[] bytes); static NamenodeRole convert(NamenodeRoleProto role); static NamenodeRoleProto convert(NamenodeRole role); static BlockStoragePolicy[] convertStoragePolicies(
      List<BlockStoragePolicyProto> policyProtos); static BlockStoragePolicy convert(BlockStoragePolicyProto proto); static BlockStoragePolicyProto convert(BlockStoragePolicy policy); static StorageTypesProto convert(StorageType[] types); static StorageInfoProto convert(StorageInfo info); static StorageInfo convert(StorageInfoProto info, NodeType type); static NamenodeRegistrationProto convert(NamenodeRegistration reg); static NamenodeRegistration convert(NamenodeRegistrationProto reg); static DatanodeID convert(DatanodeIDProto dn); static DatanodeIDProto convert(DatanodeID dn); static DatanodeIDProto[] convert(DatanodeID[] did); static DatanodeID[] convert(DatanodeIDProto[] did); static BlockProto convert(Block b); static Block convert(BlockProto b); static BlockWithLocationsProto convert(BlockWithLocations blk); static BlockWithLocations convert(BlockWithLocationsProto b); static BlocksWithLocationsProto convert(BlocksWithLocations blks); static BlocksWithLocations convert(BlocksWithLocationsProto blocks); static BlockKeyProto convert(BlockKey key); static BlockKey convert(BlockKeyProto k); static ExportedBlockKeysProto convert(ExportedBlockKeys keys); static ExportedBlockKeys convert(ExportedBlockKeysProto keys); static CheckpointSignatureProto convert(CheckpointSignature s); static CheckpointSignature convert(CheckpointSignatureProto s); static RemoteEditLogProto convert(RemoteEditLog log); static RemoteEditLog convert(RemoteEditLogProto l); static RemoteEditLogManifestProto convert(
      RemoteEditLogManifest manifest); static RemoteEditLogManifest convert(
      RemoteEditLogManifestProto manifest); static CheckpointCommandProto convert(CheckpointCommand cmd); static NamenodeCommandProto convert(NamenodeCommand cmd); static BlockKey[] convertBlockKeys(List<BlockKeyProto> list); static NamespaceInfo convert(NamespaceInfoProto info); static NamenodeCommand convert(NamenodeCommandProto cmd); static ExtendedBlock convert(ExtendedBlockProto eb); static ExtendedBlockProto convert(final ExtendedBlock b); static RecoveringBlockProto convert(RecoveringBlock b); static RecoveringBlock convert(RecoveringBlockProto b); static DatanodeInfoProto.AdminState convert(
      final DatanodeInfo.AdminStates inAs); static DatanodeInfo convert(DatanodeInfoProto di); static DatanodeInfoProto convertDatanodeInfo(DatanodeInfo di); static DatanodeInfo[] convert(DatanodeInfoProto di[]); static List<? extends HdfsProtos.DatanodeInfoProto> convert(
      DatanodeInfo[] dnInfos); static List<? extends HdfsProtos.DatanodeInfoProto> convert(
      DatanodeInfo[] dnInfos, int startIdx); static DatanodeInfo[] convert(List<DatanodeInfoProto> list); static DatanodeInfoProto convert(DatanodeInfo info); static DatanodeStorageReportProto convertDatanodeStorageReport(
      DatanodeStorageReport report); static List<DatanodeStorageReportProto> convertDatanodeStorageReports(
      DatanodeStorageReport[] reports); static DatanodeStorageReport convertDatanodeStorageReport(
      DatanodeStorageReportProto proto); static DatanodeStorageReport[] convertDatanodeStorageReports(
      List<DatanodeStorageReportProto> protos); static AdminStates convert(AdminState adminState); static LocatedBlockProto convert(LocatedBlock b); static LocatedBlock convert(LocatedBlockProto proto); static TokenProto convert(Token<?> tok); static Token<BlockTokenIdentifier> convert(
      TokenProto blockToken); static Token<DelegationTokenIdentifier> convertDelegationToken(
      TokenProto blockToken); static ReplicaState convert(ReplicaStateProto state); static ReplicaStateProto convert(ReplicaState state); static DatanodeRegistrationProto convert(
      DatanodeRegistration registration); static DatanodeRegistration convert(DatanodeRegistrationProto proto); static DatanodeCommand convert(DatanodeCommandProto proto); static BalancerBandwidthCommandProto convert(
      BalancerBandwidthCommand bbCmd); static KeyUpdateCommandProto convert(KeyUpdateCommand cmd); static BlockRecoveryCommandProto convert(BlockRecoveryCommand cmd); static FinalizeCommandProto convert(FinalizeCommand cmd); static BlockCommandProto convert(BlockCommand cmd); static BlockIdCommandProto convert(BlockIdCommand cmd); static DatanodeCommandProto convert(DatanodeCommand datanodeCommand); static KeyUpdateCommand convert(KeyUpdateCommandProto keyUpdateCmd); static FinalizeCommand convert(FinalizeCommandProto finalizeCmd); static BlockRecoveryCommand convert(
      BlockRecoveryCommandProto recoveryCmd); static BlockCommand convert(BlockCommandProto blkCmd); static BlockIdCommand convert(BlockIdCommandProto blkIdCmd); static DatanodeInfo[] convert(DatanodeInfosProto datanodeInfosProto); static BalancerBandwidthCommand convert(
      BalancerBandwidthCommandProto balancerCmd); static ReceivedDeletedBlockInfoProto convert(
      ReceivedDeletedBlockInfo receivedDeletedBlockInfo); static ReceivedDeletedBlockInfo convert(
      ReceivedDeletedBlockInfoProto proto); static NamespaceInfoProto convert(NamespaceInfo info); static LocatedBlockProto[] convertLocatedBlock(LocatedBlock[] lb); static LocatedBlock[] convertLocatedBlock(LocatedBlockProto[] lb); static List<LocatedBlock> convertLocatedBlock(
      List<LocatedBlockProto> lb); static List<LocatedBlockProto> convertLocatedBlock2(List<LocatedBlock> lb); static LocatedBlocks convert(LocatedBlocksProto lb); static LocatedBlocksProto convert(LocatedBlocks lb); static DataEncryptionKey convert(DataEncryptionKeyProto bet); static DataEncryptionKeyProto convert(DataEncryptionKey bet); static FsServerDefaults convert(FsServerDefaultsProto fs); static FsServerDefaultsProto convert(FsServerDefaults fs); static FsPermissionProto convert(FsPermission p); static FsPermission convert(FsPermissionProto p); static int convertCreateFlag(EnumSetWritable<CreateFlag> flag); static EnumSetWritable<CreateFlag> convertCreateFlag(int flag); static int convertCacheFlags(EnumSet<CacheFlag> flags); static EnumSet<CacheFlag> convertCacheFlags(int flags); static HdfsFileStatus convert(HdfsFileStatusProto fs); static SnapshottableDirectoryStatus convert(
      SnapshottableDirectoryStatusProto sdirStatusProto); static HdfsFileStatusProto convert(HdfsFileStatus fs); static SnapshottableDirectoryStatusProto convert(
      SnapshottableDirectoryStatus status); static HdfsFileStatusProto[] convert(HdfsFileStatus[] fs); static HdfsFileStatus[] convert(HdfsFileStatusProto[] fs); static DirectoryListing convert(DirectoryListingProto dl); static DirectoryListingProto convert(DirectoryListing d); static long[] convert(GetFsStatsResponseProto res); static GetFsStatsResponseProto convert(long[] fsStats); static DatanodeReportTypeProto convert(DatanodeReportType t); static DatanodeReportType convert(DatanodeReportTypeProto t); static SafeModeActionProto convert(
      SafeModeAction a); static SafeModeAction convert(
      ClientNamenodeProtocolProtos.SafeModeActionProto a); static RollingUpgradeActionProto convert(RollingUpgradeAction a); static RollingUpgradeAction convert(RollingUpgradeActionProto a); static RollingUpgradeStatusProto convertRollingUpgradeStatus(
      RollingUpgradeStatus status); static RollingUpgradeStatus convert(RollingUpgradeStatusProto proto); static RollingUpgradeInfoProto convert(RollingUpgradeInfo info); static RollingUpgradeInfo convert(RollingUpgradeInfoProto proto); static CorruptFileBlocks convert(CorruptFileBlocksProto c); static CorruptFileBlocksProto convert(CorruptFileBlocks c); static ContentSummary convert(ContentSummaryProto cs); static ContentSummaryProto convert(ContentSummary cs); static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s); static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb); static DatanodeStorageProto convert(DatanodeStorage s); static List<StorageTypeProto> convertStorageTypes(
      StorageType[] types); static List<StorageTypeProto> convertStorageTypes(
      StorageType[] types, int startIdx); static StorageTypeProto convertStorageType(StorageType type); static DatanodeStorage convert(DatanodeStorageProto s); static StorageType convertStorageType(StorageTypeProto type); static StorageType[] convertStorageTypes(
      List<StorageTypeProto> storageTypesList, int expectedSize); static StorageReportProto convert(StorageReport r); static StorageReport convert(StorageReportProto p); static StorageReport[] convertStorageReports(
      List<StorageReportProto> list); static List<StorageReportProto> convertStorageReports(StorageReport[] storages); static JournalInfo convert(JournalInfoProto info); static JournalInfoProto convert(JournalInfo j); static SnapshottableDirectoryStatus[] convert(
      SnapshottableDirectoryListingProto sdlp); static SnapshottableDirectoryListingProto convert(
      SnapshottableDirectoryStatus[] status); static DiffReportEntry convert(SnapshotDiffReportEntryProto entry); static SnapshotDiffReportEntryProto convert(DiffReportEntry entry); static SnapshotDiffReport convert(SnapshotDiffReportProto reportProto); static SnapshotDiffReportProto convert(SnapshotDiffReport report); static DataChecksum.Type convert(HdfsProtos.ChecksumTypeProto type); static CacheDirectiveInfoProto convert(CacheDirectiveInfo info); static CacheDirectiveInfo convert(CacheDirectiveInfoProto proto); static CacheDirectiveInfoExpirationProto convert(
      CacheDirectiveInfo.Expiration expiration); static CacheDirectiveInfo.Expiration convert(
      CacheDirectiveInfoExpirationProto proto); static CacheDirectiveStatsProto convert(CacheDirectiveStats stats); static CacheDirectiveStats convert(CacheDirectiveStatsProto proto); static CacheDirectiveEntryProto convert(CacheDirectiveEntry entry); static CacheDirectiveEntry convert(CacheDirectiveEntryProto proto); static CachePoolInfoProto convert(CachePoolInfo info); static CachePoolInfo convert(CachePoolInfoProto proto); static CachePoolStatsProto convert(CachePoolStats stats); static CachePoolStats convert(CachePoolStatsProto proto); static CachePoolEntryProto convert(CachePoolEntry entry); static CachePoolEntry convert(CachePoolEntryProto proto); static HdfsProtos.ChecksumTypeProto convert(DataChecksum.Type type); static DatanodeLocalInfoProto convert(DatanodeLocalInfo info); static DatanodeLocalInfo convert(DatanodeLocalInfoProto proto); static InputStream vintPrefixed(final InputStream input); static FsActionProto convert(FsAction v); static FsAction convert(FsActionProto v); static List<AclEntryProto> convertAclEntryProto(
      List<AclEntry> aclSpec); static List<AclEntry> convertAclEntry(List<AclEntryProto> aclSpec); static AclStatus convert(GetAclStatusResponseProto e); static GetAclStatusResponseProto convert(AclStatus e); static XAttrProto convertXAttrProto(XAttr a); static List<XAttrProto> convertXAttrProto(
      List<XAttr> xAttrSpec); static int convert(EnumSet<XAttrSetFlag> flag); static EnumSet<XAttrSetFlag> convert(int flag); static XAttr convertXAttr(XAttrProto a); static List<XAttr> convertXAttrs(List<XAttrProto> xAttrSpec); static List<XAttr> convert(GetXAttrsResponseProto a); static GetXAttrsResponseProto convertXAttrsResponse(
      List<XAttr> xAttrs); static List<XAttr> convert(ListXAttrsResponseProto a); static ListXAttrsResponseProto convertListXAttrsResponse(
    List<XAttr> names); static EncryptionZoneProto convert(EncryptionZone zone); static EncryptionZone convert(EncryptionZoneProto proto); static ShortCircuitShmSlotProto convert(SlotId slotId); static ShortCircuitShmIdProto convert(ShmId shmId); static SlotId convert(ShortCircuitShmSlotProto slotId); static ShmId convert(ShortCircuitShmIdProto shmId); static EventBatchList convert(GetEditsFromTxidResponseProto resp); static GetEditsFromTxidResponseProto convertEditsResponse(EventBatchList el); static CipherOptionProto convert(CipherOption option); static CipherOption convert(CipherOptionProto proto); static List<CipherOptionProto> convertCipherOptions(
      List<CipherOption> options); static List<CipherOption> convertCipherOptionProtos(
      List<CipherOptionProto> protos); static CipherSuiteProto convert(CipherSuite suite); static CipherSuite convert(CipherSuiteProto proto); static List<CryptoProtocolVersionProto> convert(
      CryptoProtocolVersion[] versions); static CryptoProtocolVersion[] convertCryptoProtocolVersions(
      List<CryptoProtocolVersionProto> protos); static CryptoProtocolVersion convert(CryptoProtocolVersionProto
      proto); static CryptoProtocolVersionProto convert(CryptoProtocolVersion
      version); static HdfsProtos.FileEncryptionInfoProto convert(
      FileEncryptionInfo info); static HdfsProtos.PerFileEncryptionInfoProto convertPerFileEncInfo(
      FileEncryptionInfo info); static HdfsProtos.ZoneEncryptionInfoProto convert(
      CipherSuite suite, CryptoProtocolVersion version, String keyName); static FileEncryptionInfo convert(
      HdfsProtos.FileEncryptionInfoProto proto); static FileEncryptionInfo convert(
      HdfsProtos.PerFileEncryptionInfoProto fileProto,
      CipherSuite suite, CryptoProtocolVersion version, String keyName); static BlockReportContext convert(BlockReportContextProto proto); static BlockReportContextProto convert(BlockReportContext context); }
PBHelper { public static NamenodeRole convert(NamenodeRoleProto role) { switch (role) { case NAMENODE: return NamenodeRole.NAMENODE; case BACKUP: return NamenodeRole.BACKUP; case CHECKPOINT: return NamenodeRole.CHECKPOINT; } return null; } private  PBHelper(); static ByteString getByteString(byte[] bytes); static NamenodeRole convert(NamenodeRoleProto role); static NamenodeRoleProto convert(NamenodeRole role); static BlockStoragePolicy[] convertStoragePolicies(
      List<BlockStoragePolicyProto> policyProtos); static BlockStoragePolicy convert(BlockStoragePolicyProto proto); static BlockStoragePolicyProto convert(BlockStoragePolicy policy); static StorageTypesProto convert(StorageType[] types); static StorageInfoProto convert(StorageInfo info); static StorageInfo convert(StorageInfoProto info, NodeType type); static NamenodeRegistrationProto convert(NamenodeRegistration reg); static NamenodeRegistration convert(NamenodeRegistrationProto reg); static DatanodeID convert(DatanodeIDProto dn); static DatanodeIDProto convert(DatanodeID dn); static DatanodeIDProto[] convert(DatanodeID[] did); static DatanodeID[] convert(DatanodeIDProto[] did); static BlockProto convert(Block b); static Block convert(BlockProto b); static BlockWithLocationsProto convert(BlockWithLocations blk); static BlockWithLocations convert(BlockWithLocationsProto b); static BlocksWithLocationsProto convert(BlocksWithLocations blks); static BlocksWithLocations convert(BlocksWithLocationsProto blocks); static BlockKeyProto convert(BlockKey key); static BlockKey convert(BlockKeyProto k); static ExportedBlockKeysProto convert(ExportedBlockKeys keys); static ExportedBlockKeys convert(ExportedBlockKeysProto keys); static CheckpointSignatureProto convert(CheckpointSignature s); static CheckpointSignature convert(CheckpointSignatureProto s); static RemoteEditLogProto convert(RemoteEditLog log); static RemoteEditLog convert(RemoteEditLogProto l); static RemoteEditLogManifestProto convert(
      RemoteEditLogManifest manifest); static RemoteEditLogManifest convert(
      RemoteEditLogManifestProto manifest); static CheckpointCommandProto convert(CheckpointCommand cmd); static NamenodeCommandProto convert(NamenodeCommand cmd); static BlockKey[] convertBlockKeys(List<BlockKeyProto> list); static NamespaceInfo convert(NamespaceInfoProto info); static NamenodeCommand convert(NamenodeCommandProto cmd); static ExtendedBlock convert(ExtendedBlockProto eb); static ExtendedBlockProto convert(final ExtendedBlock b); static RecoveringBlockProto convert(RecoveringBlock b); static RecoveringBlock convert(RecoveringBlockProto b); static DatanodeInfoProto.AdminState convert(
      final DatanodeInfo.AdminStates inAs); static DatanodeInfo convert(DatanodeInfoProto di); static DatanodeInfoProto convertDatanodeInfo(DatanodeInfo di); static DatanodeInfo[] convert(DatanodeInfoProto di[]); static List<? extends HdfsProtos.DatanodeInfoProto> convert(
      DatanodeInfo[] dnInfos); static List<? extends HdfsProtos.DatanodeInfoProto> convert(
      DatanodeInfo[] dnInfos, int startIdx); static DatanodeInfo[] convert(List<DatanodeInfoProto> list); static DatanodeInfoProto convert(DatanodeInfo info); static DatanodeStorageReportProto convertDatanodeStorageReport(
      DatanodeStorageReport report); static List<DatanodeStorageReportProto> convertDatanodeStorageReports(
      DatanodeStorageReport[] reports); static DatanodeStorageReport convertDatanodeStorageReport(
      DatanodeStorageReportProto proto); static DatanodeStorageReport[] convertDatanodeStorageReports(
      List<DatanodeStorageReportProto> protos); static AdminStates convert(AdminState adminState); static LocatedBlockProto convert(LocatedBlock b); static LocatedBlock convert(LocatedBlockProto proto); static TokenProto convert(Token<?> tok); static Token<BlockTokenIdentifier> convert(
      TokenProto blockToken); static Token<DelegationTokenIdentifier> convertDelegationToken(
      TokenProto blockToken); static ReplicaState convert(ReplicaStateProto state); static ReplicaStateProto convert(ReplicaState state); static DatanodeRegistrationProto convert(
      DatanodeRegistration registration); static DatanodeRegistration convert(DatanodeRegistrationProto proto); static DatanodeCommand convert(DatanodeCommandProto proto); static BalancerBandwidthCommandProto convert(
      BalancerBandwidthCommand bbCmd); static KeyUpdateCommandProto convert(KeyUpdateCommand cmd); static BlockRecoveryCommandProto convert(BlockRecoveryCommand cmd); static FinalizeCommandProto convert(FinalizeCommand cmd); static BlockCommandProto convert(BlockCommand cmd); static BlockIdCommandProto convert(BlockIdCommand cmd); static DatanodeCommandProto convert(DatanodeCommand datanodeCommand); static KeyUpdateCommand convert(KeyUpdateCommandProto keyUpdateCmd); static FinalizeCommand convert(FinalizeCommandProto finalizeCmd); static BlockRecoveryCommand convert(
      BlockRecoveryCommandProto recoveryCmd); static BlockCommand convert(BlockCommandProto blkCmd); static BlockIdCommand convert(BlockIdCommandProto blkIdCmd); static DatanodeInfo[] convert(DatanodeInfosProto datanodeInfosProto); static BalancerBandwidthCommand convert(
      BalancerBandwidthCommandProto balancerCmd); static ReceivedDeletedBlockInfoProto convert(
      ReceivedDeletedBlockInfo receivedDeletedBlockInfo); static ReceivedDeletedBlockInfo convert(
      ReceivedDeletedBlockInfoProto proto); static NamespaceInfoProto convert(NamespaceInfo info); static LocatedBlockProto[] convertLocatedBlock(LocatedBlock[] lb); static LocatedBlock[] convertLocatedBlock(LocatedBlockProto[] lb); static List<LocatedBlock> convertLocatedBlock(
      List<LocatedBlockProto> lb); static List<LocatedBlockProto> convertLocatedBlock2(List<LocatedBlock> lb); static LocatedBlocks convert(LocatedBlocksProto lb); static LocatedBlocksProto convert(LocatedBlocks lb); static DataEncryptionKey convert(DataEncryptionKeyProto bet); static DataEncryptionKeyProto convert(DataEncryptionKey bet); static FsServerDefaults convert(FsServerDefaultsProto fs); static FsServerDefaultsProto convert(FsServerDefaults fs); static FsPermissionProto convert(FsPermission p); static FsPermission convert(FsPermissionProto p); static int convertCreateFlag(EnumSetWritable<CreateFlag> flag); static EnumSetWritable<CreateFlag> convertCreateFlag(int flag); static int convertCacheFlags(EnumSet<CacheFlag> flags); static EnumSet<CacheFlag> convertCacheFlags(int flags); static HdfsFileStatus convert(HdfsFileStatusProto fs); static SnapshottableDirectoryStatus convert(
      SnapshottableDirectoryStatusProto sdirStatusProto); static HdfsFileStatusProto convert(HdfsFileStatus fs); static SnapshottableDirectoryStatusProto convert(
      SnapshottableDirectoryStatus status); static HdfsFileStatusProto[] convert(HdfsFileStatus[] fs); static HdfsFileStatus[] convert(HdfsFileStatusProto[] fs); static DirectoryListing convert(DirectoryListingProto dl); static DirectoryListingProto convert(DirectoryListing d); static long[] convert(GetFsStatsResponseProto res); static GetFsStatsResponseProto convert(long[] fsStats); static DatanodeReportTypeProto convert(DatanodeReportType t); static DatanodeReportType convert(DatanodeReportTypeProto t); static SafeModeActionProto convert(
      SafeModeAction a); static SafeModeAction convert(
      ClientNamenodeProtocolProtos.SafeModeActionProto a); static RollingUpgradeActionProto convert(RollingUpgradeAction a); static RollingUpgradeAction convert(RollingUpgradeActionProto a); static RollingUpgradeStatusProto convertRollingUpgradeStatus(
      RollingUpgradeStatus status); static RollingUpgradeStatus convert(RollingUpgradeStatusProto proto); static RollingUpgradeInfoProto convert(RollingUpgradeInfo info); static RollingUpgradeInfo convert(RollingUpgradeInfoProto proto); static CorruptFileBlocks convert(CorruptFileBlocksProto c); static CorruptFileBlocksProto convert(CorruptFileBlocks c); static ContentSummary convert(ContentSummaryProto cs); static ContentSummaryProto convert(ContentSummary cs); static NNHAStatusHeartbeat convert(NNHAStatusHeartbeatProto s); static NNHAStatusHeartbeatProto convert(NNHAStatusHeartbeat hb); static DatanodeStorageProto convert(DatanodeStorage s); static List<StorageTypeProto> convertStorageTypes(
      StorageType[] types); static List<StorageTypeProto> convertStorageTypes(
      StorageType[] types, int startIdx); static StorageTypeProto convertStorageType(StorageType type); static DatanodeStorage convert(DatanodeStorageProto s); static StorageType convertStorageType(StorageTypeProto type); static StorageType[] convertStorageTypes(
      List<StorageTypeProto> storageTypesList, int expectedSize); static StorageReportProto convert(StorageReport r); static StorageReport convert(StorageReportProto p); static StorageReport[] convertStorageReports(
      List<StorageReportProto> list); static List<StorageReportProto> convertStorageReports(StorageReport[] storages); static JournalInfo convert(JournalInfoProto info); static JournalInfoProto convert(JournalInfo j); static SnapshottableDirectoryStatus[] convert(
      SnapshottableDirectoryListingProto sdlp); static SnapshottableDirectoryListingProto convert(
      SnapshottableDirectoryStatus[] status); static DiffReportEntry convert(SnapshotDiffReportEntryProto entry); static SnapshotDiffReportEntryProto convert(DiffReportEntry entry); static SnapshotDiffReport convert(SnapshotDiffReportProto reportProto); static SnapshotDiffReportProto convert(SnapshotDiffReport report); static DataChecksum.Type convert(HdfsProtos.ChecksumTypeProto type); static CacheDirectiveInfoProto convert(CacheDirectiveInfo info); static CacheDirectiveInfo convert(CacheDirectiveInfoProto proto); static CacheDirectiveInfoExpirationProto convert(
      CacheDirectiveInfo.Expiration expiration); static CacheDirectiveInfo.Expiration convert(
      CacheDirectiveInfoExpirationProto proto); static CacheDirectiveStatsProto convert(CacheDirectiveStats stats); static CacheDirectiveStats convert(CacheDirectiveStatsProto proto); static CacheDirectiveEntryProto convert(CacheDirectiveEntry entry); static CacheDirectiveEntry convert(CacheDirectiveEntryProto proto); static CachePoolInfoProto convert(CachePoolInfo info); static CachePoolInfo convert(CachePoolInfoProto proto); static CachePoolStatsProto convert(CachePoolStats stats); static CachePoolStats convert(CachePoolStatsProto proto); static CachePoolEntryProto convert(CachePoolEntry entry); static CachePoolEntry convert(CachePoolEntryProto proto); static HdfsProtos.ChecksumTypeProto convert(DataChecksum.Type type); static DatanodeLocalInfoProto convert(DatanodeLocalInfo info); static DatanodeLocalInfo convert(DatanodeLocalInfoProto proto); static InputStream vintPrefixed(final InputStream input); static FsActionProto convert(FsAction v); static FsAction convert(FsActionProto v); static List<AclEntryProto> convertAclEntryProto(
      List<AclEntry> aclSpec); static List<AclEntry> convertAclEntry(List<AclEntryProto> aclSpec); static AclStatus convert(GetAclStatusResponseProto e); static GetAclStatusResponseProto convert(AclStatus e); static XAttrProto convertXAttrProto(XAttr a); static List<XAttrProto> convertXAttrProto(
      List<XAttr> xAttrSpec); static int convert(EnumSet<XAttrSetFlag> flag); static EnumSet<XAttrSetFlag> convert(int flag); static XAttr convertXAttr(XAttrProto a); static List<XAttr> convertXAttrs(List<XAttrProto> xAttrSpec); static List<XAttr> convert(GetXAttrsResponseProto a); static GetXAttrsResponseProto convertXAttrsResponse(
      List<XAttr> xAttrs); static List<XAttr> convert(ListXAttrsResponseProto a); static ListXAttrsResponseProto convertListXAttrsResponse(
    List<XAttr> names); static EncryptionZoneProto convert(EncryptionZone zone); static EncryptionZone convert(EncryptionZoneProto proto); static ShortCircuitShmSlotProto convert(SlotId slotId); static ShortCircuitShmIdProto convert(ShmId shmId); static SlotId convert(ShortCircuitShmSlotProto slotId); static ShmId convert(ShortCircuitShmIdProto shmId); static EventBatchList convert(GetEditsFromTxidResponseProto resp); static GetEditsFromTxidResponseProto convertEditsResponse(EventBatchList el); static CipherOptionProto convert(CipherOption option); static CipherOption convert(CipherOptionProto proto); static List<CipherOptionProto> convertCipherOptions(
      List<CipherOption> options); static List<CipherOption> convertCipherOptionProtos(
      List<CipherOptionProto> protos); static CipherSuiteProto convert(CipherSuite suite); static CipherSuite convert(CipherSuiteProto proto); static List<CryptoProtocolVersionProto> convert(
      CryptoProtocolVersion[] versions); static CryptoProtocolVersion[] convertCryptoProtocolVersions(
      List<CryptoProtocolVersionProto> protos); static CryptoProtocolVersion convert(CryptoProtocolVersionProto
      proto); static CryptoProtocolVersionProto convert(CryptoProtocolVersion
      version); static HdfsProtos.FileEncryptionInfoProto convert(
      FileEncryptionInfo info); static HdfsProtos.PerFileEncryptionInfoProto convertPerFileEncInfo(
      FileEncryptionInfo info); static HdfsProtos.ZoneEncryptionInfoProto convert(
      CipherSuite suite, CryptoProtocolVersion version, String keyName); static FileEncryptionInfo convert(
      HdfsProtos.FileEncryptionInfoProto proto); static FileEncryptionInfo convert(
      HdfsProtos.PerFileEncryptionInfoProto fileProto,
      CipherSuite suite, CryptoProtocolVersion version, String keyName); static BlockReportContext convert(BlockReportContextProto proto); static BlockReportContextProto convert(BlockReportContext context);  }