/** {@inheritDoc} */ @Override public OutputStream create(IgfsPath path, boolean overwrite) throws IgniteException { return igfs.create(path, overwrite); }
/** {@inheritDoc} */ @Override public OutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, @Nullable Map<String, String> props) throws IgniteException { return igfs.create(path, bufSize, overwrite, replication, blockSize, props); }
@Override public HadoopIgfsStreamDelegate apply() { IgfsOutputStream stream = igfs.create(path, bufSize, overwrite, colocate ? igfs.nextAffinityKey() : null, replication, blockSize, props); return new HadoopIgfsStreamDelegate(HadoopIgfsInProc.this, stream); } });
/** {@inheritDoc} */ @Override public OutputStream openOutputStream(String path, boolean append) throws IOException { IgfsPath igfsPath = new IgfsPath(path); final IgfsOutputStream igfsOutputStream; if (append) igfsOutputStream = igfsEx.append(igfsPath, true/*create*/); else igfsOutputStream = igfsEx.create(igfsPath, true/*overwrite*/); return igfsOutputStream; }
PrintWriter testInputFileWriter = new PrintWriter(igfs.create(new IgfsPath(path), true));
/** * Create the file in the given IGFS and write provided data chunks to it. * * @param igfs IGFS. * @param file File. * @param overwrite Overwrite flag. * @param chunks Data chunks. * @throws IOException In case of IO exception. */ protected static void createFile(IgfsEx igfs, IgfsPath file, boolean overwrite, @Nullable byte[]... chunks) throws IOException { OutputStream os = null; try { os = igfs.create(file, overwrite); writeFileChunks(os, chunks); } finally { U.closeQuiet(os); awaitFileClose(igfs, file); } }
try (PrintWriter pw = new PrintWriter(igfs.create(inFile, true))) { pw.println("hello0 world0"); pw.println("world1 hello1");
/** {@inheritDoc} */ @Override public OutputStream create(IgfsPath path, boolean overwrite) throws IgniteException { return igfs.create(path, overwrite); }
long streamId = registerResource(ses, igfs.create(
/** {@inheritDoc} */ @Override public OutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, @Nullable Map<String, String> props) throws IgniteException { return igfs.create(path, bufSize, overwrite, replication, blockSize, props); }
long streamId = registerResource(ses, igfs.create(