Examples of FileStatus


Examples of com.intellij.openapi.vcs.FileStatus

        }

        Review review = project.getComponent(ReviewManager.class).getReviewByName(reviewName);
        if (review != null)
        {
          FileStatus fileStatus = retrieveFileStatus(review, vFile);
          textAttributes.setForegroundColor(fileStatus.getColor());
        }

        append(node.toString(), SimpleTextAttributes.fromTextAttributes(textAttributes));

        String oldToString = toString();
View Full Code Here

Examples of com.intellij.openapi.vcs.FileStatus

      if (vFile == null)
      {
        return FileStatus.NOT_CHANGED;
      }

      FileStatus fileStatus = FileStatusManager.getInstance(project).getStatus(vFile);
      return (fileStatus == null) ? FileStatus.NOT_CHANGED : fileStatus;
    }
View Full Code Here

Examples of eu.stratosphere.core.fs.FileStatus

    }

    // Check if the path is valid
    try {
      final FileSystem fs = this.path.getFileSystem();
      final FileStatus f = fs.getFileStatus(this.path);
      if (f == null) {
        throw new IOException(this.path.toString() + " led to a null object");
      }
    } catch (IOException e) {
      throw new IllegalConfigurationException("Cannot access file or directory: "
View Full Code Here

Examples of org.apache.flink.core.fs.FileStatus

 
  protected FileBaseStatistics getFileStats(FileBaseStatistics cachedStats, Path filePath, FileSystem fs,
      ArrayList<FileStatus> files) throws IOException {
   
    // get the file info and check whether the cached statistics are still valid.
    final FileStatus file = fs.getFileStatus(filePath);
    long latestModTime = file.getModificationTime();

    // enumerate all files and check their modification time stamp.
    if (file.isDir()) {
      FileStatus[] fss = fs.listStatus(filePath);
      files.ensureCapacity(fss.length);
     
      for (FileStatus s : fss) {
        if (!s.isDir()) {
View Full Code Here

Examples of org.apache.hadoop.fs.FileStatus

   * @return true if exists
   * @throws IOException
   */
  public static boolean isTableInfoExists(FileSystem fs, Path rootdir,
      String tableName) throws IOException {
    FileStatus status = getTableInfoPath(fs, rootdir, tableName);
    return status == null? false: fs.exists(status.getPath());
  }
View Full Code Here

Examples of org.apache.hadoop.fs.FileStatus

   * @throws IOException
   */
  static long getTableInfoModtime(final FileSystem fs, final Path rootdir,
      final String tableName)
  throws IOException {
    FileStatus status = getTableInfoPath(fs, rootdir, tableName);
    return status == null? 0: status.getModificationTime();
  }
View Full Code Here

Examples of org.apache.hadoop.fs.FileStatus

  }

  static TableDescriptorModtime getTableDescriptorModtime(FileSystem fs, Path tableDir)
  throws NullPointerException, IOException {
    if (tableDir == null) throw new NullPointerException();
    FileStatus status = getTableInfoPath(fs, tableDir);
    if (status == null) {
      throw new TableInfoMissingException("No .tableinfo file under "
          + tableDir.toUri());
    }
    FSDataInputStream fsDataInputStream = fs.open(status.getPath());
    HTableDescriptor hTableDescriptor = null;
    try {
      hTableDescriptor = new HTableDescriptor();
      hTableDescriptor.readFields(fsDataInputStream);
    } finally {
      fsDataInputStream.close();
    }
    return new TableDescriptorModtime(status.getModificationTime(), hTableDescriptor);
  }
View Full Code Here

Examples of org.apache.hadoop.fs.FileStatus

   * tests.
   */
  public static void deleteTableDescriptorIfExists(String tableName,
      Configuration conf) throws IOException {
    FileSystem fs = FSUtils.getCurrentFileSystem(conf);
    FileStatus status = getTableInfoPath(fs, FSUtils.getRootDir(conf), tableName);
    // The below deleteDirectory works for either file or directory.
    if (status != null && fs.exists(status.getPath())) {
      FSUtils.deleteDirectory(fs, status.getPath());
    }
  }
View Full Code Here

Examples of org.apache.hadoop.fs.FileStatus

   *         already exists and we weren't forcing the descriptor creation.
   * @throws IOException if a filesystem error occurs
   */
  public static boolean createTableDescriptorForTableDirectory(FileSystem fs, Path tabledir,
      HTableDescriptor htableDescriptor, boolean forceCreation) throws IOException {
    FileStatus status = getTableInfoPath(fs, tabledir);
    if (status != null) {
      LOG.info("Current tableInfoPath = " + status.getPath());
      if (!forceCreation) {
        if (fs.exists(status.getPath()) && status.getLen() > 0) {
          LOG.info("TableInfo already exists.. Skipping creation");
          return false;
        }
      }
    }
View Full Code Here

Examples of org.apache.hadoop.fs.FileStatus

   * from the given directory.
   * @throws IOException
   */
  private List<StoreFile> loadStoreFiles() throws IOException {
    ArrayList<StoreFile> results = new ArrayList<StoreFile>();
    FileStatus files[] = getStoreFiles();

    if (files == null || files.length == 0) {
      return results;
    }
    // initialize the thread pool for opening store files in parallel..
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.