List of usage examples for org.apache.hadoop.fs InvalidPathException InvalidPathException
public InvalidPathException(final String path)
From source file:org.apache.carbondata.hive.MapredCarbonInputFormat.java
License:Apache License
/** * this method will read the schema from the physical file and populate into CARBON_TABLE * * @param configuration// ww w.j ava2 s. co m * @throws IOException */ private static void populateCarbonTable(Configuration configuration, String paths) throws IOException, InvalidConfigurationException { String dirs = configuration.get(INPUT_DIR, ""); String[] inputPaths = StringUtils.split(dirs); String validInputPath = null; if (inputPaths.length == 0) { throw new InvalidPathException("No input paths specified in job"); } else { if (paths != null) { for (String inputPath : inputPaths) { if (paths.startsWith(inputPath.replace("file:", ""))) { validInputPath = inputPath; break; } } } } if (null != validInputPath) { AbsoluteTableIdentifier absoluteTableIdentifier = AbsoluteTableIdentifier.from(validInputPath, getDatabaseName(configuration), getTableName(configuration)); // read the schema file to get the absoluteTableIdentifier having the correct table id // persisted in the schema CarbonTable carbonTable = SchemaReader.readCarbonTableFromStore(absoluteTableIdentifier); configuration.set(CARBON_TABLE, ObjectSerializationUtil.convertObjectToString(carbonTable)); setTableInfo(configuration, carbonTable.getTableInfo()); } else { throw new InvalidPathException("No input paths specified in job"); } }
From source file:org.apache.ignite.hadoop.fs.v1.IgniteHadoopFileSystem.java
License:Apache License
/** {@inheritDoc} */ @Override//from ww w. ja va 2s . com protected void checkPath(Path path) { URI uri = path.toUri(); if (uri.isAbsolute()) { if (!F.eq(uri.getScheme(), IGFS_SCHEME)) throw new InvalidPathException( "Wrong path scheme [expected=" + IGFS_SCHEME + ", actual=" + uri.getAuthority() + ']'); if (!F.eq(uri.getAuthority(), uriAuthority)) throw new InvalidPathException( "Wrong path authority [expected=" + uriAuthority + ", actual=" + uri.getAuthority() + ']'); } }
From source file:org.apache.ignite.hadoop.fs.v2.IgniteHadoopFileSystem.java
License:Apache License
/** {@inheritDoc} */ @Override// w w w .jav a 2 s. c om public void checkPath(Path path) { URI uri = path.toUri(); if (uri.isAbsolute()) { if (!F.eq(uri.getScheme(), IGFS_SCHEME)) throw new InvalidPathException( "Wrong path scheme [expected=" + IGFS_SCHEME + ", actual=" + uri.getAuthority() + ']'); if (!F.eq(uri.getAuthority(), uriAuthority)) throw new InvalidPathException( "Wrong path authority [expected=" + uriAuthority + ", actual=" + uri.getAuthority() + ']'); } }
From source file:org.gridgain.grid.ggfs.hadoop.v1.GridGgfsHadoopFileSystem.java
License:Open Source License
/** {@inheritDoc} */ @Override/*w w w . ja va 2 s . c o m*/ protected void checkPath(Path path) { URI uri = path.toUri(); if (uri.isAbsolute()) { if (!F.eq(uri.getScheme(), GGFS_SCHEME)) throw new InvalidPathException( "Wrong path scheme [expected=" + GGFS_SCHEME + ", actual=" + uri.getAuthority() + ']'); if (!F.eq(uri.getAuthority(), uriAuthority)) throw new InvalidPathException( "Wrong path authority [expected=" + uriAuthority + ", actual=" + uri.getAuthority() + ']'); } }
From source file:org.gridgain.grid.ggfs.hadoop.v2.GridGgfsHadoopFileSystem.java
License:Open Source License
/** {@inheritDoc} */ @Override/* w w w.j a v a2s . c o m*/ public void checkPath(Path path) { URI uri = path.toUri(); if (uri.isAbsolute()) { if (!F.eq(uri.getScheme(), GGFS_SCHEME)) throw new InvalidPathException( "Wrong path scheme [expected=" + GGFS_SCHEME + ", actual=" + uri.getAuthority() + ']'); if (!F.eq(uri.getAuthority(), uriAuthority)) throw new InvalidPathException( "Wrong path authority [expected=" + uriAuthority + ", actual=" + uri.getAuthority() + ']'); } }