public Writer create() throws IOException { if ((path != null ? 1 : 0) + (ostream != null ? 1 : 0) != 1) { throw new AssertionError("Please specify exactly one of " + "filesystem/path or path"); } if (path != null) { ostream = AbstractHFileWriter.createOutputStream(conf, fs, path); } return createWriter(fs, path, ostream, blockSize, compression, encoder, comparator, checksumType, bytesPerChecksum); }
public Writer create() throws IOException { if ((path != null ? 1 : 0) + (ostream != null ? 1 : 0) != 1) { throw new AssertionError("Please specify exactly one of " + "filesystem/path or path"); } if (path != null) { ostream = AbstractHFileWriter.createOutputStream(conf, fs, path, favoredNodes); try { ostream.setDropBehind(shouldDropBehind && cacheConf.shouldDropBehindCompaction()); } catch (UnsupportedOperationException uoe) { if (LOG.isTraceEnabled()) LOG.trace("Unable to set drop behind on " + path, uoe); else if (LOG.isDebugEnabled()) LOG.debug("Unable to set drop behind on " + path); } } return createWriter(fs, path, ostream, comparator, fileContext); }