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

How to use
PersistFile
in
alluxio.wire

Best Java code snippets using alluxio.wire.PersistFile (Showing top 3 results out of 315)

origin: Alluxio/alluxio

/**
 * @param persistFile wire type
 * @return proto representation of given wire type
 */
public static alluxio.grpc.PersistFile toProto(PersistFile persistFile) {
 return alluxio.grpc.PersistFile.newBuilder().setFileId(persistFile.getFileId())
   .addAllBlockIds(persistFile.getBlockIds()).build();
}
origin: Alluxio/alluxio

filesToPersist.add(new PersistFile(fileId, blockIds));
origin: Alluxio/alluxio

@Test
public void scheduleAsyncPersist() throws Exception {
 DefaultAsyncPersistHandler handler =
   new DefaultAsyncPersistHandler(new FileSystemMasterView(mFileSystemMaster));
 AlluxioURI path = new AlluxioURI("/test");
 long blockId = 0;
 long workerId = 1;
 long fileId = 2;
 List<FileBlockInfo> blockInfoList = new ArrayList<>();
 BlockLocation location = new BlockLocation().setWorkerId(workerId);
 blockInfoList.add(new FileBlockInfo().setBlockInfo(
   new BlockInfo().setBlockId(blockId).setLocations(Lists.newArrayList(location))));
 when(mFileSystemMaster.getFileBlockInfoList(path)).thenReturn(blockInfoList);
 when(mFileSystemMaster.getFileId(path)).thenReturn(fileId);
 when(mFileSystemMaster.getPath(fileId)).thenReturn(path);
 when(mFileSystemMaster.getFileInfo(fileId))
   .thenReturn(new FileInfo().setLength(1).setCompleted(true));
 handler.scheduleAsyncPersistence(path);
 List<PersistFile> persistFiles = handler.pollFilesToPersist(workerId);
 assertEquals(1, persistFiles.size());
 assertEquals(Lists.newArrayList(blockId), persistFiles.get(0).getBlockIds());
}
alluxio.wirePersistFile

Javadoc

Class to represent a file persist info.

Most used methods

  • getBlockIds
  • <init>
    Creates a new instance for persist file.
  • getFileId

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Table (org.hibernate.mapping)
    A relational table
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 12 Jupyter Notebook extensions
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