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

How to use
isPinned
method
in
alluxio.wire.FileInfo

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

origin: Alluxio/alluxio

/**
 * @return whether the entity referenced by this uri is pinned, mutable
 */
public boolean isPinned() {
 return mInfo.isPinned();
}
origin: Alluxio/alluxio

/**
 * Tests the {@link FileSystemMaster#setAttribute(AlluxioURI, SetAttributeContext)} method and
 * that an exception is thrown when trying to set a TTL for a directory.
 */
@Test
public void setAttribute() throws Exception {
 mFileSystemMaster.createFile(NESTED_FILE_URI, mNestedFileContext);
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(NESTED_FILE_URI, GET_STATUS_CONTEXT);
 assertFalse(fileInfo.isPinned());
 assertEquals(Constants.NO_TTL, fileInfo.getTtl());
 // No State.
 mFileSystemMaster.setAttribute(NESTED_FILE_URI, SetAttributeContext.defaults());
 fileInfo = mFileSystemMaster.getFileInfo(NESTED_FILE_URI, GET_STATUS_CONTEXT);
 assertFalse(fileInfo.isPinned());
 assertEquals(Constants.NO_TTL, fileInfo.getTtl());
 // Just set pinned flag.
 mFileSystemMaster.setAttribute(NESTED_FILE_URI,
   SetAttributeContext.defaults(SetAttributePOptions.newBuilder().setPinned(true)));
 fileInfo = mFileSystemMaster.getFileInfo(NESTED_FILE_URI, GET_STATUS_CONTEXT);
 assertTrue(fileInfo.isPinned());
 assertEquals(Constants.NO_TTL, fileInfo.getTtl());
 // Both pinned flag and ttl value.
 mFileSystemMaster.setAttribute(NESTED_FILE_URI,
   SetAttributeContext.defaults(SetAttributePOptions.newBuilder().setPinned(false).setTtl(1)));
 fileInfo = mFileSystemMaster.getFileInfo(NESTED_FILE_URI, GET_STATUS_CONTEXT);
 assertFalse(fileInfo.isPinned());
 assertEquals(1, fileInfo.getTtl());
 mFileSystemMaster.setAttribute(NESTED_URI,
   SetAttributeContext.defaults(SetAttributePOptions.newBuilder().setTtl(1)));
}
origin: Alluxio/alluxio

private SetAttributePOptions verifySetState(TestUser user, String path,
  SetAttributePOptions options) throws Exception {
 try (Closeable r = new AuthenticatedUserRule(user.getUser(),
   ServerConfiguration.global()).toResource()) {
  mFileSystemMaster.setAttribute(new AlluxioURI(path),
    SetAttributeContext.defaults(options.toBuilder()));
  FileInfo fileInfo = mFileSystemMaster.getFileInfo(new AlluxioURI(path),
    GetStatusContext.defaults());
  return FileSystemMasterOptions.setAttributesDefaults().toBuilder()
    .setPinned(fileInfo.isPinned()).setTtl(fileInfo.getTtl())
    .setPersisted(fileInfo.isPersisted()).build();
 }
}
origin: Alluxio/alluxio

.setBlockSizeBytes(fileInfo.getBlockSizeBytes())
.setCreationTimeMs(fileInfo.getCreationTimeMs()).setCompleted(fileInfo.isCompleted())
.setFolder(fileInfo.isFolder()).setPinned(fileInfo.isPinned())
.setCacheable(fileInfo.isCacheable()).setPersisted(fileInfo.isPersisted())
.addAllBlockIds(fileInfo.getBlockIds())
origin: Alluxio/alluxio

 /**
  * Tests the {@link MutableInodeDirectory#generateClientFileInfo(String)} method.
  */
 @Test
 public void generateClientFileInfo() {
  MutableInodeDirectory inodeDirectory = createInodeDirectory();
  String path = "/test/path";
  FileInfo info = inodeDirectory.generateClientFileInfo(path);
  Assert.assertEquals(inodeDirectory.getId(), info.getFileId());
  Assert.assertEquals(inodeDirectory.getName(), info.getName());
  Assert.assertEquals(path, info.getPath());
  Assert.assertEquals("", info.getUfsPath());
  Assert.assertEquals(0, info.getLength());
  Assert.assertEquals(0, info.getBlockSizeBytes());
  Assert.assertEquals(inodeDirectory.getCreationTimeMs(), info.getCreationTimeMs());
  Assert.assertTrue(info.isCompleted());
  Assert.assertTrue(info.isFolder());
  Assert.assertEquals(inodeDirectory.isPinned(), info.isPinned());
  Assert.assertFalse(info.isCacheable());
  Assert.assertNotNull(info.getBlockIds());
  Assert.assertEquals(inodeDirectory.getLastModificationTimeMs(),
    info.getLastModificationTimeMs());
 }
}
origin: org.alluxio/alluxio-core-common

/**
 * @return whether the entity referenced by this uri is pinned, mutable
 */
public boolean isPinned() {
 return mInfo.isPinned();
}
origin: org.alluxio/alluxio-core-client-internal

/**
 * @return whether the entity referenced by this uri is pinned, mutable
 */
public boolean isPinned() {
 return mInfo.isPinned();
}
origin: Alluxio/alluxio

Assert.assertEquals(a.isMountPoint(), b.isMountPoint());
Assert.assertEquals(a.isPersisted(), b.isPersisted());
Assert.assertEquals(a.isPinned(), b.isPinned());
Assert.assertEquals(a.getInAlluxioPercentage(), b.getInAlluxioPercentage());
Assert.assertEquals(a.getAcl(), b.getAcl());
origin: Alluxio/alluxio

Assert.assertEquals(uriStatus.isFolder(), fileInfo.isFolder());
Assert.assertEquals(uriStatus.isPersisted(), fileInfo.isPersisted());
Assert.assertEquals(uriStatus.isPinned(), fileInfo.isPinned());
Assert.assertEquals(uriStatus.isMountPoint(), fileInfo.isMountPoint());
Assert.assertEquals(uriStatus.getFileBlockInfos(),
alluxio.wireFileInfoisPinned

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 PhpStorm 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