public String toString(boolean showContents) { StringBuilder str = new StringBuilder(); str.append('['); str.append(getFileName()); str.append(" in "); str.append(replicas.getDirectories()); str.append(']'); if (showContents) { str.append(System.lineSeparator()); str.append("Files and contents follow:"); str.append(System.lineSeparator()); replicas.printContentsWithAnyErrors(str); } return str.toString(); }
public String toString(boolean showContents) { StringBuilder str = new StringBuilder(); str.append('['); str.append(getFileName()); str.append(" in "); str.append(replicas.getDirectories()); str.append(']'); if (showContents) { str.append(System.lineSeparator()); str.append("Files and contents follow:"); str.append(System.lineSeparator()); replicas.printContentsWithAnyErrors(str); } return str.toString(); }
Map<SSTable, LogRecord> makeRecords(Type type, Iterable<SSTableReader> tables) { assert type == Type.ADD || type == Type.REMOVE; for (SSTableReader sstable : tables) { File directory = sstable.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); } return LogRecord.make(type, tables); }
private LogRecord makeRecord(Type type, SSTable table) { assert type == Type.ADD || type == Type.REMOVE; File directory = table.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); return LogRecord.make(type, table); }
private LogRecord makeRecord(Type type, SSTable table) { assert type == Type.ADD || type == Type.REMOVE; File directory = table.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); return LogRecord.make(type, table); }
public String toString(boolean showContents) { StringBuilder str = new StringBuilder(); str.append('['); str.append(getFileName()); str.append(" in "); str.append(replicas.getDirectories()); str.append(']'); if (showContents) { str.append(System.lineSeparator()); str.append("Files and contents follow:"); str.append(System.lineSeparator()); replicas.printContentsWithAnyErrors(str); } return str.toString(); }
public String toString(boolean showContents) { StringBuilder str = new StringBuilder(); str.append('['); str.append(getFileName()); str.append(" in "); str.append(replicas.getDirectories()); str.append(']'); if (showContents) { str.append(System.lineSeparator()); str.append("Files and contents follow:"); str.append(System.lineSeparator()); replicas.printContentsWithAnyErrors(str); } return str.toString(); }
Map<SSTable, LogRecord> makeRecords(Type type, Iterable<SSTableReader> tables) { assert type == Type.ADD || type == Type.REMOVE; for (SSTableReader sstable : tables) { File directory = sstable.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); } return LogRecord.make(type, tables); }
private LogRecord makeRecord(Type type, SSTable table) { assert type == Type.ADD || type == Type.REMOVE; File directory = table.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); return LogRecord.make(type, table); }
/** * this version of makeRecord takes an existing LogRecord and converts it to a * record with the given type. This avoids listing the directory and if the * LogRecord already exists, we have all components for the sstable */ private LogRecord makeRecord(Type type, SSTable table, LogRecord record) { assert type == Type.ADD || type == Type.REMOVE; File directory = table.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); return record.asType(type); }
private Collection<LogRecord> makeRecords(Type type, Iterable<SSTableReader> tables) { assert type == Type.ADD || type == Type.REMOVE; for (SSTableReader sstable : tables) { File directory = sstable.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); } return LogRecord.make(type, tables); }
/** * this version of makeRecord takes an existing LogRecord and converts it to a * record with the given type. This avoids listing the directory and if the * LogRecord already exists, we have all components for the sstable */ private LogRecord makeRecord(Type type, SSTable table, LogRecord record) { assert type == Type.ADD || type == Type.REMOVE; File directory = table.descriptor.directory; String fileName = StringUtils.join(directory, File.separator, getFileName()); replicas.maybeCreateReplica(directory, fileName, records); return record.asType(type); }