public static DatanodeLocalInfoProto convert(DatanodeLocalInfo info) { DatanodeLocalInfoProto.Builder builder = DatanodeLocalInfoProto.newBuilder(); builder.setSoftwareVersion(info.getSoftwareVersion()); builder.setConfigVersion(info.getConfigVersion()); builder.setUptime(info.getUptime()); return builder.build(); }
public static DatanodeLocalInfo convert(DatanodeLocalInfoProto proto) { return new DatanodeLocalInfo(proto.getSoftwareVersion(), proto.getConfigVersion(), proto.getUptime()); }