public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = path("/test/hadoop/file"); FSDataOutputStream out = fs.create(src); out.writeChar('H'); //write some data out.close(); out.close(); }
ofile.writeChar('\n');
ofile.writeChar('\n');
@Test public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = getTestRootPath(fSys, "test/hadoop/file"); FSDataOutputStream out = fSys.create(src); out.writeChar('H'); //write some data out.close(); out.close(); }
ofile.writeChar('\n');
@Test public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = getTestRootPath(fc, "test/hadoop/file"); FSDataOutputStream out = fc.create(src, EnumSet.of(CreateFlag.CREATE), Options.CreateOpts.createParent()); out.writeChar('H'); //write some data out.close(); out.close(); }
public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = path("/test/hadoop/file"); FSDataOutputStream out = fs.create(src); out.writeChar('H'); //write some data out.close(); out.close(); }
public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = path("/test/hadoop/file"); FSDataOutputStream out = fs.create(src); out.writeChar('H'); //write some data out.close(); out.close(); }
@Test public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = getTestRootPath(fSys, "test/hadoop/file"); FSDataOutputStream out = fSys.create(src); out.writeChar('H'); //write some data out.close(); out.close(); }
int label = (int) dataset.getLabel(instance); files[currents[label]].writeBytes(line); files[currents[label]].writeChar('\n');
@Test public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = getTestRootPath(fSys, "test/hadoop/file"); FSDataOutputStream out = fSys.create(src); out.writeChar('H'); //write some data out.close(); out.close(); }
int label = (int) dataset.getLabel(instance); files[currents[label]].writeBytes(line); files[currents[label]].writeChar('\n');
int label = (int) dataset.getLabel(instance); files[currents[label]].writeBytes(line); files[currents[label]].writeChar('\n');
@Test public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = getTestRootPath(fc, "test/hadoop/file"); FSDataOutputStream out = fc.create(src, EnumSet.of(CREATE), Options.CreateOpts.createParent()); out.writeChar('H'); //write some data out.close(); out.close(); }
@Test public void testOutputStreamClosedTwice() throws IOException { //HADOOP-4760 according to Closeable#close() closing already-closed //streams should have no effect. Path src = getTestRootPath(fc, "test/hadoop/file"); FSDataOutputStream out = fc.create(src, EnumSet.of(CREATE), Options.CreateOpts.createParent()); out.writeChar('H'); //write some data out.close(); out.close(); }
@Before public void initialize() throws Exception { conf = new Configuration(false); conf.set("fs.file.impl", LocalFileSystem.class.getName()); fs = FileSystem.getLocal(conf); testDir = new FileSystemTestHelper().getTestRootPath(fs); // don't want scheme on the path, just an absolute path testDir = new Path(fs.makeQualified(testDir).toUri().getPath()); FileSystem.setDefaultUri(conf, fs.getUri()); fs.setWorkingDirectory(testDir); fs.mkdirs(new Path("d1")); fs.mkdirs(new Path("d2")); fs.createNewFile(FROM); FSDataOutputStream output = fs.create(FROM, true); for(int i = 0; i < 100; ++i) { output.writeInt(i); output.writeChar('\n'); } output.close(); fs.setTimes(FROM, MODIFICATION_TIME, 0); fs.setPermission(FROM, PERMISSIONS); fs.setTimes(new Path("d1"), MODIFICATION_TIME, 0); fs.setPermission(new Path("d1"), PERMISSIONS); }
@Before public void initialize() throws Exception { conf = new Configuration(false); conf.set("fs.file.impl", LocalFileSystem.class.getName()); fs = FileSystem.getLocal(conf); testDir = new FileSystemTestHelper().getTestRootPath(fs); // don't want scheme on the path, just an absolute path testDir = new Path(fs.makeQualified(testDir).toUri().getPath()); FileSystem.setDefaultUri(conf, fs.getUri()); fs.setWorkingDirectory(testDir); fs.mkdirs(new Path("d1")); fs.mkdirs(new Path("d2")); fs.createNewFile(FROM); FSDataOutputStream output = fs.create(FROM, true); for(int i = 0; i < 100; ++i) { output.writeInt(i); output.writeChar('\n'); } output.close(); fs.setTimes(FROM, MODIFICATION_TIME, 0); fs.setPermission(FROM, PERMISSIONS); fs.setTimes(new Path("d1"), MODIFICATION_TIME, 0); fs.setPermission(new Path("d1"), PERMISSIONS); }