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

How to use
getGroup
method
in
alluxio.wire.FileInfo

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

origin: Alluxio/alluxio

/**
 * @return the group that owns the entity referenced by this uri, mutable
 */
public String getGroup() {
 return mInfo.getGroup();
}
origin: Alluxio/alluxio

OutputStream outputStream = ufs.create(dstPath,
  CreateOptions.defaults(ServerConfiguration.global())
  .setOwner(fileInfo.getOwner()).setGroup(fileInfo.getGroup())
  .setMode(new Mode((short) fileInfo.getMode())));
final WritableByteChannel outputChannel = Channels.newChannel(outputStream);
origin: Alluxio/alluxio

 private void assertFileInfoEqualsFileStatus(FileInfo info, FileStatus status) {
  assertEquals(info.getOwner(), status.getOwner());
  assertEquals(info.getGroup(), status.getGroup());
  assertEquals(info.getMode(), status.getPermission().toShort());
  assertEquals(info.getLastModificationTimeMs(), status.getModificationTime());
  assertEquals(info.isFolder(), status.isDir());
 }
}
origin: Alluxio/alluxio

@Test
public void setGroupSuccess() throws Exception {
 // super user
 verifySetAcl(TEST_USER_ADMIN, TEST_FILE_URI, null, TEST_USER_1.getGroup(), (short) -1, false);
 // super group
 verifySetAcl(TEST_USER_SUPERGROUP, TEST_DIR_URI, null, TEST_USER_2.getGroup(), (short) -1,
   true);
 FileInfo fileInfo = mFileSystemMaster
   .getFileInfo(mFileSystemMaster.getFileId(new AlluxioURI(TEST_DIR_FILE_URI)));
 assertEquals(TEST_USER_2.getGroup(), fileInfo.getGroup());
 // owner
 verifySetAcl(TEST_USER_1, TEST_DIR_URI, null, TEST_USER_2.getGroup(), (short) -1, true);
 fileInfo = mFileSystemMaster
   .getFileInfo(mFileSystemMaster.getFileId(new AlluxioURI(TEST_DIR_FILE_URI)));
 assertEquals(TEST_USER_2.getGroup(), fileInfo.getGroup());
}
origin: Alluxio/alluxio

@Test
public void setAclSuccess() throws Exception {
 // super user sets owner, group, and permission
 verifySetAcl(TEST_USER_ADMIN, TEST_FILE_URI, TEST_USER_1.getUser(), TEST_USER_1.getGroup(),
   (short) 0600, false);
 // owner sets group and permission
 verifySetAcl(TEST_USER_1, TEST_DIR_URI, null, TEST_USER_2.getGroup(), (short) 0777, true);
 FileInfo fileInfo = mFileSystemMaster
   .getFileInfo(mFileSystemMaster.getFileId(new AlluxioURI(TEST_DIR_FILE_URI)));
 assertEquals(TEST_USER_2.getGroup(), fileInfo.getGroup());
 assertEquals((short) 0777, fileInfo.getMode());
}
origin: Alluxio/alluxio

.addAllBlockIds(fileInfo.getBlockIds())
.setLastModificationTimeMs(fileInfo.getLastModificationTimeMs()).setTtl(fileInfo.getTtl())
.setOwner(fileInfo.getOwner()).setGroup(fileInfo.getGroup()).setMode(fileInfo.getMode())
.setPersistenceState(fileInfo.getPersistenceState()).setMountPoint(fileInfo.isMountPoint())
.addAllFileBlockInfos(fileBlockInfos)
origin: Alluxio/alluxio

private void verifySetAcl(TestUser runUser, String path, String owner, String group,
  short mode, boolean recursive) throws Exception {
 try (Closeable r = new AuthenticatedUserRule(runUser.getUser(),
   ServerConfiguration.global()).toResource()) {
  SetAttributeContext context = SetAttributeContext.defaults(SetAttributePOptions.newBuilder()
    .setMode(new Mode(mode).toProto()).setRecursive(recursive));
  if (owner != null) {
   context.getOptions().setOwner(owner);
  }
  if (group != null) {
   context.getOptions().setGroup(group);
  }
  mFileSystemMaster.setAttribute(new AlluxioURI(path), context);
 }
 try (Closeable r = new AuthenticatedUserRule(TEST_USER_ADMIN.getUser(),
   ServerConfiguration.global()).toResource()) {
  FileInfo fileInfo =
    mFileSystemMaster.getFileInfo(mFileSystemMaster.getFileId(new AlluxioURI(path)));
  if (owner != null) {
   assertEquals(owner, fileInfo.getOwner());
  }
  if (group != null) {
   assertEquals(group, fileInfo.getGroup());
  }
  if (mode != -1) {
   assertEquals(mode, fileInfo.getMode());
  }
 }
}
origin: Alluxio/alluxio

Assert.assertEquals(a.getFileBlockInfos(), b.getFileBlockInfos());
Assert.assertEquals(a.getFileId(), b.getFileId());
Assert.assertEquals(a.getGroup(), b.getGroup());
Assert.assertEquals(a.getLastModificationTimeMs(), b.getLastModificationTimeMs());
Assert.assertEquals(a.getLength(), b.getLength());
origin: org.alluxio/alluxio-core-common

/**
 * @return the group that owns the entity referenced by this uri, mutable
 */
public String getGroup() {
 return mInfo.getGroup();
}
origin: Alluxio/alluxio

  fileInfo.getCreationTimeMs());
Assert.assertEquals(uriStatus.getFileId(), fileInfo.getFileId());
Assert.assertEquals(uriStatus.getGroup(), fileInfo.getGroup());
Assert.assertEquals(uriStatus.getInMemoryPercentage(),
  fileInfo.getInMemoryPercentage());
alluxio.wireFileInfogetGroup

Popular methods of FileInfo

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

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Top Vim plugins
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