Beispiel #1
0
func NewRecordIndexer(f *os.File) Indexer {
	return &record{
		f:     f,
		r:     multi.NewReader(f),
		Index: New(),
	}
}
Beispiel #2
0
func NewReader(f file.SectionReader) io.Reader {
	return &Reader{
		f:        f,
		r:        multi.NewReader(f),
		counter:  1,
		overflow: nil,
	}
}
Beispiel #3
0
func NewChunkRecordIndexer(f *os.File) Indexer {
	fi, _ := f.Stat()
	return &chunkRecord{
		f:     f,
		size:  fi.Size(),
		r:     multi.NewReader(f),
		Index: New(),
	}
}
Beispiel #4
0
func NewRecordIndexer(f *os.File, nType string, snFormat string, snIndexPath string) Indexer {
	return &record{
		f:     f,
		r:     multi.NewReader(f),
		t:     nType,
		snf:   snFormat,
		snp:   snIndexPath,
		Index: New(),
	}
}
Beispiel #5
0
// We pass our index instantiation function the data file that we will be
// creating an index to, the node type, and the format of the subset node
// index (if the node is of type subset, otherwise snFomrat == "")
func NewChunkRecordIndexer(f *os.File, nType string, snFormat string, snRecordIndexPath string) Indexer {
	fi, _ := f.Stat()
	return &chunkRecord{
		f:     f,
		r:     multi.NewReader(f),
		t:     nType,
		snf:   snFormat,
		snrp:  snRecordIndexPath,
		Index: New(),
		size:  fi.Size(),
	}
}