Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.FileSystem.makeQualified()


                fs.delete(transactionInfo, false);
                if (LOG.isDebugEnabled()) {
                    LOG.debug(MessageFormat.format(
                            "Finish deleting transaction info: job={0}, path={1}",
                            jobContext.getJobID(),
                            fs.makeQualified(transactionInfo)));
                }
            }
        }

        private void setCommitted(JobContext jobContext, boolean value) throws IOException {
View Full Code Here


            if (value) {
                if (LOG.isInfoEnabled()) {
                    LOG.info(MessageFormat.format(
                            "Creating commit mark: job={0}, path={1}",
                            jobContext.getJobID(),
                            fs.makeQualified(commitMark)));
                }
                fs.create(commitMark, false).close();
                if (LOG.isDebugEnabled()) {
                    LOG.debug(MessageFormat.format(
                            "Finish creating commit mark: job={0}, path={1}",
View Full Code Here

                fs.create(commitMark, false).close();
                if (LOG.isDebugEnabled()) {
                    LOG.debug(MessageFormat.format(
                            "Finish creating commit mark: job={0}, path={1}",
                            jobContext.getJobID(),
                            fs.makeQualified(commitMark)));
                }
            } else {
                if (LOG.isInfoEnabled()) {
                    LOG.info(MessageFormat.format(
                            "Deleting commit mark: job={0}, path={1}",
View Full Code Here

            } else {
                if (LOG.isInfoEnabled()) {
                    LOG.info(MessageFormat.format(
                            "Deleting commit mark: job={0}, path={1}",
                            jobContext.getJobID(),
                            fs.makeQualified(commitMark)));
                }
                fs.delete(commitMark, false);
                if (LOG.isDebugEnabled()) {
                    LOG.debug(MessageFormat.format(
                            "Finish deleting commit mark: job={0}, path={1}",
View Full Code Here

                fs.delete(commitMark, false);
                if (LOG.isDebugEnabled()) {
                    LOG.debug(MessageFormat.format(
                            "Finish deleting commit mark: job={0}, path={1}",
                            jobContext.getJobID(),
                            fs.makeQualified(commitMark)));
                }
            }
        }

        private boolean isCommitted(JobContext jobContext) throws IOException {
View Full Code Here

                attributes);
        Configuration conf = new Configuration();
        HadoopDataSourceProfile result = HadoopDataSourceProfile.convert(profile, conf);

        FileSystem defaultFs = FileSystem.get(conf);
        Path path = defaultFs.makeQualified(new Path(defaultFs.getWorkingDirectory(), "relative"));
        assertThat(result.getFileSystem().getCanonicalServiceName(), is(defaultFs.getCanonicalServiceName()));
        assertThat(result.getFileSystemPath(), is(path));
    }

    /**
 
View Full Code Here

    }

    @Override
    public Path resolve(Path file) throws IOException, InterruptedException {
        FileSystem fs = file.getFileSystem(configuration);
        Path qualified = fs.makeQualified(file);
        return doResolve(qualified);
    }

    private Path doResolve(Path sourcePath) throws IOException, InterruptedException {
        assert sourcePath.isAbsolute();
View Full Code Here

        try {
            if (basePath == null) {
                fs = FileSystem.get(conf);
            } else {
                fs = FileSystem.get(basePath.toUri(), conf);
                basePath = fs.makeQualified(basePath);
            }
        } catch (IOException e) {
            throw new BulkLoaderSystemException(e, CLASS, "TG-COMMON-00019", rawPaths);
        }
        List<Path> results = new ArrayList<Path>();
View Full Code Here

        List<Path> results = new ArrayList<Path>();
        for (String rawPath : rawPaths) {
            String resolved = variables.parse(rawPath, false);
            Path fullPath;
            if (basePath == null) {
                fullPath = fs.makeQualified(new Path(resolved));
            } else {
                fullPath = new Path(basePath, resolved);
            }
            results.add(fullPath);
        }
View Full Code Here

        VariableTable variables = createVariables(context);
        Configuration config = configurations.newInstance();
        FileSystem fs = FileSystem.get(config);
        for (String path : description.getPaths()) {
            String resolved = variables.parse(path, false);
            Path target = fs.makeQualified(new Path(resolved));
            LOG.debug("ファイルを削除しています: {}", target);
            boolean succeed = fs.delete(target, true);
            LOG.debug("ファイルを削除しました (succeed={}): {}", succeed, target);
        }
    }
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.