congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FileInfo.getDefaultAcl
Code IndexAdd Tabnine to your IDE (free)

How to use
getDefaultAcl
method
in
alluxio.wire.FileInfo

Best Java code snippets using alluxio.wire.FileInfo.getDefaultAcl (Showing top 6 results out of 315)

origin: Alluxio/alluxio

/**
 * @return the default ACL entries for this path, mutable
 */
public DefaultAccessControlList getDefaultAcl() {
 return mInfo.getDefaultAcl();
}
origin: Alluxio/alluxio

@Test
public void inheritNonExtendedDefaultAcl() throws Exception {
 AlluxioURI dir = new AlluxioURI("/dir");
 mFileSystemMaster.createDirectory(dir, CreateDirectoryContext.defaults());
 String aclString = "default:user::-w-";
 mFileSystemMaster.setAcl(dir, SetAclAction.MODIFY,
   Arrays.asList(AclEntry.fromCliString(aclString)), SetAclContext.defaults());
 AlluxioURI inner = new AlluxioURI("/dir/inner");
 mFileSystemMaster.createDirectory(inner, CreateDirectoryContext.defaults());
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(inner, GetStatusContext.defaults());
 List<String> accessEntries = fileInfo.getAcl().toStringEntries();
 assertTrue(accessEntries.toString(), accessEntries.contains("user::-w-"));
 List<String> defaultEntries = fileInfo.getDefaultAcl().toStringEntries();
 assertTrue(defaultEntries.toString(), defaultEntries.contains(aclString));
}
origin: Alluxio/alluxio

@Test
public void inheritExtendedDefaultAcl() throws Exception {
 AlluxioURI dir = new AlluxioURI("/dir");
 mFileSystemMaster.createDirectory(dir, CreateDirectoryContext.defaults());
 String aclString = "default:user:foo:-w-";
 mFileSystemMaster.setAcl(dir, SetAclAction.MODIFY,
   Arrays.asList(AclEntry.fromCliString(aclString)), SetAclContext.defaults());
 AlluxioURI inner = new AlluxioURI("/dir/inner");
 mFileSystemMaster.createDirectory(inner, CreateDirectoryContext.defaults());
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(inner, GetStatusContext.defaults());
 List<String> accessEntries = fileInfo.getAcl().toStringEntries();
 assertTrue(accessEntries.toString(), accessEntries.contains("user:foo:-w-"));
 List<String> defaultEntries = fileInfo.getDefaultAcl().toStringEntries();
 assertTrue(defaultEntries.toString(), defaultEntries.contains(aclString));
}
origin: Alluxio/alluxio

@Test
public void removeExtendedDefaultAclMask() throws Exception {
 mFileSystemMaster.createDirectory(NESTED_URI, CreateDirectoryContext
   .defaults(CreateDirectoryPOptions.newBuilder().setRecursive(true)));
 AclEntry newAcl = AclEntry.fromCliString("default:user:newuser:rwx");
 // Add an ACL
 addAcl(NESTED_URI, newAcl);
 assertThat(getInfo(NESTED_URI).getDefaultAcl().getEntries(), hasItem(newAcl));
 // Attempt to remove the ACL mask
 AclEntry maskEntry = AclEntry.fromCliString("default:mask::rwx");
 assertThat(getInfo(NESTED_URI).getDefaultAcl().getEntries(), hasItem(maskEntry));
 try {
  removeAcl(NESTED_URI, maskEntry);
  fail("Expected removing the mask from an extended ACL to fail");
 } catch (IOException e) {
  assertThat(e.getMessage(), containsString("mask"));
 }
 // Remove the extended ACL
 removeAcl(NESTED_URI, newAcl);
 // Now we can add and remove a mask
 addAcl(NESTED_URI, maskEntry);
 removeAcl(NESTED_URI, maskEntry);
}
origin: Alluxio/alluxio

 builder.setAcl(toProto(fileInfo.getAcl()));
if (!fileInfo.getDefaultAcl().equals(DefaultAccessControlList.EMPTY_DEFAULT_ACL)) {
 builder.setDefaultAcl(toProto(fileInfo.getDefaultAcl()));
origin: Alluxio/alluxio

Assert.assertEquals(a.getInAlluxioPercentage(), b.getInAlluxioPercentage());
Assert.assertEquals(a.getAcl(), b.getAcl());
Assert.assertEquals(a.getDefaultAcl(), b.getDefaultAcl());
Assert.assertEquals(a.getUfsFingerprint(), b.getUfsFingerprint());
Assert.assertEquals(a.getReplicationMax(), b.getReplicationMax());
alluxio.wireFileInfogetDefaultAcl

Popular methods of FileInfo

  • <init>
    Creates a new instance of FileInfo.
  • getPath
  • isFolder
  • setFileBlockInfos
  • getGroup
  • getLastModificationTimeMs
  • getLength
  • getMode
  • getName
  • getOwner
  • getUfsPath
  • isCompleted
  • getUfsPath,
  • isCompleted,
  • setBlockIds,
  • setFolder,
  • setLength,
  • setPath,
  • getBlockIds,
  • getBlockSizeBytes,
  • getCreationTimeMs,
  • getFileId

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now