@Override
public boolean isAvailable() {
byte[] responseBytes = ApiProxy.makeSyncCall("file", "GetCapabilities",
GetCapabilitiesRequest.newBuilder().build().toByteArray());
GetCapabilitiesResponse response;
try {
response = GetCapabilitiesResponse.parseFrom(responseBytes);
} catch (InvalidProtocolBufferException e) {
throw new RuntimeException("Failed to parse GetCapabilitiesResponse: "
+ SerializationUtil.prettyBytes(responseBytes), e);
}
return response.getShuffleAvailable();
}