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

How to use
getBlockIds
method
in
alluxio.wire.FileInfo

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

origin: Alluxio/alluxio

/**
 * @return a list of block ids belonging to the file, empty for directories, immutable
 */
public List<Long> getBlockIds() {
 return mInfo.getBlockIds();
}
origin: Alluxio/alluxio

/**
 * Tests the {@link FileSystemMaster#getNewBlockIdForFile(AlluxioURI)} method.
 */
@Test
public void getNewBlockIdForFile() throws Exception {
 mFileSystemMaster.createFile(NESTED_FILE_URI, mNestedFileContext);
 long blockId = mFileSystemMaster.getNewBlockIdForFile(NESTED_FILE_URI);
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(NESTED_FILE_URI, GET_STATUS_CONTEXT);
 assertEquals(Lists.newArrayList(blockId), fileInfo.getBlockIds());
}
origin: Alluxio/alluxio

/**
 * Tests that lost files can successfully be detected.
 */
@Test
public void lostFilesDetection() throws Exception {
 createFileWithSingleBlock(NESTED_FILE_URI);
 long fileId = mFileSystemMaster.getFileId(NESTED_FILE_URI);
 FileInfo fileInfo = mFileSystemMaster.getFileInfo(fileId);
 mBlockMaster.reportLostBlocks(fileInfo.getBlockIds());
 assertEquals(PersistenceState.NOT_PERSISTED.name(), fileInfo.getPersistenceState());
 // Check with getPersistenceState.
 assertEquals(PersistenceState.NOT_PERSISTED,
   mFileSystemMaster.getPersistenceState(fileId));
 // run the detector
 HeartbeatScheduler.execute(HeartbeatContext.MASTER_LOST_FILES_DETECTION);
 fileInfo = mFileSystemMaster.getFileInfo(fileId);
 assertEquals(PersistenceState.LOST.name(), fileInfo.getPersistenceState());
 // Check with getPersistenceState.
 assertEquals(PersistenceState.LOST, mFileSystemMaster.getPersistenceState(fileId));
}
origin: Alluxio/alluxio

.setFolder(fileInfo.isFolder()).setPinned(fileInfo.isPinned())
.setCacheable(fileInfo.isCacheable()).setPersisted(fileInfo.isPersisted())
.addAllBlockIds(fileInfo.getBlockIds())
.setLastModificationTimeMs(fileInfo.getLastModificationTimeMs()).setTtl(fileInfo.getTtl())
.setOwner(fileInfo.getOwner()).setGroup(fileInfo.getGroup()).setMode(fileInfo.getMode())
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-client-internal

/**
 * @return a list of block ids belonging to the file, empty for directories, immutable
 */
public List<Long> getBlockIds() {
 return mInfo.getBlockIds();
}
origin: Alluxio/alluxio

Assert.assertEquals(a.getBlockIds(), b.getBlockIds());
Assert.assertEquals(a.getBlockSizeBytes(), b.getBlockSizeBytes());
Assert.assertEquals(a.getCreationTimeMs(), b.getCreationTimeMs());
origin: org.alluxio/alluxio-core-common

/**
 * @return a list of block ids belonging to the file, empty for directories, immutable
 */
public List<Long> getBlockIds() {
 return mInfo.getBlockIds();
}
origin: Alluxio/alluxio

FileInfo fileInfo = FileInfoTest.createRandom();
URIStatus uriStatus = new URIStatus(fileInfo);
Assert.assertEquals(uriStatus.getBlockIds(), fileInfo.getBlockIds());
Assert.assertEquals(uriStatus.getBlockSizeBytes(),
  fileInfo.getBlockSizeBytes());
alluxio.wireFileInfogetBlockIds

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,
  • 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
  • Github Copilot alternatives
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