/** * Find a record and write the value to a file. * * @param key * @param uriOrPath * @param offset * @return false if record not found, true otherwise. * @throws IOException */ public boolean findAndExport(K key, String uriOrPath, long offset) throws IOException { FileSystem fs = null; Path p = null; if (uriOrPath != null) { final URI uri = convertToURI(uriOrPath); fs = getFileSystem(uri); p = new Path(uri.toString()); } return findAndExport(key, fs, p, offset); }
/** * Find a record and write the value to a file. * * @param key * @param uriOrPath * @param offset * @return false if record not found, true otherwise. * @throws IOException */ public boolean findAndExport(K key, String uriOrPath, long offset) throws IOException { FileSystem fs = null; Path p = null; if (uriOrPath != null) { final URI uri = convertToURI(uriOrPath); fs = getFileSystem(uri); p = new Path(uri.toString()); } return findAndExport(key, fs, p, offset); }
throw new UnsupportedOperationException("Not implemented yet"); } else { if (!utility.findAndExport(new Text(queryKey), outputPathOrUri, offset)) { if (offset == 0) System.err.format("Key '%s' was not found in the file.\n", queryKey);