make method name more unique
This commit is contained in:
@@ -121,7 +121,7 @@ public class BSFile implements AutoCloseable {
|
|||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(final long value) {
|
public void appendSingleValue(final long value) {
|
||||||
int bytesWritten = VariableByteEncoder.encodeInto(value, buffer.getBuffer(), offsetInBuffer);
|
int bytesWritten = VariableByteEncoder.encodeInto(value, buffer.getBuffer(), offsetInBuffer);
|
||||||
|
|
||||||
if (bytesWritten == 0) {
|
if (bytesWritten == 0) {
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ public class LongStreamFile implements AutoCloseable {
|
|||||||
return new LongStreamFile(bsFile);
|
return new LongStreamFile(bsFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(final long value) throws IOException {
|
public void appendSingleValue(final long value) throws IOException {
|
||||||
|
|
||||||
bsFile.append(value);
|
bsFile.appendSingleValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stream<LongList> streamOfLongLists() {
|
public Stream<LongList> streamOfLongLists() {
|
||||||
|
|||||||
@@ -51,13 +51,13 @@ public class BSFileTest {
|
|||||||
blockOffset = bsFile.getRootBlockOffset();
|
blockOffset = bsFile.getRootBlockOffset();
|
||||||
|
|
||||||
for (long i = 0; i < numLongs / 2; i++) {
|
for (long i = 0; i < numLongs / 2; i++) {
|
||||||
bsFile.append(i);
|
bsFile.appendSingleValue(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try (final BSFile bsFile = BSFile.existingFile(blockOffset, ds, NullCustomizer.INSTANCE)) {
|
try (final BSFile bsFile = BSFile.existingFile(blockOffset, ds, NullCustomizer.INSTANCE)) {
|
||||||
|
|
||||||
for (long i = numLongs / 2; i < numLongs; i++) {
|
for (long i = numLongs / 2; i < numLongs; i++) {
|
||||||
bsFile.append(i);
|
bsFile.appendSingleValue(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,7 @@ public class BSFileTest {
|
|||||||
// will produce 1,2 and 3 byte sequences when encoded
|
// will produce 1,2 and 3 byte sequences when encoded
|
||||||
final long value = random.nextLong(32768);
|
final long value = random.nextLong(32768);
|
||||||
listOfValues.add(value);
|
listOfValues.add(value);
|
||||||
bsFile.append(value);
|
bsFile.appendSingleValue(value);
|
||||||
}
|
}
|
||||||
expected.put(bsFile.getRootBlockOffset(), listOfValues);
|
expected.put(bsFile.getRootBlockOffset(), listOfValues);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public class DataStore implements AutoCloseable {
|
|||||||
|
|
||||||
try (final LongStreamFile docIdsOfTag = diskStorage.streamExistingFile(diskStoreOffsetForDocIdsOfTag,
|
try (final LongStreamFile docIdsOfTag = diskStorage.streamExistingFile(diskStoreOffsetForDocIdsOfTag,
|
||||||
partitionId)) {
|
partitionId)) {
|
||||||
docIdsOfTag.append(docId);
|
docIdsOfTag.appendSingleValue(docId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user