use of org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.SetQuotaRequestProto in project hadoop by apache.
the class ClientNamenodeProtocolTranslatorPB method setQuota.
@Override
public void setQuota(String path, long namespaceQuota, long storagespaceQuota, StorageType type) throws IOException {
final SetQuotaRequestProto.Builder builder = SetQuotaRequestProto.newBuilder().setPath(path).setNamespaceQuota(namespaceQuota).setStoragespaceQuota(storagespaceQuota);
if (type != null) {
builder.setStorageType(PBHelperClient.convertStorageType(type));
}
final SetQuotaRequestProto req = builder.build();
try {
rpcProxy.setQuota(null, req);
} catch (ServiceException e) {
throw ProtobufHelper.getRemoteException(e);
}
}
Aggregations