big-sequence-file

a big file providing sequential data access.

License

License

GroupId

GroupId

com.github.downgoon
ArtifactId

ArtifactId

big-sequence-file
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

big-sequence-file
a big file providing sequential data access.
Project URL

Project URL

http://github.com/downgoon/big-sequence-file
Source Code Management

Source Code Management

http://github.com/downgoon/big-sequence-file

Download big-sequence-file

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.downgoon/big-sequence-file/ -->
<dependency>
    <groupId>com.github.downgoon</groupId>
    <artifactId>big-sequence-file</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.downgoon/big-sequence-file/
implementation 'com.github.downgoon:big-sequence-file:0.1.0'
// https://jarcasting.com/artifacts/com.github.downgoon/big-sequence-file/
implementation ("com.github.downgoon:big-sequence-file:0.1.0")
'com.github.downgoon:big-sequence-file:jar:0.1.0'
<dependency org="com.github.downgoon" name="big-sequence-file" rev="0.1.0">
  <artifact name="big-sequence-file" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.downgoon', module='big-sequence-file', version='0.1.0')
)
libraryDependencies += "com.github.downgoon" % "big-sequence-file" % "0.1.0"
[com.github.downgoon/big-sequence-file "0.1.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.4

Project Modules

There are no modules declared in this project.

big-sequence-file

a big file, similar to java embedded implementation of kafka, providing sequential data access.

QuickStart

  • Sample Code
BigSequenceFile bsf = null;

try {
  bsf = new BigSequenceFile("hello.bsf");
  bsf.open();

  bsf.appendTrunk("abc".getBytes());
  bsf.appendTrunk("def".getBytes());
  bsf.appendTrunk("g".getBytes());

  byte[] trunk = bsf.deductTrunk();
  System.out.println(new String(trunk));

} finally {
  if (bsf != null) {
    bsf.close();
  }
}

for more infomation, please read QuickStart.java example.

  • maven dependency
<dependency>
  <groupId>com.github.downgoon</groupId>
  <artifactId>big-sequence-file</artifactId>
  <version>0.1.0</version>
</dependency>
  • underlying structure

when we new two '.bsf' files: new BigSequenceFile("hello.bsf") and new BigSequenceFile("world.bsf"), the underlying files may look like as follows:

$ tree .
├── hello.bsf
├── hello_0.seg
├── world.bsf
├── world_0.seg
├── world_1.seg
└── world_2.seg

the .bsf file manages meta info of the user namespaced bsf file (e.g. hello.bsf), while multipule .seg files store data info. in general, a BSF file always consists of only one .bsf and several .seg files in underlying storage layer.

For Developers

Versions

Version
0.1.0