Interface ProtoTranslator<A,B>
- Type Parameters:
A- YARN side internal messagesB- CSI proto messages
- All Known Implementing Classes:
GetPluginInfoResponseProtoTranslator,NodePublishVolumeRequestProtoTranslator,NodeUnpublishVolumeRequestProtoTranslator,ValidateVolumeCapabilitiesRequestProtoTranslator,ValidationVolumeCapabilitiesResponseProtoTranslator
public interface ProtoTranslator<A,B>
ProtoTranslator converts a YARN side message to CSI proto message
and vice versa. Each CSI proto message should have a corresponding
YARN side message implementation, and a transformer to convert them
one to the other. This layer helps we to hide CSI spec messages
from YARN components.
-
Method Summary
-
Method Details
-
convertTo
Convert message from type A to type B.- Parameters:
messageA-- Returns:
- messageB
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-
convertFrom
Convert message from type B to type A.- Parameters:
messageB-- Returns:
- messageA
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-