use of org.apache.hadoop.fs.InvalidPathException in project hadoop by apache.
the class TestINodeFile method testInvalidSymlinkTarget.
private void testInvalidSymlinkTarget(NamenodeProtocols nnRpc, String invalidTarget, String link) throws IOException {
try {
FsPermission perm = FsPermission.createImmutable((short) 0755);
nnRpc.createSymlink(invalidTarget, link, perm, false);
fail("Symbolic link creation of target " + invalidTarget + " should fail");
} catch (InvalidPathException expected) {
// Expected
}
}
use of org.apache.hadoop.fs.InvalidPathException in project carbondata by apache.
the class CarbonInputFormat method populateCarbonTable.
/**
* this method will read the schema from the physical file and populate into CARBON_TABLE
* @param configuration
* @throws IOException
*/
private static void populateCarbonTable(Configuration configuration) throws IOException {
String dirs = configuration.get(INPUT_DIR, "");
String[] inputPaths = StringUtils.split(dirs);
if (inputPaths.length == 0) {
throw new InvalidPathException("No input paths specified in job");
}
AbsoluteTableIdentifier absoluteTableIdentifier = AbsoluteTableIdentifier.fromTablePath(inputPaths[0]);
// read the schema file to get the absoluteTableIdentifier having the correct table id
// persisted in the schema
CarbonTable carbonTable = SchemaReader.readCarbonTableFromStore(absoluteTableIdentifier);
setCarbonTable(configuration, carbonTable);
}
Aggregations