use of org.apache.hadoop.ozone.client.protocol.ClientProtocol in project ozone by apache.
the class TestOzoneManagerListVolumes method createVolumeWithOwnerAndAcl.
private static void createVolumeWithOwnerAndAcl(ObjectStore objectStore, String volumeName, String ownerName, String aclString) throws IOException {
ClientProtocol proxy = objectStore.getClientProxy();
objectStore.createVolume(volumeName);
proxy.setVolumeOwner(volumeName, ownerName);
setVolumeAcl(objectStore, volumeName, aclString);
}
use of org.apache.hadoop.ozone.client.protocol.ClientProtocol in project ozone by apache.
the class TestBucketOwner method createVolumeWithOwnerAndAcl.
private static void createVolumeWithOwnerAndAcl(ObjectStore store, String volumeName, String ownerName, String aclString) throws IOException {
ClientProtocol proxy = store.getClientProxy();
store.createVolume(volumeName);
proxy.setVolumeOwner(volumeName, ownerName);
setVolumeAcl(store, volumeName, aclString);
}
use of org.apache.hadoop.ozone.client.protocol.ClientProtocol in project ozone by apache.
the class TestOzoneRpcClientAbstract method testVolumeSetOwner.
@Test
public void testVolumeSetOwner() throws IOException {
String volumeName = UUID.randomUUID().toString();
store.createVolume(volumeName);
String ownerName = "someRandomUser1";
ClientProtocol proxy = store.getClientProxy();
proxy.setVolumeOwner(volumeName, ownerName);
// Set owner again
proxy.setVolumeOwner(volumeName, ownerName);
}
use of org.apache.hadoop.ozone.client.protocol.ClientProtocol in project ozone by apache.
the class TestOzoneRpcClientAbstract method testBucketSetOwner.
@Test
public void testBucketSetOwner() throws IOException {
String volumeName = UUID.randomUUID().toString();
String bucketName = UUID.randomUUID().toString();
store.createVolume(volumeName);
store.getVolume(volumeName).createBucket(bucketName);
String oldOwner = store.getVolume(volumeName).getBucket(bucketName).getOwner();
String ownerName = "testUser";
ClientProtocol proxy = store.getClientProxy();
proxy.setBucketOwner(volumeName, bucketName, ownerName);
String newOwner = store.getVolume(volumeName).getBucket(bucketName).getOwner();
assertEquals(ownerName, newOwner);
assertNotEquals(oldOwner, newOwner);
store.getVolume(volumeName).deleteBucket(bucketName);
store.deleteVolume(volumeName);
}
use of org.apache.hadoop.ozone.client.protocol.ClientProtocol in project ozone by apache.
the class TestRecursiveAclWithFSO method createVolumeWithOwnerAndAcl.
private void createVolumeWithOwnerAndAcl(ObjectStore objectStore, String volumeName, String ownerName, String aclString) throws IOException {
ClientProtocol proxy = objectStore.getClientProxy();
objectStore.createVolume(volumeName);
proxy.setVolumeOwner(volumeName, ownerName);
setVolumeAcl(objectStore, volumeName, aclString);
}
Aggregations