Examples of InvalidPathException


Examples of org.apache.hadoop.fs.InvalidPathException

   */
  public String getUriPath(final Path p) {
    checkPath(p);
    String s = p.toUri().getPath();
    if (!isValidName(s)) {
      throw new InvalidPathException("Path part " + s + " from URI " + p
          + " is not a valid filename.");
    }
    return s;
  }
View Full Code Here

Examples of org.apache.hadoop.fs.InvalidPathException

    }
    if (isInSafeMode()) {
      throw new SafeModeException("Cannot create symlink " + link, safeMode);
    }
    if (!DFSUtil.isValidName(link)) {
      throw new InvalidPathException("Invalid file name: " + link);
    }
    if (!dir.isValidToCreate(link)) {
      throw new IOException("failed to create link " + link
          +" either because the filename is invalid or the file exists");
    }
View Full Code Here

Examples of org.apache.hadoop.fs.InvalidPathException

    }
    if (isInSafeMode()) {
      throw new SafeModeException("Cannot create file" + src, safeMode);
    }
    if (!DFSUtil.isValidName(src)) {
      throw new InvalidPathException(src);
    }

    // Verify that the destination does not exist as a directory already.
    boolean pathExists = dir.exists(src);
    if (pathExists && dir.isDir(src)) {
View Full Code Here

Examples of org.apache.hadoop.fs.InvalidPathException

    assert hasWriteLock();
    if (isInSafeMode()) {
      throw new SafeModeException("Cannot rename " + src, safeMode);
    }
    if (!DFSUtil.isValidName(dst)) {
      throw new InvalidPathException("Invalid name: " + dst);
    }
    if (isPermissionEnabled) {
      checkParentAccess(pc, src, FsAction.WRITE);
      checkAncestorAccess(pc, dst, FsAction.WRITE);
    }
View Full Code Here

Examples of org.apache.hadoop.fs.InvalidPathException

    throws AccessControlException, UnresolvedLinkException {
    FSPermissionChecker pc = getPermissionChecker();
    readLock();
    try {
      if (!DFSUtil.isValidName(src)) {
        throw new InvalidPathException("Invalid file name: " + src);
      }
      if (isPermissionEnabled) {
        checkTraverse(pc, src);
      }
      return dir.getFileInfo(src, resolveLink);
View Full Code Here

Examples of org.apache.hadoop.fs.InvalidPathException

      // all the users of mkdirs() are used to expect 'true' even if
      // a new directory is not created.
      return true;
    }
    if (!DFSUtil.isValidName(src)) {
      throw new InvalidPathException(src);
    }
    if (isPermissionEnabled) {
      checkAncestorAccess(pc, src, FsAction.WRITE);
    }
    if (!createParent) {
View Full Code Here

Examples of org.apache.hadoop.fs.InvalidPathException

    if (thatScheme == null) {
      if (thatAuthority == null) {
        if (path.isUriPathAbsolute()) {
          return;
        }
        throw new InvalidPathException("relative paths not allowed:" +
            path);
      } else {
        throw new InvalidPathException(
            "Path without scheme with non-null autorhrity:" + path);
      }
    }
    String thisScheme = this.getUri().getScheme();
    String thisAuthority = this.getUri().getAuthority();
   
    // Schemes and authorities must match.
    // Allow for null Authority for file:///
    if (!thisScheme.equalsIgnoreCase(thatScheme) ||
       (thisAuthority != null &&
            !thisAuthority.equalsIgnoreCase(thatAuthority)) ||
       (thisAuthority == null && thatAuthority != null)) {
      throw new InvalidPathException("Wrong FS: " + path + ", expected: "
          + this.getUri());
    }
   
    int thisPort = this.getUri().getPort();
    int thatPort = path.toUri().getPort();
    if (thatPort == -1) { // -1 => defaultPort of Uri scheme
      thatPort = this.getUriDefaultPort();
    }
    if (thisPort != thatPort) {
      throw new InvalidPathException("Wrong FS: " + path + ", expected: "
          + this.getUri());
    }
  }
View Full Code Here

Examples of org.hibernate.hql.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim) ) {
        throw new InvalidPathException( "subclass test not allowed for null or not null discriminator: '" + text + "'" );
      }
      else {
        setSQLValue( node, text, discrim ); //the class discriminator value
      }
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      else {
        setConstantValue( node, text, value );
      }
    }
View Full Code Here

Examples of org.hibernate.hql.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim) ) {
        throw new InvalidPathException( "subclass test not allowed for null or not null discriminator: '" + text + "'" );
      }
      else {
        setSQLValue( node, text, discrim ); //the class discriminator value
      }
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      else {
        setConstantValue( node, text, value );
      }
    }
View Full Code Here

Examples of org.hibernate.hql.ast.InvalidPathException

    if ( persister != null ) {
      // the name of an entity class
      final String discrim = persister.getDiscriminatorSQLValue();
      node.setDataType( persister.getDiscriminatorType() );
      if ( InFragment.NULL.equals(discrim) || InFragment.NOT_NULL.equals(discrim) ) {
        throw new InvalidPathException( "subclass test not allowed for null or not null discriminator: '" + text + "'" );
      }
      else {
        setSQLValue( node, text, discrim ); //the class discriminator value
      }
    }
    else {
      Object value = ReflectHelper.getConstantValue( text );
      if ( value == null ) {
        throw new InvalidPathException( "Invalid path: '" + text + "'" );
      }
      else {
        setConstantValue( node, text, value );
      }
    }
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.