/** {@inheritDoc} */ @Override protected void setup(Context ctx) throws IOException, InterruptedException { X.println("___ Mapper: " + ctx.getTaskAttemptID()); String taskId = ctx.getTaskAttemptID().toString(); LocalFileSystem locFs = FileSystem.getLocal(ctx.getConfiguration()); String workDir = locFs.getWorkingDirectory().toString(); assertNull(taskWorkDirs.put(workDir, taskId)); }
@Test public void testRelativePathToAbsolutePath() throws IOException { LocalFileSystem localFileSystem = new LocalFileSystem(); Path actualPath = FileUtils.makeAbsolute(localFileSystem, new Path("relative/path")); Path expectedPath = new Path(localFileSystem.getWorkingDirectory(), "relative/path"); assertEquals(expectedPath.toString(), actualPath.toString()); Path absolutePath = new Path("/absolute/path"); Path unchangedPath = FileUtils.makeAbsolute(localFileSystem, new Path("/absolute/path")); assertEquals(unchangedPath.toString(), absolutePath.toString()); }
/** {@inheritDoc} */ @Override protected void setup(Context ctx) throws IOException, InterruptedException { X.println("___ Reducer: " + ctx.getTaskAttemptID()); String taskId = ctx.getTaskAttemptID().toString(); String workDir = FileSystem.getLocal(ctx.getConfiguration()).getWorkingDirectory().toString(); assertNull(taskWorkDirs.put(workDir, taskId)); }
Path outputDir = new Path(outputPath).makeQualified(localFileSystem.getUri(), localFileSystem.getWorkingDirectory()); byte[][] families = { FAMILY_A, FAMILY_B }; Table t = UTIL.createTable(sourceTable, families);
protected Path getDefaultWorkingDirectory() throws IOException { if (wd == null) wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory(); return wd; } }
protected Path getDefaultWorkingDirectory() throws IOException { if (wd == null) wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory(); return wd; }
@Override protected Path getDefaultWorkingDirectory() throws IOException { if (wd == null) wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory(); return wd; }
@Override protected Path getDefaultWorkingDirectory() throws IOException { if (wd == null) wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory(); return wd; }
@Override protected Path getDefaultWorkingDirectory() throws IOException { if (wd == null) wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory(); return wd; }
@Override protected Path getDefaultWorkingDirectory() throws IOException { if (wd == null) wd = FileSystem.getLocal(new Configuration()).getWorkingDirectory(); return wd; }
final String scheme = backupDir.toUri().getScheme(); if (scheme == null || "file".equals(scheme)) { backupDir = backupDir.makeQualified(URI.create("file:///"), FileSystem.getLocal(new Configuration()).getWorkingDirectory());
Path pathDst = new Path(local.getWorkingDirectory(), pathSrc.getName());
Path pathDst = new Path(local.getWorkingDirectory(), pathSrc.getName());
/** * Initializes the test. * @throws Exception if some errors were occurred */ @Before public void setUp() throws Exception { conf = new Configuration(); fs = FileSystem.getLocal(conf); workingDirectory = fs.getWorkingDirectory(); fs.setWorkingDirectory(new Path(folder.getRoot().getAbsoluteFile().toURI())); }
Path outputDir = new Path(outputPath).makeQualified(localFileSystem.getUri(), localFileSystem.getWorkingDirectory()); byte[][] families = { FAMILY_A, FAMILY_B }; Table t = UTIL.createTable(sourceTable, families);
Path outputDir = new Path(outputPath).makeQualified(localFileSystem.getUri(), localFileSystem.getWorkingDirectory()); byte[][] families = { FAMILY_A, FAMILY_B }; Table t = UTIL.createTable(sourceTable, families);
target = new Path(lfs.getWorkingDirectory(), dest);
target = new Path(lfs.getWorkingDirectory(), dest);
Path origDir = fileSys.getWorkingDirectory(); Path subdir = new Path(TEST_ROOT_DIR, "new"); try {
Path origDir = fileSys.getWorkingDirectory(); Path subdir = new Path(TEST_ROOT_DIR, "new"); try {