use of org.apache.hadoop.yarn.server.resourcemanager.recovery.records.AMRMTokenSecretManagerState in project hadoop by apache.
the class FileSystemRMStateStore method storeOrUpdateAMRMTokenSecretManagerState.
@Override
public synchronized void storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate) throws Exception {
Path nodeCreatePath = getNodePath(amrmTokenSecretManagerRoot, AMRMTOKEN_SECRET_MANAGER_NODE);
AMRMTokenSecretManagerState data = AMRMTokenSecretManagerState.newInstance(amrmTokenSecretManagerState);
byte[] stateData = data.getProto().toByteArray();
if (isUpdate) {
updateFile(nodeCreatePath, stateData, true);
} else {
writeFileWithRetries(nodeCreatePath, stateData, true);
}
}
use of org.apache.hadoop.yarn.server.resourcemanager.recovery.records.AMRMTokenSecretManagerState in project hadoop by apache.
the class LeveldbRMStateStore method storeOrUpdateAMRMTokenSecretManagerState.
@Override
public void storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState state, boolean isUpdate) {
AMRMTokenSecretManagerState data = AMRMTokenSecretManagerState.newInstance(state);
byte[] stateData = data.getProto().toByteArray();
db.put(bytes(AMRMTOKEN_SECRET_MANAGER_ROOT), stateData);
}
Aggregations