Tabnine Logo
UnderFileSystemUtils.touch
Code IndexAdd Tabnine to your IDE (free)

How to use
touch
method
in
alluxio.util.UnderFileSystemUtils

Best Java code snippets using alluxio.util.UnderFileSystemUtils.touch (Showing top 6 results out of 315)

origin: Alluxio/alluxio

UnderFileSystemUtils.touch(ufs, URIUtils.appendPath(mLocation,
  ServerConfiguration.get(PropertyKey.MASTER_FORMAT_FILE_PREFIX)
    + System.currentTimeMillis())
origin: Alluxio/alluxio

/**
 * Formats the journal.
 */
public void format() throws IOException {
 URI location = getLocation();
 LOG.info("Formatting {}", location);
 if (mUfs.isDirectory(location.toString())) {
  for (UfsStatus status : mUfs.listStatus(location.toString())) {
   String childPath = URIUtils.appendPathOrDie(location, status.getName()).toString();
   if (status.isDirectory()
     && !mUfs.deleteDirectory(childPath, DeleteOptions.defaults().setRecursive(true))
     || status.isFile() && !mUfs.deleteFile(childPath)) {
    throw new IOException(String.format("Failed to delete %s", childPath));
   }
  }
 } else if (!mUfs.mkdirs(location.toString())) {
  throw new IOException(String.format("Failed to create %s", location));
 }
 // Create a breadcrumb that indicates that the journal folder has been formatted.
 UnderFileSystemUtils.touch(mUfs, URIUtils.appendPathOrDie(location,
   ServerConfiguration.get(PropertyKey.MASTER_FORMAT_FILE_PREFIX) + System.currentTimeMillis())
   .toString());
}
origin: Alluxio/alluxio

UnderFileSystem ufs = UnderFileSystem.Factory.create(job.getTempUfsPath(),
  ServerConfiguration.global());
UnderFileSystemUtils.touch(ufs, job.getTempUfsPath());
origin: Alluxio/alluxio

UnderFileSystem ufs = UnderFileSystem.Factory.create(job.getTempUfsPath(),
  ServerConfiguration.global());
UnderFileSystemUtils.touch(ufs, job.getTempUfsPath());
origin: org.alluxio/alluxio-core-server-common

UnderFileSystemUtils.touch(ufs, URIUtils.appendPath(mLocation,
  Configuration.get(PropertyKey.MASTER_FORMAT_FILE_PREFIX) + System.currentTimeMillis())
  .toString());
origin: org.alluxio/alluxio-core-server-common

/**
 * Formats the journal.
 */
public void format() throws IOException {
 URI location = getLocation();
 LOG.info("Formatting {}", location);
 if (mUfs.isDirectory(location.toString())) {
  for (UfsStatus status : mUfs.listStatus(location.toString())) {
   String childPath = URIUtils.appendPathOrDie(location, status.getName()).toString();
   if (status.isDirectory()
     && !mUfs.deleteDirectory(childPath, DeleteOptions.defaults().setRecursive(true))
     || status.isFile() && !mUfs.deleteFile(childPath)) {
    throw new IOException(String.format("Failed to delete %s", childPath));
   }
  }
 } else if (!mUfs.mkdirs(location.toString())) {
  throw new IOException(String.format("Failed to create %s", location));
 }
 // Create a breadcrumb that indicates that the journal folder has been formatted.
 UnderFileSystemUtils.touch(mUfs, URIUtils.appendPathOrDie(location,
   Configuration.get(PropertyKey.MASTER_FORMAT_FILE_PREFIX) + System.currentTimeMillis())
   .toString());
}
alluxio.utilUnderFileSystemUtilstouch

Javadoc

Creates an empty file.

Popular methods of UnderFileSystemUtils

  • getBucketName
  • approximateContentHash
    Returns an approximate content hash, using the length and modification time.
  • deleteFileIfExists
    Deletes the specified path from the specified under file system if it is a file and exists.
  • isHdfs
  • deleteDirIfExists
    Deletes the directory at the given path if it exists.
  • isLocal
  • mkdirIfNotExists
    Attempts to create the directory if it does not already exist.

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
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