public byte[] readLongValue(Scanner scanner, int len) throws IOException { DataInputStream din = scanner.entry().getValueStream(); byte[] b = new byte[len]; din.readFully(b); din.close(); return b; }
public byte[] readLongValue(Scanner scanner, int len) throws IOException { DataInputStream din = scanner.entry().getValueStream(); byte[] b = new byte[len]; din.readFully(b); din.close(); return b; }
public byte[] readLongValue(Scanner scanner, int len) throws IOException { DataInputStream din = scanner.entry().getValueStream(); byte[] b = new byte[len]; din.readFully(b); din.close(); return b; }
/** * Parses the given file and stores the logs for each container in a file named after the container in the given. * outputFolder * * @param inputPath * @param outputFolder * @throws IOException */ void parseOneFile(final Path inputPath, final File outputFolder) throws IOException { try (final TFile.Reader.Scanner scanner = this.getScanner(inputPath)) { while (!scanner.atEnd()) { new LogFileEntry(scanner.entry()).write(outputFolder); scanner.advance(); } } }
/** * Parses the given file and writes its contents into the outputWriter for all logs in it. * * @param inputPath * @param outputWriter * @throws IOException */ void parseOneFile(final Path inputPath, final Writer outputWriter) throws IOException { try (final TFile.Reader.Scanner scanner = this.getScanner(inputPath)) { while (!scanner.atEnd()) { new LogFileEntry(scanner.entry()).write(outputWriter); scanner.advance(); } } }
@Override public void readFully(TreeMap<Slice, Slice> data) throws IOException { scanner.rewind(); for (; !scanner.atEnd(); scanner.advance()) { Entry en = scanner.entry(); int klen = en.getKeyLength(); int vlen = en.getValueLength(); byte[] key = new byte[klen]; byte[] value = new byte[vlen]; en.getKey(key); en.getValue(value); data.put(new Slice(key, 0, key.length), new Slice(value, 0, value.length)); } }
/** * Parses the given file and stores the logs for each container in a file named after the container in the given * outputFolder * * @param inputPath * @param outputFolder * @throws IOException */ void parseOneFile(final Path inputPath, final File outputFolder) throws IOException { try (final TFile.Reader.Scanner scanner = this.getScanner(inputPath)) { while (!scanner.atEnd()) { new LogFileEntry(scanner.entry()).write(outputFolder); scanner.advance(); } } }
/** * Parses the given file and writes its contents into the outputWriter for all logs in it. * * @param inputPath * @param outputWriter * @throws IOException */ void parseOneFile(final Path inputPath, final Writer outputWriter) throws IOException { try (final TFile.Reader.Scanner scanner = this.getScanner(inputPath)) { while (!scanner.atEnd()) { new LogFileEntry(scanner.entry()).write(outputWriter); scanner.advance(); } } }
@Override public boolean next() throws IOException { if (scanner.atEnd()) return false; Entry entry = scanner.entry(); keyLength = entry.getKeyLength(); checkKeyBuffer(keyLength); entry.getKey(keyBuffer); valueLength = entry.getValueLength(); checkValueBuffer(valueLength); entry.getValue(valueBuffer); scanner.advance(); return true; }
@Override public boolean next() throws IOException { if (scanner.atEnd()) return false; Entry entry = scanner.entry(); keyLength = entry.getKeyLength(); checkKeyBuffer(keyLength); entry.getKey(keyBuffer); valueLength = entry.getValueLength(); checkValueBuffer(valueLength); entry.getValue(valueBuffer); scanner.advance(); return true; }
public boolean next() throws IOException { if (scanner.atEnd()) return false; Entry entry = scanner.entry(); keyLength = entry.getKeyLength(); checkKeyBuffer(keyLength); entry.getKey(keyBuffer); valueLength = entry.getValueLength(); checkValueBuffer(valueLength); entry.getValue(valueBuffer); scanner.advance(); return true; }
public Entry next() throws IOException { TFile.Reader.Scanner.Entry entry = scanner.entry(); DataInputStream dis = entry.getKeyStream(); HistoryDataKey key = new HistoryDataKey(); key.readFields(dis); dis = entry.getValueStream(); byte[] value = new byte[entry.getValueLength()]; dis.read(value); scanner.advance(); return new Entry(key, value); }
public Entry next() throws IOException { TFile.Reader.Scanner.Entry entry = scanner.entry(); DataInputStream dis = entry.getKeyStream(); HistoryDataKey key = new HistoryDataKey(); key.readFields(dis); dis = entry.getValueStream(); byte[] value = new byte[entry.getValueLength()]; dis.read(value); scanner.advance(); return new Entry(key, value); }
public Entry next() throws IOException { TFile.Reader.Scanner.Entry entry = scanner.entry(); DataInputStream dis = entry.getKeyStream(); HistoryDataKey key = new HistoryDataKey(); key.readFields(dis); dis = entry.getValueStream(); byte[] value = new byte[entry.getValueLength()]; dis.read(value); scanner.advance(); return new Entry(key, value); }